Created
January 21, 2016 10:46
-
-
Save lorentzca/f99aa353554a84b81554 to your computer and use it in GitHub Desktop.
集え我が一族
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 characters
#!/usr/bin/ruby | |
require 'uri' | |
require 'open-uri' | |
require 'net/http' | |
open('http://data.iana.org/TLD/tlds-alpha-by-domain.txt') {|f| | |
f.each_line {|line| | |
next line if %r(^#) =~ line | |
url = "http://kunishima.#{line}" | |
begin | |
status = timeout(1) { | |
code = Net::HTTP.get_response(URI.parse(url)).code | |
puts url + ' : ' + code | |
} | |
rescue | |
end | |
} | |
} |
Author
lorentzca
commented
Jan 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment