Skip to content

Commit

Permalink
try your dns #100
Browse files Browse the repository at this point in the history
  • Loading branch information
txthinking committed Nov 10, 2016
1 parent a967bb5 commit d71641f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@ $ cd google-hosts/scripts
$ ./apply.sh
```

**`auto.sh` find CIDR and run find.sh, select.sh, apply.sh**
**`auto.sh` find CIDR from a DNS and run find.sh, select.sh, apply.sh**

```
# This script find IP from $ nslookup -q=TXT _netblocks.google.com 8.8.4.4
# IP may be all dead, then you need find IP from other pool
$ cd google-hosts/scripts
$ ./auto.sh
$ ./auto.sh DNS # DNS is like 8.8.8.8, but you should try DNS in diffrent countries.
```

Explanation of output
Expand Down
11 changes: 10 additions & 1 deletion scripts/auto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
# Author: [email protected]
#

for i in $(nslookup -q=TXT _netblocks.google.com 8.8.4.4 | grep -Po '\d+\.\d+\.\d+.\d+\/\d+')
if [ $# -eq 0 ]
then
echo -e "Usage:\n";
echo -e " $ ./auto.sh DNS"
echo -e "\nDNS is like 8.8.8.8, but you should try DNS in diffrent countries.\n"
echo -e "\nView auto.sh file to see more.\n"
exit 0;
fi

for i in $(nslookup -q=TXT _netblocks.google.com $1 | grep -Po '\d+\.\d+\.\d+.\d+\/\d+')
do
./find.sh $i
done
Expand Down

0 comments on commit d71641f

Please sign in to comment.