Giter Site home page Giter Site logo

Import Error about gittools HOT 11 CLOSED

internetwache avatar internetwache commented on August 22, 2024
Import Error

from gittools.

Comments (11)

gehaxelt avatar gehaxelt commented on August 22, 2024 1

Hi,
I'm sorry for the delay and I was wrong initially. The script is written for python3.

Could you try to run with with python3 gitfinder.py ?

from gittools.

gehaxelt avatar gehaxelt commented on August 22, 2024

Hi,
which python version are you using?
Did you try python2 ?

from gittools.

ITuser07 avatar ITuser07 commented on August 22, 2024

It's Python 2.7.12 will this one not work?

from gittools.

ITuser07 avatar ITuser07 commented on August 22, 2024

Thanks, that did seem to work. It's scanning and finishing now, I must be doing something wrong though as it's not outputting.

command = python3 gitfinder.py -i input.txt -o output.txt
Note: the input.txt file has one line in it that has http://www.mysite.com

from gittools.

gehaxelt avatar gehaxelt commented on August 22, 2024

Does your domain expose a ".git" repository?

Can you manually downlad http://www.mysite.com/.git/HEAD ?

from gittools.

ITuser07 avatar ITuser07 commented on August 22, 2024

Yep it does and yep I can. Does the output.txt file need to exist already then it just writes to it or does it actually create the file? I've tried it both ways and neither worked.

from gittools.

gehaxelt avatar gehaxelt commented on August 22, 2024

Hmm, that's strange. I think it should create the file automatically.

Can you send me an email with your domain?

from gittools.

ITuser07 avatar ITuser07 commented on August 22, 2024

I don't think it's the domain as I have tried 2 different ones. I would prefer not to give the address out sense the git is exposed.

Heres a snipit of my command:

~/GitTools/Finder$ python3 gitfinder.py -i domains.txt -o output.txt
Scanning...
Finished

inside the domains.txt file are 2 lines.
http://www.mysite.com
http://mysite2.com

both of them have exposed git directory's and directory listing is enabled.

from gittools.

gehaxelt avatar gehaxelt commented on August 22, 2024

Hi,
the python script appends http:// to all domains:

        req = urlopen('http://' + domain + "/.git/HEAD")

The input file should only contain domains, not full urls.
Removing http:// should help.

from gittools.

ITuser07 avatar ITuser07 commented on August 22, 2024

You hit the nail on the head. That was it. Thank you! :)

from gittools.

gehaxelt avatar gehaxelt commented on August 22, 2024

You're welcome!

from gittools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.