Closed ITuser07 closed 7 years ago
Hi,
which python version are you using?
Did you try python2
?
It's Python 2.7.12 will this one not work?
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
?
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
Does your domain expose a ".git" repository?
Can you manually downlad http://www.mysite.com/.git/HEAD
?
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.
Hmm, that's strange. I think it should create the file automatically.
Can you send me an email with your domain?
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.
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.
You hit the nail on the head. That was it. Thank you! :)
You're welcome!
Any idea why when trying to run python gitfinder.py it would be throwing the following error?