pentesting, updated
katana
katana: a fast, next-generation crawler that spiders an application and extracts endpoints, forms and parameters for further testing.
What it’s for
Automate the crawl/spidering step — discover every URL, form field and parameter an app exposes, including JS-rendered routes, to feed into fuzzing and injection tools.
Install
go install github.com/projectdiscovery/katana/cmd/katana@latest # https://github.com/projectdiscovery/katana
Common commands
katana -u https://example.com # crawl a single target
katana -u https://example.com -jc # also crawl JS files for endpoints
katana -u https://example.com -headless # render JS (SPA routes) with a headless browser
katana -u https://example.com -d 3 # limit crawl depth to 3
katana -u https://example.com -f qurl # output only URLs with query parameters
katana -u https://example.com -H "Cookie: session=<your-session>" # authenticated crawl
katana -u https://example.com -o urls.txt # save discovered URLs
Useful flags
| Flag | Effect |
|---|---|
-jc | Crawl JavaScript files for additional endpoints |
-headless | Use a headless browser, needed for JS-rendered SPAs |
-d | Max crawl depth |
-f qurl | Output only URLs that carry a query string |
-H | Add a header (auth cookie, custom header) |
-o | Write discovered URLs to a file |
Notes
The natural first step before ffuf (fuzz what katana finds) or dalfox (katana -u https://example.com -f qurl | dalfox pipe).