modulepackage
0.0.0-20180425184110-e21c1e5c2913
Repository: https://github.com/jakewarren/ipisp.git
Documentation: pkg.go.dev
# README
IPISP
IPISP provides a Go client for Team Cymru's ASN resolution service.
Features
- Programmatically resolve IP addresses or ASNs to network information.
- Allows bulk conversion.
- DNS and Netcat/Whois client.
- Thread-safe
Example
A more thorough example is in the examples/ folder.
client, _ := ipisp.NewDNSClient()
resp, _ := client.LookupIP(net.ParseIP("4.2.2.2"))
fmt.Printf("IP: %v\n", resp.IP)
fmt.Printf("ASN: %v\n", resp.ASN)
fmt.Printf("Range: %v\n", resp.Range)
fmt.Printf("Country: %v\n", resp.Country)
fmt.Printf("Registry: %v\n", resp.Registry)
fmt.Printf("ISP: %v\n", resp.Name)
# Packages
No description provided by the author
# Functions
NewDNSClient returns a dns client.
NewWhoisClient returns a pointer to a new connected whois client.
ParseASN parses a string like AS2341 into an ASN.
ParseName returns a pointer to a new name.
# Structs
No description provided by the author
Name contains an IPISP ISP name.
Response contains a response from Cymru.
WhoisClient uses the whois client.
# Interfaces
Client is a lookup client.
# Type aliases
ASN contains an Autonomous Systems Number.