Skip to main content

ZIP bomb generator (for educational purposes only)

Project description

ByteBomber is a Python tool for creating ZIP bombs. It demonstrates how compression algorithms (specifically ZIP's DEFLATE) can exploit redundancy to create highly compressed files that expand drastically when extracted. It’s primarily for educational purposes to understand the impact of such files.

Installation

Install ByteBomber via pip: pip install bytebomber

You can then use it in your project: from bytebomber import build_zip_bomb

Usage

You can use ByteBomber as a Python module or directly from your command line.

As a Python Module

Call build_zip_bomb() to create a ZIP bomb. You can pass several arguments to customize the behavior:

build_zip_bomb(
    target_input="500 GB",
    payload_input="1 MB",
    zip_name="bomb.zip",
    folder_name="bomb-dir",
    verbose=True,
    show_progress=True
)
Parameter Description
target_input Total uncompressed size of the ZIP bomb. Default: prompts user or uses "500 GB".
payload_input Size of each file inside the ZIP. Smaller values = more files. Default: prompts user or uses "1 MB".
zip_name Output ZIP file name. Default: prompts user or uses "bomb.zip".
folder_name Internal folder name for the payload files. Default: prompts user or uses "bomb_dir".
verbose If True, shows config + summary output. Default: True.
show_progress If True, shows a live progress bar. Default: True.

Command-Line Usage

When you run ByteBomber from your terminal, you can optionally use flags to customize its behavior:

bytebomber --target-size "100 GB" --payload-size "500 KB" --output "my_bomb.zip"
Flag Long Flag Description
-t --target-size Total uncompressed size of the ZIP bomb (e.g., "500 GB"). Default: "500 GB".
-p --payload-size Size of each file inside the ZIP (e.g., "1 MB"). Default: "1 MB".
-o --output Output ZIP file name. Default: "bomb.zip".
-f --folder Internal folder name for the payload files. Default: "bomb-dir".
-n --no-progress Disable the live progress bar.
-q --quiet Silence all output messages.

Use the format <number> <unit> when entering values (e.g., 500 GB, 1 TB). ByteBomber supports B, KB, MB, GB, TB, PB, EB, ZB, and YB. Valuse in the GB-TB range are usually more than enough to stress a system. Values above TB are astronomical data zizes far more than most systems can handle.

[!NOTE] The program accepts values using standard units (e.g., MB, GB), but internally it treats them as binary units (e.g., MiB, GiB).

ByteBomber is for educational purposes only. Do not deploy ZIP bombs on systems you do not own or have permission to test. Misuse can result in data loss or system damage.

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

bytebomber-2.3.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

bytebomber-2.3.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file bytebomber-2.3.1.tar.gz.

File metadata

  • Download URL: bytebomber-2.3.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bytebomber-2.3.1.tar.gz
Algorithm Hash digest
SHA256 f7f95b0ce749e12a7f27791dd6df8b239ff1d427029b6001c8603e9869b3a916
MD5 e25cb5baed3f51c9e05037d880ba0e58
BLAKE2b-256 aec616e37355b589c1225e62c07a6e93b90a9d9d004dcc6886cb1a116c3d469e

See more details on using hashes here.

Provenance

The following attestation bundles were made for bytebomber-2.3.1.tar.gz:

Publisher: python-publish.yml on redkitlab/ByteBomber

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bytebomber-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: bytebomber-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bytebomber-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d7a9c950dea63ad62de2d12179a5393f519497bc3f661e7e95fe879ddf3f0e18
MD5 8a42aadf8e924c926fd3befe34113633
BLAKE2b-256 881a25735484f8e2b0100469f53e24e66cf1d22ad786707ee155cc4ec50786d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for bytebomber-2.3.1-py3-none-any.whl:

Publisher: python-publish.yml on redkitlab/ByteBomber

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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