forked from mirrors/pyinstxtractor
Detect empty files within PYZArchive
This commit is contained in:
parent
3b38d8d173
commit
d4a7dab166
1 changed files with 5 additions and 0 deletions
|
|
@ -434,6 +434,11 @@ class PyInstArchive:
|
|||
if not os.path.exists(fileDir):
|
||||
os.makedirs(fileDir)
|
||||
|
||||
if length == 0:
|
||||
print('[!] Warning: Empty file {0}'.format(filePath))
|
||||
self._writePyc(filePath, b"")
|
||||
continue
|
||||
|
||||
try:
|
||||
data = f.read(length)
|
||||
data = zlib.decompress(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue