In computing, a zip bomb, also known as a decompression bomb or zip of death, is a malicious archive file designed to crash or render useless the program or system reading it.
AS THE CREATOR, I AM NOT RESPONSIBLE FOR ANY DAMAGES! PLEASE USE WITH CARE!
python zipbomb.py --mode [flat|nested] [OPTIONS]
--mode flat
--files NUM Number of files to generate (default: 100)
--name NAME Base filename (default: file)
--size SIZE Per-file size (e.g., 10MB, 5GB, 1TB) (default: 10MB)
--content PATTERN Custom content pattern (default: "0")
--output FILE Output ZIP filename (default: bomb.zip)
--workers NUM Worker processes (default: CPU cores)
--no-repeat Use null bytes instead of repeating pattern
--include-dirs PATH Comma-separated directories to include
--include-files PATH Comma-separated files to include
--mode nested
--size SIZE Total decompressed size in MB (default: 1024)
--output FILE Output ZIP filename (default: bomb.zip)
--include-dirs PATH Comma-separated directories to include
--include-files PATH Comma-separated files to include
python zipbomb.py --mode flat --files 100 --size 10MB --output out.zip
python zipbomb.py --mode flat --files 50 --size 20MB --content "AAABBBCCC" --output out.zip
python zipbomb.py --mode flat --files 200 --size 50MB --workers 8 --output bomb.zip
python zipbomb.py --mode flat --files 10 --size 5GB --output mega_bomb.zip
python zipbomb.py --mode flat --files 100 --size 10MB --no-repeat --output bomb.zip
python zipbomb.py --mode nested --size 1024 --output out.zip
python zipbomb.py --mode nested --size 10240 --output large_bomb.zip
python zipbomb.py --mode flat --files 50 --size 10MB --include-files "file1.txt,file2.txt" --output out.zip
python zipbomb.py --mode nested --size 2048 --include-dirs "folder1,folder2" --output out.zip
✨ New in V2:
- Parallel Processing: Multi-threaded file generation for faster creation
- Flexible Size Units: Support for KB, MB, GB, TB (not just MB)
- Custom Content Patterns: Create bombs with custom repeating patterns
- Progress Bars: Visual progress tracking for file generation and zipping
- Better Error Handling: Validation and user-friendly error messages
- Null Byte Option:
--no-repeatflag for null-byte-only files - Worker Control: Specify number of parallel workers for optimization
- Named Arguments: More flexible, easier-to-remember command syntax
- Color Output: Colored terminal messages for better readability
- Automatic Detection: Smart warnings for unrealistic sizes (>1TB)
| Feature | Flat | Nested |
|---|---|---|
| File Structure | Many individual files | Zip within zip within zip |
| Compression Ratio | Lower (better for transfer) | Higher (much smaller file size) |
| Speed | Fast (parallel processing) | Slower (recursive zipping) |
| Customization | High (patterns, content) | Limited |
| Best For | Quick testing, custom patterns | Maximum compression |
| Minimum Size | Any positive number | 500 MB recommended |
pip install colorama
- Python 3.6+
coloramalibrary (for colored output)
pip install -r lib.txt
Or manually:
pip install colorama
-
For Maximum Speed: Use flat mode with multiple workers
python zipbomb.py --mode flat --files 500 --size 50MB --workers 16 -
For Maximum Compression: Use nested mode
python zipbomb.py --mode nested --size 10240 -
For Custom Content: Use flat mode with pattern
python zipbomb.py --mode flat --content "PAYLOAD" --files 100 --size 10MB -
For Large Files: Use size units and parallel processing
python zipbomb.py --mode flat --files 20 --size 5GB --workers 8
Error: "size must be a number"
- Nested mode expects a number in MB, not units like "1GB"
- Use:
--size 1024for 1GB equivalent
Warning: "You requested X workers, but only Y CPU cores available"
- The script detected more workers than CPU cores
- It will auto-adjust or ask for confirmation
Warning: "Total size exceeds 1 TB"
- For very large sizes, the script will ask for confirmation before proceeding
This tool is for educational and authorized security testing purposes only. Unauthorized creation or distribution of zip bombs is illegal. The creator is not responsible for any misuse or damage caused by this script.
- Complete rewrite of flat mode with parallel processing
- Added colorama for colored output
- New flexible size parsing (KB, MB, GB, TB)
- Custom content patterns support
- Worker process configuration
- Progress bars for generation and zipping
- Improved error handling and validation
- Better nested mode visualization



