Error Decompressing Data Stream
Contents |
User List Committer List Help Tracker Documentation Tracker Development Report Tracker Problem Issue8672 classification Title: Error error decompressing data corrupted installer decompressing valid zlib data Type: behavior Stage: resolved Components:
Data Integrity Error When Decompressing
Tests Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6 process Status: closed Resolution: fixed
Error Decompressing Data Corrupted Installer Hatası
Dependencies: Superseder: Assigned To: Nosy List: gregory.p.smith, matthew.brett, pitrou Priority: normal Keywords: patch Created on 2010-05-09 22:44 by matthew.brett, last changed 2010-05-11 23:39
Error Decompressing Data Corrupted Installer Fix
by pitrou. This issue is now closed. Files File name Uploaded Description Edit mat.bin matthew.brett, 2010-05-09 22:44 binary zlib-compressed data causing decompression error zlib-8672.patch pitrou, 2010-05-10 23:00 Messages (9) msg105420 - (view) Author: Matthew Brett (matthew.brett) Date: 2010-05-09 22:44 I have a valid zlib compressed string, attached lỗi error decompressing data corrupted installer here as 'mat.bin' (1.7M), that cause and error on zlib.decompress decompression: >>> import zlib >>> data = open('mat.bin', 'rb').read() >>> out = zlib.decompress(data) Traceback (most recent call last): File "
[ thread ] [ subject ] [ author ] Stephan
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of http://stackoverflow.com/questions/32367005/zlib-error-error-5-while-decompressing-data-incomplete-or-truncated-stream-in this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up zlib.error: error decompressing Error -5 while decompressing data: incomplete or truncated stream in Python up vote 0 down vote favorite I have been pulling my hair out trying to get a proxy working. I need to decrypt the packets from a server and client ((this may be out of order..)), then decompress everything but the packet header. The first 2 packets ((10101 and 20104)) are not error decompressing data compressed, and decrypt, destruct, and decompile properly. Alas, but to no avail; FAIL!; zlib.error: Error -5 while decompressing data: incomplete or truncated stream Same error while I am attempting to decompress the encrypted version of the packet. When I include the packet header, I get a randomly chosen -3 error. I have also tried changing -zlib.MAX_WBITS to zlib.MAX_WBITS, as well as a few others, but still get the same error. Here's the code; import socket, sys, os, struct, zlib from Crypto.Cipher import ARC4 as rc4 cwd = os.getcwd() s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ss = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(('192.168.2.12',9339)) s.listen(1) client, addr = s.accept() key = "fhsd6f86f67rt8fw78fw789we78r9789wer6renonce" cts = rc4.new(key) stc = rc4.new(key) skip = 'a'*len(key) cts.encrypt(skip) stc.encrypt(skip) ss.connect(('game.boombeachgame.com',9339)) ss.settimeout(0.25) s.settimeout(0.25) def io(): while True: try: pack = client.recv(65536) decpack = cts.decrypt(pack[7:]) msgid, paylen = dechead(pack) if msgid != 10101: decopack = zlib.decompress(decpack, -zlib.MAX_WBITS) print "ID:",msgid print "Payload Length",paylen print "Payload:\n",decpack ss.send(pack) dump(msgid, decpack) except socket.timeout: pass try: pack = ss.recv(65536) msgid, paylen = dechead(pack) decpack = stc.decrypt(pack[7:]) if msgid != 20104: decopack = zlib.decompress(decpack, -zlib.MAX_WBITS) print "ID:",msgid print "Payload Length",paylen print "Payload:\n",decpack client.send(pack) dump(msgid, decpack) except socket.timeout: pass def dump