Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 36 lines (30 sloc) 0.652 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#
# = Ruby Whois
#
# An intelligent pure Ruby WHOIS client.
#
#
# Category:: Net
# Package:: Whois
# Author:: Simone Carletti <weppos@weppos.net>
# License:: MIT License
#
#--
#
#++


module Whois
  class Server
    module Adapters
      
      class Afilias < Base
        
        def request(qstring)
          response = ask_the_socket(qstring, "whois.afilias-grs.info", DEFAULT_WHOIS_PORT)
          if response =~ /Domain Name:/ && response =~ /Whois Server:(\S+)/
            ask_the_socket(qstring, $1, DEFAULT_WHOIS_PORT)
          else
            response
          end
        end
        
      end
      
    end
  end
end
Something went wrong with that request. Please try again.