|
|
How to EXPLODE using freeware libs
Hello there,
I am trying to decompress a stream that was zipped with the IMPLODE method
(pretty sure about that because of the presence of the implode.dll from
PKware in the applications' exes).
Is there any method/free lib that can handle that (on Win32)?
AFAIK zlib does not support the implosion...
Keep busting
Marco
|
|
0
|
|
|
|
Reply
|
Ing
|
10/8/2003 4:16:09 PM |
|
> AFAIK zlib does not support the implosion...
No, it doesn't.
PKWARE have never documented the algorithm used in the DCL implode method
but this has been successfully reverse-engineered by a number of people.
Mark Adler has made available source code in C (blast.c) to do the
decompression of this particular data stream. You can find a link to this
somewhere on the web site datacompression.info.
Note that this handles decompression only, not compression.
You can find others if you search the Web.
Hope this helps.
regards
Mike B
|
|
0
|
|
|
|
Reply
|
Mike
|
10/8/2003 5:50:10 PM
|
|
"Ing. Marco Lo Monaco" <mr.alien@libero.it> wrote in message news:<bm1cbg$d66$1@grillo.cs.interbusiness.it>...
> I am trying to decompress a stream that was zipped with the IMPLODE method
> (pretty sure about that because of the presence of the implode.dll from
> PKware in the applications' exes).
My guess is that the implode.dll generates the PKWare DCL format as
opposed to the PKZip implode method. (Why they used the same name for
two different methods, I'll never know.) You can use blast found in
the zlib beta contrib directory to decompress the DCL format:
http://www.alumni.caltech.edu/~madler/zlib-1.2.0.7.tar.gz
If on the other hand, it is PKZip's implode method, then look at
Info-ZIP's zip source code, from which you can extract an exploder:
http://www.info-zip.org/
mark
|
|
0
|
|
|
|
Reply
|
madler
|
10/9/2003 1:20:29 AM
|
|
Thank you, guru! :-)
What I tried also is to create a fake zip file (by hacking the
local-file/file-headers) and use already-inside-coded decompression in
pkunzip/winzip, but it didn't work right.
Here is the step that I made, please give me a suggestion:
I have a file named test.txt (uncompressed) and a candidate zip stream with
implode method (probably PKware's one or maybe PKzip's)
1) I zipped it with no-compression option creating test.zip. AFAIK the
checksum should be done only on the stream (compressed from the beginning
with unknown method): let's call this checksum C;
2) I hacked this three things in the local file/file headers (as seen in the
appnote.txt on zip file format downloaded from PKware's site):
a) bit 1 set of the 'general purpose bit flag' (method 6 -> implode)
b) byte 'compression method' sert to value 0x06 (implode);
c) adjusted the uncompressed size with sizeof(test.txt);
3) tried to pkunzip the fake-and-hacked zip file, but got error of bad
imploded data and checksum error. I can appreciate the bad imploded data
error, but what about the checsum? Shouldn't be it computed on the
compressed stream? So if C is ok for the un-hacked test.zip, it shold work
fine also for the hacked version.
That's right: maybe it didn't work because I setted up things for PKzip's
implode method: I tried also to set the compression method byte to 0x0A
(PKware's one), but nothing... Then I have seen that there are 4 bits
reserved for PKware (and they probably use those, what do you think?): it
is also not clear if bit 1 of general purpose bit flag should be set for
implosion, without being worried about PKzip/PKware implementation.
I could also try to perform a brute force setting of those bits, but I don't
like doing blind tests....:-)
I think I will have a look to the links you kindly gave me.
Thanks again
Marco
"Mark Adler" <madler@alumni.caltech.edu> ha scritto nel messaggio
news:7ab39013.0310081720.54febcd4@posting.google.com...
> "Ing. Marco Lo Monaco" <mr.alien@libero.it> wrote in message
news:<bm1cbg$d66$1@grillo.cs.interbusiness.it>...
> > I am trying to decompress a stream that was zipped with the IMPLODE
method
> > (pretty sure about that because of the presence of the implode.dll from
> > PKware in the applications' exes).
>
> My guess is that the implode.dll generates the PKWare DCL format as
> opposed to the PKZip implode method. (Why they used the same name for
> two different methods, I'll never know.) You can use blast found in
> the zlib beta contrib directory to decompress the DCL format:
>
> http://www.alumni.caltech.edu/~madler/zlib-1.2.0.7.tar.gz
>
> If on the other hand, it is PKZip's implode method, then look at
> Info-ZIP's zip source code, from which you can extract an exploder:
>
> http://www.info-zip.org/
>
> mark
|
|
0
|
|
|
|
Reply
|
Ing
|
10/9/2003 9:32:19 AM
|
|
Thanx Mike, as you can read in the other post, Mark himself gave me the
right links.
That helped me :-)
Marco
"Mike Brindley" <mike.brindley@wol.co.za> ha scritto nel messaggio
news:bm1iol$bqn$1@ctb-nnrp2.saix.net...
> > AFAIK zlib does not support the implosion...
>
> No, it doesn't.
>
> PKWARE have never documented the algorithm used in the DCL implode method
> but this has been successfully reverse-engineered by a number of people.
>
> Mark Adler has made available source code in C (blast.c) to do the
> decompression of this particular data stream. You can find a link to this
> somewhere on the web site datacompression.info.
> Note that this handles decompression only, not compression.
>
> You can find others if you search the Web.
>
> Hope this helps.
>
> regards
>
> Mike B
>
>
>
>
|
|
0
|
|
|
|
Reply
|
Ing
|
10/9/2003 9:33:41 AM
|
|
"Ing. Marco Lo Monaco" <mr.alien@libero.it> wrote in message news:<bm3990$gbr$1@fata.cs.interbusiness.it>...
> 3) tried to pkunzip the fake-and-hacked zip file, but got error of bad
> imploded data and checksum error.
As I had guessed, the data appears to be the DCL implode, as opposed
to the PKZip implode. Try the blast code on it.
mark
|
|
0
|
|
|
|
Reply
|
madler
|
10/9/2003 5:32:44 PM
|
|
|
5 Replies
340 Views
(page loaded in 0.61 seconds)
|
|
|
|
|
|
|
|
|