Below are 20 examples of using gobuster
for directory traversal and discovery. These examples cover different scenarios, including custom wordlists, extensions, and output formatting.
Basic Examples
- Simple directory scan
gobuster dir -u http://example.com -w /path/to/wordlist.txt
- Directory scan with custom extensions
gobuster dir -u http://example.com -w /path/to/wordlist.txt -x php,html,js
- Recursive directory scan
gobuster dir -u http://example.com -w /path/to/wordlist.txt -r
- Ignoring length-based results
gobuster dir -u http://example.com -w /path/to/wordlist.txt --exclude-length 0
- Directory scan using a proxy
gobuster dir -u http://example.com -w /path/to/wordlist.txt --proxy http://127.0.0.1:8080
Advanced Examples
- HTTPS with insecure certificate
gobuster dir -u https://example.com -w /path/to/wordlist.txt -k
- Custom User-Agent
gobuster dir -u http://example.com -w /path/to/wordlist.txt -a "MyCustomAgent/1.0"
- Custom HTTP headers
gobuster dir -u http://example.com -w /path/to/wordlist.txt -H "Authorization: Bearer TOKEN"
- Concurrent threads
gobuster dir -u http://example.com -w /path/to/wordlist.txt -t 50
- Timeout adjustments
gobuster dir -u http://example.com -w /path/to/wordlist.txt --timeout 10s
Output Handling
- Save output to a file
gobuster dir -u http://example.com -w /path/to/wordlist.txt -o results.txt
- Verbose output
gobuster dir -u http://example.com -w /path/to/wordlist.txt -v
- JSON formatted output
gobuster dir -u http://example.com -w /path/to/wordlist.txt -o results.json -z
- Filtering status codes
gobuster dir -u http://example.com -w /path/to/wordlist.txt -s "200,204,301"
- Custom DNS resolver
gobuster dir -u http://example.com -w /path/to/wordlist.txt --dns-resolver 1.1.1.1
Specialized Scans
- Scan specific ports
gobuster dir -u http://example.com:8080 -w /path/to/wordlist.txt
- Use environment variables for authentication
gobuster dir -u http://example.com -w /path/to/wordlist.txt --username $USERNAME --password $PASSWORD
- Rate limiting requests
gobuster dir -u http://example.com -w /path/to/wordlist.txt --rate-limit 2
- Scanning a subdirectory
gobuster dir -u http://example.com/admin -w /path/to/wordlist.txt
- Using a brute-force strategy
gobuster dir -u http://example.com -w /path/to/large-wordlist.txt --wildcard