Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError: 'utf-8' codec can't decode #14

Open
websecer opened this issue May 20, 2021 · 5 comments
Open

UnicodeDecodeError: 'utf-8' codec can't decode #14

websecer opened this issue May 20, 2021 · 5 comments
Assignees
Labels

Comments

@websecer
Copy link

Traceback (most recent call last):
File "/usr/local/bin/githacker", line 11, in
load_entry_point('GitHacker==1.0.2', 'console_scripts', 'githacker')()
File "/usr/local/lib/python3.8/dist-packages/GitHacker-1.0.2-py3.8.egg/GitHacker/init.py", line 265, in main
File "/usr/local/lib/python3.8/dist-packages/GitHacker-1.0.2-py3.8.egg/GitHacker/init.py", line 45, in start
File "/usr/local/lib/python3.8/dist-packages/GitHacker-1.0.2-py3.8.egg/GitHacker/init.py", line 197, in add_blob_file_tasks
File "/home/romanee/.local/lib/python3.8/site-packages/git/index/base.py", line 441, in iter_blobs
for entry in self.entries.values():
File "/home/romanee/.local/lib/python3.8/site-packages/gitdb/util.py", line 253, in getattr
self.set_cache(attr)
File "/home/romanee/.local/lib/python3.8/site-packages/git/index/base.py", line 128, in set_cache
self._deserialize(stream)
File "/home/romanee/.local/lib/python3.8/site-packages/git/index/base.py", line 157, in _deserialize
self.version, self.entries, self._extension_data, _conten_sha = read_cache(stream)
File "/home/romanee/.local/lib/python3.8/site-packages/git/index/fun.py", line 198, in read_cache
path = read(path_size).decode(defenc)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 0: invalid start byte

系统环境
ubuntu20
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
python 3.8
git version 2.25.1

@WangYihang
Copy link
Owner

如果方便是否可以提供目标网站的地址呢?看报错感觉是依赖的库 GitPython 的问题。

@websecer
Copy link
Author

麻烦老哥发个邮件b3VyYmVzdDAjZ21haWwuY29t

@WangYihang
Copy link
Owner

  • 测试通过任意文件读取漏洞来获取目标仓库

@WangYihang
Copy link
Owner

我这边测试通过任意文件读取是可以正常利用的,参见 test.py
如果是任意文件包含,则情况比较复杂,很难利用,得具体情况具体分析,提取出被包含的文件的具体内容再一点一点恢复。

@WangYihang
Copy link
Owner

你这个遇到的 'utf-8' codec can't decode byte 0x96 in position 0: invalid start byte,我复现不出来,暂时无法调试。

@WangYihang WangYihang self-assigned this Jul 26, 2022
@WangYihang WangYihang added the bug label Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants