forked from CloakHQ/CloakBrowser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecaptcha_score.py
More file actions
35 lines (26 loc) · 915 Bytes
/
recaptcha_score.py
File metadata and controls
35 lines (26 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""Check reCAPTCHA v3 score with stealth browser.
Visits Google's reCAPTCHA demo page and extracts the score.
Expected: 0.9 (human-level) with cloakbrowser.
Default Playwright typically scores 0.1-0.3.
"""
import time
from cloakbrowser import launch
print("Launching stealth browser...", flush=True)
browser = launch(headless=True)
page = browser.new_page()
# Google's official reCAPTCHA v3 demo
page.goto("https://recaptcha-demo.appspot.com/recaptcha-v3-request-scores.php")
page.wait_for_load_state("networkidle")
# Click to trigger reCAPTCHA scoring
button = page.query_selector("button")
if button:
button.click()
time.sleep(3)
# Extract score from page
content = page.content()
print("Page loaded. Check the score in the response.")
print(f"URL: {page.url}")
# Take screenshot as proof
page.screenshot(path="recaptcha_score.png")
print("Screenshot saved: recaptcha_score.png")
browser.close()