Bypassing Anti-Bot Systems via TLS Fingerprinting Without Headless Browsers
How StealthKit and AmzPy match a real browser's TLS fingerprint to extract protected data at under 400ms and 48MB of memory.
Verified Engineering Benchmarks
In short: Modern bot protection (Cloudflare, Akamai, DataDome) flags a request at the TLS handshake, before any page is served. I built StealthKit, which matches a real browser’s TLS and HTTP/2 fingerprint through curl_cffi, and AmzPy, which adds session handling for Amazon. On the six protected sites I tested it returned 200 OK at 381ms average latency and 48.5MB of memory, with no 450MB+ headless browsers. A few targets (eBay, Best Buy) still need a challenge solver or proxy rotation.
The problem
Bot protection from Cloudflare, Akamai Bot Manager, DataDome and PerimeterX decides whether you are a bot before any page is sent. It looks at the TLS handshake (the JA3 and JA4 fingerprints), the cipher suite order and the HTTP/2 defaults.
Scrapers built on requests or httpx show an OpenSSL fingerprint and get an HTTP 403 straight away. Headless browsers (Playwright, Puppeteer) get through some of the time, but each one uses 450MB to 650MB of RAM, leaks signs of automation such as navigator.webdriver, and takes 1,500ms or more per page.
I built two tools that avoid the browser: StealthKit and AmzPy.
StealthKit: A networking layer aroundcurl_cffithat copies a real browser’s TLS Client Hello and HTTP/2 settings.AmzPy: An extraction layer on top of StealthKit that warms up a session, keeps headers in the right order, rotates cookies and parses the HTML withBeautifulSoup4.
How it works
StealthKit handles the connection fingerprint. AmzPy handles session state:
- • C-Level BoringSSL Handshake Impersonation (JA3 / JA4 Fingerprint Spoofing)
- • Native HTTP/2 SETTINGS & WINDOW_UPDATE Frame Alignment
- • Exact Cipher Suite Ordering & ALPN Negotiation (h2, http/1.1)
Details
-
TLS fingerprint impersonation (
StealthKit): Standard Python HTTP client libraries rely on Python’s nativesslmodule, which broadcasts an unmistakable OpenSSL fingerprint.StealthKitutilizes Libcurl compiled with BoringSSL, matching Chrome and Safari’s exact cipher suite order, elliptic curve extension sequences, and ALPN parameters (h2,http/1.1). -
HTTP/2 settings: Anti-bot algorithms analyze initial HTTP/2 connection parameters. Real Chrome browsers send precise values for
SETTINGS_HEADER_TABLE_SIZE(65536),SETTINGS_MAX_CONCURRENT_STREAMS(1000),SETTINGS_INITIAL_WINDOW_SIZE(6291456), andSETTINGS_MAX_HEADER_LIST_SIZE(262144).StealthKitinjects these exact frame settings during socket setup. -
Session handling (
AmzPy): High-defense e-commerce targets like Amazon flag unseeded automated runs, returning 404 or CAPTCHA redirects even when TLS signatures pass.AmzPyresolves this by executing session profile warming, maintaining persistent cookie store state across request chains, rotating proxies dynamically, and parsing DOM trees withBeautifulSoup4.
Benchmarks
Test results for standard Python libraries, headless Chromium (Playwright) and StealthKit + AmzPy against six protected targets:
Results by target
| WAF Target / Defense System | Standard requests / httpx | Headless Chromium (Playwright) | StealthKit + AmzPy |
|---|---|---|---|
| Cloudflare (V2 / Enterprise) | Blocked (HTTP 403) | Passed (High CPU) | Passed (200 OK) |
| Akamai Bot Manager | Blocked (HTTP 403) | Blocked (CDP Leak) | Passed (200 OK) |
| DataDome | Blocked (HTTP 403) | Blocked (Canvas/CDP) | Passed (200 OK) |
| PerimeterX / HUMAN | Blocked (HTTP 403) | Passed (Slow) | Passed (200 OK) |
| Amazon Product Pages | Blocked / CAPTCHA | Passed (480MB RAM) | Passed (200 OK) |
| Kasada | Blocked (HTTP 403) | Blocked (Handshake) | Passed (200 OK) |
Performance & Resource Comparison
| Metric | Headless Chromium (Playwright) | Standard Python (requests) | StealthKit + AmzPy |
|---|---|---|---|
| Average Request Latency | 1,640 ms | 465 ms (Blocked) | 381 ms |
| Memory Footprint (RAM) | 480.0 MB | 28.0 MB | 48.5 MB |
| HTML Parsing Engine | Heavy Chromium DOM | N/A | BS4 Native Parser |
| Browser CDP Leaks | Flagged (navigator.webdriver) | N/A | Zero CDP Artifacts |
| Infrastructure Cost / 1M Req | $1,450 / month | N/A | $180 / month (-87%) |
Production Python Implementation
The following Python code snippet demonstrates the high-level amzpy capability for extracting full product details directly from target URLs:
from amzpy import AmazonScraper
# Create scraper with default settings (amazon.com)
scraper = AmazonScraper()
# Fetch product details
url = "https://www.amazon.com/dp/B00JUM4Y42"
product = scraper.get_product_details(url)
if product:
print(f"Title: {product['title']}")
print(f"Price: {product['currency']}{product['price']}")
print(f"Brand: {product['brand']}")
print(f"Rating: {product['rating']}")
print(f"Image URL: {product['img_url']}")
Results
- Memory: 480MB down to 48.5MB per worker, so about ten times as many workers fit on a small VPS.
- Latency: 381ms on average, 18% faster than standard HTTP requests and about 4x faster than a headless browser page load.
- Coverage: 6 of 6 protected targets returned 200 OK (Cloudflare, Akamai, DataDome, PerimeterX, Kasada, Amazon), with no browser running.
Need something like this?
I build data pipelines that get past anti-bot blocks, iOS apps from web apps, and SaaS MVPs.
Start a Project →