Skip to content

Commit ec7e036

Browse files
committed
Fix PyPI release issues
1 parent fd2c9be commit ec7e036

File tree

5 files changed

+25
-26
lines changed

5 files changed

+25
-26
lines changed

.github/workflows/python-publish.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020

2121
- name: Build release distributions
2222
run: |
23-
# NOTE: put your own distribution build steps here.
2423
python -m pip install build
2524
python -m build
2625
@@ -35,19 +34,11 @@ jobs:
3534
needs:
3635
- release-build
3736
permissions:
38-
# IMPORTANT: this permission is mandatory for trusted publishing
3937
id-token: write
4038

41-
# Dedicated environments with protections for publishing are strongly recommended.
42-
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
4339
environment:
4440
name: pypi
45-
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
46-
# url: https://pypi.org/p/YOURPROJECT
47-
#
48-
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
49-
# ALTERNATIVE: exactly, uncomment the following line instead:
50-
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
41+
url: https://pypi.org/project/bytebomber/
5142

5243
steps:
5344
- name: Retrieve release distributions

ByteBomber/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .__main__ import build_zip_bomb

ByteBomber/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get_bytes(amount_str):
2929
except:
3030
raise ValueError("Format: <number> <unit>, e.g., 1 PB or 500 GB")
3131

32-
def main():
32+
def build_zip_bomb():
3333
target_input = input("Bomb decompressed size: ") or "500 GB"
3434
payload_input = input("Payload file size: ") or "1 MB"
3535
zip_name = input("Output zip name: ") or "bomb.zip"

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
ByteBomber is a tool for createing a ZIP bombs. A ZIP bomb is a highly compressed ZIP file that massively expands in size when extracted. ByteBomber is designed to demonstrate how compression algorithms (specifically ZIP's DEFLATE) can be used to exhaust system resources (disk space, RAM, or CPU), potentially crashing systems or causing instability.
44

5+
## Installation
6+
7+
To install ByteBomber, run the following command: `pip install bytebomber` (Alternatively, use `pip3` if necessary.)
8+
9+
Once installed, you can integrate ByteBomber into your own project by importing the build_zip_bomb function: `from bytebomber import build_zip_bomb`
10+
11+
You can then call build_zip_bomb() in your code to generate ZIP bombs.
12+
513
## What ByteBomber Does
614

715
1. Takes input for how big the uncompressed bomb should be.
@@ -39,17 +47,17 @@ When you run the script, you'll be prompted for the following:
3947

4048
Use the format `<number> <unit>` when entering values (e.g., `500 GB`, `1 TB`).
4149

42-
| Supported Unit | Size | Size In Bytes |
43-
|----------------|----------|----------------
44-
| B (byte) | 1 B | 1
45-
| KB (Kilobyte) | 1,024 B | 1,024
46-
| MB (Megabyte) | 1,024 KB | 1,048,576
47-
| GB (Gigabyte) | 1,024 MB | 1,073,741,824
48-
| TB (Terabyte) | 1,024 GB | 1,099,511,627,776
49-
| PB (Petabyte) | 1,024 TB | 1,125,899,906,842,624
50-
| EB (Exabyte) | 1,024 PB | 1,152,921,504,606,846,976
51-
| ZB (Zettabyte) | 1,024 EB | 1,180,591,620,717,411,303,424
52-
| YB (Yottabyte) | 1,024 ZB | 1,208,925,819,614,629,174,706,176
50+
| Supported Unit | Size | Size In Bytes |
51+
| -------------- | -------- | --------------------------------- |
52+
| B (byte) | 1 B | 1 |
53+
| KB (Kilobyte) | 1,024 B | 1,024 |
54+
| MB (Megabyte) | 1,024 KB | 1,048,576 |
55+
| GB (Gigabyte) | 1,024 MB | 1,073,741,824 |
56+
| TB (Terabyte) | 1,024 GB | 1,099,511,627,776 |
57+
| PB (Petabyte) | 1,024 TB | 1,125,899,906,842,624 |
58+
| EB (Exabyte) | 1,024 PB | 1,152,921,504,606,846,976 |
59+
| ZB (Zettabyte) | 1,024 EB | 1,180,591,620,717,411,303,424 |
60+
| YB (Yottabyte) | 1,024 ZB | 1,208,925,819,614,629,174,706,176 |
5361

5462
> [!NOTE]
5563
> For most purposes, GB or TB ranges are more than sufficient to stress a system. PB, EB, ZB, and YB represent astronomical data sizes far beyond what typical systems can handle.
@@ -83,5 +91,4 @@ Inside the ZIP there are tens of thousands to millions of identical files like:
8391

8492
All filled with null bytes. The compression algorithm detects repetition and compresses it heavily.
8593

86-
> [!WARNING]
87-
> **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.**
94+
> [!WARNING] > **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.**

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ByteBomber"
7-
version = "1.2.0"
7+
version = "2.0.0"
88
description = "ZIP bomb generator (for educational purposes only)"
99
readme = "README.md"
1010
requires-python = ">=3.6,<4.0"
@@ -29,4 +29,4 @@ Source = "https://github.com/luckalgorithm/ByteBomber"
2929
IssueTracker = "https://github.com/luckalgorithm/ByteBomber/issues"
3030

3131
[project.scripts]
32-
bytebomber = "bytebomber.__main__:main"
32+
bytebomber = "bytebomber.__main__:build_zip_bomb"

0 commit comments

Comments
 (0)