File size: 1,997 Bytes
f262da8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import requests
import time
import os

# Read from environment, default to HF Spaces port
API_URL = os.getenv("API_URL", "http://127.0.0.1:7860/scrape")
API_KEY = os.getenv("API_KEY", "my_secret_key_123")

SITES = [
    ("🟒 No CF (httpbin)",     "https://httpbin.org/headers"),
    ("🟑 Medium CF (G2.com)",  "https://www.g2.com"),
    ("πŸ”΄ Strict CF",           "https://nowsecure.nl"),
    ("πŸ”΄ Turnstile Demo",      "https://demo.turnstile.workers.dev/"),
    ("🟑 Indeed (job site)",   "https://www.indeed.com"),
]

print("\n" + "="*62)
print("   πŸ”¬ LIVE 3-STAGE BYPASS TEST β€” 5 REAL SITES")
print("="*62)

results = []
for label, url in SITES:
    print(f"\n  {label}")
    print(f"  URL: {url[:55]}")
    print(f"  {'─'*52}")
    try:
        headers = {"X-API-Key": API_KEY}
        resp = requests.post(API_URL, json={"url": url}, headers=headers, timeout=60).json()
        stage    = resp.get("stage", "?")
        method   = resp.get("method", "?")
        t        = resp.get("time_seconds", "?")
        cookies  = resp.get("cookies", {})
        token    = resp.get("token")
        html     = (resp.get("html") or "")[:80].replace("\n", " ")

        print(f"  βœ… Stage {stage}: {method}")
        print(f"  ⏱  Time:    {t}s")
        print(f"  πŸͺ Cookies: {len(cookies)}" + (f"   πŸ”‘ Token: {token[:25]}..." if token else ""))
        print(f"  πŸ“„ Preview: {html}...")
        results.append((label, "βœ… PASS", stage, t))
    except Exception as e:
        print(f"  ❌ FAILED β€” {str(e)[:80]}")
        results.append((label, "❌ FAIL", "β€”", "β€”"))

print("\n" + "="*62)
print("   πŸ“Š SUMMARY TABLE")
print("="*62)
print(f"  {'Site':<28} {'Result':<10} {'Stage':<8} {'Time'}")
print(f"  {'─'*28} {'─'*10} {'─'*8} {'─'*8}")
for label, result, stage, t in results:
    print(f"  {label:<28} {result:<10} {str(stage):<8} {t}s")
wins = sum(1 for _, r, _, _ in results if "PASS" in r)
print(f"\n  Score: {wins}/5 sites bypassed")
print("="*62)