You've already forked pyinstxtractor
mirror of
https://github.com/extremecoders-re/pyinstxtractor.git
synced 2025-08-03 00:25:51 +08:00
Support files larger than 2GiB, closes #61
PyInstaller 4.3 added support for CArchive sizes >2GiB & <4GiB Details: - https://pyinstaller.org/en/stable/CHANGES.html#id81 - https://github.com/pyinstaller/pyinstaller/commit/937d8a
This commit is contained in:
@@ -192,7 +192,7 @@ class PyInstArchive:
|
|||||||
|
|
||||||
# Read CArchive cookie
|
# Read CArchive cookie
|
||||||
(magic, lengthofPackage, toc, tocLen, pyver, pylibname) = \
|
(magic, lengthofPackage, toc, tocLen, pyver, pylibname) = \
|
||||||
struct.unpack('!8siiii64s', self.fPtr.read(self.PYINST21_COOKIE_SIZE))
|
struct.unpack('!8sIIii64s', self.fPtr.read(self.PYINST21_COOKIE_SIZE))
|
||||||
|
|
||||||
except:
|
except:
|
||||||
print('[!] Error : The file is not a pyinstaller archive')
|
print('[!] Error : The file is not a pyinstaller archive')
|
||||||
@@ -224,11 +224,11 @@ class PyInstArchive:
|
|||||||
# Parse table of contents
|
# Parse table of contents
|
||||||
while parsedLen < self.tableOfContentsSize:
|
while parsedLen < self.tableOfContentsSize:
|
||||||
(entrySize, ) = struct.unpack('!i', self.fPtr.read(4))
|
(entrySize, ) = struct.unpack('!i', self.fPtr.read(4))
|
||||||
nameLen = struct.calcsize('!iiiiBc')
|
nameLen = struct.calcsize('!iIIIBc')
|
||||||
|
|
||||||
(entryPos, cmprsdDataSize, uncmprsdDataSize, cmprsFlag, typeCmprsData, name) = \
|
(entryPos, cmprsdDataSize, uncmprsdDataSize, cmprsFlag, typeCmprsData, name) = \
|
||||||
struct.unpack( \
|
struct.unpack( \
|
||||||
'!iiiBc{0}s'.format(entrySize - nameLen), \
|
'!IIIBc{0}s'.format(entrySize - nameLen), \
|
||||||
self.fPtr.read(entrySize - 4))
|
self.fPtr.read(entrySize - 4))
|
||||||
|
|
||||||
name = name.decode('utf-8').rstrip('\0')
|
name = name.decode('utf-8').rstrip('\0')
|
||||||
|
Reference in New Issue
Block a user