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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7f95b0ce749e12a7f27791dd6df8b239ff1d427029b6001c8603e9869b3a916
|
|
| MD5 |
e25cb5baed3f51c9e05037d880ba0e58
|
|
| BLAKE2b-256 |
aec616e37355b589c1225e62c07a6e93b90a9d9d004dcc6886cb1a116c3d469e
|
Provenance
The following attestation bundles were made for bytebomber-2.3.1.tar.gz:
Publisher:
python-publish.yml on redkitlab/ByteBomber
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bytebomber-2.3.1.tar.gz -
Subject digest:
f7f95b0ce749e12a7f27791dd6df8b239ff1d427029b6001c8603e9869b3a916 - Sigstore transparency entry: 230972499
- Sigstore integration time:
-
Permalink:
redkitlab/ByteBomber@b22b0d1683dc587dd75c47f687f0b937a8839c46 -
Branch / Tag:
refs/tags/2.3.1 - Owner: https://github.com/redkitlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b22b0d1683dc587dd75c47f687f0b937a8839c46 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7a9c950dea63ad62de2d12179a5393f519497bc3f661e7e95fe879ddf3f0e18
|
|
| MD5 |
8a42aadf8e924c926fd3befe34113633
|
|
| BLAKE2b-256 |
881a25735484f8e2b0100469f53e24e66cf1d22ad786707ee155cc4ec50786d8
|
Provenance
The following attestation bundles were made for bytebomber-2.3.1-py3-none-any.whl:
Publisher:
python-publish.yml on redkitlab/ByteBomber
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bytebomber-2.3.1-py3-none-any.whl -
Subject digest:
d7a9c950dea63ad62de2d12179a5393f519497bc3f661e7e95fe879ddf3f0e18 - Sigstore transparency entry: 230972514
- Sigstore integration time:
-
Permalink:
redkitlab/ByteBomber@b22b0d1683dc587dd75c47f687f0b937a8839c46 -
Branch / Tag:
refs/tags/2.3.1 - Owner: https://github.com/redkitlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b22b0d1683dc587dd75c47f687f0b937a8839c46 -
Trigger Event:
release
-
Statement type: