This is a simple Python solution to brute-force an MD5 hash for CTF challenges using asynchronous HTTP requests. The code sends HTTP GET requests to a target URL, testing each possible MD5 hash character (hexadecimal) and then tries to find the flag from the server.
- Python 3.x
httpx
libraryasyncio
library
-
Clone the repository:
git clone https://github.com/kn0x0x/brute-force-md5.git
-
Install the required dependencies:
pip install httpx
- Update the
base_url
in themain()
function to point to the server you are trying to solve. - Run the script:
python3 solve.py
The script will brute-force the MD5 hash of the flag by sending asynchronous requests to the server. Once the MD5 hash is fully constructed, it will attempt to fetch the flag.
- This script uses the
httpx
library to send HTTP GET requests asynchronously to improve speed. - It brute-forces each character of the MD5 hash and then appends the
flag.txt
path to retrieve the flag once the hash is fully discovered.