1 | domainsToDig=$(dig @8.8.8.8 _spf.google.com TXT +short | \
|
2 | sed \
|
3 | -e 's/"v=spf1//' \
|
4 | -e 's/ ~all"//' \
|
5 | -e 's/ include:/\n/g' | \
|
6 | tail -n+2)
|
7 | for domain in $domainsToDig ; do
|
8 | dig @8.8.8.8 $domain TXT +short | \
|
9 | sed \
|
10 | -e 's/"v=spf1//' \
|
11 | -e 's/ ~all"//' \
|
12 | -e 's/ ip.:/\n/g' | \
|
13 | tail -n+2
|
14 | done
|