Skip to content

parse zip file headers (Central directory file header, Local file header, End of central directory, Optional data descriptor) and extract (inflate) files. (also support gzip, tar files)

Notifications You must be signed in to change notification settings

sky-bro/zipwalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zipwalk

cmake status

A CLI tool to parse damaged zip files.

Build and install

mkdir build
cd build
# default value of ${CMAKE_INSTALL_PREFIX} is "/usr/local"
cmake ../src # cmake -DCMAKE_INSTALL_PREFIX=~/.local/ ../src/
make # compile
make install # install zipwalk to ${CMAKE_INSTALL_PREFIX}/bin/zipwalk

to uninstall, just delete the file: rm zipwalk

Arch User

yay -Sy zipwalk

Run

  • zipwalk: ./zipwalk -f ../samples/123.zip
  • test-my_inflate: ./test/test-my_inflate ../samples/123.deflate 123.txt

getopt

  • ./zipwalk
  • -t --target_directory, where to put the extracted files
  • -f --file zipfile path
  • -v --version print version number
  • -h --help print usage
  • -s --save-file save files
  • -e --extension parse file as a zip/gzip/tar, ignore the suffix of filename

Thinking / TODO

  • in local file header, filename: folders? files? -- check whether ends with '/' or not
  • date & time
  • base folder
  • zip32/zip64
  • getbyte, getword, getdword, getqword(little endian ?)
  • human readable? -h
  • mkdir, recursively
  • file / folder
  • other compression method
    • stored
    • deflate
  • summary info
  • encrypted ?
  • .gz/.tar.gz files
    • determine format of a file by its filename
    • or one more argument -e --extension zip, tar, gzip
    • .tar.gz .tgz .gz: do un-gzip, save file to .tar
    • .tar: do un-tar

Refs

About

parse zip file headers (Central directory file header, Local file header, End of central directory, Optional data descriptor) and extract (inflate) files. (also support gzip, tar files)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published