WebVac
WebVac is an asyncio-powered dynamic web scraping and crawling tool built for modern JavaScript-heavy targets. It drives a real Chromium browser through Patchright, supports proxy rotation, robots handling, anti-bot resilience, optional login/session reuse, exports rich scan artifacts in multiple formats, and can optionally launch De-Caffeinator for VAPT-focused JavaScript reverse engineering.
Highlights
- Dynamic scraping with a real browser engine (Patchright)
- Single-page and recursive crawl modes
- Concurrency support with isolated browser slot identities
- Proxy pools with latency-based selection, round-robin, or random strategy (auto-uses
proxies.txt) - robots.txt bypassed by default (
--respect-robotsto obey) - Automatic screenshots for blocked/CAPTCHA pages (per-scan
assets/screenshots/) - Structured output (default: JSON + HTML report)
- Historical scan sessions under
scraped_data/<target>/scans/… - PDF and sourcemap asset download support
- Unified auth: Patchright login, session restore, MFA/TOTP
- Auth walls (
/login,/ap/signin, …) skipped separately from bot/WAF blocks - Human-like mouse/scroll/warmup on Patchright Chromium (
--no-humanizeto disable) - Network debug dumps on scrape failures (per-scan
network/folder) - Optional CapSolver auto-CAPTCHA (on by default when a key is present)
- Logout URL deny and sticky proxy when authenticated
- Optional opt-in VAPT task powered by De-Caffeinator
Release
Current release: 0.3.1
Highlights in 0.3.1:
- published to PyPI — install with
pip install webvac - 43-test pytest suite covering proxy parsing, storage, and robots behaviour
- GitHub Actions CI on Ubuntu and Windows for Python 3.11 and 3.12
- Docker image for scrape mode with Patchright Chromium preinstalled
CONTRIBUTING.mdcontributor guide and a tag-driven release workflow- fix report HTML generation on Python 3.11 and the Contact tab's page index
The 0.3.0 release introduced the De-Caffeinator integration via --task vapt,
the VAPT / JS analysis launcher option, session-scoped VAPT output under
analysis/decaffeinator/, and the scrape-first core cleanup.
See CHANGELOG.md for the release summary.
Project Structure
All application code lives in the installable webvac/ package. See docs/STRUCTURE.md.
run.py: Thin shim → interactive menu (webvac.cli.interactive)webvac/cli/scraper.py: Main CLI orchestrator (python -m webvac)webvac/core/: BFS crawler, page scrape flow, pipelineswebvac/auth/: AuthManager, sessions, MFA, auth-wall detectionwebvac/captcha/: CapSolver detect → extract → solve → inject (optional)webvac/utils/: Browser, proxies, robots, origin probe, screenshots, network debug, humanizewebvac/data/: HTML parse, page records, storage/exportexamples/: Input templates (auth, proxies, session, pipeline) — seeexamples/README.mddocs/,scripts/
Requirements
- Python 3.11+ (3.12 recommended)
- Windows, Linux, or macOS
- Browser dependencies required by Patchright
Installation
From PyPI
pip install webvac
python -m patchright install
That installs the webvac and webvac-menu console scripts. The PyPI package
contains the scraping core only; use a source checkout below if you also want
the examples/, docs/, or the --task vapt submodule.
From source
- Clone the repository.
- Initialize the De-Caffeinator submodule (needed for
--task vapt). - Create and activate a virtual environment.
- Install dependencies.
- Install Patchright browser binaries.
Windows PowerShell
git submodule update --init --recursive
python -m venv .venv
(Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned) ; (& .\.venv\Scripts\Activate.ps1)
pip install -r requirements.txt
pip install -e .
python -m patchright install
Linux/macOS
git submodule update --init --recursive
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
python -m patchright install
pip install -e . registers the webvac and webvac-menu console scripts and makes imports resolve as webvac.*.
If you only want scrape/crawl mode, WebVac itself still works without using the submodule. But --task vapt requires decaffeinator/blob-unpacker to be present and initialized.
First Run Checklist
Run the built-in preflight before your first scrape:
python -m webvac --doctor
--doctor checks:
- Python/runtime availability
- Patchright browser launch
- output directory write access
- proxy file parsing and optional health-check
- pipeline file discovery
- CapSolver key detection
- De-Caffeinator root validation when
--task vaptis selected
If your proxy pool is present but dead, WebVac will warn and continue with a direct connection using your real IP.
Example input files
Templates live under examples/. Copy and edit before use:
| Template | Flag |
|---|---|
examples/auth_creds.example.json |
--auth-profile / login JSON |
examples/proxies.example.txt |
--proxy-file |
examples/session.example.json |
--session-file (storage_state) |
examples/session_cookies_legacy.example.json |
--session-file (cookie list) |
examples/pipeline.example.py |
--pipeline-file |
The interactive menu (python run.py) lists these files and shows format hints when you pick session / proxy / credentials / pipeline.
Quick Start
Interactive launcher (recommended first run)
python run.py
# or: webvac-menu
The launcher helps you choose scrape mode, VAPT / JS analysis, browser visibility, login/session options, and common runtime settings.
Pick VAPT / JS analysis to run De-Caffeinator (blob unpacker) instead of the scrape pipeline. That menu option maps to --task vapt.
Recommended first command:
python -m webvac --doctor
Direct CLI usage
python -m webvac --url https://example.com --mode single
python -m webvac --url https://example.com --mode crawl --depth 3 --max-pages 50 --concurrency 2
VAPT task
Use the opt-in VAPT task when you want De-Caffeinator analysis instead of the normal scrape flow.
Clone with the submodule (or init it after clone):
git clone --recurse-submodules https://github.com/Shellghostt/WebVac.git
# or, inside an existing clone:
git submodule update --init --recursive
The De-Caffeinator checkout lives at decaffeinator/ (tool root: decaffeinator/blob-unpacker).
From the interactive launcher:
python run.py
Then choose VAPT / JS analysis.
Or from the CLI:
python -m webvac --task vapt --url https://example.com
Deep browser + historical JS discovery:
python -m webvac --task vapt --url https://example.com \
--vapt-profile deep --vapt-playwright --vapt-wayback
Common CLI Options
Core
--task scrape|vapt: Normal scrape flow or De-Caffeinator VAPT task--url: Target URL (required)--mode single|crawl: Single page or recursive internal crawl--engine dynamic|lightweight: Browser-based or lightweight HTTP engine--depth: Maximum crawl depth (crawl mode)--max-pages: Maximum number of pages (omit for unlimited crawl)--concurrency: Parallel workers for crawl mode
Browser and loading
--no-headless: Run browser in visible mode--timeout: Page load timeout in milliseconds--wait-until domcontentloaded|load|networkidle: Navigation wait strategy--no-humanize: Disable Bezier mouse paths, wheel scroll, per-host warmup, and post-load settle--no-humanize-warmup: Keep settle/scroll humanize but skip the once-per-host root visit
Output
--output: Output root directory (default:scraped_data)--format:json,csv,markdown,sqlite,html,all--label: Custom label for output naming
Robots and etiquette
--no-robots: Ignore robots.txt entirely--ignore-crawl-delay: Obey allow/deny rules but ignore crawl-delay--delay-min,--delay-max: Request pacing window
Login / authentication
--login: Enable login before scraping (forcesdynamicengine)--login-url: Login page URL--username,--password: Credentials (or setWEBVAC_USER/WEBVAC_PASS)--session-file: Load/save Playwrightstorage_state(legacy cookie-list files still work)--auth-profile FILE: Rich credentials JSON (selectors, steps, TOTP, policies) — seeexamples/auth_creds.example.json--auth-check-url URL: Protected URL used to verify session after login/restore--on-auth-wall abort|skip|relogin: Mid-crawl login-wall policy (default:skip)--session-ttl SECONDS: Expire saved sessions (0 = never)--otp-prompt: Prompt for OTP/MFA when an OTP field appears--no-auth-proxy-rotate: Pin proxy while authenticated (also default when--login)--dismiss-selector CSS: Extra Accept-button selector (repeatable; login + every scrape)--pause-for-consent: Headed wait-for-ENTER after first page per host (use with--no-headless)--no-consent-dismiss: Disable automatic cookie/CMP Accept clicks on scraped pages
Known-site CMP URL bypasses (host-allowlisted): Deloitte ?hidebanner=true (multi-TLD). Consent cookies before navigation: Google/YouTube CONSENT=YES+ (broad TLD list), Bing/MSN ENFORCE_PRIVACY, Yahoo GUCS, DuckDuckGo preference cookie. Auto-dismiss also covers OneTrust, Cookiebot, Didomi, Osano, Sourcepoint, Quantcast, Usercentrics, Funding Choices. Not applied to unknown hosts.
Honeypot links (display:none, visibility:hidden, common hidden classes) are skipped when discovering crawl links.
Env vars: WEBVAC_USER, WEBVAC_PASS, optional WEBVAC_SESSION_KEY (Fernet-encrypt session files).
Example — login then crawl:
python -m webvac --url https://example.com/dashboard --mode crawl \
--login --login-url https://example.com/login \
--username you@example.com --password secret \
--session-file sessions/example.json \
--auth-check-url https://example.com/account \
--on-auth-wall skip
Example — restore session only:
python -m webvac --url https://example.com/dashboard --mode single \
--session-file sessions/example.json --auth-check-url https://example.com/account
Proxies
--proxy-file FILE: One proxy per line--proxies "...": Comma-separated proxy list--proxy-strategy latency|random|round_robin--proxy-playbook none|residential|datacenter: Named sticky/cooldown/geo defaults (residential = sticky 25 + UA/geo/tz pin)--sticky-requests N: Successful requests before voluntary rotate (0= stay on the same proxy)--cooldown-seconds SECS: Cooldown after 429/timeout- If no proxy source is passed, WebVac auto-uses
./proxies.txtwhen present - If configured proxies fail startup health-check, WebVac warns and falls back to a direct connection
VAPT task (De-Caffeinator)
--task vapt: Run De-Caffeinator instead of the normal scrape pipeline--decaffeinator-root DIR: Path to De-Caffeinator (default:./decaffeinator/blob-unpacker)--vapt-profile standard|quick|stealth|deep--vapt-format json|jsonl--vapt-playwright: Enable SPA asset discovery in De-Caffeinator--vapt-wayback: Enable historical JS discovery from Wayback--vapt-no-files: Skip source/deobfuscated file writes
VAPT task output is stored under the normal scan session path in analysis/decaffeinator/.
Residential example:
python -m webvac --url https://example.com --mode crawl \
--proxy-file proxies.txt --proxy-playbook residential
Each proxy line gets a locked UA + matching US city geolocation/timezone. Use provider session usernames for ISP sticky IPs (see examples/proxies.example.txt).
--no-health-check: Skip startup benchmark
Network diagnosis (default on)
Listeners attach on every dynamic page load (document, script, xhr/fetch/websocket + failed resources). On scrape failure, dumps go to {scan_session}/network/*.json with status histogram and root-cause hints.
--no-network-debug: Disable listeners and dumps--network-debug-always: Also dump on successful pages
Auth/login URLs (/ap/signin, /login, /register, …) are classified as auth_wall and skipped — they do not trigger bot retries or proxy rotation. Reports show them under “Auth Walls Skipped”.
Auto CAPTCHA (CapSolver)
When a bot/CAPTCHA page is detected, WebVac calls CapSolver by default if an API key is present (reCAPTCHA v2/v3, hCaptcha, or Cloudflare Turnstile), then injects the token into the page.
# Recommended: gitignored key file (copy examples/capsolver.example.key → capsolver.key)
python -m webvac --url https://example.com --mode single
# or via environment
set CAPSOLVER_API_KEY=YOUR_KEY
python -m webvac --url https://example.com
# or one-off flag (ends up in shell history)
python -m webvac --url https://example.com --mode single \
--captcha-api-key YOUR_KEY
# disable even when a key file exists
python -m webvac --url https://example.com --captcha-solver none
- Key file: repo-root
capsolver.key(gitignored) or.envwithCAPSOLVER_API_KEY= - CapSolver is on by default when a key is found
--captcha-solver none|capsolver(nonedisables even if a key file exists)--captcha-api-key KEY(orCAPSOLVER_API_KEY/WEBVAC_CAPSOLVER_KEY)--captcha-timeout SECS(default 120)
Proxy File Format
Use either of the following per line:
http://ip:porthttp://ip:port|username|password
Lines beginning with # are treated as comments.
Example:
# plain
http://1.2.3.4:8080
# authenticated
http://5.6.7.8:3128|myuser|mypassword
Output Layout
WebVac writes data under scraped_data using scan-session folders for versioned runs.
scraped_data/
<target>/
scans/
<timestamp>_<scan-id>/
scrape/
data.json
data.csv
report.html
network/
<host>_<timestamp>.json
assets/
pdfs/
sourcemaps/
screenshots/
meta/
meta.json
Documentation
Full technical docs (architecture, workflows, diagrams, config, security):
- Index:
docs/README.md docs/OVERVIEW.md— What WebVac is / is notdocs/WORKFLOWS.md— End-to-end scrape, auth, CapSolver, VAPT flowsdocs/ARCHITECTURE.md— Layered system architecture- Deep dives:
docs/architecture/— CLI, Crawl, Browser, Auth, Captcha, Proxy, Network, Data, VAPT docs/SCAN_LAYOUT.md— On-disk session layout +meta.jsondocs/CONFIG_REFERENCE.md— Defaults and CLI mappingdocs/RELEASE_CHECKLIST.md— Pre-push / pre-release verificationdocs/SECURITY.md— Secrets and responsible usedocs/webvac-architecture-one-page.html— Visual one-pagerCHANGELOG.md— Release historyCONTRIBUTING.md— Development setup, checks, and PR workflow
To regenerate architecture PDF:
python scripts/generate_architecture_pdf.py
Notes on Security and Responsible Usage
See also docs/SECURITY.md.
- Respect target terms of service and legal boundaries.
- Use robots bypass only when you are explicitly authorized.
- Avoid scraping sensitive targets without permission.
- Store credentials and proxy secrets securely — copy
examples/auth_creds.example.jsontoauth_creds.json(gitignored). - Prefer env vars (
WEBVAC_USER/WEBVAC_PASS) over committing credentials. - Optional session encryption: set
WEBVAC_SESSION_KEYbefore saving sessions.
Current Default Behavior
- Scrape pipeline is enabled.
- Default output formats are
json,html.
Troubleshooting
Browser launch or navigation fails
- Ensure dependencies are installed in the active virtual environment.
- Try visible browser mode with
--no-headless. - Switch wait strategy to
--wait-until domcontentloaded.
Frequent bot/challenge blocks
- Enable proxies and use latency strategy.
- Lower concurrency.
- Increase delays between requests.
- Keep humanize enabled (default); try
--no-headlessfor hard challenges. - Use origin mode only when authorized.
- Inspect
{scan_session}/network/*.jsonfor challenge/CAPTCHA URL hints.
Empty or partial data
- Increase timeout.
- Crawl deeper with higher
--depth. - Verify selectors if using targeted extraction options.
Contributors
- Adityaaa — author & maintainer
Contributing
See CONTRIBUTING.md for full development setup, the local
checks (pytest + webvac --doctor), branch/PR workflow, and how to add tests.
New contributors can start with issues labelled
good first issue.
- Create a feature branch.
- Keep changes focused and test locally.
- Add or update tests where relevant.
- Open a pull request with a concise summary.
License
This project is licensed under the MIT License.
Metadata
Release files for webvac 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| webvac-0.3.1.tar.gz | 161.0 kB | With provenance | Details for webvac-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| webvac-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for webvac-0.3.1-py3-none-any.whl |
Total release size: 332.8 kB
Release files / webvac-0.3.1.tar.gz
| Download URL | webvac-0.3.1.tar.gz |
|---|---|
| Size | 161.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73cce4f2a8e9e9c974707bc69f2aae9e5b91376d4717a3d1d27c3849654e5678
|
|
BLAKE2b-256 checksum How to use checksums |
165dcef3e2621a661d0e743b39286a476ab459015ec750423c5723208ae6ec4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / webvac-0.3.1-py3-none-any.whl
| Download URL | webvac-0.3.1-py3-none-any.whl |
|---|---|
| Size | 171.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
167e5f151f18e0e58ed5007162bceb29360fbfdd38d7ec0423c757f8c7dde9b7
|
|
BLAKE2b-256 checksum How to use checksums |
97cec0618ff47d4dfe8141b7309f7d235afaf2a4f627693052b077818c0532df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for webvac 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for webvac-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.