Sans is a lightweight Go tool that resolves subdomains from a provided list, retrieves their associated IP addresses, and fetches ASN (Autonomous System Number) information along with the owning company (organization) details using the IPInfo.io API. It also saves unique IPs and ASNs to ip.txt
and asn.txt
respectively.
- Subdomain Resolution: Reads a list of subdomains from a file and resolves their IP addresses.
- IP Information Retrieval: For each IP, fetches ASN and organization details using the IPInfo.io API.
- Formatted Output: Displays output in a colorized, easy-to-read format.
- Results Storage: Saves unique IP addresses and ASN numbers into
ip.txt
andasn.txt
.
- Go 1.18+: Download and install Go from the official Go downloads page.
- IPInfo.io token: You will need a valid token from IPInfo.io to use this tool. You can sign up for a free plan,
You can install Sans directly using go install
:
go install github.com/samidunimsara/sans@latest
Once installed, run Sans from the command line with the required flags.
-l
: Path to a file containing a list of subdomains (one per line).-t
: Your IPInfo.io API token.
sans -l subdomains.txt -t YOUR_API_TOKEN
This will:
- Resolve each subdomain in the
subdomains.txt
file. - Retrieve the IP information for each resolved subdomain, including ASN and organization (owned company) name.
- Display output in the following format:
subdomain_name IP_address ASN organization_name
For example:
breeno.test.com 123.345.345.444 AS222 ABC ORG
breenofs.test.testcom 222.33.3.54 AS234 IDC, US Telecommunications Corporation
- Save unique IP addresses to
ip.txt
and ASN numbers toasn.txt
.