-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Length of package more than 2147483647 bytes #61
Comments
Might be built with a modified pyinstaller. |
As I wrote, change signed integer in the code to unsigned integer will solve this bug. search and replace these code also: |
As I wrote, change signed integer in the code to unsigned integer
will solve this bug.
Search: struct.unpack('!8siiii64s',
self.fPtr.read(self.PYINST21_COOKIE_SIZE))
Replace: struct.unpack('!8sIIII64s',
self.fPtr.read(self.PYINST21_COOKIE_SIZE))
iiii to IIII , signed integer to unsigned integer.
search and replace these code also:
nameLen = struct.calcsize('!IIIIBc')
(entryPos, cmprsdDataSize, uncmprsdDataSize, cmprsFlag, typeCmprsData,
name) =
struct.unpack(
'!IIIBc{0}s'.format(entrySize - nameLen),
self.fPtr.read(entrySize - 4))
lmcjrrg ***@***.***> 于2022年11月28日周一 17:29写道:
… I also encountered this problem, local pyinstaller=5.6
[+] Processing start_program.exe
[+] Pyinstaller version: 2.1+
[+] Python version: 3.10
[+] Length of package: -1928081237 bytes
[+] Found 10364 files in CArchive
[+] Beginning extraction...please standby
Traceback (most recent call last):
File "E:\workFile\windows_final_file\dist\pyinstxtractor.py", line 454, in
main()
File "E:\workFile\windows_final_file\dist\pyinstxtractor.py", line 443, in
main
arch.extractFiles()
File "E:\workFile\windows_final_file\dist\pyinstxtractor.py", line 277, in
extractFiles
data = zlib.decompress(data)
zlib.error: Error -5 while decompressing data: incomplete or truncated
stream
—
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPUJIRKVL3C75IOFMS4E3WKR3QPANCNFSM6AAAAAASKEIXLQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Thank you. I have solved the problem according to your method. It's great |
Change:
struct.unpack('!8siiii64s', self.fPtr.read(self.PYINST21_COOKIE_SIZE))
To:
struct.unpack('!8sIIII64s', self.fPtr.read(self.PYINST21_COOKIE_SIZE))
Will solve this error:
[+] Pyinstaller version: 2.1+
[+] Python version: 3.7
-2089571957
[+] Length of package: -2089571957 bytes
[+] Found 4480 files in CArchive
[+] Beginning extraction...please standby
Traceback (most recent call last):
File "pyinstxtractor.py", line 456, in
main()
File "pyinstxtractor.py", line 445, in main
arch.extractFiles()
File "pyinstxtractor.py", line 279, in extractFiles
data = zlib.decompress(data)
zlib.error: Error -5 while decompressing data: incomplete or truncated stream
And these place, change to unsign int
nameLen = struct.calcsize('!IIIIBc')
(entryPos, cmprsdDataSize, uncmprsdDataSize, cmprsFlag, typeCmprsData, name) =
struct.unpack(
'!IIIBc{0}s'.format(entrySize - nameLen),
self.fPtr.read(entrySize - 4))
The text was updated successfully, but these errors were encountered: