Skip to content

Commit 8769046

Browse files
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 - pyinstaller/pyinstaller@937d8a
1 parent 158b374 commit 8769046

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pyinstxtractor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def getCArchiveInfo(self):
192192

193193
# Read CArchive cookie
194194
(magic, lengthofPackage, toc, tocLen, pyver, pylibname) = \
195-
struct.unpack('!8siiii64s', self.fPtr.read(self.PYINST21_COOKIE_SIZE))
195+
struct.unpack('!8sIIii64s', self.fPtr.read(self.PYINST21_COOKIE_SIZE))
196196

197197
except:
198198
print('[!] Error : The file is not a pyinstaller archive')
@@ -224,11 +224,11 @@ def parseTOC(self):
224224
# Parse table of contents
225225
while parsedLen < self.tableOfContentsSize:
226226
(entrySize, ) = struct.unpack('!i', self.fPtr.read(4))
227-
nameLen = struct.calcsize('!iiiiBc')
227+
nameLen = struct.calcsize('!iIIIBc')
228228

229229
(entryPos, cmprsdDataSize, uncmprsdDataSize, cmprsFlag, typeCmprsData, name) = \
230230
struct.unpack( \
231-
'!iiiBc{0}s'.format(entrySize - nameLen), \
231+
'!IIIBc{0}s'.format(entrySize - nameLen), \
232232
self.fPtr.read(entrySize - 4))
233233

234234
name = name.decode('utf-8').rstrip('\0')

0 commit comments

Comments
 (0)