A CLI tool to parse damaged zip files.
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/zipwalkto uninstall, just delete the file:
rm zipwalk
yay -Sy zipwalkzipwalk:./zipwalk -f ../samples/123.ziptest-my_inflate:./test/test-my_inflate ../samples/123.deflate 123.txt
- ./zipwalk
-t--target_directory, where to put the extracted files-f--filezipfile path-v--versionprint version number-h--helpprint usage-s--save-filesave files-e--extensionparse file as a zip/gzip/tar, ignore the suffix of filename
- 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--extensionzip, tar, gzip .tar.gz.tgz.gz: do un-gzip, save file to.tar.tar: do un-tar
- wiki: ZIP (file format)
- ZIP压缩算法详细分析及解压实例解释 详细,从哈夫曼到deflate
- zip文件结构
- zip文件解析
- rfc1951 (deflate format)