Last active
October 9, 2016 17:09
-
-
Save Atavic/bf6c56322eefbde89ea7c7d0e134058c to your computer and use it in GitHub Desktop.
query domain SPF record
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
domainsToDig=$(dig @8.8.8.8 _spf.google.com TXT +short | \ | |
sed \ | |
-e 's/"v=spf1//' \ | |
-e 's/ ~all"//' \ | |
-e 's/ include:/\n/g' | \ | |
tail -n+2) | |
for domain in $domainsToDig ; do | |
dig @8.8.8.8 $domain TXT +short | \ | |
sed \ | |
-e 's/"v=spf1//' \ | |
-e 's/ ~all"//' \ | |
-e 's/ ip.:/\n/g' | \ | |
tail -n+2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment