diff --git a/pyinstxtractor.py b/pyinstxtractor.py index e46a2a7..980afbc 100644 --- a/pyinstxtractor.py +++ b/pyinstxtractor.py @@ -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