Created
December 3, 2019 22:47
-
-
Save natemccurdy/43e9b2913c0d0c2be812d39fad212f66 to your computer and use it in GitHub Desktop.
Show the network blocks used by googleapis.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
netblocks=$(dig TXT _spf.google.com +short | grep -E -o "include:_netblocks\d?\.google\.com" | sed 's/include://') | |
{ | |
for net in $netblocks; do | |
dig TXT "$net" +short | |
done | |
} | grep -E -o "ip4:[0-9\./]+" | sed 's/ip4://' | sort -V |
Author
natemccurdy
commented
Dec 3, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment