Giter VIP home page Giter VIP logo

llzipdump's Introduction

Build Status

This is terribly incomplete for now

However following is already useful on JARs and APKs:

  • ./llzipdump ZIP >/dev/null; echo $? and if this returns 1 then
  • ./llzipdump ZIP | less '+/ Garbage$'

If you see something like APK Sig Block 42 on the end of the Garbage, have a look at https://source.android.com/security/apksigning

llzipdump

LowLevel dump of ZIP files, when all other tools leave you completely in the dark.

Usage

git clone https://github.com/hilbix/llzipdump.git
cd llzipdump
make all
sudo make install

Then:

llzipdump file.zip..
llzipdump - < file.zip

Return code:

0 zip is clean
1 zip is not clean
else: something is broken

In future I want the tool to be able to clean the ZIP file:

llzipdump -1 -- files.zip - > clean.zip
llzipdump -1 - < dirty.zip > clean.zip

Please note that this then would wipe the APK signature, see https://source.android.com/security/apksigning

TODO/BUGs

  • This is terribly incomplete (see NOTYET in the source)

  • Probably does not work for ZIP64 archives

  • Probably does not work for progressive archives (which cannot seek)

  • Probably does not work for split ZIP files

  • Fails on encrypted archives (does not grok encryption records yet)

  • CRC32 is not checked. So currently you need other tools for this

  • Add more ZIP variants. If you find one which is not processed correctly, pease open an issue on GH and do not forget to add a link to the ZIP file! (Without a sample ZIP I certainly cannot fix it.)

  • The central directory is not compared with the file entries. In fact this program just dumps things and does not interpret them.

FAQ

WTF why?

  • Because ZIP files can contain information which is hidden from unzip, zipdetails and zipinfo as well.

License?

  • Free as in free beer, free speech, free baby

llzipdump's People

Contributors

hilbix avatar

Watchers

James Cloos avatar  avatar  avatar

llzipdump's Issues

Hexdump offsets are wrong

zipdump (stdin) part 4250 Unexpected EOF
zipdump (stdin) part 4250: offset            0x25a654 (2467412)
:0025a658: 24 00 00 00                                      ! $...

The HEX offset is wrong. 0025a658 is the size of the ZIP while 0x25a654 is the correct offset

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.