XX-net / XX-Net

A proxy tool to bypass GFW.
32.91k stars 7.71k forks source link

建议先用nmap工具扫一遍google ip的443端口 #454

Open linhua55 opened 9 years ago

linhua55 commented 9 years ago

建议先用nmap工具扫一遍google ip的443端口,再使用checkgoogleip等工具 使用nmap工具进行端口扫描比较快,且系统资源占用较少,直接用checkgoogleip进行一遍扫描会浪费系统资源。如用以下命令:

sudo nmap -sS --min-rate 5000 --max-retries 0 -n -T5 -PN -oG 5000gae_443_ip.gnmap  -iL google_ip.txt  -p443 -vv

其中google_ip.txt为nslookup查询得到的google ip段,有221184 个IP

nslookup -q=TXT _netblocks.google.com 8.8.8.8

google_ip.txt

64.18.0.0/20
64.233.160.0/19
66.102.0.0/20
66.249.80.0/20
72.14.192.0/18
74.125.0.0/16
173.194.0.0/16
207.126.144.0/20
209.85.128.0/17
216.58.192.0/19
216.239.32.0/19

如果中途中断了,可使用如下命令恢复

sudo nmap --resume  5000gae_443_ip.gnmap

最后用了4分钟可得到285个443端口开放的ip,当然不止这么多。减小扫描速度,

sudo nmap -sS --min-rate 2000 --max-retries 2 -n -T4 -PN -oG gae_443_ip.gnmap  -iL google_ip.txt  -p443 -vv

可用9分钟得到8719个443端口开放的ip,再用checkgoogleip等工具,工作量会少很多。

一行命令得可用ip

大约17分钟

sudo nmap -sS --min-rate 2000 --max-retries 2 -n -T4 -PN -oG gae_443_ip.gnmap  -iL google_ip.txt  -p443 -vv && cat gae_443_ip.gnmap|grep open|awk '{print $2}'|xargs -I ip -P 20 sh -c 'curl -k -m 20 --resolve xxnet-13.appspot.com:443:ip https://xxnet-13.appspot.com/_gh/  |grep -e GoAgent -e Quota -q && echo ip' > tmp.txt
yjd commented 9 years ago

不错的方法。

TangBaohua commented 9 years ago

斜线后面数字代表什么?

clawneo commented 9 years ago

但是全是linux下的命令。。。 有win下的工具么?

linhua55 commented 9 years ago

@TangBaohua IP地址段的CIDR表示法 @clawneo windows自带nslookup命令,nmap命令可通过安装Zenmap软件获得。在win下,不需要命令前面的“sudo”