kimci86 / bkcrack

Crack legacy zip encryption with Biham and Kocher's known plaintext attack.
zlib License
1.6k stars 156 forks source link

Compression level in --list arg output #89

Open mastereworm opened 1 year ago

mastereworm commented 1 year ago

Would be great if --list (-L) argument result table will include info about comression level of encrypted archive. Think it's not so complicated, because zipdetails perl script has that function.

Another interesting approach, if bkcrack could determine packer program (if it's possible somehow) - pkzip, zip/winzip/winrar, 7zip, etc. The perspective of that functionality - an ability to autopack plaintext with detected packer (but some packers could be proprietary...)

kimci86 commented 1 year ago

Think it's not so complicated, because zipdetails perl script has that function.

The compression level information available in ZIP metadata has four possible values (normal, maximum, fast, super fast) so it does not correspond exactly to the compression level used by InfoZIP or 7zip packers for example (which have compression levels numbered from 1 to 9). In addition 7zip outputs the same 'normal' compression level in the output archive metadata for any compression level as far as I know, so I am not sure showing that information is so useful. Maybe showing it only when it is not not 'normal' could be nice?

The perspective of that functionality - an ability to autopack plaintext with detected packer (but some packers could be proprietary...)

I plan to eventually implement this with zlib deflate implementation: #84. It would not cover all cases but it would still be something :)