Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<IE.au3>
- #include<string.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- $url = 'https://www.google.com/recaptcha/api2/demo'
- $g_recaptcha_response = RecaptchaBox($url)
- ClipPut($g_recaptcha_response)
- MsgBox(0,'g_recaptcha_response',$g_recaptcha_response)
- Func RecaptchaBox($url)
- Local $oIE = _IECreateEmbedded()
- $Form1 = GUICreate("ReCaptcha Box", 321, 473, 555, 160)
- $obj = GUICtrlCreateObj($oIE, 0, 0, 316, 468)
- _IENavigate($oIE, $url)
- $site_key = _StringBetween(_IEDocReadHTML($oIE),'data-sitekey="','"')[0]
- _IEDocWriteHTML($oIE,'<div class="g-recaptcha" data-sitekey="'&$site_key&'"></div><script src="https://www.google.com/recaptcha/api.js"></script>')
- GUISetState(@SW_SHOW)
- While 1
- $g_recaptcha_response = _StringBetween(_StringBetween(_IEDocReadHTML($oIE),'<textarea name="g-recaptcha-response"','/textarea>')[0],'>','<')[0]
- if Not $g_recaptcha_response = '' Then ExitLoop
- WEnd
- GUIDelete($Form1)
- Return $g_recaptcha_response
- EndFunc
Add Comment
Please, Sign In to add comment