Skip to content

Commit

Permalink
Merge pull request #70 from maximevince/master
Browse files Browse the repository at this point in the history
Do not abort after the first extraction error
  • Loading branch information
extremecoders-re authored Jun 30, 2023
2 parents 128cb96 + c19cdbb commit 044812c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyinstxtractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ def extractFiles(self):
data = self.fPtr.read(entry.cmprsdDataSize)

if entry.cmprsFlag == 1:
data = zlib.decompress(data)
try:
data = zlib.decompress(data)
except zlib.error:
print('[!] Error : Failed to decompress {0}'.format(entry.name))
continue
# Malware may tamper with the uncompressed size
# Comment out the assertion in such a case
assert len(data) == entry.uncmprsdDataSize # Sanity Check
Expand Down

0 comments on commit 044812c

Please sign in to comment.