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
如果方便是否可以提供目标网站的地址呢?看报错感觉是依赖的库 GitPython 的问题。
麻烦老哥发个邮件b3VyYmVzdDAjZ21haWwuY29t
我这边测试通过任意文件读取是可以正常利用的,参见 test.py。
如果是任意文件包含,则情况比较复杂,很难利用,得具体情况具体分析,提取出被包含的文件的具体内容再一点一点恢复。
你这个遇到的 'utf-8' codec can't decode byte 0x96 in position 0: invalid start byte,我复现不出来,暂时无法调试。