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/zipwalk
to uninstall, just delete the file:
rm zipwalk
yay -Sy zipwalk
zipwalk
:./zipwalk -f ../samples/123.zip
test-my_inflate
:./test/test-my_inflate ../samples/123.deflate 123.txt
- ./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
- 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
- wiki: ZIP (file format)
- ZIP压缩算法详细分析及解压实例解释 详细,从哈夫曼到deflate
- zip文件结构
- zip文件解析
- rfc1951 (deflate format)