Skip to content

offftherecord/getroots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getroots

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.

Features

  • Removes wildcards (e.g., *.example.comexample.com)
  • Extracts the root (apex) domain using the Public Suffix List
  • Supports input from STDIN or a file
  • Simple command-line interface

Installation

go install github.com/offftherecord/getroots@latest

Usage

$ 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 exit

Examples

From STDIN

echo "*.google.com" | getroots

From a file

getroots -f domains.txt

Example input

*.google.com
sub.*.example.co.uk
http://*.test.com.

Example output

google.com
example.co.uk
test.com

License

MIT

About

Parse a list of wildcard domain from various formats and return the root domain.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages