Advertisement
Guest User

Untitled

a guest
May 27th, 2014
457
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.29 KB | None | 0 0
  1. ;http://stackoverflow.com/questions/11380785/best-way-to-save-a-captcha-and-then-solve-it-manually - Alternatively search for recaptcha_public_key
  2.  
  3. #include <dbcclient.au3>
  4.  
  5.     ;Get recaptcha challenge ID
  6.     Local $captchaChallenge = _FFGetValue("recaptcha_challenge_field", "id")
  7.     ;Query google.com for the captcha image
  8.     Local $captchaURL = "http://www.google.com/recaptcha/api/image?c=" & $captchaChallenge
  9.     ;~ MsgBox(0, "", $captchaURL)
  10.     ;Download the captcha image and save as .jpg
  11.     $tempcaptchaurl = "Captchas\Tumblr reg " & Random(5,5000,1) & ".jpg"
  12.     $downCaptcha = InetGet($captchaURL, $tempcaptchaurl)
  13.  
  14.     ;Request a solution from DBC
  15.     $solvedcaptcha = DeathByCaptchaDecode("DCBUsername", "DCBPassword", $tempcaptchaurl, 120)
  16.     If $solvedcaptcha[1] = "" Then
  17. ;~      MsgBox(0, "No captcha returned.", "Solved: " & $solvedcaptcha[1] & @CRLF & "Captcha path: " & $tempcaptchaurl)
  18.         ;Retry or manually enter captcha instead of quitting?
  19.         _FFQuit()
  20.         sleep(4000)
  21.         Return 0
  22.     EndIf
  23.  
  24.     ;Click the captcha response field, as tumblr is sometimes buggy if it's not clicked
  25.     _FFClick("recaptcha_response_field", "name")
  26.     Sleep(200)
  27.     ;Insert captcha solution
  28.     _FFSetValue($solvedcaptcha[1], "recaptcha_response_field", "name")
  29.     Sleep(500)
  30.     ;Submit form
  31.     _FFClick("signup_forms_submit", "id")
  32.     _FFLoadWait()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement