Free ReCaptcha v2 and v3 breaker
- The only coding I've done is assembly language on a Z80 Amstrad a great many years ago
- I've never touched Python or used FastAPI
- I was prompted to do this when some Facebook guy said he'd integrated Recaptcha into GSA CaptchaBreaker, said he'd give it away and then didn't
- I'm also a Mac user but have GSA SER & CB etc running on my MacMini to try and get some juice for my sites. I'm no Windows expert but I can get around
1. install Python from https://www.python.org/downloads/
click the box on the installer to 'Add python.exe to PATH'
at the end of the installation, also click the 'Disable path length limit'
then close button
2. Now to install ffmpeg via the command line
go to https://www.liquidweb.com/kb/how-to-install-chocolatey-on-windows/#:~:text=Chocolatey%20or%20Choco%20as%20it
Scroll down to the 'Install Using Windows Cmd Shell' section. Paste in the command you see there
3. next run 'choco install ffmpeg' and when prompted, type 'yes' to accept all further install prompts
4. also run ' pip install fastapi playwright playwright-recaptcha python-multipart uvicorn ' - this installs the wrapper which will act as an internal webserver as well as the GitHub code that does the captcha solving
5. also ' pip install msvc-runtime ' which I found early on is needed to avoid some missing code
6. from Windows command line, ' playwright install ' - this preps and installs the needed web browsers so captcha solving can run in the background
7. To avoid Windows permission problems, I chose my user directory and Documents to store stuff.
Make a 'recaptcha' directory, and then 1 inside this one - used _capv2v3 since I prefer directories to be listed at the top. These names can be anything that makes better sense for you. They can be anything you like.
Unzip the attachment from this post and copy the attached _capv2v3.py into the '_capv2v3' directory
NOTE: You will need edit the _capv2v3.py file to fill in rotating proxy details into the top solve_captcha2 function. I've been told ReCaptchav2 solving has a higher success rate with proxies but no idea really. Mine are currently webshare proxies.
8. This script/FastAPI webserver will create small txt files that I have used to update the captcha's status and final result. It creates lots of these files so I have an internal function inside it that deletes any .txt file that is older than 30 minutes. Be aware to not store anything else inside these 2 directories, with a .txt extension.
Caveat: There is room for improvement to use some lightweight database obviously but that's too complicated for me, at this stage.
9. Open a Windows CMD shell (run as Administrator) and navigate to the '_capv2v3' directory.
In the Windows CMD shell, run this command 'uvicorn _capv2v3:app --port 8000 --workers 8' - adjust number of workers to your system.
The Windows CMD shell should now be running a webserver awaiting input for captcha solving
10. Now it is time to activate them into GSA SER. You can add this to GSA CaptchaBreaker if it is running in webserver mode too.
11. Click GSA SER options, and the left 'Captcha' tab.
Click add and choose 2Captcha API With IP from the top of the list
Host - 127.0.0.1:8000
API-Key - GSA (or anything else but fill something in)
Usage types - tick both ReCaptchav2 and ReCaptchav3
Other options are up to your situation and choice.
12. Click OK and you should soon see activity in the Windows CMD shell.
13. Be very careful when editing the .ph Python file too. Python is not tolerate with incorrect code formatting. Keep the formatting as it is in the original file and you should be OK.
14. My experience with XEvil was an awful lot of failures, timeouts etc. It was very heavy on my MacMini, crashed a lot, it's developers were always price-gouging for upgrades and they never reply to any emails, leaving me without access to their forums for help. Plus their hidden monthly subscription fee.
Anyway, I hope I've covered the installation. I've spent a bit of time optimising as best I can with my experience and all seems to be OK.
Big thanks go out to the guy/s at https://github.com/Xewdy444/Playwright-reCAPTCHA and special thanks to ChatGPT who I chatted with for many long hours in Python help
Comments welcome and certainly if you have any Python skills then don't be afraid to jump in on improvements.
Edit: script updated Mar 3, 2023 and threads set to 0 for testing