A powerful, concurrent vulnerability scanner written in Go that tests for XSS (Cross-Site Scripting) and SQLi (SQL Injection) vulnerabilities in web applications.
- Multiple Injection Methods: Supports various injection types (uri, param, finder, clusterbomb)
- Multi-threading: Configurable thread count for faster scanning
- Attack Modes:
- XSS detection using headless Chrome/Selenium
- Time-based SQL injection detection
- Flexible Input:
- Test single URLs or read from files
- Use custom payloads or wordlists
- Pipe URLs from other tools
- Custom Parameter Testing: Specify which parameters to test
- Attack Strategies: Replace values or append payloads to existing values
- Go 1.16 or higher
- ChromeDriver in your PATH (for XSS detection)
go install github.com/gilsgil/xhunter@latestTest a single URL for XSS:
xhunter -u "http://example.com/page?param=test" -w payloads.txt -m xssTest multiple URLs from a file for SQL injection:
xhunter -l urls.txt -w sqli-payloads.txt -m sqli -u string
Single URL to test (XSS or SQLi)
-l string
Path to file with list of URLs
-w string
Path to file with payloads
-a string
Attack type: 'postfix' or 'replace' (default "postfix")
-it string
Injection type: 'uri', 'param', 'finder', 'clusterbomb' (default "param")
-m string
Mode: 'xss' or 'sqli' (default "xss")
-t int
Number of threads (default 10)
-v Enable verbose logging
-param string
Custom parameter(s) for injection (comma-separated)
-payload string
Custom payload for injection
- uri: Injects payloads directly in the URL path
- param: Injects payloads into each parameter individually
- finder: Uses an extensive set of common parameters for testing
- clusterbomb: Injects the same payload into all parameters simultaneously
- postfix: Appends the payload to the existing parameter value
- replace: Replaces the parameter value with the payload
Test specific parameters with a custom payload:
xhunter -u "http://example.com/page" -param "id,user,token" -payload "<script>alert(1)</script>" -m xssTest multiple URLs with custom parameters from a wordlist:
xhunter -l urls.txt -param "id,user" -w xss-payloads.txt -it clusterbomb -m xssIntegrate with other tools:
cat domains.txt | httpx -silent | xhunter -w payloads.txt -m xssThe tool uses Selenium with headless Chrome to detect XSS vulnerabilities by checking for JavaScript alerts. Make sure ChromeDriver is installed and available in your PATH.
SQL injection detection is time-based, looking for responses that take between 21-25 seconds which may indicate a successful time-based SQL injection.
<script>alert('XSS')</script>
<img src=x onerror=alert('XSS')>
"><script>alert('XSS')</script>
' OR SLEEP(23)--
" OR SLEEP(23)--
' WAITFOR DELAY '00:00:23'--
This tool is intended for legal security testing with proper authorization. Do not use it against systems you don't have permission to test.
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.