A simple Go tool to normalize and extract root (apex) domains from bug bounty scope lists. It removes wildcards and outputs the clean root domain, making it easy to process domains from platforms like HackerOne and Bugcrowd.
- Removes wildcards (e.g.,
*.example.com→example.com) - Extracts the root (apex) domain using the Public Suffix List
- Supports input from STDIN or a file
- Simple command-line interface
go install github.com/offftherecord/getroots@latest$ getroots -h
getroots - Extract the root domains from wildcarded domain strings. Useful for parsing bug bounty scope lists
Usage:
getroots [options]
Options:
-f FILE Read domains from FILE (one per line)
-h Show this help message and exitFrom STDIN
echo "*.google.com" | getrootsFrom a file
getroots -f domains.txtExample input
*.google.com
sub.*.example.co.uk
http://*.test.com.
Example output
google.com
example.co.uk
test.com
MIT