webvac 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- webvac-0.3.1/LICENSE +21 -0
- webvac-0.3.1/PKG-INFO +508 -0
- webvac-0.3.1/README.md +467 -0
- webvac-0.3.1/pyproject.toml +68 -0
- webvac-0.3.1/setup.cfg +4 -0
- webvac-0.3.1/tests/test_proxy.py +204 -0
- webvac-0.3.1/tests/test_robots.py +51 -0
- webvac-0.3.1/tests/test_storage.py +105 -0
- webvac-0.3.1/webvac/__init__.py +3 -0
- webvac-0.3.1/webvac/__main__.py +6 -0
- webvac-0.3.1/webvac/auth/__init__.py +0 -0
- webvac-0.3.1/webvac/auth/auth.py +774 -0
- webvac-0.3.1/webvac/auth/cookie_audit.py +61 -0
- webvac-0.3.1/webvac/auth/credentials.py +39 -0
- webvac-0.3.1/webvac/auth/default_creds.py +589 -0
- webvac-0.3.1/webvac/auth/manager.py +471 -0
- webvac-0.3.1/webvac/auth/mfa.py +73 -0
- webvac-0.3.1/webvac/auth/popups.py +206 -0
- webvac-0.3.1/webvac/auth/profile.py +98 -0
- webvac-0.3.1/webvac/auth/session_store.py +150 -0
- webvac-0.3.1/webvac/auth/steps.py +210 -0
- webvac-0.3.1/webvac/auth/wall.py +140 -0
- webvac-0.3.1/webvac/captcha/__init__.py +24 -0
- webvac-0.3.1/webvac/captcha/config.py +145 -0
- webvac-0.3.1/webvac/captcha/detect.py +423 -0
- webvac-0.3.1/webvac/captcha/extract.py +465 -0
- webvac-0.3.1/webvac/captcha/inject.py +235 -0
- webvac-0.3.1/webvac/captcha/manager.py +208 -0
- webvac-0.3.1/webvac/captcha/models.py +65 -0
- webvac-0.3.1/webvac/captcha/network_watch.py +255 -0
- webvac-0.3.1/webvac/captcha/providers/__init__.py +15 -0
- webvac-0.3.1/webvac/captcha/providers/capsolver.py +258 -0
- webvac-0.3.1/webvac/cli/__init__.py +1 -0
- webvac-0.3.1/webvac/cli/captcha_demo.py +441 -0
- webvac-0.3.1/webvac/cli/interactive.py +882 -0
- webvac-0.3.1/webvac/cli/scraper.py +1157 -0
- webvac-0.3.1/webvac/config/__init__.py +0 -0
- webvac-0.3.1/webvac/config/config.py +126 -0
- webvac-0.3.1/webvac/core/__init__.py +0 -0
- webvac-0.3.1/webvac/core/crawler.py +833 -0
- webvac-0.3.1/webvac/core/page_scrape_flow.py +641 -0
- webvac-0.3.1/webvac/core/pipeline.py +37 -0
- webvac-0.3.1/webvac/data/__init__.py +0 -0
- webvac-0.3.1/webvac/data/html_parser.py +394 -0
- webvac-0.3.1/webvac/data/page_record.py +82 -0
- webvac-0.3.1/webvac/data/storage.py +1132 -0
- webvac-0.3.1/webvac/models/__init__.py +8 -0
- webvac-0.3.1/webvac/models/origin.py +70 -0
- webvac-0.3.1/webvac/models/scan.py +70 -0
- webvac-0.3.1/webvac/store/__init__.py +5 -0
- webvac-0.3.1/webvac/store/scan_session.py +126 -0
- webvac-0.3.1/webvac/utils/__init__.py +0 -0
- webvac-0.3.1/webvac/utils/asset_downloader.py +111 -0
- webvac-0.3.1/webvac/utils/browser.py +1071 -0
- webvac-0.3.1/webvac/utils/browser_pool.py +41 -0
- webvac-0.3.1/webvac/utils/consent.py +245 -0
- webvac-0.3.1/webvac/utils/detection.py +240 -0
- webvac-0.3.1/webvac/utils/humanize.py +344 -0
- webvac-0.3.1/webvac/utils/network_debug.py +334 -0
- webvac-0.3.1/webvac/utils/network_listener.py +210 -0
- webvac-0.3.1/webvac/utils/origin_probe.py +146 -0
- webvac-0.3.1/webvac/utils/proxy.py +643 -0
- webvac-0.3.1/webvac/utils/proxy_playbook.py +75 -0
- webvac-0.3.1/webvac/utils/robots.py +213 -0
- webvac-0.3.1/webvac/utils/screenshot.py +107 -0
- webvac-0.3.1/webvac/vapt/__init__.py +5 -0
- webvac-0.3.1/webvac/vapt/decaffeinator.py +160 -0
- webvac-0.3.1/webvac.egg-info/PKG-INFO +508 -0
- webvac-0.3.1/webvac.egg-info/SOURCES.txt +71 -0
- webvac-0.3.1/webvac.egg-info/dependency_links.txt +1 -0
- webvac-0.3.1/webvac.egg-info/entry_points.txt +3 -0
- webvac-0.3.1/webvac.egg-info/requires.txt +16 -0
- webvac-0.3.1/webvac.egg-info/top_level.txt +1 -0
webvac-0.3.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Adityaaa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
webvac-0.3.1/PKG-INFO
ADDED
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: webvac
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: Asyncio dynamic web scraper with auth and an optional De-Caffeinator VAPT task.
|
|
5
|
+
Author: Adityaaa
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Shellghostt/WebVac
|
|
8
|
+
Project-URL: Repository, https://github.com/Shellghostt/WebVac
|
|
9
|
+
Project-URL: Issues, https://github.com/Shellghostt/WebVac/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/Shellghostt/WebVac/blob/main/CHANGELOG.md
|
|
11
|
+
Project-URL: Documentation, https://github.com/Shellghostt/WebVac/blob/main/docs/README.md
|
|
12
|
+
Keywords: scraping,crawler,browser-automation,playwright,patchright,asyncio,security
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
22
|
+
Classifier: Topic :: Security
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: patchright
|
|
27
|
+
Requires-Dist: beautifulsoup4==4.12.3
|
|
28
|
+
Requires-Dist: lxml==5.2.2
|
|
29
|
+
Requires-Dist: tqdm==4.66.4
|
|
30
|
+
Requires-Dist: colorama==0.4.6
|
|
31
|
+
Requires-Dist: aiohttp
|
|
32
|
+
Requires-Dist: jsbeautifier
|
|
33
|
+
Requires-Dist: pyotp
|
|
34
|
+
Requires-Dist: cryptography
|
|
35
|
+
Requires-Dist: capsolver>=1.0.7
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest; extra == "dev"
|
|
38
|
+
Provides-Extra: socks
|
|
39
|
+
Requires-Dist: aiohttp-socks; extra == "socks"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# WebVac
|
|
43
|
+
|
|
44
|
+
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.
|
|
45
|
+
|
|
46
|
+
## Highlights
|
|
47
|
+
|
|
48
|
+
- Dynamic scraping with a real browser engine (Patchright)
|
|
49
|
+
- Single-page and recursive crawl modes
|
|
50
|
+
- Concurrency support with isolated browser slot identities
|
|
51
|
+
- Proxy pools with latency-based selection, round-robin, or random strategy (auto-uses `proxies.txt`)
|
|
52
|
+
- robots.txt bypassed by default (`--respect-robots` to obey)
|
|
53
|
+
- Automatic screenshots for blocked/CAPTCHA pages (per-scan `assets/screenshots/`)
|
|
54
|
+
- Structured output (default: JSON + HTML report)
|
|
55
|
+
- Historical scan sessions under `scraped_data/<target>/scans/…`
|
|
56
|
+
- PDF and sourcemap asset download support
|
|
57
|
+
- Unified auth: Patchright login, session restore, MFA/TOTP
|
|
58
|
+
- Auth walls (`/login`, `/ap/signin`, …) skipped separately from bot/WAF blocks
|
|
59
|
+
- Human-like mouse/scroll/warmup on Patchright Chromium (`--no-humanize` to disable)
|
|
60
|
+
- Network debug dumps on scrape failures (per-scan `network/` folder)
|
|
61
|
+
- Optional CapSolver auto-CAPTCHA (on by default when a key is present)
|
|
62
|
+
- Logout URL deny and sticky proxy when authenticated
|
|
63
|
+
- Optional opt-in VAPT task powered by De-Caffeinator
|
|
64
|
+
|
|
65
|
+
## Release
|
|
66
|
+
|
|
67
|
+
Current release: `0.3.1`
|
|
68
|
+
|
|
69
|
+
Highlights in `0.3.1`:
|
|
70
|
+
- published to PyPI — install with `pip install webvac`
|
|
71
|
+
- 43-test pytest suite covering proxy parsing, storage, and robots behaviour
|
|
72
|
+
- GitHub Actions CI on Ubuntu and Windows for Python 3.11 and 3.12
|
|
73
|
+
- Docker image for scrape mode with Patchright Chromium preinstalled
|
|
74
|
+
- `CONTRIBUTING.md` contributor guide and a tag-driven release workflow
|
|
75
|
+
- fix report HTML generation on Python 3.11 and the Contact tab's page index
|
|
76
|
+
|
|
77
|
+
The `0.3.0` release introduced the De-Caffeinator integration via `--task vapt`,
|
|
78
|
+
the **VAPT / JS analysis** launcher option, session-scoped VAPT output under
|
|
79
|
+
`analysis/decaffeinator/`, and the scrape-first core cleanup.
|
|
80
|
+
|
|
81
|
+
See [`CHANGELOG.md`](CHANGELOG.md) for the release summary.
|
|
82
|
+
|
|
83
|
+
## Project Structure
|
|
84
|
+
|
|
85
|
+
All application code lives in the installable `webvac/` package. See [`docs/STRUCTURE.md`](docs/STRUCTURE.md).
|
|
86
|
+
|
|
87
|
+
- `run.py`: Thin shim → interactive menu (`webvac.cli.interactive`)
|
|
88
|
+
- `webvac/cli/scraper.py`: Main CLI orchestrator (`python -m webvac`)
|
|
89
|
+
- `webvac/core/`: BFS crawler, page scrape flow, pipelines
|
|
90
|
+
- `webvac/auth/`: AuthManager, sessions, MFA, auth-wall detection
|
|
91
|
+
- `webvac/captcha/`: CapSolver detect → extract → solve → inject (optional)
|
|
92
|
+
- `webvac/utils/`: Browser, proxies, robots, origin probe, screenshots, network debug, humanize
|
|
93
|
+
- `webvac/data/`: HTML parse, page records, storage/export
|
|
94
|
+
- `examples/`: Input templates (auth, proxies, session, pipeline) — see [`examples/README.md`](examples/README.md)
|
|
95
|
+
- `docs/`, `scripts/`
|
|
96
|
+
|
|
97
|
+
## Requirements
|
|
98
|
+
|
|
99
|
+
- Python 3.11+ (3.12 recommended)
|
|
100
|
+
- Windows, Linux, or macOS
|
|
101
|
+
- Browser dependencies required by Patchright
|
|
102
|
+
|
|
103
|
+
## Installation
|
|
104
|
+
|
|
105
|
+
### From PyPI
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pip install webvac
|
|
109
|
+
python -m patchright install
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
That installs the `webvac` and `webvac-menu` console scripts. The PyPI package
|
|
113
|
+
contains the scraping core only; use a source checkout below if you also want
|
|
114
|
+
the `examples/`, `docs/`, or the `--task vapt` submodule.
|
|
115
|
+
|
|
116
|
+
### From source
|
|
117
|
+
|
|
118
|
+
1. Clone the repository.
|
|
119
|
+
2. Initialize the De-Caffeinator submodule (needed for `--task vapt`).
|
|
120
|
+
3. Create and activate a virtual environment.
|
|
121
|
+
4. Install dependencies.
|
|
122
|
+
5. Install Patchright browser binaries.
|
|
123
|
+
|
|
124
|
+
### Windows PowerShell
|
|
125
|
+
|
|
126
|
+
```powershell
|
|
127
|
+
git submodule update --init --recursive
|
|
128
|
+
python -m venv .venv
|
|
129
|
+
(Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned) ; (& .\.venv\Scripts\Activate.ps1)
|
|
130
|
+
pip install -r requirements.txt
|
|
131
|
+
pip install -e .
|
|
132
|
+
python -m patchright install
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Linux/macOS
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
git submodule update --init --recursive
|
|
139
|
+
python3 -m venv .venv
|
|
140
|
+
source .venv/bin/activate
|
|
141
|
+
pip install -r requirements.txt
|
|
142
|
+
pip install -e .
|
|
143
|
+
python -m patchright install
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`pip install -e .` registers the `webvac` and `webvac-menu` console scripts and makes imports resolve as `webvac.*`.
|
|
147
|
+
|
|
148
|
+
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.
|
|
149
|
+
|
|
150
|
+
## First Run Checklist
|
|
151
|
+
|
|
152
|
+
Run the built-in preflight before your first scrape:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
python -m webvac --doctor
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
`--doctor` checks:
|
|
159
|
+
- Python/runtime availability
|
|
160
|
+
- Patchright browser launch
|
|
161
|
+
- output directory write access
|
|
162
|
+
- proxy file parsing and optional health-check
|
|
163
|
+
- pipeline file discovery
|
|
164
|
+
- CapSolver key detection
|
|
165
|
+
- De-Caffeinator root validation when `--task vapt` is selected
|
|
166
|
+
|
|
167
|
+
If your proxy pool is present but dead, WebVac will warn and continue with a direct connection using your real IP.
|
|
168
|
+
|
|
169
|
+
## Example input files
|
|
170
|
+
|
|
171
|
+
Templates live under [`examples/`](examples/). Copy and edit before use:
|
|
172
|
+
|
|
173
|
+
| Template | Flag |
|
|
174
|
+
|----------|------|
|
|
175
|
+
| `examples/auth_creds.example.json` | `--auth-profile` / login JSON |
|
|
176
|
+
| `examples/proxies.example.txt` | `--proxy-file` |
|
|
177
|
+
| `examples/session.example.json` | `--session-file` (storage_state) |
|
|
178
|
+
| `examples/session_cookies_legacy.example.json` | `--session-file` (cookie list) |
|
|
179
|
+
| `examples/pipeline.example.py` | `--pipeline-file` |
|
|
180
|
+
|
|
181
|
+
The interactive menu (`python run.py`) lists these files and shows format hints when you pick session / proxy / credentials / pipeline.
|
|
182
|
+
|
|
183
|
+
## Quick Start
|
|
184
|
+
|
|
185
|
+
### Interactive launcher (recommended first run)
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
python run.py
|
|
189
|
+
# or: webvac-menu
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
The launcher helps you choose scrape mode, VAPT / JS analysis, browser visibility, login/session options, and common runtime settings.
|
|
193
|
+
|
|
194
|
+
Pick **VAPT / JS analysis** to run De-Caffeinator (blob unpacker) instead of the scrape pipeline. That menu option maps to `--task vapt`.
|
|
195
|
+
|
|
196
|
+
Recommended first command:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
python -m webvac --doctor
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Direct CLI usage
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
python -m webvac --url https://example.com --mode single
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
python -m webvac --url https://example.com --mode crawl --depth 3 --max-pages 50 --concurrency 2
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### VAPT task
|
|
213
|
+
|
|
214
|
+
Use the opt-in VAPT task when you want De-Caffeinator analysis instead of the normal scrape flow.
|
|
215
|
+
|
|
216
|
+
Clone with the submodule (or init it after clone):
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
git clone --recurse-submodules https://github.com/Shellghostt/WebVac.git
|
|
220
|
+
# or, inside an existing clone:
|
|
221
|
+
git submodule update --init --recursive
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
The De-Caffeinator checkout lives at `decaffeinator/` (tool root: `decaffeinator/blob-unpacker`).
|
|
225
|
+
|
|
226
|
+
From the interactive launcher:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
python run.py
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Then choose **VAPT / JS analysis**.
|
|
233
|
+
|
|
234
|
+
Or from the CLI:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
python -m webvac --task vapt --url https://example.com
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Deep browser + historical JS discovery:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
python -m webvac --task vapt --url https://example.com \
|
|
244
|
+
--vapt-profile deep --vapt-playwright --vapt-wayback
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Common CLI Options
|
|
248
|
+
|
|
249
|
+
### Core
|
|
250
|
+
|
|
251
|
+
- `--task scrape|vapt`: Normal scrape flow or De-Caffeinator VAPT task
|
|
252
|
+
- `--url`: Target URL (required)
|
|
253
|
+
- `--mode single|crawl`: Single page or recursive internal crawl
|
|
254
|
+
- `--engine dynamic|lightweight`: Browser-based or lightweight HTTP engine
|
|
255
|
+
- `--depth`: Maximum crawl depth (crawl mode)
|
|
256
|
+
- `--max-pages`: Maximum number of pages (omit for unlimited crawl)
|
|
257
|
+
- `--concurrency`: Parallel workers for crawl mode
|
|
258
|
+
|
|
259
|
+
### Browser and loading
|
|
260
|
+
|
|
261
|
+
- `--no-headless`: Run browser in visible mode
|
|
262
|
+
- `--timeout`: Page load timeout in milliseconds
|
|
263
|
+
- `--wait-until domcontentloaded|load|networkidle`: Navigation wait strategy
|
|
264
|
+
- `--no-humanize`: Disable Bezier mouse paths, wheel scroll, per-host warmup, and post-load settle
|
|
265
|
+
- `--no-humanize-warmup`: Keep settle/scroll humanize but skip the once-per-host root visit
|
|
266
|
+
|
|
267
|
+
### Output
|
|
268
|
+
|
|
269
|
+
- `--output`: Output root directory (default: `scraped_data`)
|
|
270
|
+
- `--format`: `json,csv,markdown,sqlite,html,all`
|
|
271
|
+
- `--label`: Custom label for output naming
|
|
272
|
+
|
|
273
|
+
### Robots and etiquette
|
|
274
|
+
|
|
275
|
+
- `--no-robots`: Ignore robots.txt entirely
|
|
276
|
+
- `--ignore-crawl-delay`: Obey allow/deny rules but ignore crawl-delay
|
|
277
|
+
- `--delay-min`, `--delay-max`: Request pacing window
|
|
278
|
+
|
|
279
|
+
### Login / authentication
|
|
280
|
+
|
|
281
|
+
- `--login`: Enable login before scraping (forces `dynamic` engine)
|
|
282
|
+
- `--login-url`: Login page URL
|
|
283
|
+
- `--username`, `--password`: Credentials (or set `WEBVAC_USER` / `WEBVAC_PASS`)
|
|
284
|
+
- `--session-file`: Load/save Playwright `storage_state` (legacy cookie-list files still work)
|
|
285
|
+
- `--auth-profile FILE`: Rich credentials JSON (selectors, steps, TOTP, policies) — see `examples/auth_creds.example.json`
|
|
286
|
+
- `--auth-check-url URL`: Protected URL used to verify session after login/restore
|
|
287
|
+
- `--on-auth-wall abort|skip|relogin`: Mid-crawl login-wall policy (default: `skip`)
|
|
288
|
+
- `--session-ttl SECONDS`: Expire saved sessions (0 = never)
|
|
289
|
+
- `--otp-prompt`: Prompt for OTP/MFA when an OTP field appears
|
|
290
|
+
- `--no-auth-proxy-rotate`: Pin proxy while authenticated (also default when `--login`)
|
|
291
|
+
- `--dismiss-selector CSS`: Extra Accept-button selector (repeatable; login + every scrape)
|
|
292
|
+
- `--pause-for-consent`: Headed wait-for-ENTER after first page per host (use with `--no-headless`)
|
|
293
|
+
- `--no-consent-dismiss`: Disable automatic cookie/CMP Accept clicks on scraped pages
|
|
294
|
+
|
|
295
|
+
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.
|
|
296
|
+
Honeypot links (`display:none`, `visibility:hidden`, common hidden classes) are skipped when discovering crawl links.
|
|
297
|
+
|
|
298
|
+
Env vars: `WEBVAC_USER`, `WEBVAC_PASS`, optional `WEBVAC_SESSION_KEY` (Fernet-encrypt session files).
|
|
299
|
+
|
|
300
|
+
Example — login then crawl:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
python -m webvac --url https://example.com/dashboard --mode crawl \
|
|
304
|
+
--login --login-url https://example.com/login \
|
|
305
|
+
--username you@example.com --password secret \
|
|
306
|
+
--session-file sessions/example.json \
|
|
307
|
+
--auth-check-url https://example.com/account \
|
|
308
|
+
--on-auth-wall skip
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Example — restore session only:
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
python -m webvac --url https://example.com/dashboard --mode single \
|
|
315
|
+
--session-file sessions/example.json --auth-check-url https://example.com/account
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### Proxies
|
|
319
|
+
|
|
320
|
+
- `--proxy-file FILE`: One proxy per line
|
|
321
|
+
- `--proxies "..."`: Comma-separated proxy list
|
|
322
|
+
- `--proxy-strategy latency|random|round_robin`
|
|
323
|
+
- `--proxy-playbook none|residential|datacenter`: Named sticky/cooldown/geo defaults (residential = sticky 25 + UA/geo/tz pin)
|
|
324
|
+
- `--sticky-requests N`: Successful requests before voluntary rotate (`0` = stay on the same proxy)
|
|
325
|
+
- `--cooldown-seconds SECS`: Cooldown after 429/timeout
|
|
326
|
+
- If no proxy source is passed, WebVac auto-uses `./proxies.txt` when present
|
|
327
|
+
- If configured proxies fail startup health-check, WebVac warns and falls back to a direct connection
|
|
328
|
+
|
|
329
|
+
### VAPT task (De-Caffeinator)
|
|
330
|
+
|
|
331
|
+
- `--task vapt`: Run De-Caffeinator instead of the normal scrape pipeline
|
|
332
|
+
- `--decaffeinator-root DIR`: Path to De-Caffeinator (default: `./decaffeinator/blob-unpacker`)
|
|
333
|
+
- `--vapt-profile standard|quick|stealth|deep`
|
|
334
|
+
- `--vapt-format json|jsonl`
|
|
335
|
+
- `--vapt-playwright`: Enable SPA asset discovery in De-Caffeinator
|
|
336
|
+
- `--vapt-wayback`: Enable historical JS discovery from Wayback
|
|
337
|
+
- `--vapt-no-files`: Skip source/deobfuscated file writes
|
|
338
|
+
|
|
339
|
+
VAPT task output is stored under the normal scan session path in `analysis/decaffeinator/`.
|
|
340
|
+
|
|
341
|
+
Residential example:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
python -m webvac --url https://example.com --mode crawl \
|
|
345
|
+
--proxy-file proxies.txt --proxy-playbook residential
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
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`).
|
|
349
|
+
- `--no-health-check`: Skip startup benchmark
|
|
350
|
+
|
|
351
|
+
### Network diagnosis (default on)
|
|
352
|
+
|
|
353
|
+
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.
|
|
354
|
+
|
|
355
|
+
- `--no-network-debug`: Disable listeners and dumps
|
|
356
|
+
- `--network-debug-always`: Also dump on successful pages
|
|
357
|
+
|
|
358
|
+
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”.
|
|
359
|
+
|
|
360
|
+
### Auto CAPTCHA (CapSolver)
|
|
361
|
+
|
|
362
|
+
When a bot/CAPTCHA page is detected, WebVac calls [CapSolver](https://www.capsolver.com/) by default if an API key is present (reCAPTCHA v2/v3, hCaptcha, or Cloudflare Turnstile), then injects the token into the page.
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
# Recommended: gitignored key file (copy examples/capsolver.example.key → capsolver.key)
|
|
366
|
+
python -m webvac --url https://example.com --mode single
|
|
367
|
+
|
|
368
|
+
# or via environment
|
|
369
|
+
set CAPSOLVER_API_KEY=YOUR_KEY
|
|
370
|
+
python -m webvac --url https://example.com
|
|
371
|
+
|
|
372
|
+
# or one-off flag (ends up in shell history)
|
|
373
|
+
python -m webvac --url https://example.com --mode single \
|
|
374
|
+
--captcha-api-key YOUR_KEY
|
|
375
|
+
|
|
376
|
+
# disable even when a key file exists
|
|
377
|
+
python -m webvac --url https://example.com --captcha-solver none
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
- Key file: repo-root `capsolver.key` (gitignored) or `.env` with `CAPSOLVER_API_KEY=`
|
|
381
|
+
- CapSolver is **on by default** when a key is found
|
|
382
|
+
- `--captcha-solver none|capsolver` (`none` disables even if a key file exists)
|
|
383
|
+
- `--captcha-api-key KEY` (or `CAPSOLVER_API_KEY` / `WEBVAC_CAPSOLVER_KEY`)
|
|
384
|
+
- `--captcha-timeout SECS` (default 120)
|
|
385
|
+
|
|
386
|
+
## Proxy File Format
|
|
387
|
+
|
|
388
|
+
Use either of the following per line:
|
|
389
|
+
|
|
390
|
+
- `http://ip:port`
|
|
391
|
+
- `http://ip:port|username|password`
|
|
392
|
+
|
|
393
|
+
Lines beginning with `#` are treated as comments.
|
|
394
|
+
|
|
395
|
+
Example:
|
|
396
|
+
|
|
397
|
+
```text
|
|
398
|
+
# plain
|
|
399
|
+
http://1.2.3.4:8080
|
|
400
|
+
|
|
401
|
+
# authenticated
|
|
402
|
+
http://5.6.7.8:3128|myuser|mypassword
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
## Output Layout
|
|
406
|
+
|
|
407
|
+
WebVac writes data under `scraped_data` using scan-session folders for versioned runs.
|
|
408
|
+
|
|
409
|
+
```text
|
|
410
|
+
scraped_data/
|
|
411
|
+
<target>/
|
|
412
|
+
scans/
|
|
413
|
+
<timestamp>_<scan-id>/
|
|
414
|
+
scrape/
|
|
415
|
+
data.json
|
|
416
|
+
data.csv
|
|
417
|
+
report.html
|
|
418
|
+
network/
|
|
419
|
+
<host>_<timestamp>.json
|
|
420
|
+
assets/
|
|
421
|
+
pdfs/
|
|
422
|
+
sourcemaps/
|
|
423
|
+
screenshots/
|
|
424
|
+
meta/
|
|
425
|
+
meta.json
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
## Documentation
|
|
429
|
+
|
|
430
|
+
Full technical docs (architecture, workflows, diagrams, config, security):
|
|
431
|
+
|
|
432
|
+
- **Index:** [`docs/README.md`](docs/README.md)
|
|
433
|
+
- [`docs/OVERVIEW.md`](docs/OVERVIEW.md) — What WebVac is / is not
|
|
434
|
+
- [`docs/WORKFLOWS.md`](docs/WORKFLOWS.md) — End-to-end scrape, auth, CapSolver, VAPT flows
|
|
435
|
+
- [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) — Layered system architecture
|
|
436
|
+
- Deep dives: [`docs/architecture/`](docs/architecture/) — CLI, Crawl, Browser, Auth, Captcha, Proxy, Network, Data, VAPT
|
|
437
|
+
- [`docs/SCAN_LAYOUT.md`](docs/SCAN_LAYOUT.md) — On-disk session layout + `meta.json`
|
|
438
|
+
- [`docs/CONFIG_REFERENCE.md`](docs/CONFIG_REFERENCE.md) — Defaults and CLI mapping
|
|
439
|
+
- [`docs/RELEASE_CHECKLIST.md`](docs/RELEASE_CHECKLIST.md) — Pre-push / pre-release verification
|
|
440
|
+
- [`docs/SECURITY.md`](docs/SECURITY.md) — Secrets and responsible use
|
|
441
|
+
- [`docs/webvac-architecture-one-page.html`](docs/webvac-architecture-one-page.html) — Visual one-pager
|
|
442
|
+
- [`CHANGELOG.md`](CHANGELOG.md) — Release history
|
|
443
|
+
- [`CONTRIBUTING.md`](CONTRIBUTING.md) — Development setup, checks, and PR workflow
|
|
444
|
+
|
|
445
|
+
To regenerate architecture PDF:
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
python scripts/generate_architecture_pdf.py
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
## Notes on Security and Responsible Usage
|
|
452
|
+
|
|
453
|
+
See also [`docs/SECURITY.md`](docs/SECURITY.md).
|
|
454
|
+
|
|
455
|
+
- Respect target terms of service and legal boundaries.
|
|
456
|
+
- Use robots bypass only when you are explicitly authorized.
|
|
457
|
+
- Avoid scraping sensitive targets without permission.
|
|
458
|
+
- Store credentials and proxy secrets securely — copy `examples/auth_creds.example.json` to `auth_creds.json` (gitignored).
|
|
459
|
+
- Prefer env vars (`WEBVAC_USER` / `WEBVAC_PASS`) over committing credentials.
|
|
460
|
+
- Optional session encryption: set `WEBVAC_SESSION_KEY` before saving sessions.
|
|
461
|
+
|
|
462
|
+
## Current Default Behavior
|
|
463
|
+
|
|
464
|
+
- Scrape pipeline is enabled.
|
|
465
|
+
- Default output formats are `json,html`.
|
|
466
|
+
|
|
467
|
+
## Troubleshooting
|
|
468
|
+
|
|
469
|
+
### Browser launch or navigation fails
|
|
470
|
+
|
|
471
|
+
- Ensure dependencies are installed in the active virtual environment.
|
|
472
|
+
- Try visible browser mode with `--no-headless`.
|
|
473
|
+
- Switch wait strategy to `--wait-until domcontentloaded`.
|
|
474
|
+
|
|
475
|
+
### Frequent bot/challenge blocks
|
|
476
|
+
|
|
477
|
+
- Enable proxies and use latency strategy.
|
|
478
|
+
- Lower concurrency.
|
|
479
|
+
- Increase delays between requests.
|
|
480
|
+
- Keep humanize enabled (default); try `--no-headless` for hard challenges.
|
|
481
|
+
- Use origin mode only when authorized.
|
|
482
|
+
- Inspect `{scan_session}/network/*.json` for challenge/CAPTCHA URL hints.
|
|
483
|
+
|
|
484
|
+
### Empty or partial data
|
|
485
|
+
|
|
486
|
+
- Increase timeout.
|
|
487
|
+
- Crawl deeper with higher `--depth`.
|
|
488
|
+
- Verify selectors if using targeted extraction options.
|
|
489
|
+
|
|
490
|
+
## Contributors
|
|
491
|
+
|
|
492
|
+
- [Adityaaa](https://github.com/Shellghostt) — author & maintainer
|
|
493
|
+
|
|
494
|
+
## Contributing
|
|
495
|
+
|
|
496
|
+
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for full development setup, the local
|
|
497
|
+
checks (`pytest` + `webvac --doctor`), branch/PR workflow, and how to add tests.
|
|
498
|
+
New contributors can start with issues labelled
|
|
499
|
+
[`good first issue`](https://github.com/Shellghostt/WebVac/labels/good%20first%20issue).
|
|
500
|
+
|
|
501
|
+
1. Create a feature branch.
|
|
502
|
+
2. Keep changes focused and test locally.
|
|
503
|
+
3. Add or update tests where relevant.
|
|
504
|
+
4. Open a pull request with a concise summary.
|
|
505
|
+
|
|
506
|
+
## License
|
|
507
|
+
|
|
508
|
+
This project is licensed under the [MIT License](LICENSE).
|