██╗ ██╗███████╗███████╗ ███████╗██╗ █████╗ ██╗ ██╗███████╗██████╗
╚██╗██╔╝██╔════╝██╔════╝ ██╔════╝██║ ██╔══██╗╚██╗ ██╔╝██╔════╝██╔══██╗
╚███╔╝ ███████╗███████╗ ███████╗██║ ███████║ ╚████╔╝ █████╗ ██████╔╝
██╔██╗ ╚════██║╚════██║ ╚════██║██║ ██╔══██║ ╚██╔╝ ██╔══╝ ██╔══██╗
██╔╝ ██╗███████║███████║ ███████║███████╗██║ ██║ ██║ ███████╗██║ ██║
╚═╝ ╚═╝╚══════╝╚══════╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
The Ultimate XSS Hunter — Context-Aware · AI Heuristic · DOM/SPA · Stealth · OOB
XSSSlayer is a real-browser XSS scanner built on Python asyncio and Microsoft Playwright. Unlike regex-based tools, XSSSlayer executes JavaScript inside a full Chromium instance — making it zero false positives.
Every finding is confirmed by a real alert() / confirm() / prompt() dialog caught by the browser's native event system. No guessing. No noise.
| Category | Capabilities |
|---|---|
| Detection Engine | Dialog-only XSS confirmation (0 false positives), DOM XSS via MutationObserver, URL fragment (#) SPA testing |
| Context Analysis | 12 injection contexts: HTML_BODY, ATTR_DQ/SQ/BARE, SCRIPT_STRING, COMMENT, STYLE, and more |
| Fuzzing Engine | 22-char batch probe, allowed/blocked char analysis (raw HTTP response + DOM cross-check), context-escape prefix generation |
| AI Heuristic | Generates novel payloads on-the-fly based on char allowlist from fuzz results |
| WAF Bypass | WAF fingerprinting + tailored bypass profiles (Cloudflare/F5/Akamai/Imperva), UA rotation, X-Forwarded-For spoofing, adaptive 403/429 backoff, double URL encode, base64 eval(atob()), hex \xNN, unicode \uNNNN, comment junk (scr/**/ipt), case randomizer (OnErRoR) |
| Stealth | Playwright fingerprint masking: navigator.webdriver, hardwareConcurrency, WebGL, plugins, chrome object, screen dimensions |
| Auto-Discovery | Form/input discovery, parameter mining (hidden inputs, JS hints, JSON body), BFS same-origin crawler |
| Blind / OOB XSS | --xss-report injects callback payloads (cookie/localStorage/URL exfil) into params and, optionally, headers |
| Output | Dark-theme HTML report with risk levels, screenshots, elapsed time, payload detail |
| Session Support | --cookie for authenticated panel testing |
| Proxy Support | --proxy for Burp Suite integration |
Correctness
- Fixed false "BLOCKED" detection — the fuzzer used to check DOM-serialized page content, which always HTML-encodes
<and>even when the target doesn't actually block them. It now reads the raw HTTP response body first (falling back to DOM text for SPAs), so allowed characters are reported accurately.
Speed
- Faster payload scanning — replaced fixed dialog-wait timeouts with early-exit polling, so the scanner moves on the instant a dialog fires instead of always waiting out the full timeout. Applies to both the main payload scanner and the DOM/SPA fragment scanner (Step 4).
--fastmode — near-zero jitter, shorter dialog timeout, and higher default concurrency for when you need raw speed over maximum thoroughness.
Stability
- Clean Ctrl+C shutdown — interrupting a scan, at any stage (including mid-startup), now exits gracefully with a clean summary instead of a wall of tracebacks.
- Connection-stall watchdog — if the browser connection stalls or dies mid-scan, XSSSlayer now detects it after 20 seconds, stops safely, and saves whatever results were already found — instead of hanging indefinitely.
- Fixed a payload-transport crash — a raw NUL/control byte in one of the built-in payloads could corrupt Playwright's internal browser connection under high concurrency. All payloads are now transport-safe.
- Fixed a Playwright version mismatch —
setup.py/pyproject.tomlno longer silently downgrade an already-installed newer Playwright, which used to break the cached Chromium binary.
New capabilities
- WAF-specific bypass profiles — once a WAF is fingerprinted (Cloudflare, F5, Akamai, Imperva, or generic), XSSSlayer prioritizes payloads and evasion techniques tailored to that specific WAF instead of a one-size-fits-all list.
- Expanded Blind XSS / OOB coverage — new payload variants exfiltrate cookies, localStorage, and the current URL to your callback. Add
--oob-contextto also plant blind payloads in the Referer, User-Agent, and X-Forwarded-For headers, not just form/URL parameters. - Adaptive concurrency — when the target starts throwing repeated 403/429 responses, XSSSlayer automatically throttles down the number of concurrent tabs, then restores full concurrency once the target settles down. Tune the backoff wait with
--retry-delay.
git clone https://github.com/alisalive/XSSSlayer.git
cd XSSSlayer
chmod +x setup_kali.sh
./setup_kali.shsetup_kali.sh does everything automatically:
- Installs all system dependencies (smart package resolution for Kali 2024+, Ubuntu 24.04+, Debian 12+)
- Creates Python virtual environment
- Installs all Python packages
- Installs Playwright Chromium browser
- Registers
xssslayeras a global command — works from any directory
⚠️ If you already have XSSSlayer cloned, just pull and re-run setup:cd XSSSlayer && git pull origin main && ./setup_kali.sh
After setup — use from anywhere:
xssslayer -u "https://target.com"
xssslayer --helpStep 1 — Clone and install:
git clone https://github.com/alisalive/XSSSlayer.git
cd XSSSlayer
python -m venv venv
venv\Scripts\pip install -r requirements.txt
venv\Scripts\python -m playwright install chromium
venv\Scripts\pip install -e .Step 2 — Make xssslayer available from any directory (run once in CMD):
setx PATH "%PATH%;C:\Users\%USERNAME%\XSSSlayer"
⚠️ After runningsetx, open a new CMD window — the old one won't see the updated PATH.
The xssslayer.bat launcher included in the repo handles venv activation automatically — you never need to activate the venv manually.
After setup — use from anywhere:
xssslayer -u "https://target.com"
xssslayer --helpCrawls the entire target, discovers all forms and parameters, scans everything automatically.
xssslayer -u "https://target.com"Target a specific URL and parameter directly. No crawling — straight to injection.
xssslayer -u "https://target.com/search?q=x" -p q --max-pages 1Maximum coverage: crawler + screenshots + Burp proxy + OOB + visible PoC browser.
xssslayer -u "https://target.com" \
--cookie "session=YOUR_TOKEN" \
--xss-report YOUR_XSS_REPORT_ID \
--show-browser --screenshot \
--proxy http://127.0.0.1:8080 \
--max-pages 60 --timeout 20 \
--jitter 0.5 2.0 \
--concurrency 25 \
-o results.jsonLow-and-slow with human-like delays to evade WAFs and rate limiters.
xssslayer -u "https://target.com" \
--concurrency 3 \
--jitter 1.5 4.0 \
--timeout 30Pass session cookies to scan protected pages and admin panels.
xssslayer -u "https://target.com/admin/users?id=1" \
-p id \
--cookie "session=abc123; csrf_token=xyz" \
--screenshotTrade a little thoroughness for a lot of speed.
xssslayer -u "https://target.com" --fast| Flag | Default | Description |
|---|---|---|
-u, --url |
Required | Target URL |
-p, --param |
Auto | Parameter to inject. Omit for full auto-discovery |
-c, --concurrency |
20 |
Max parallel browser tabs |
--timeout |
15 |
Navigation timeout in seconds |
--jitter MIN MAX |
0.3 1.5 |
Random delay range between requests (seconds) |
--max-pages |
30 |
Max pages to crawl in auto-discovery mode |
--fast |
Off | Speed mode: near-zero jitter, faster dialog timeout, higher concurrency |
--proxy |
None | HTTP proxy (e.g. http://127.0.0.1:8080) |
--cookie |
None | Session cookies ("name=value; name2=value2") |
--retry-delay |
10 |
Backoff delay in seconds on 403/429 responses |
--xss-report |
None | Blind/OOB XSS callback ID |
--oob-context |
Off | Also inject Blind XSS/OOB payloads into Referer, User-Agent, X-Forwarded-For headers |
--screenshot |
Off | Save PNG screenshots of confirmed XSS |
--show-browser |
Off | Open visible Chromium window on XSS confirmation |
--no-mine |
Off | Disable parameter mining |
-o, --output |
None | Save confirmed results to JSON file |
Target URL
│
├─► Step 1: WAF Detection
│ └─► Signature matching against headers & body
│
├─► Step 2: BFS Crawler (same-origin, --max-pages)
│ └─► Form / Input Discovery
│ └─► Parameter Mining (hidden fields, JS hints, JSON body)
│
├─► Step 3: God Mode Scan
│ ├─► Context Analysis (Batch Fuzz → 12 context types)
│ │ └─► Allowed/Blocked char detection (raw response + DOM cross-check)
│ ├─► Payload Selection
│ │ ├─► 15 Universal Polyglots
│ │ ├─► Context-Specific Escapes
│ │ ├─► AI Heuristic (on-the-fly from fuzz results)
│ │ ├─► WAF-Specific Bypass Profile (if fingerprinted)
│ │ └─► 2769 payloads from file + Encoding Variants
│ └─► Real Browser Execution (Playwright Chromium)
│ ├─► page.on("dialog") → XSS Confirmed ✓
│ └─► Early-exit polling (no fixed waits)
│
└─► Step 4: DOM / SPA XSS (URL fragment scan)
└─► MutationObserver → DOM XSS Confirmed ✓
→ HTML Report + Screenshot (optional)
Terminal — Rich-colored live feed with timestamps, context tags, WAF status, and confirmed hit alerts.
HTML Report — Auto-saved to results/report_YYYYMMDD_HHMMSS.html. Dark theme, risk badges, full payload detail, screenshot thumbnails.
JSON — Use -o output.json for pipeline integration or custom reporting.
| Dependency | Version |
|---|---|
| Python | 3.10+ |
| playwright | ≥ 1.51.0 |
| rich | ≥ 13.7.1 |
| aiohttp | ≥ 3.11.0 |
| beautifulsoup4 | ≥ 4.12.0 |
| Chromium | Auto-installed via playwright install chromium |
⚠️ Python 3.13 users: Playwright < 1.51.0 hangs onnew_page()due to a Python 3.13 asyncio incompatibility. This repo requiresplaywright>=1.51.0which fixes it.
Cause: Playwright < 1.51.0 is incompatible with Python 3.13.
Fix:
cd XSSSlayer
source venv/bin/activate
pip install --upgrade playwright
python -m playwright install chromiumVerify versions:
python --version # must be 3.10+
python -m playwright --version # must be 1.51.0+Fix — re-run setup (it auto-creates /usr/local/bin/xssslayer):
./setup_kali.shOr create the launcher manually:
XSSSLAYER_DIR="$(pwd)"
sudo tee /usr/local/bin/xssslayer > /dev/null << EOF
#!/usr/bin/env bash
source "$XSSSLAYER_DIR/venv/bin/activate"
exec python "$XSSSLAYER_DIR/xss_slayer.py" "\$@"
EOF
sudo chmod +x /usr/local/bin/xssslayerCause: XSSSlayer directory is not in your PATH.
Fix — run once in CMD:
setx PATH "%PATH%;C:\Users\%USERNAME%\XSSSlayer"Open a new CMD window after running this command.
The package was renamed to libasound2t64. The setup_kali.sh handles this automatically. If needed manually:
sudo apt-get install libasound2t64You ran python xss_slayer.py directly outside the venv. Use the global command instead:
xssslayer -u "https://target.com"Or activate the venv first:
source venv/bin/activate
python xss_slayer.py -u "https://target.com"Run Playwright's built-in dependency installer:
sudo python -m playwright install-deps chromiumLines like N: Skipping acquire of configured file ... brave-browser are harmless. They come from a duplicate Brave repository entry and do not affect XSSSlayer.
Fixed in v2.0. setup.py/pyproject.toml used to pin an older Playwright version, which could silently downgrade an already-installed newer one and break the cached Chromium binary. Both files now match requirements.txt. If you still hit BrowserType.launch: Executable doesn't exist, just re-run:
python -m playwright install chromiumFixed in v2.0. A connection-stall watchdog now detects a dead/frozen browser connection after 20 seconds of no progress, logs a warning, and stops the scan safely with whatever results were already found — instead of hanging forever.
Fixed in v2.0. Interrupting a scan — at any point, including during startup — now exits gracefully with a clean summary line instead of a TargetClosedError/traceback spam.
For authorized penetration testing and security research only. Using this tool against systems without explicit written permission is illegal and unethical. The author assumes no liability for misuse. Always obtain proper authorization before scanning any target.
If XSSSlayer helped you find a bug bounty or level up your security research:
- ⭐ Star this repository
- 🐛 Open an issue for bugs or feature requests
- 🔗 Share it with the community
Developed by alisalive.exe | GitHub: alisalive
XSSSlayer v2.0.0 — The Ultimate XSS Hunter


