Skip to content
forked from ammario/ipisp

Golang IP to ISP service utilizing team cymru's IP to ASN service

License

Notifications You must be signed in to change notification settings

Freeaqingme/ipisp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPISP

IPISP wraps Team Cymru's IP to ASN service.

Features

  • Programmatically resolve an IP address's AS number, ISP name, range, allocation time, registry, and country of registration.
  • Safe for bulk usage by using Cymru's DNS interface
  • Concurrent safe

Godoc

Example

A more thorough example is in the examples/ folder.

client, _ := ipisp.NewDnsClient()
resp, err := 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.Name)
fmt.Printf("Registry: %v\n", resp.Registry)
fmt.Printf("ISP: %v\n", resp.Name.Raw)

About

Golang IP to ISP service utilizing team cymru's IP to ASN service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%