-
-
Save x2c3z4/c5d6fd8a8b02ea7556a22cb5891e335b to your computer and use it in GitHub Desktop.
Revisions
-
n0531m renamed this gist
Jun 13, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
n0531m revised this gist
May 5, 2015 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,16 @@ #!/bin/bash # https://cloud.google.com/compute/docs/faq#ipranges #nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :` do dig txt $LINE +short done | tr " " "\n" | grep ip4 | cut -f 2 -d : | sort -n # changing target to _spf.google.com, you can get a simliar range now for Google Apps mail servers. # https://support.google.com/a/answer/60764 # changing it to _netblocks.google.com will help get all the ip ranges google uses for its services. -
n0531m revised this gist
May 5, 2015 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,3 +7,8 @@ for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" do dig txt $LINE +short done | tr " " "\n" | grep ip4 | cut -f 2 -d : | sort -n # changing host name as below, and you can get a simliar range now for Google Apps mail servers. # https://support.google.com/a/answer/60764 # for LINE in `dig txt _spf.google.com +short | tr " " "\n" | grep include | cut -f 2 -d :`; do dig txt $LINE +short; done | tr " " "\n" | grep ip4 | cut -f 2 -d : | sort -n -
n0531m revised this gist
May 5, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # https://cloud.google.com/compute/docs/faq#ipranges #nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 #`dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | tr : "\t" | cut -f 2` -
n0531m revised this gist
May 5, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 #`dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | tr : "\t" | cut -f 2` for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :` do dig txt $LINE +short done | tr " " "\n" | grep ip4 | cut -f 2 -d : | sort -n -
n0531m created this gist
May 5, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ #nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 #`dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | tr : "\t" | cut -f 2` for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | tr : "\t" | cut -f 2` do dig txt $LINE +short done | tr " " "\n" | grep ip4 | tr : "\t" | cut -f 2 | sort -n