https://github.com/threatcode/bgpmap
https://github.com/threatcode/bgpmap
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/threatcode/bgpmap
- Owner: threatcode
- Created: 2023-10-05T22:10:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-11T23:18:13.000Z (over 2 years ago)
- Last Synced: 2025-02-10T07:18:28.875Z (about 1 year ago)
- Language: Go
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GoLang bindings for `bgp.he.net`
## Usage
```bash
go get github.com/ThreatCode/bgpmap
```
```golang
package main
import (
"fmt"
"github.com/ThreatCode/bgpmap"
)
func main() {
// Search
s := bgpmap.NewSearch("cloudflare")
fmt.Println(s.ASNs)
// Get IPv4 and IPv6 prefixes
asn, err := bgpmap.NewASN(395747)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(asn.IPv4Networks)
fmt.Println(asn.IPv6Networks)
}
```