getroots

command module
v0.0.0-...-05eba67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2025 License: MIT Imports: 7 Imported by: 0

README

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL