GitHacker
GitHacker copied to clipboard
Why does not work?
Hello.
root@debian:~# githacker --url https://www.target.com/.git/ --output-folder /home/test/
2022-10-13 20:50:21 INFO 1 urls to be exploited
2022-10-13 20:50:21 INFO Exploiting https://www.target.com/.git/ into /home/test/2885f055223ecdcc046def4094a3c5c6
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:849: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Traceback (most recent call last):
File "/usr/local/bin/githacker", line 10, in
Thanks for reporting, I will check it out soon.
same here
Could you please provide the .git/HEAD
file? It seems that there is a corner case that GitHacker didn't handle correctly. @LeandroVCastro @JacobOzn
Currently, GitHacker parses the .git/HEAD
file to get the current branch name using the RegExp (ref: refs/heads/([a-zA-Z\d_-]+)
). GitHacker asserts that the number of current branch name equals 1 (see code).
The content of .git/HEAD
file will be like the following block by default.
ref: refs/heads/master
But when the git repo checkouts to some commit (say c768909c5199e94b13d2bae023986a6817df840d
), the content of .git/HEAD
file will be like:
c768909c5199e94b13d2bae023986a6817df840d
Under that circumstance, the RegExp can not match any result, so the assertion will fail.
I will try to figure out how to fix this issue. Thanks a lot for reporting this bug.
I pushed a hotfix to remedy this bug.
Please check it out.
pip install -U git+https://github.com/WangYihang/GitHacker
I pushed a hotfix to remedy this bug.
Please check it out.
pip install -U git+https://github.com/WangYihang/GitHacker
not work too.
Traceback (most recent call last):
File "/home/xx/.local/bin/githacker", line 8, in
@yyg12345678910, thanks for reporting.
It sees that your /home/xx/.local/lib/python3.10/site-packages/GitHacker/init.py
file is not equivalent to the file https://github.com/WangYihang/GitHacker/blob/master/GitHacker/__init__.py
in latest master branch.
File "/home/xx/.local/lib/python3.10/site-packages/GitHacker/init.py", line 284, in parse_current_branch_name
assert len(branch_names) == 1
See the latest code in line 284.
assert len(branch_names) <= 1
I will release the fixed version soon. Before that, please use the following command to reinstall GitHacker, sorry for the inconvenience.
pip uninstall GitHacker
git clone https://github.com/WangYihang/GitHacker
cd GitHacker/
pip install -r requirements.txt
python setup.py install
May I ask this error occurred when I was running, what is the error? How to solve it
┌──(kali㉿kali)-[~/GitHacker-master]
└─$ python setup.py install
Traceback (most recent call last):
File "/home/kali/GitHacker-master/setup.py", line 2, in