Skip to content

AlphafromZion/wolfbrowser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐺 wolfbrowser

Stealth browser toolkit for Python. Direct CDP connection, no Selenium, no WebDriver traces.

Built for AI agents that need to browse the real web β€” not the sanitised version that anti-bot systems let through.

What It Does

  • Bypasses anti-bot detection β€” Cloudflare, Imperva, DataDome, hCaptcha challenges
  • Realistic fingerprints β€” randomised screen, GPU, platform, timezone, locale (internally consistent)
  • Human-like interaction β€” bezier curve mouse movement, variable typing speed, smooth scrolling
  • Session persistence β€” save/load cookies and localStorage across runs
  • Pure CDP β€” no Selenium, no chromedriver binary, no WebDriver protocol traces

Quick Start

pip install websockets httpx
import asyncio
from wolfbrowser import WolfBrowser

async def main():
    async with WolfBrowser(headless=True) as browser:
        tab = await browser.get_tab()
        await tab.goto("https://example.com")
        
        print(await tab.get_title())
        print(await tab.get_text())
        
        # Interact like a human
        await tab.click("Accept Cookies")
        await tab.type_text("#search", "something")
        await tab.scroll("down", 500)
        
        # Screenshot
        await tab.screenshot("page.png", full_page=True)

asyncio.run(main())

CLI

# Fetch page content with stealth
python -m wolfbrowser.cli fetch "https://example.com" --output text

# Screenshot
python -m wolfbrowser.cli screenshot "https://example.com" -o page.png --full-page

# Extract specific elements
python -m wolfbrowser.cli extract "https://example.com" -s "h1,h2,p" --format json

# Verify stealth is working
python -m wolfbrowser.cli stealth-test

Stealth Test Results

Testing bot.sannysoft.com...
  navigator.webdriver: None βœ…
  window.chrome: True βœ…
  plugins.length: 5 βœ…
  languages: en-AU,en βœ…
  platform: Win32 βœ…

Testing nowsecure.nl (Cloudflare)...
  Title: nowsecure.nl
  Result: βœ… PASSED

Anti-Detection

11 stealth patches applied via CDP before any page JavaScript executes:

Check Status
navigator.webdriver Hidden
window.chrome Present
Plugins array Populated (5)
Languages Realistic
Platform Matches fingerprint
WebGL renderer Spoofed GPU
Screen dimensions Randomised
User-Agent consistency sec-ch-ua matched
Timezone/locale Matched
Function.toString Native-looking
Permissions API Patched

Session Management

Save login state and restore it later:

from wolfbrowser import WolfBrowser, SessionManager

sm = SessionManager()

async with WolfBrowser() as browser:
    tab = await browser.get_tab()
    await tab.goto("https://somesite.com")
    # ... log in ...
    await sm.save_session(tab, "mysite")

# Later
async with WolfBrowser() as browser:
    tab = await browser.get_tab()
    await sm.load_session(tab, "mysite")  # Logged in!

How It Works

  1. Launches Chrome with --disable-blink-features=AutomationControlled and stealth flags
  2. Connects via Chrome DevTools Protocol (CDP) over websocket β€” no chromedriver needed
  3. Injects 11 anti-detection scripts via Page.addScriptToEvaluateOnNewDocument (runs before any site JS)
  4. Sets User-Agent, timezone, locale via CDP commands (not JS injection)
  5. Generates internally consistent fingerprints (GPU matches platform, timezone matches locale, etc.)
  6. Human-like interaction via Input.dispatchMouseEvent with bezier curves and variable timing

Requirements

  • Python 3.10+
  • Chrome or Chromium installed
  • websockets and httpx packages

License

MIT


Built by @AlphafromZion 🐺

About

🐺 Stealth browser toolkit β€” CDP-based, anti-detection, human-like interaction. Passes Cloudflare.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages