pyrate project is designed to test the application's security technologies by sending requests to a web application and checking whether they are blocked by the rate-limiting and WAF mechanisms. The code is using the asyncio library to handle concurrency and make many requests at the same time, which could help simulate real-world traffic more effectively.
- Install Python
git clone
this repocd
into the repopip install -r requirements.txt
The pyrate
application takes few arguments:
--url
- the URL to test--rate
- number of requests per second, deafult is 5--log
- save a log file locally in logs/ with the URL as the file name--body
- add a custom request body to send with each request, default is None--headers
- headers to send with each request separated by space--method
- HTTP method to use--verbose
- print the response body for each request--random-agent
- send a random user agent with each request--waf
- append '<script>alert(1)</script>' to the URL and trigger the WAF--waf-list
- list all available wafs--insecure
- bypass certificate checks
python3 pyrate.py --url https://example.com/ --rate 1 --method POST --body "id=1" --headers "Content-Type: application/json" "Authorization:Bearer 12345" --waf
❯ python3 pyrate.py --url https://brokencrystals.com --rate 1
###Simple Python Rate Limiting Tester###
This tool will multiply the numebr of the threads by 60, so it can calculate
the number of requests availabe in 1 minute.
[info] External IP: X.X.X.X
[info] Total requests: 25
[info] Testing https://brokencrystals.com
[success] Detected WAF: Cloudflare WAF
100%|██████████████████████████████████████████████████ [00:16<00:00, 3.58it/s]
+------------------------------+
| Total Requests Status Code |
+==============================+
| 25 200 |
+------------------------------+
[logging] debug files were saved in: ./logs/brokencrystals.log
All debug files will be saved to the logs/[hostname]
folder.
- git clone this repo
cd
into the repodocker build -t pyrate .
docker run -it pyrate --url https://example.com/
- Dor Shaer - creator and maintainer
All WAF signatures logic were taken from the awesome library wafalyzer