Package: goodbyecaptcha
GoodByeCaptchaAn async Python library to automate solving ReCAPTCHA v2 by images/audio using
Mozilla’s DeepSpeech, PocketSphinx, Microsoft Azure’s, Wit.AI, Google Speech or
Amazon’s Transcribe Speech-to-Text API. Also image recognition to detect
the object suggested in the captcha. Built with Pyppeteer for Chrome
automation framework and similarities to Puppeteer, PyDub for easily
converting MP3 files into WAV, aiohttp for async minimalistic web-server,
and Python’s built-in AsyncIO for convenience.DisclaimerThis project is for educational and research purposes only. Any actions
and/or activities related to the material contained on this GitHub
Repository is solely your responsibility. The misuse of the information
in this GitHub Repository can result in criminal charges brought against
the persons in question. The author will not be held responsible in the
event any criminal charges be brought against any individuals misusing
the information in this GitHub Repository to break the law.CompatibilityLinux, macOS, and Windows!RequirementsPython3.7,FFmpeg, aMicrosoft
Azureaccount for Bing Speech API access, an
Amazon Web Services account for Transcribe and S3 access, a Wit.AI or for Pocketsphinx.
You’ll need pulseaudio, swig, libasound2-dev, and libpulse-dev under Debian.Train the yolov3 neural network to improve image recognition.Training YoloV3I recommend training yolov3 to improve the recaptcha resolution with the following information:DatasetTutorial VideoObject classes:bicycle, bridge, bus, car, chimneys, crosswalk, fire hydrant, motorcycle, palm trees, parking meters, stair, taxis, tractors, traffic light, treesInstallation$apt-getupdate&&apt-getinstall-ylibpangocairo-1.0-0libx11-xcb1libxcomposite1libxcursor1libxdamage1libxi6libxtst6libnss3libcups2libxss1libxrandr2libgconf-2-4libasound2libasound2-devlibatk1.0-0libgtk-3-0gconf-servicelibappindicator1libc6libcairo2libcups2libdbus-1-3libexpat1libfontconfig1libgcc1libgdk-pixbuf2.0-0libglib2.0-0libnspr4libpango-1.0-0libpulse-devlibstdc++6libx11-6libxcb1libxext6libxfixes3libxrender1libxtst6ca-certificatesfonts-liberationlsb-releasexdg-utilsbuild-essentialffmpegswigsoftware-properties-commoncurl$pipinstallgoodbyecaptchaInstall tutorialConfigurationPlease edit goodbyecaptcha.example.yaml and save as goodbyecaptcha.yamlUsageIf you want to use it in your own scriptfromgoodbyecaptcha.solverimportSolverpageurl="https://www.google.com/recaptcha/api2/demo"proxy="127.0.0.1:1000"auth_details={"username":"user","password":"pass"}args=["--timeout 5"]options={"ignoreHTTPSErrors":True,"args":args}# References: https://miyakogi.github.io/pyppeteer/reference.htmlclient=Solver(# With Proxy# pageurl, lang='en-US', options=options, proxy=proxy, proxy_auth=auth_details# Without Proxypageurl,lang='en-US',options=options)solution=client.loop.run_until_complete(client.start())ifsolution:print(solution)If you want to use eventsfromgoodbyecaptcha.solverimportSolverpageurl="https://www.google.com/recaptcha/api2/demo"proxy="127.0.0.1:1000"auth_details={"username":"user","password":"pass"}args=["--timeout 5"]options={"ignoreHTTPSErrors":True,"args":args}# References: https://miyakogi.github.io/pyppeteer/reference.htmlclassMySolver(Solver):asyncdefon_goto(self):# Set Cookies and other stuffawaitself.page.setCookie({'name':'cookie1','value':'value1','domain':'.google.com'})self.log('Cookies ready!')asyncdefon_start(self):# Set or Change dataself.log('Set data in form ...')awaitself.page.type('input[name="input1"]','value')asyncdefon_finish(self):# Click button Sendself.log('Clicking send button ...')awaitself.page.click('input[id="recaptcha-demo-submit"]')awaitself.page.waitForNavigation()awaitself.page.screenshot({'path':'image.png'})client=MySolver(# With Proxy# pageurl, lang='en-US', options=options, proxy=proxy, proxy_auth=auth_details# Without Proxypageurl,lang='en-US',options=options)client.loop.run_until_complete(client.start())