You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "vortex12.py", line 46, in
rop = ROP(libs)
File "/usr/local/lib/python2.7/dist-packages/pwnlib/rop/rop.py", line 466, in init
self.__load()
File "/usr/local/lib/python2.7/dist-packages/pwnlib/rop/rop.py", line 1090, in __load
self.__cache_save(elf, elf_gadgets)
File "/usr/local/lib/python2.7/dist-packages/pwnlib/rop/rop.py", line 1009, in __cache_save
file(self.__get_cachefile_name(elf), 'w+').write(repr(data))
IOError: [Errno 36] File name too long: '/tmp/pwntools-rop-cache/2af3321088068fd0fabfbc8c938b47aa2a22e3876b39aa0f9c894f02f1c5edf6_e79282760fb8d4fd9c7310515c6d9617c28f95fc9562a9058cb69cd861c534be_331321edfc0b8c9b643600ce1b5bf7348b2a635cd04b1ec631cf65b8128afe12_066e2be587ae87d77cf03fd5a2155f1a203c8e3d2d405ca89f006c81c7145e58'
This probably what cause problem:
def __get_cachefile_name(self, files):
"""Given an ELF or list of ELF objects, return a cache file for the set of files"""
cachedir = os.path.join(tempfile.gettempdir(), 'pwntools-rop-cache')
if not os.path.exists(cachedir):
os.mkdir(cachedir)
if isinstance(files, ELF):
files = [files]
hashes = []
for elf in self.elfs:
sha256 = hashlib.sha256(elf.get_data()).hexdigest()
hashes.append(sha256)
return os.path.join(cachedir, '_'.join(hashes))
Linux max filename length only 255 so instead of join hash files name, dont better should hash the join file name ?
The text was updated successfully, but these errors were encountered:
xtrm0
added a commit
to xtrm0/pwntools
that referenced
this issue
Oct 5, 2018
Error log:
This probably what cause problem:
Linux max filename length only 255 so instead of join hash files name, dont better should hash the join file name ?
The text was updated successfully, but these errors were encountered: