└── recaptcha-v3.py /recaptcha-v3.py: -------------------------------------------------------------------------------- 1 | import re 2 | import requests 3 | 4 | ''' 5 | 6 | Search for "anchor" in the network tab while the site is loading to obtain the url 7 | 8 | anchor url should look like: 9 | https://www.google.com/recaptcha/api2/anchor?ar=1&k=... 10 | 11 | ''' 12 | 13 | ANCHOR_URL = "" 14 | 15 | # ------------------------------------------- 16 | 17 | def RecaptchaV3(ANCHOR_URL): 18 | url_base = 'https://www.google.com/recaptcha/' 19 | post_data = "v={}&reason=q&c={}&k={}&co={}" 20 | 21 | client = requests.Session() 22 | 23 | client.headers.update({ 24 | 'content-type': 'application/x-www-form-urlencoded' 25 | }) 26 | 27 | matches = re.findall('([api2|enterprise]+)\/anchor\?(.*)', ANCHOR_URL)[0] 28 | url_base += matches[0]+'/' 29 | params = matches[1] 30 | 31 | res = client.get(url_base+'anchor', params=params) 32 | token = re.findall(r'"recaptcha-token" value="(.*?)"', res.text)[0] 33 | 34 | params = dict(pair.split('=') for pair in params.split('&')) 35 | post_data = post_data.format(params["v"], token, params["k"], params["co"]) 36 | 37 | res = client.post(url_base+'reload', params=f'k={params["k"]}', data=post_data) 38 | 39 | answer = re.findall(r'"rresp","(.*?)"', res.text)[0] 40 | 41 | return answer 42 | 43 | # ------------------------------------------- 44 | 45 | ans = RecaptchaV3(ANCHOR_URL) 46 | 47 | print(ans) 48 | 49 | # If you are not sure how/where to use this token then this script is not for you :) 50 | --------------------------------------------------------------------------------