Skip to content

Instantly share code, notes, and snippets.

@jayswan jayswan/

Created Jul 26, 2016
What would you like to do?
Scripts to retrieve CIDR blocks for various services
# Fastly
curl -s | jq -r '.addresses | .[]'
# Google
dig @ +short txt | awk '{gsub("ip4:","");for (col=2; col<NF;++col) print $col}'
curl -s | \
jq --raw-output '.prefixes | map(.ip_prefix) | .[]'
# Tor
curl -s \
| awk '/ExitAddress/ {print $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.