Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An asynchronized Python library to automate solving ReCAPTCHA v2 using audio and image recognition

License

NotificationsYou must be signed in to change notification settings

MacKey-255/GoodByeCatpcha

 
 

Repository files navigation

PyPIPyPI - Python VersionSourceForge - DownloadsPyPI - LicensePyPI - Status

GoodByeCaptcha

An async Python library to automate solving ReCAPTCHA v2 by images/audio usingMozilla's DeepSpeech, PocketSphinx, Microsoft Azure’s, Wit.AI, Google Speech orAmazon's Transcribe Speech-to-Text API. Also image recognition to detectthe object suggested in the captcha. Built with Pyppeteer for Chromeautomation framework and similarities to Puppeteer, PyDub for easilyconverting MP3 files into WAV, aiohttp for async minimalistic web-server,and Python’s built-in AsyncIO for convenience.

Disclaimer

This project is for educational and research purposes only. Any actionsand/or activities related to the material contained on this GitHubRepository is solely your responsibility. The misuse of the informationin this GitHub Repository can result in criminal charges brought againstthe persons in question. The author will not be held responsible in theevent any criminal charges be brought against any individuals misusingthe information in this GitHub Repository to break the law.

Compatibility

Linux, macOS, and Windows!

Requirements

Python3.7,FFmpeg, aMicrosoftAzure account for Bing Speech API access, anAmazon 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 YoloV3

I recommend training yolov3 to improve the recaptcha resolution with the following information:
  • Dataset
  • Tutorial Video
  • Object classes: bicycle, bridge, bus, car, chimneys, crosswalk, fire hydrant, motorcycle, palm trees, parking meters, stair, taxis, tractors, traffic light, trees

Installation

$ apt-get update&& apt-get install -y libpangocairo-1.0-0 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxi6 libxtst6 libnss3 libcups2 libxss1 libxrandr2 libgconf-2-4 libasound2 libasound2-dev libatk1.0-0 libgtk-3-0 gconf-service libappindicator1 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgdk-pixbuf2.0-0 libglib2.0-0 libnspr4 libpango-1.0-0 libpulse-dev libstdc++6 libx11-6 libxcb1 libxext6 libxfixes3 libxrender1 libxtst6 ca-certificates fonts-liberation lsb-release xdg-utils build-essential ffmpeg swig software-properties-common curl python3-pocketsphinx libpulse-dev$ pip install goodbyecaptcha

Install tutorial

https://img.youtube.com/vi/hPYMUdQ2aV8/0.jpg

Configuration

Please edit goodbyecaptcha.example.yaml and save as goodbyecaptcha.yaml

Usage

If you want to use it in your own script

fromgoodbyecaptcha.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 events

fromgoodbyecaptcha.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())

[8]ページ先頭

©2009-2025 Movatter.jp