Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ip2asn

Go Reference

A command-line tool to look up the ASN (Autonomous System Number) of one or more IPv4 or IPv6 addresses.

The tool uses the WHOIS service provided by Cymru to look up the ASN for each IP address.

Installation

To install ip2asn, run the following command:

go install github.com/melvinsh/ip2asn@latest

Usage

The tool reads IP addresses from standard input, one address per line. For example:

$ echo "8.8.8.8" | ip2asn
15169

You can also pipe in a file containing a list of IP addresses:

cat ips.txt | ip2asn

The output is the ASN number for each IP address. If the tool is unable to look up the ASN for an IP address, it will print an error message to standard error and move on to the next address.

About

A command-line tool to look up the ASN of one or more IPv4 or IPv6 addresses.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages