Re: Decompress a zlib'd string in PHP

From: Date: Thu, 27 Oct 2005 05:07:41 +0000
Subject: Re: Decompress a zlib'd string in PHP
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-224706@lists.php.net to get a copy of this message
Hi Richard :) Looks like all he did was change a couple of atoms names...BEFORE the compressed movie header stuff :( All in all.... is all pretty basic stuff. I am more interested in what comes AFTER dcomzlib. Quicktime automatically decompressed the movie header when it plays a file, so there has to be way to decompress it? As far as legality, I am hacking my own files :) Ultimately, I want to write a password variable into the Quicktime file My hope is that all movie variables are also compressed with dcomzlib...as they are no where to be found by looking at the hex :( If I can find the variables, then I can rewrite them :) I know several members of the Quicktime Engineering team, and no one has made a peep. But, they will not tell me the answer either ;) Maybe they are waiting to sue me the moment I figure it out ;) Here is a 'test' movie I created: These two examples are the SAME file...One has a compressed movie header. The other is uncompressed So...one has dcomzlib, and one is not Uncompressed Movie Header: ftypqt qt fimoovlmvhdøÜ bøÜ bXX@Xßtrak\tkhdøÜ bøÜ bXˇˇ@@-$edtselstXmdia mdhdøÜ bøÜ bXXH9hdlrmhlrtextapp2æApple Text Media Handler§minfLgmhdgmin@ˇˇˇˇˇˇ,text Compressed Movie Header ftypqt qt PmoovHcmov
dcomzlib4cmvdfixúµRøo1ˆ](R•Ç:¥p† Y–    ÿ@™h
CÜT™(™∫ò≥sg≈ˆùŒŒïva„/!˛&;##ˇJxˆ˘~$)(Òü˝ûüø˜=˚ChÌßÃ≤!$dôRò—◊∑W§Ö/›ê˝∑6Á,˚{Õ û_≤ƒ?òÇL`}b&ÆfØ≠Y£µgg≥’Έsflπ;å
sü    m⁄◊ù
◊$ÂX“flÙé–Δ£îä¬ÓÀTÜΩ6$œ:î ¯ Ú\0¸¬¯Ä EÉ¡;…’Gât¢€ô3OÏû]Òb2»¡5êõôÔûÃ@p¢Ò3b:d–≠»Ùi¡ΔùƒØ?iÛJ¿¸\M;9˚é‡≠π*€¥Ôk1+˜r¬+Ì£H˜5B˝}®œ«õ±{Á~ÔIã≥6?¸ÛnúQ∂pyw5#™Éem{¢XºÿõSj,√´äHÊ^ does this provide any clues ? g
Hi,
    On the MPlayer samples FTP, there is an example of a MOV file that
is presumably "protected" in: ftp://ftp.mplayerhq.hu/MPlayer/samples/MOV/protected_mov/ Has anyone looked closely at the file? I was trying to figure out what was protected about it. The first 32 bytes are: 00 00 22 B6 68 24 2E 6D 00 00 22 AE 62 30 72 29 ..".h$.m..".b0r) 00 00 00 0C 64 63 6F 6D 7A 6C 69 62 00 00 22 9A ....dcomzlib..". The "dcomzlib" tag looks familiar. I had a hunch and changed a few of the bytes to: 00 00 22 B6 6D 6F 6F 76 00 00 22 AE 63 6D 6F 76 ..".moov..".cmov 00 00 00 0C 64 63 6F 6D 7A 6C 69 62 00 00 22 9A ....dcomzlib..". And then I was able to parse the file with a custom QT parser I assembled:
On Oct 26, 2005, at 7:53 PM, Richard Lynch wrote:
On Wed, October 26, 2005 12:34 pm, Graham Anderson wrote:
The compressor in the file data says: dcomzlib
Okay, now we are getting somewhere. dcomzlib is, most likely, not the same as zlib.
I tried the below with gzinflate and with gzuncompress. Both give errors: gzinflate(): data error gzuncompress(): data error
And this pretty much clinches it, mostly, assuming you passed in the right data. "DE789CB552BF6F133114F65D2852A50A7568E14041B2A00B120CB081549514860CA9545 And this is just "data" with not much we can do to guess about its format. However, I surfed to http://info.com/dcomzlib and the very first link (also the only one in English) was to: http://sourceforge.net/mailarchive/forum.php?forum_id=9050&max_rows=25&style=nested&viewmonth=200205 where somebody pretty much tells you how to decompress this, I think. (I didn't read the WHOLE thing, mind you) S/He also raises the question of the legality of doing this, which you may also wish to consider before proceeding. --Like Music? http://l-i-e.com/artists.htm --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#224706) next »