Created
May 4, 2014 12:49
-
-
Save gomasy/ed13f2eca00d92a70f99 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
require "socket" | |
def inquiry(host, domain) | |
whois = "" | |
socket = TCPSocket.open(host, 43) | |
socket.puts domain | |
while socket.gets != nil do | |
str = socket.gets | |
whois << str if str != nil | |
end | |
socket.close | |
whois | |
end | |
domain_list = [ | |
"axer.ga", | |
"goma.ga", | |
"manuke.ga", | |
"kubi.ga" | |
] | |
domain_list.each do |e| | |
suspended = false | |
str = inquiry("whois.dot.ga", e) | |
if str.include?("suspended") | |
suspended = true | |
end | |
puts suspended | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment