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
    • MAX_ARCHIVE_SIZE_BYTES - ensures the uncompressed size of an archive is limited
    • MAX_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
    • MIN_DISK_FREE_SPACE - minimum free space at the extraction location
    • MAX_DEPTH - allow setting a maximum archive depth to traverse

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

Configuration values are supplied one of four ways, and any item lower in this list will overwrite a prior one:

  • Default values are stored in the app
  • A TOML file at ~/.config/archae/ will be created on first run and can override those values (ex. MIN_ARCHIVE_RATIO = 0.005)
  • Env vars starts starting with "ARCHAE_" are parsed (ex. ARCHAE_MIN_ARCHIVE_RATIO=0.005)
  • Values can be passed in as flags (ex. --min_archive_ratio=0.005)

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

archae --help

 Usage: archae [OPTIONS] COMMAND [ARGS]...

 Archae explodes archives.

╭─ Options ────────────────────────────────────────────────────────────────────────────╮
│ --version  -v  Show the version and exit.                                            │
│ --help     -h  Show this message and exit.                                           │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────╮
│ extract         Extract and analyze an archive.                                      │
│ listopts        List all available configuration options.                            │
│ status          Show archae status and available tools.                              │
╰──────────────────────────────────────────────────────────────────────────────────────╯

TODOs

  • More archive bomb protections
    • delete_archives_as_exploded - remove archive files to reduce duplication (boolean)
  • 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.2.0.tar.gz (14.4 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.2.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file archae-2026.2.0.tar.gz.

File metadata

  • Download URL: archae-2026.2.0.tar.gz
  • Upload date:
  • Size: 14.4 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.2.0.tar.gz
Algorithm Hash digest
SHA256 7c4888ffc615e99e00209ae8f8d04ce8b01d84df4aa7ad52baf1bc9f65b3797e
MD5 769346d4bb9c1bc817930a4b8e9e7b94
BLAKE2b-256 285b8223d32933fa608ba4d3be82cb1d6e03740c7dc79a571cbb0be5d7d0d1d9

See more details on using hashes here.

File details

Details for the file archae-2026.2.0-py3-none-any.whl.

File metadata

  • Download URL: archae-2026.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe9da6de1fa9353f7fbb977c06299492f7ae830228a2731e2fe3544b2cc6b76b
MD5 6c860e9e32e5ebb7b5ebbf28cbf7d4a1
BLAKE2b-256 a6c058c234ec7a88e57b097ffbd2313485bd76b64f161aed8cb7a9c90074656f

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