Stealth browser automation for AI agents over MCP and the Chrome DevTools Protocol: navigation, network hooks, DOM extraction, and pixel-accurate UI cloning.
Python ai-agent-toolsai-toolsanthropicanti-bot-bypassautomation-toolsbrowser-automationchrome-devtoolsclaude-mcpcloudflare-bypassdeveloper-toolsfastmcpmcp-servermodel-context-protocolnetwork-interceptionnodriverpythonstealth-browserundetectable-browserweb-automationweb-scraping
Fix broken scroll_page and add stealth test results
Vibhek Soni51e3422d4620
diff --git a/STEALTH_TESTS.md b/STEALTH_TESTS.mdnew file mode 100644index 0000000..5ee039a--- /dev/null+++ b/STEALTH_TESTS.md@@ -0,0 +1,138 @@+# Stealth Detection Test Results++Verified bypass results for stealth-browser-mcp against major bot detection systems.++**Test Date:** 2026-02-10+**Browser:** Chrome 144 (nodriver)+**Platform:** Windows 10 (Win64)+**Mode:** Non-headless++---++## 1. Cloudflare Challenge (nowsecure.nl)++**Result: PASSED**++The browser navigated through Cloudflare's bot challenge without any manual intervention.+The page resolved to the "NOWSECURE BY NODRIVER" victory screen, confirming full bypass+of Cloudflare's JavaScript challenge, TLS fingerprinting, and behavioral analysis.++---++## 2. CreepJS Fingerprint Analysis++**Result: PASSED**++CreepJS performs deep browser fingerprinting across dozens of vectors. Key findings:++| Detection Vector | Result |+|-----------------|--------|+| Headless detected | 0% |+| Stealth detected | 0% |+| Like headless | 25% (chromium flag, normal for real Chrome) |+| Privacy resistance | unknown (no fingerprint blocking detected) |+| Security resistance | unknown (clean) |+| Extension detected | unknown (none) |++**Fingerprint consistency:**+- GPU: NVIDIA GeForce RTX 2070 SUPER (real hardware)+- Platform: Windows 10 (64-bit), 16 cores, 8GB RAM+- Timezone: America/New_York (Eastern Standard Time)+- Language: en-US+- WebRTC: Real local/STUN candidates exposed+- Confidence: moderate (consistent fingerprint)++---++## 3. Sannysoft Bot Detection++**Result: 20/20 TESTS PASSED**++Every single detection vector returned "ok" or consistent values.++| Test | Result |+|------|--------|+| PHANTOM_UA | ok |+| PHANTOM_PROPERTIES | ok |+| PHANTOM_ETSL | ok |+| PHANTOM_LANGUAGE | ok |+| PHANTOM_WEBSOCKET | ok |+| MQ_SCREEN | ok |+| PHANTOM_OVERFLOW | ok |+| PHANTOM_WINDOW_HEIGHT | ok |+| HEADCHR_UA | ok |+| HEADCHR_CHROME_OBJ | ok |+| HEADCHR_PERMISSIONS | ok |+| HEADCHR_PLUGINS | ok |+| HEADCHR_IFRAME | ok |+| CHR_DEBUG_TOOLS | ok |+| SELENIUM_DRIVER | ok |+| CHR_BATTERY | ok |+| CHR_MEMORY | ok |+| TRANSPARENT_PIXEL | ok |+| SEQUENTUM | ok |+| VIDEO_CODECS | ok |++**Additional consistent properties:**+- User Agent: Standard Chrome 144 UA string+- WebDriver: missing (passed - not detected as automated)+- Chrome object: present (passed - real Chrome API)+- Permissions: prompt (normal behavior)+- Plugins: 5 (standard Chrome PDF plugins)+- Languages: en-US, en+- WebGL Vendor: Google Inc. (NVIDIA)+- Broken Image: 16x16 (correct dimensions)+- Canvas fingerprints: All consistent hashes across contexts++---++## 4. Intoli Headless Detection (Round II)++**Result: ALL TESTS PASSED**++| Test | Result |+|------|--------|+| User Agent (Old) | Chrome/144.0.0.0 (clean) |+| WebDriver (New) | missing (passed) |+| WebDriver Advanced | pass |+| Chrome (New) | present (passed) |+| Permissions (New) | prompt (normal) |+| Plugins Length (Old) | 5 (correct) |+| Plugins type | PluginArray (pass) |+| Languages (Old) | en-US, en (consistent) |+| WebGL Vendor | Google Inc. (NVIDIA) |+| WebGL Renderer | ANGLE (NVIDIA GeForce RTX 2070 SUPER) |+| Broken Image Dimensions | 16x16 (correct) |++---++## 5. X.com (Twitter) Login Wall Bypass++**Result: BYPASSED**++Navigated to `x.com/elonmusk` which presents a login modal blocking content.+The browser loaded the full profile data behind the modal. After removing the+overlay via DOM manipulation, all profile data was accessible:++- Display name, handle, bio, join date+- Follower/following counts (234.3M followers)+- Full tweet timeline with engagement metrics+- All data-testid attributes queryable++This demonstrates real-world scraping capability against a major platform+with aggressive bot detection (Arkose Labs/FunCaptcha integration).++---++## Summary++| Detection System | Type | Result |+|-----------------|------|--------|+| Cloudflare | JS Challenge + TLS | PASSED |+| CreepJS | Deep Fingerprinting | 0% stealth / 0% headless |+| Sannysoft | Bot Detection Suite | 20/20 tests passed |+| Intoli | Headless Detection | All tests passed |+| X.com | Login Wall + Arkose | Bypassed, data scraped |++All tests confirm that stealth-browser-mcp running on nodriver is undetectable+by current industry-standard bot detection systems.diff --git a/src/dom_handler.py b/src/dom_handler.pyindex 601425e..3c0092c 100644--- a/src/dom_handler.py+++ b/src/dom_handler.py@@ -621,27 +621,23 @@ class DOMHandler:bool: True if scroll succeeded, False otherwise."""try:+ behavior = "'smooth'" if smooth else "'instant'"+if direction == "down":- script = f"window.scrollBy(0, {amount})"+ script = f"window.scrollBy({{top: {amount}, left: 0, behavior: {behavior}}})"elif direction == "up":- script = f"window.scrollBy(0, -{amount})"+ script = f"window.scrollBy({{top: -{amount}, left: 0, behavior: {behavior}}})"elif direction == "right":- script = f"window.scrollBy({amount}, 0)"+ script = f"window.scrollBy({{top: 0, left: {amount}, behavior: {behavior}}})"elif direction == "left":- script = f"window.scrollBy(-{amount}, 0)"+ script = f"window.scrollBy({{top: 0, left: -{amount}, behavior: {behavior}}})"elif direction == "top":- script = "window.scrollTo(0, 0)"+ script = f"window.scrollTo({{top: 0, left: 0, behavior: {behavior}}})"elif direction == "bottom":- script = "window.scrollTo(0, document.body.scrollHeight)"+ script = f"window.scrollTo({{top: document.body.scrollHeight, left: 0, behavior: {behavior}}})"else:raise ValueError(f"Invalid scroll direction: {direction}")- if smooth:- script = script.replace("scrollBy", "scrollBy({behavior: 'smooth'}, ")- script = script.replace("scrollTo", "scrollTo({behavior: 'smooth', top: ")- if "scrollTo" in script:- script = script.replace(")", "})")-await tab.evaluate(script)await asyncio.sleep(0.5 if smooth else 0.1)