A full reversal of MTCaptcha, including the folding algorithm and the visual captcha solver (ocr).
Coded By Nmqx and Thibhrb in python and golang
- Architecture :
- Go Service: Handles the computationally intensive "Folding" algorithm (PoW) required to generate the valid
fatoken. - Python Controller: Manages the HTTP session, request signing, and flow orchestration.
- PyTorch CRNN: A Convolutional Recurrent Neural Network trained to solve the specific visual style of MTCaptcha images.
- Go Service: Handles the computationally intensive "Folding" algorithm (PoW) required to generate the valid
- Full Flow Automation: Automates the entire process from fetching the challenge (
getchallenge), downloading the image (getimage), calculating the necessary proofs, and submitting the solution (solvechallenge). - Network: Uses
curl_cffito mimic real browser TLS fingerprints (Safari/Chrome).
flow.py: The main entry point. Orchestrates the solution process, interacting with the MTCaptcha API and the local services.calculate.go: A standalone HTTP service (running on port 9091) that implements the reverse-engineered folding algorithm (by nmqx and gemini) to calculate thefaparameter.cnn.py: The neural network definition (CRNN) and training logic.predictor.py: A lightweight inference wrapper for the trained model.crnn_weights.pt: Pre-trained weights for the captcha solver.
- Python 3.8+
- Go 1.18+
- NVIDIA GPU (Optional, but recommended for faster CRNN inference)
-
Install Python Dependencies:
pip install torch torchvision torchaudio numpy pillow requests curl_cffi
-
Initialize Go Module:
go mod init mtcaptcha-solver go mod tidy
The js solving runs or a localhost port , run the go script
go run calculate.goand it will listen on port 9091
Open a separate terminal and run the main flow script.
Make sure to change the proxies in flow.py to your own proxies. There is a big input ur own proxies in the file you should find it pretty easily
python flow.py- Proxies: Change in flow.py, use session proxies and use the randint var to make a session id so it stays the same for the session.
- Model Training: If you wish to retrain the model, place your labeled dataset in a folder named
captured_hitsand runpython cnn.py. - Dataset: Used a dataset by scraping the captchas so lowkey do your own dataset if you want to improve the model.
This project is for educational and research purposes only. It is intended to demonstrate vulnerabilities in captcha systems and the importance of bot protection. The authors are not responsible for any misuse of this code.
The proxy used in the script has like 10mb left so dont bother, use your own proxies. Also the cnn model is not the best, it's just a proof of concept, it will have a lot of false positives and false negatives. (around 10%), last thing, a fingerprint banned is a 1432 code on the getimage request. I have no clue why but probably because curl_cffi is not a real browser and doesn't emulate perfectly everything idk feel free to try to fix it on a fork