Skip to content

Commit

Permalink
Merge branch 'stable' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Arusekk committed Nov 5, 2019
2 parents 6f510a3 + 215b2e6 commit d8a2359
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pwnlib/rop/rop.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,13 +1011,11 @@ def __get_cachefile_name(self, files):
if isinstance(files, ELF):
files = [files]

hashes = []
sha256 = hashlib.sha256()
for elf_data in sorted(elf.get_data() for elf in self.elfs):
sha256.update(elf_data)

for elf in self.elfs:
sha256 = hashlib.sha256(elf.get_data()).hexdigest()
hashes.append(sha256)

return os.path.join(cachedir, '_'.join(hashes))
return os.path.join(cachedir, sha256.hexdigest())

def __cache_load(self, elf):
filename = self.__get_cachefile_name(elf)
Expand Down

0 comments on commit d8a2359

Please sign in to comment.