Created
June 16, 2014 06:02
-
-
Save mashihua/96d8cc11bfedb9098f85 to your computer and use it in GitHub Desktop.
Google valid server
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
spawn = require('child_process').spawn | |
tls = require 'tls' | |
### | |
Google Beijing: | |
203.208.32.0 – 203.208.63.255 | |
### | |
ips = [] | |
for ip3 in [32...64] | |
for ip4 in [1...255] | |
ips.push "203.208.#{ip3}.#{ip4}" | |
actives = [] | |
hostips = {} | |
#通过检测443端口的SSL证书判断某个IP属于哪个域名,最后得到host-ip隐射{host1:[ip1, ip2, ip3],...} | |
hosts = ()-> | |
ip = actives.shift() | |
if not ip | |
console.log "%j", hostips | |
process.exit() | |
cleartextStream = tls.connect 443, ip, {rejectUnauthorized:false,allowHalfOpen: false}, -> | |
try | |
cert = cleartextStream.getPeerCertificate() | |
cn = cert.subject.CN | |
console.log cn, ip | |
host = hostips[cn] or (hostips[cn] = []) | |
host.push ip | |
catch e | |
cleartextStream.end() | |
hosts() | |
cleartextStream.setTimeout 1000, -> | |
#cleartextStream.on 'timeout', -> | |
cleartextStream.destroy() | |
cleartextStream.end() | |
hosts() | |
cleartextStream.on 'error', -> | |
cleartextStream.destroy() | |
cleartextStream.end() | |
hosts() | |
# ping google ip | |
ping = -> | |
ip = ips.shift() | |
if not ip | |
console.log "%j", actives | |
hosts() | |
console.log "ping #{ip}" | |
child = spawn 'ping', ['-c', '1', '-n', '-W', '1', ip] | |
child.on 'exit', (code, signal)-> | |
if code is 0 | |
actives.push ip | |
ping() | |
run() |
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
{ | |
"*.c.docs.google.com": [ | |
"203.208.40.1", | |
"203.208.40.2", | |
"203.208.40.3", | |
"203.208.40.4", | |
"203.208.40.5", | |
"203.208.40.6", | |
"203.208.40.7", | |
"203.208.40.8", | |
"203.208.40.10", | |
"203.208.40.9", | |
"203.208.40.11", | |
"203.208.40.12", | |
"203.208.40.16", | |
"203.208.40.17", | |
"203.208.40.18", | |
"203.208.40.19", | |
"203.208.40.21", | |
"203.208.40.20", | |
"203.208.40.22", | |
"203.208.40.23", | |
"203.208.40.25", | |
"203.208.40.26", | |
"203.208.40.27", | |
"203.208.41.11", | |
"203.208.41.10", | |
"203.208.41.19", | |
"203.208.41.20", | |
"203.208.41.22", | |
"203.208.41.23", | |
"203.208.41.24", | |
"203.208.41.25", | |
"203.208.41.26", | |
"203.208.41.27", | |
"203.208.46.1", | |
"203.208.46.2", | |
"203.208.46.3", | |
"203.208.46.4", | |
"203.208.46.5", | |
"203.208.46.6", | |
"203.208.46.7", | |
"203.208.46.8", | |
"203.208.46.16", | |
"203.208.46.17", | |
"203.208.46.18", | |
"203.208.46.19", | |
"203.208.46.20", | |
"203.208.46.21", | |
"203.208.46.22", | |
"203.208.46.23", | |
"203.208.46.25", | |
"203.208.46.24", | |
"203.208.46.26", | |
"203.208.46.28", | |
"203.208.46.27", | |
"203.208.46.29", | |
"203.208.46.31", | |
"203.208.46.32", | |
"203.208.46.33", | |
"203.208.46.34", | |
"203.208.46.35", | |
"203.208.46.38", | |
"203.208.46.37", | |
"203.208.46.65", | |
"203.208.46.66", | |
"203.208.46.67", | |
"203.208.46.68", | |
"203.208.46.70", | |
"203.208.46.71", | |
"203.208.46.72", | |
"203.208.46.80", | |
"203.208.46.81", | |
"203.208.46.82", | |
"203.208.46.84", | |
"203.208.46.85", | |
"203.208.46.87", | |
"203.208.46.89", | |
"203.208.46.92", | |
"203.208.46.93", | |
"203.208.46.99", | |
"203.208.46.100", | |
"203.208.46.102", | |
"203.208.46.103", | |
"203.208.47.4", | |
"203.208.47.2", | |
"203.208.47.1", | |
"203.208.47.7", | |
"203.208.47.8", | |
"203.208.47.18", | |
"203.208.47.19", | |
"203.208.47.16", | |
"203.208.47.17", | |
"203.208.47.20", | |
"203.208.47.21", | |
"203.208.47.24", | |
"203.208.47.23", | |
"203.208.47.26", | |
"203.208.47.25", | |
"203.208.47.28", | |
"203.208.47.27", | |
"203.208.47.29", | |
"203.208.47.30", | |
"203.208.47.31", | |
"203.208.47.32", | |
"203.208.47.34", | |
"203.208.47.33", | |
"203.208.47.36", | |
"203.208.47.35", | |
"203.208.47.37", | |
"203.208.47.39", | |
"203.208.47.66", | |
"203.208.47.65", | |
"203.208.47.38", | |
"203.208.47.68", | |
"203.208.47.69", | |
"203.208.47.70", | |
"203.208.47.67", | |
"203.208.47.72", | |
"203.208.47.80", | |
"203.208.47.71", | |
"203.208.47.81", | |
"203.208.47.83", | |
"203.208.47.82", | |
"203.208.47.86", | |
"203.208.47.84", | |
"203.208.47.85", | |
"203.208.47.88", | |
"203.208.47.87", | |
"203.208.47.93", | |
"203.208.47.90", | |
"203.208.47.91", | |
"203.208.47.92", | |
"203.208.47.94", | |
"203.208.47.96", | |
"203.208.47.95", | |
"203.208.47.97", | |
"203.208.47.98", | |
"203.208.47.99", | |
"203.208.47.100", | |
"203.208.47.102", | |
"203.208.47.129", | |
"203.208.47.101", | |
"203.208.47.103", | |
"203.208.47.131", | |
"203.208.47.132", | |
"203.208.47.134", | |
"203.208.47.130", | |
"203.208.47.135", | |
"203.208.47.144", | |
"203.208.47.147", | |
"203.208.47.146", | |
"203.208.47.149", | |
"203.208.47.145", | |
"203.208.47.150", | |
"203.208.47.151", | |
"203.208.47.152", | |
"203.208.47.154", | |
"203.208.47.153", | |
"203.208.47.155", | |
"203.208.47.157", | |
"203.208.47.156", | |
"203.208.47.158", | |
"203.208.47.159", | |
"203.208.47.160", | |
"203.208.47.163", | |
"203.208.47.161", | |
"203.208.47.162", | |
"203.208.47.165", | |
"203.208.47.164", | |
"203.208.47.167", | |
"203.208.48.1", | |
"203.208.48.2", | |
"203.208.48.3", | |
"203.208.48.4", | |
"203.208.48.5", | |
"203.208.48.8", | |
"203.208.48.7", | |
"203.208.48.9", | |
"203.208.48.6", | |
"203.208.48.10", | |
"203.208.48.11", | |
"203.208.48.12", | |
"203.208.48.16", | |
"203.208.48.17", | |
"203.208.48.20", | |
"203.208.48.18", | |
"203.208.48.22", | |
"203.208.48.21", | |
"203.208.48.24", | |
"203.208.48.23", | |
"203.208.48.26", | |
"203.208.48.25", | |
"203.208.48.27", | |
"203.208.49.33", | |
"203.208.49.34", | |
"203.208.49.35", | |
"203.208.49.36", | |
"203.208.49.37", | |
"203.208.49.38", | |
"203.208.49.39", | |
"203.208.49.40", | |
"203.208.49.41", | |
"203.208.49.42", | |
"203.208.49.43", | |
"203.208.49.44", | |
"203.208.49.48", | |
"203.208.49.50", | |
"203.208.49.49", | |
"203.208.49.51", | |
"203.208.49.52", | |
"203.208.49.54", | |
"203.208.49.56", | |
"203.208.49.55", | |
"203.208.49.57", | |
"203.208.49.59", | |
"203.208.49.58" | |
], | |
"*.doubleclick.net": [ | |
"203.208.36.27", | |
"203.208.36.28", | |
"203.208.37.27", | |
"203.208.37.28", | |
"203.208.40.155", | |
"203.208.41.156", | |
"203.208.41.155", | |
"203.208.46.155", | |
"203.208.46.156", | |
"203.208.46.187", | |
"203.208.46.188", | |
"203.208.46.219", | |
"203.208.46.220", | |
"203.208.48.156", | |
"203.208.48.155", | |
"203.208.49.188", | |
"203.208.49.187" | |
], | |
"*.g.doubleclick.net": [ | |
"203.208.36.13", | |
"203.208.36.25", | |
"203.208.36.26", | |
"203.208.37.25", | |
"203.208.37.26", | |
"203.208.40.141", | |
"203.208.40.153", | |
"203.208.40.154", | |
"203.208.41.141", | |
"203.208.41.153", | |
"203.208.41.154", | |
"203.208.46.153", | |
"203.208.46.154", | |
"203.208.46.173", | |
"203.208.46.185", | |
"203.208.46.186", | |
"203.208.46.205", | |
"203.208.46.217", | |
"203.208.46.218", | |
"203.208.48.141", | |
"203.208.48.153", | |
"203.208.49.173", | |
"203.208.49.185", | |
"203.208.49.186" | |
], | |
"*.google-analytics.com": [ | |
"203.208.36.30", | |
"203.208.37.30", | |
"203.208.41.158", | |
"203.208.46.158", | |
"203.208.46.222", | |
"203.208.48.158" | |
], | |
"*.google.com": [ | |
"203.208.36.1", | |
"203.208.36.2", | |
"203.208.36.3", | |
"203.208.36.4", | |
"203.208.36.5", | |
"203.208.36.6", | |
"203.208.36.7", | |
"203.208.37.1", | |
"203.208.37.2", | |
"203.208.37.3", | |
"203.208.37.4", | |
"203.208.37.5", | |
"203.208.37.6", | |
"203.208.37.7", | |
"203.208.37.8", | |
"203.208.37.9", | |
"203.208.37.14", | |
"203.208.40.128", | |
"203.208.40.129", | |
"203.208.40.130", | |
"203.208.40.131", | |
"203.208.40.132", | |
"203.208.40.133", | |
"203.208.40.135", | |
"203.208.40.136", | |
"203.208.40.137", | |
"203.208.40.142", | |
"203.208.41.128", | |
"203.208.41.129", | |
"203.208.41.131", | |
"203.208.41.132", | |
"203.208.41.130", | |
"203.208.41.133", | |
"203.208.41.134", | |
"203.208.41.136", | |
"203.208.41.135", | |
"203.208.41.137", | |
"203.208.41.142", | |
"203.208.46.129", | |
"203.208.46.128", | |
"203.208.46.131", | |
"203.208.46.132", | |
"203.208.46.133", | |
"203.208.46.136", | |
"203.208.46.137", | |
"203.208.46.142", | |
"203.208.46.163", | |
"203.208.46.161", | |
"203.208.46.162", | |
"203.208.46.164", | |
"203.208.46.168", | |
"203.208.46.166", | |
"203.208.46.167", | |
"203.208.46.169", | |
"203.208.46.174", | |
"203.208.46.193", | |
"203.208.46.192", | |
"203.208.46.194", | |
"203.208.46.199", | |
"203.208.46.196", | |
"203.208.46.197", | |
"203.208.46.198", | |
"203.208.46.200", | |
"203.208.46.206", | |
"203.208.48.128", | |
"203.208.48.129", | |
"203.208.48.131", | |
"203.208.48.133", | |
"203.208.48.132", | |
"203.208.48.134", | |
"203.208.48.135", | |
"203.208.48.136", | |
"203.208.48.137", | |
"203.208.48.142", | |
"203.208.49.160", | |
"203.208.49.161", | |
"203.208.49.162", | |
"203.208.49.163", | |
"203.208.49.166", | |
"203.208.49.165", | |
"203.208.49.167", | |
"203.208.49.168", | |
"203.208.49.169", | |
"203.208.49.174" | |
], | |
"*.googleusercontent.com": [ | |
"203.208.36.11", | |
"203.208.37.10", | |
"203.208.40.138", | |
"203.208.40.139", | |
"203.208.40.140", | |
"203.208.41.138", | |
"203.208.41.139", | |
"203.208.41.140", | |
"203.208.46.138", | |
"203.208.46.139", | |
"203.208.46.140", | |
"203.208.46.170", | |
"203.208.46.172", | |
"203.208.46.204", | |
"203.208.48.138", | |
"203.208.48.139", | |
"203.208.48.140", | |
"203.208.49.170", | |
"203.208.49.172", | |
"203.208.49.171" | |
], | |
"*.gstatic.com": [ | |
"203.208.40.143" | |
], | |
"*.mail.google.com": [ | |
"203.208.36.29", | |
"203.208.37.29", | |
"203.208.40.157", | |
"203.208.41.157", | |
"203.208.46.157", | |
"203.208.48.157" | |
], | |
"google.com": [ | |
"203.208.36.15", | |
"203.208.36.23", | |
"203.208.36.31", | |
"203.208.37.15", | |
"203.208.37.23", | |
"203.208.37.24", | |
"203.208.37.31", | |
"203.208.40.159", | |
"203.208.41.143", | |
"203.208.41.151", | |
"203.208.41.152", | |
"203.208.41.159", | |
"203.208.46.152", | |
"203.208.46.159", | |
"203.208.46.183", | |
"203.208.46.191", | |
"203.208.46.216", | |
"203.208.46.223", | |
"203.208.48.143", | |
"203.208.48.159", | |
"203.208.49.175", | |
"203.208.49.183", | |
"203.208.49.184" | |
], | |
"mail.google.com": [ | |
"203.208.36.21", | |
"203.208.36.22", | |
"203.208.37.21", | |
"203.208.40.150", | |
"203.208.41.150", | |
"203.208.41.149", | |
"203.208.46.149", | |
"203.208.46.150", | |
"203.208.46.181", | |
"203.208.46.213", | |
"203.208.46.214", | |
"203.208.48.149", | |
"203.208.48.150", | |
"203.208.49.181", | |
"203.208.49.182" | |
], | |
"spdy-proxy.ext.google.com": [ | |
"203.208.61.236" | |
], | |
"www.google.com": [ | |
"203.208.36.16", | |
"203.208.36.17", | |
"203.208.36.18", | |
"203.208.36.19", | |
"203.208.36.20", | |
"203.208.37.16", | |
"203.208.37.17", | |
"203.208.37.18", | |
"203.208.37.19", | |
"203.208.37.20", | |
"203.208.40.144", | |
"203.208.40.146", | |
"203.208.40.145", | |
"203.208.40.147", | |
"203.208.40.148", | |
"203.208.41.144", | |
"203.208.41.145", | |
"203.208.41.147", | |
"203.208.41.146", | |
"203.208.41.148", | |
"203.208.46.144", | |
"203.208.46.145", | |
"203.208.46.146", | |
"203.208.46.176", | |
"203.208.46.177", | |
"203.208.46.178", | |
"203.208.46.208", | |
"203.208.46.209", | |
"203.208.46.212", | |
"203.208.46.211", | |
"203.208.48.144", | |
"203.208.48.146", | |
"203.208.48.147", | |
"203.208.48.148", | |
"203.208.49.176", | |
"203.208.49.177", | |
"203.208.49.178", | |
"203.208.49.179" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment