ammario / ipisp

Query IP address network information in Go
MIT License
66 stars 13 forks source link
asn asn-service ip-address network-analysis networking scanning security team-cymru whois

ipisp

GoDoc

ipisp provides a Go client for Team Cymru's IP-ASN mapping service. Basically, this library allows you to query an IP address' ISP and allocation information.

go get github.com/ammario/ipisp/v2

Features

Basic usage

Running

resp, err := ipisp.LookupIP(context.Background(), net.ParseIP("4.2.2.2"))
if err != nil {
    log.Fatalf("lookup: %v", err)
}
fmt.Printf("ISP: %s\n", resp.ISPName)

displays

ISP: LEVEL3, US