Archive Inspector
List and inspect nested zip, tar, 7z, rar, gz, xz and zst archives and flag zip bombs and path traversal.
Install
irm https://raw.githubusercontent.com/chayprabs/localtools/main/archive-inspector/install.ps1 | iexlocaltools-archive-inspector updatelocaltools-archive-inspector uninstall
curl -fsSL https://raw.githubusercontent.com/chayprabs/localtools/main/archive-inspector/install.sh | bashlocaltools-archive-inspector updatelocaltools-archive-inspector uninstall
brew install chayprabs/localtools/localtools-archive-inspectorbrew upgrade localtools-archive-inspectorbrew uninstall localtools-archive-inspector
scoop bucket add localtools https://github.com/chayprabs/homebrew-localtools; scoop install localtools-archive-inspectorscoop update localtools-archive-inspectorscoop uninstall localtools-archive-inspector
winget install localtools.ArchiveInspectorwinget upgrade localtools.ArchiveInspectorwinget uninstall localtools.ArchiveInspector
Opens at http://127.0.0.1:47122 in your browser. Run localtools-archive-inspector --help for the command line. Set LOCALTOOLS_NO_OPEN=1 to install without opening it.
Direct download
| Platform | File | Size |
|---|---|---|
| Windows x64 | archive-inspector-1.0.2-windows-x64.zip | 4.2 MB |
| macOS Apple Silicon | archive-inspector-1.0.2-macos-arm64.zip | 3.8 MB |
| macOS Intel | archive-inspector-1.0.2-macos-x64.zip | 4.1 MB |
| Linux x64 | archive-inspector-1.0.2-linux-x64.zip | 4.1 MB |
| Linux ARM64 | archive-inspector-1.0.2-linux-arm64.zip | 3.7 MB |
SHA-256 checksums are in the release notes; the install scripts verify them for you.
See it
How to use
- Open Archive Inspector (it starts at http://127.0.0.1:47122).
- Choose an archive: zip, jar, apk, docx, whl, tar, tgz, tar.xz, gz, zst, 7z or rar (up to 512 MiB).
- Press Inspect: read the safety verdict and findings, then browse every entry, including archives nested inside it.
- Use Preview, SHA-256 or Download on any file without extracting the archive; add a second archive to see what changed.
- From a terminal: localtools-archive-inspector check upload.zip (exit code 2 when unsafe), or extract upload.zip -o out for a safe extraction.
FAQ
Does it extract the archive to disk?
No. Listing, previews and hashes read entries straight from the archive. Nested archives are copied to a temporary file only to be opened, and that file is deleted afterwards. Extraction happens only when you run the extract command.
Which zip bombs does it detect?
Extreme compression ratios, archives that declare far more data than their size (like the passwordless 42.zip, whose nested layers expand to petabytes), overlapping entries that reuse the same compressed data (David Fifield's zbsm.zip), and archives that contain themselves (r.zip). Reading stops after 1 GiB of decompressed data in any case. Password-protected archives, such as the original 42.zip, are listed and flagged as encrypted, but their contents cannot be checked.
What makes an entry unsafe?
Paths with .., absolute paths or drive letters (zip slip), symlinks or hard links pointing outside the archive, entries written through a symlink, Unicode direction-override characters, executables disguised as documents or with double extensions, plus warnings for duplicates, case collisions, setuid bits and encrypted entries.
Can it open password-protected archives?
No. Encrypted entries and archives are listed where the format allows and flagged as encrypted, but never decrypted.
Is the extract command safe to use on untrusted archives?
It writes only regular files and directories into a new or empty folder, refuses traversal paths, links, device files and Windows device names, never overwrites files and stops at 1 GiB or 20,000 entries (adjustable). Every refused entry is listed.