调用bing.com查域名的ruby脚本
require net/http
def bingdomin(scanurl)
h = Net::HTTP.new("www.bing.com", 80)
resp, data = h.get(scanurl, nil)
if resp.message == "OK"
allpagesumtemp=data.to_s.split("id="count"")
match=/sd.*?s/.match(allpagesumtemp[1])
allpagesum=match[0].to_i
bb= data.to_s.split("<cite>")
for i in 1...bb.size
ctemp= bb[i].split("</cite>")[0]
if ctemp.split("/")[0]=nil
puts bb[i].split("</cite>")[0]
end
if ctemp.split("/")[0]!=nil
puts ctemp.split("/")[0]
end
end
return allpagesum
end
endif $*[0]==nil
abort "没有输入ip ,exp:#{$0} ip"end
allpagesum=bingdomin("/search?q=iP%3a#{ARGV[0]}&mkt=en-US&setlang=match&uid=F492768A&smkt=zh-CN&first=1&FORM=PERE")k=11
while k<allpagesum
bingdomin("/search?q=iP%3a#{ARGV[0]}&mkt=en-US&setlang=match&uid=F492768A&smkt=zh-CN&first=#{k}&FORM=PERE=")
k=k+10
end
补充:综合编程 , 其他综合 ,