Skip to main content

Archae explodes archives.

Project description

Archae

Archae Logo of a spider exploring a sarcophagus

PyPI Supported Python Versions pre-commit.ci status Test Documentation Status PyPI - License

Archae explodes archives.

Why

Every once and a while, I run into an issue: multiple layers of archives. The reasons vary, but examples would include:

  • Searching for something in a ZIP of folders that contained a ZIP with a CD image in it
  • Running a malware scan and finding an obscure archive format was missed and not even flagged Meanwhile, I want to make sure I don't fill my disk, especially if an archive bomb (more commonly known as a ZIP bomb) has been jammed in somewhere. They're only funny the first time. :D

Features

  • Uses 7z/peazip/unar (not 7za/7zr) to try to extract archives
  • No substantial limit on the number of archive layers
  • Identifies file types via libmagic
  • Detects duplicate archives
  • Basic archive bomb protections
    • min_archive_size_bytes - ensures the uncompressed size of an archive is limited
    • min_total_size_bytes - ensures the total extracted footprint isn't above a certain size
    • min_archive_ratio - ensures very-high-compression-ratio archives are stopped

Installation

Archae is available on PyPI. Install with uv or your package manager of choice:

uv tool install archae

Documentation

Check out the Archae documentation for the User's Guide and CLI Reference.

Usage

Running archae --help or python -m archae --help shows a list of all of the available options and arguments:

archae --help

 Usage: archae [OPTIONS] ARCHIVE_PATH

 Archae explodes archives.

╭─ Arguments ──────────────────────────────────────────────────────────────────────────╮
│ *  ARCHIVE_PATH  FILE  Archive to examine [required]                                 │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────╮
│ --max_total_size_bytes        FILESIZE               Maximum total extraction size   │
│                                                      before failing, default 100G    │
│                                                      [default: 107374182400]         │
│ --max_archive_size_bytes      FILESIZE               Maximum individual archive      │
│                                                      extraction size before failing, │
│                                                      default 10G [default:           │
│                                                      10737418240]                    │
│ --min_archive_ratio           FLOAT RANGE [0<=x<=1]  Minimum allowed compression     │
│                                                      ratio for an archive. A         │
│                                                      floating-point value between    │
│                                                      0.0 and 1.0, inclusive. Default │
│                                                      is 0.005 [default: 0.005]       │
│ --version                 -v                         Show the version and exit.      │
│ --help                    -h                         Show this message and exit.     │
╰──────────────────────────────────────────────────────────────────────────────────────╯

TODOs

  • More archive bomb protections
    • min_total_size_bytes - (NYI) ensures the total extracted footprint isn't above a certain size
    • min_free_space - minimum free space at the extraction location
    • delete_archives_as_exploded - remove archive files to reduce duplication (boolean)
    • max_archive_depth - allow setting a maximum archive depth
  • Improve archive type detection
  • Separate between extractable and non-extractable archive types
  • Detect password-protected archives
  • Allow supplying archive passwords by hash
  • Add custom magic to detect obscure archive formats

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

archae-2026.1.0b2.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

archae-2026.1.0b2-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file archae-2026.1.0b2.tar.gz.

File metadata

  • Download URL: archae-2026.1.0b2.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for archae-2026.1.0b2.tar.gz
Algorithm Hash digest
SHA256 ee1b11fe9a366b52c35474158ea62f64e8d6b141aabe25d70c2563e0bd27c006
MD5 6d131c8ea2517ae070bd330705142dc7
BLAKE2b-256 81ee0a60958e2bd142a2835cb5419498fb7a806fc64ae19de177c4944b2eb386

See more details on using hashes here.

File details

Details for the file archae-2026.1.0b2-py3-none-any.whl.

File metadata

  • Download URL: archae-2026.1.0b2-py3-none-any.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for archae-2026.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 23d13f779147fe79242754d15a4e34123b136533b530a2c543ad660ba1b6e329
MD5 d3dea30c2c6dd9154e5795d7bc2f56f9
BLAKE2b-256 03f29c5f527c76f0e7a3d968f9071b96304bcd4e3794ea4c7432e43b09e33cb6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page