|
| 1 | +# HTTP Request Flooder (mfloods) |
| 2 | + |
| 3 | +A high-performance HTTP request flooding tool written in Rust, designed for load testing and stress testing web applications. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- 🚀 **High Performance**: Built with Rust for maximum speed and efficiency |
| 8 | +- 🔄 **Parallel Processing**: Configurable multi-threading for concurrent requests |
| 9 | +- 🌐 **Proxy Support**: HTTP, HTTPS, and SOCKS5 proxy support |
| 10 | +- 🔒 **SSL Options**: Configurable SSL certificate verification |
| 11 | +- 📊 **Progress Tracking**: Real-time progress bar for large request batches |
| 12 | +- 📝 **Flexible Input**: Raw HTTP request files for complete control |
| 13 | +- 🎯 **Connection Pooling**: Efficient connection management to prevent resource exhaustion |
| 14 | +- 📈 **Detailed Logging**: Multiple log levels for debugging and monitoring |
| 15 | + |
| 16 | +## Quick Start |
| 17 | + |
| 18 | +### Download |
| 19 | + |
| 20 | +Download the latest release for your platform from the [Releases](https://github.com/yourusername/mfloods/releases) page. |
| 21 | + |
| 22 | +### Basic Usage |
| 23 | + |
| 24 | +```bash |
| 25 | +# Single request |
| 26 | +./mfloods request.txt |
| 27 | + |
| 28 | +# Multiple requests with threading |
| 29 | +./mfloods -num 100 -th 4 request.txt |
| 30 | + |
| 31 | +# With proxy |
| 32 | +./mfloods -num 50 -th 2 -proxy http://proxy:8080 request.txt |
| 33 | + |
| 34 | +# With SSL bypass for proxy |
| 35 | +./mfloods -insecure -proxy http://127.0.0.1:8080 request.txt |
| 36 | +``` |
| 37 | + |
| 38 | +## Command Line Options |
| 39 | + |
| 40 | +| Option | Description | Default | |
| 41 | +|--------|-------------|---------| |
| 42 | +| `-h, --help` | Show help message | - | |
| 43 | +| `-log <level>` | Set log level (error, warn, info, debug, trace) | info | |
| 44 | +| `-num <count>` | Number of requests to make | 1 | |
| 45 | +| `-th <threads>` | Number of threads for parallel processing | 1 | |
| 46 | +| `-proxy <url>` | Proxy URL (http://, https://, socks5://) | none | |
| 47 | +| `-insecure` | Disable SSL certificate verification | false | |
| 48 | + |
| 49 | +## Log Levels |
| 50 | + |
| 51 | +- **error**: Only error messages |
| 52 | +- **warn**: Warnings and errors |
| 53 | +- **info**: Important information with progress bar (default) |
| 54 | +- **debug**: Detailed information including headers |
| 55 | +- **trace**: Most detailed information |
| 56 | + |
| 57 | +## HTTP Request File Format |
| 58 | + |
| 59 | +Create a text file containing a raw HTTP request: |
| 60 | + |
| 61 | +``` |
| 62 | +POST /api/endpoint HTTP/2 |
| 63 | +Host: example.com |
| 64 | +User-Agent: mfloods/1.0 |
| 65 | +Content-Type: application/json |
| 66 | +Accept: */* |
| 67 | +Connection: keep-alive |
| 68 | +
|
| 69 | +{"key": "value"} |
| 70 | +``` |
| 71 | + |
| 72 | +### Example Request File |
| 73 | + |
| 74 | +```http |
| 75 | +POST /bbs/api/global/apply/bl-auth HTTP/2 |
| 76 | +Host: sgp-api.buy.mi.com |
| 77 | +User-Agent: okhttp/4.12.0 |
| 78 | +Accept-Encoding: gzip, deflate, br |
| 79 | +Accept: */* |
| 80 | +Connection: keep-alive |
| 81 | +Cookie: new_bbs_serviceToken=XZCh; |
| 82 | +Content-Type: application/json; charset=utf-8 |
| 83 | +
|
| 84 | +{"is_retry":true} |
| 85 | +``` |
| 86 | + |
| 87 | +## Use Cases |
| 88 | + |
| 89 | +### Load Testing |
| 90 | +```bash |
| 91 | +# Test with 1000 requests using 8 threads |
| 92 | +./mfloods -num 1000 -th 8 -log info request.txt |
| 93 | +``` |
| 94 | + |
| 95 | +### Proxy Testing |
| 96 | +```bash |
| 97 | +# Test through HTTP proxy |
| 98 | +./mfloods -num 100 -th 4 -proxy http://127.0.0.1:8080 request.txt |
| 99 | + |
| 100 | +# Test through SOCKS5 proxy |
| 101 | +./mfloods -num 100 -th 4 -proxy socks5://127.0.0.1:9050 request.txt |
| 102 | +``` |
| 103 | + |
| 104 | +### SSL/Proxy Scenarios |
| 105 | +```bash |
| 106 | +# Bypass SSL verification for proxy testing |
| 107 | +./mfloods -insecure -proxy http://127.0.0.1:8080 request.txt |
| 108 | +``` |
| 109 | + |
| 110 | +## Performance Features |
| 111 | + |
| 112 | +- **Connection Pooling**: Reuses connections to reduce overhead |
| 113 | +- **Resource Management**: Automatic cleanup of idle connections |
| 114 | +- **Concurrency Control**: Limits concurrent connections to prevent resource exhaustion |
| 115 | +- **Timeout Protection**: Prevents hanging requests from consuming resources |
| 116 | + |
| 117 | +## Security Notice |
| 118 | + |
| 119 | +⚠️ **Warning**: This tool is designed for testing and debugging purposes only. Use responsibly and only on systems you own or have explicit permission to test. |
| 120 | + |
| 121 | +- The `-insecure` flag disables SSL security - use only in trusted environments |
| 122 | +- Always respect rate limits and terms of service |
| 123 | +- Do not use for malicious purposes |
| 124 | + |
| 125 | +## Building from Source |
| 126 | + |
| 127 | +If you want to build from source (not included in this repository): |
| 128 | + |
| 129 | +```bash |
| 130 | +git clone <source-repo> |
| 131 | +cd mfloods |
| 132 | +cargo build --release |
| 133 | +``` |
| 134 | + |
| 135 | +## License |
| 136 | + |
| 137 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 138 | + |
| 139 | +## Contributing |
| 140 | + |
| 141 | +This repository contains only the compiled binaries and documentation. For source code contributions, please refer to the main development repository. |
| 142 | + |
| 143 | +## Support |
| 144 | + |
| 145 | +For issues, questions, or feature requests, please open an issue on GitHub. |
| 146 | + |
| 147 | +--- |
| 148 | + |
| 149 | +**Note**: This repository contains only the compiled binaries and documentation. The source code is not included for distribution purposes. |
0 commit comments