Skip to content

Instantly share code, notes, and snippets.

@mb00g
Created February 3, 2020 10:21
Show Gist options
  • Save mb00g/f5dc7525dc46585e8e77a55dd9d9b568 to your computer and use it in GitHub Desktop.
Save mb00g/f5dc7525dc46585e8e77a55dd9d9b568 to your computer and use it in GitHub Desktop.
cat /usr/bin/asn2downstream
input=$(echo $1)
curl -s https://api.bgpview.io/asn/$input/downstreams | jq '.data .ipv4_downstreams'
cat /usr/bin/asn2upstream
input=$(echo $1)
curl -s https://api.bgpview.io/asn/$input/upstreams | jq '.data .ipv4_upstreams'
cat /usr/bin/asn2peers
input=$(echo $1)
curl -s https://api.bgpview.io/asn/$input/peers | jq '.data .ipv4_peers'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment