Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;http://stackoverflow.com/questions/11380785/best-way-to-save-a-captcha-and-then-solve-it-manually - Alternatively search for recaptcha_public_key
- #include <dbcclient.au3>
- ;Get recaptcha challenge ID
- Local $captchaChallenge = _FFGetValue("recaptcha_challenge_field", "id")
- ;Query google.com for the captcha image
- Local $captchaURL = "http://www.google.com/recaptcha/api/image?c=" & $captchaChallenge
- ;~ MsgBox(0, "", $captchaURL)
- ;Download the captcha image and save as .jpg
- $tempcaptchaurl = "Captchas\Tumblr reg " & Random(5,5000,1) & ".jpg"
- $downCaptcha = InetGet($captchaURL, $tempcaptchaurl)
- ;Request a solution from DBC
- $solvedcaptcha = DeathByCaptchaDecode("DCBUsername", "DCBPassword", $tempcaptchaurl, 120)
- If $solvedcaptcha[1] = "" Then
- ;~ MsgBox(0, "No captcha returned.", "Solved: " & $solvedcaptcha[1] & @CRLF & "Captcha path: " & $tempcaptchaurl)
- ;Retry or manually enter captcha instead of quitting?
- _FFQuit()
- sleep(4000)
- Return 0
- EndIf
- ;Click the captcha response field, as tumblr is sometimes buggy if it's not clicked
- _FFClick("recaptcha_response_field", "name")
- Sleep(200)
- ;Insert captcha solution
- _FFSetValue($solvedcaptcha[1], "recaptcha_response_field", "name")
- Sleep(500)
- ;Submit form
- _FFClick("signup_forms_submit", "id")
- _FFLoadWait()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement