whois 0.9.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +161 -21
- data/LICENSE.rdoc +1 -1
- data/Manifest +184 -13
- data/README.rdoc +24 -31
- data/Rakefile +7 -7
- data/bin/ruby-whois +9 -3
- data/data/ip_del_list +2 -0
- data/data/make_servers_charset.pl +21 -0
- data/data/make_tld_serv.pl +8 -7
- data/data/servers_charset_list +37 -0
- data/data/tld_serv_list +32 -30
- data/lib/whois.rb +0 -1
- data/lib/whois/answer.rb +24 -13
- data/lib/whois/answer/parser.rb +27 -16
- data/lib/whois/answer/parser/NOTES.txt +3 -0
- data/lib/whois/answer/parser/base.rb +140 -101
- data/lib/whois/answer/parser/jobswhois.verisign-grs.com.rb +99 -0
- data/lib/whois/answer/parser/whois.adamsnames.tc.rb +64 -0
- data/lib/whois/answer/parser/whois.aeda.net.ae.rb +65 -0
- data/lib/whois/answer/parser/whois.aero.rb +6 -6
- data/lib/whois/answer/parser/whois.afilias-grs.info.rb +6 -6
- data/lib/whois/answer/parser/whois.afilias.info.rb +12 -12
- data/lib/whois/answer/parser/whois.biz.rb +72 -0
- data/lib/whois/answer/parser/whois.cat.rb +74 -0
- data/lib/whois/answer/parser/whois.cira.ca.rb +77 -0
- data/lib/whois/answer/parser/whois.crsnic.net.rb +16 -13
- data/lib/whois/answer/parser/whois.denic.de.rb +14 -18
- data/lib/whois/answer/parser/whois.dk-hostmaster.dk.rb +75 -0
- data/lib/whois/answer/parser/whois.domain-registry.nl.rb +72 -0
- data/lib/whois/answer/parser/whois.domainregistry.ie.rb +7 -13
- data/lib/whois/answer/parser/whois.dotmobiregistry.net.rb +72 -0
- data/lib/whois/answer/parser/whois.educause.edu.rb +8 -8
- data/lib/whois/answer/parser/whois.eu.org.rb +8 -17
- data/lib/whois/answer/parser/whois.eu.rb +64 -0
- data/lib/whois/answer/parser/whois.iana.org.rb +6 -9
- data/lib/whois/answer/parser/whois.isnic.is.rb +72 -0
- data/lib/whois/answer/parser/whois.meregistry.net.rb +72 -0
- data/lib/whois/answer/parser/whois.museum.rb +76 -0
- data/lib/whois/answer/parser/whois.nic-se.se.rb +77 -0
- data/lib/whois/answer/parser/whois.nic.ac.rb +92 -0
- data/lib/whois/answer/parser/whois.nic.asia.rb +12 -12
- data/lib/whois/answer/parser/whois.nic.cc.rb +99 -0
- data/lib/whois/answer/parser/whois.nic.cd.rb +68 -0
- data/lib/whois/answer/parser/whois.nic.ch.rb +64 -0
- data/lib/whois/answer/parser/whois.nic.coop.rb +74 -0
- data/lib/whois/answer/parser/whois.nic.fr.rb +8 -11
- data/lib/whois/answer/parser/whois.nic.gl.rb +77 -0
- data/lib/whois/answer/parser/whois.nic.gov.rb +8 -17
- data/lib/whois/answer/parser/whois.nic.hu.rb +21 -19
- data/lib/whois/answer/parser/whois.nic.im.rb +68 -0
- data/lib/whois/answer/parser/whois.nic.io.rb +64 -0
- data/lib/whois/answer/parser/whois.nic.it.rb +16 -16
- data/lib/whois/answer/parser/whois.nic.ly.rb +76 -0
- data/lib/whois/answer/parser/whois.nic.mu.rb +77 -0
- data/lib/whois/answer/parser/whois.nic.name.rb +8 -17
- data/lib/whois/answer/parser/whois.nic.nu.rb +84 -0
- data/lib/whois/answer/parser/whois.nic.tel.rb +76 -0
- data/lib/whois/answer/parser/whois.nic.tl.rb +76 -0
- data/lib/whois/answer/parser/whois.nic.travel.rb +72 -0
- data/lib/whois/answer/parser/whois.nic.tv.rb +16 -13
- data/lib/whois/answer/parser/whois.nic.uk.rb +82 -0
- data/lib/whois/answer/parser/whois.nic.us.rb +72 -0
- data/lib/whois/answer/parser/whois.norid.no.rb +72 -0
- data/lib/whois/answer/parser/whois.publicinterestregistry.net.rb +16 -16
- data/lib/whois/answer/parser/whois.register.bg.rb +74 -0
- data/lib/whois/answer/parser/whois.registro.br.rb +64 -0
- data/lib/whois/answer/parser/whois.registrypro.pro.rb +77 -0
- data/lib/whois/answer/parser/whois.ripe.net.rb +64 -0
- data/lib/whois/answer/parser/whois.ripn.net.rb +72 -0
- data/lib/whois/answer/parser/whois.rotld.ro.rb +64 -0
- data/lib/whois/answer/parser/whois.samoanic.ws.rb +76 -0
- data/lib/whois/answer/parser/whois.za.net.rb +8 -11
- data/lib/whois/answer/parser/whois.za.org.rb +7 -10
- data/lib/whois/answer/super_struct.rb +1 -1
- data/lib/whois/client.rb +4 -4
- data/lib/whois/definitions/NOTES.txt +12 -0
- data/lib/whois/definitions/ipv4.rb +2 -0
- data/lib/whois/definitions/tlds.rb +27 -27
- data/lib/whois/errors.rb +11 -1
- data/lib/whois/server.rb +1 -0
- data/lib/whois/server/adapters/web.rb +1 -2
- data/lib/whois/version.rb +4 -4
- data/test/answer/parser/base_test.rb +16 -29
- data/test/answer/parser/jobswhois.verisign-grs.com_test.rb +122 -0
- data/test/answer/parser/whois.adamsnames.tc_test.rb +122 -0
- data/test/answer/parser/whois.aeda.net.ae_test.rb +63 -0
- data/test/answer/parser/whois.afilias-grs.info_test.rb +274 -13
- data/test/answer/parser/whois.afilias.info_test.rb +1 -1
- data/test/answer/parser/whois.biz_test.rb +51 -0
- data/test/answer/parser/whois.cat_test.rb +51 -0
- data/test/answer/parser/whois.cira.ca_test.rb +51 -0
- data/test/answer/parser/whois.crsnic.net_test.rb +8 -3
- data/test/answer/parser/whois.denic.de_test.rb +11 -18
- data/test/answer/parser/whois.dk-hostmaster.dk_test.rb +57 -0
- data/test/answer/parser/whois.domain-registry.nl_test.rb +49 -0
- data/test/answer/parser/whois.domainregistry.ie_test.rb +7 -11
- data/test/answer/parser/whois.dotmobiregistry.net_test.rb +51 -0
- data/test/answer/parser/whois.educause.edu_test.rb +3 -3
- data/test/answer/parser/whois.eu.org_test.rb +6 -12
- data/test/answer/parser/whois.eu_test.rb +45 -0
- data/test/answer/parser/whois.iana.org_test.rb +2 -4
- data/test/answer/parser/whois.isnic.is_test.rb +49 -0
- data/test/answer/parser/whois.meregistry.net_test.rb +51 -0
- data/test/answer/parser/whois.museum_test.rb +51 -0
- data/test/answer/parser/whois.nic-se.se_test.rb +58 -0
- data/test/answer/parser/whois.nic.ac_test.rb +126 -0
- data/test/answer/parser/whois.nic.asia_test.rb +1 -1
- data/test/answer/parser/whois.nic.cc_test.rb +122 -0
- data/test/answer/parser/whois.nic.cd_test.rb +49 -0
- data/test/answer/parser/whois.nic.ch_test.rb +45 -0
- data/test/answer/parser/whois.nic.coop_test.rb +51 -0
- data/test/answer/parser/whois.nic.fr_test.rb +178 -13
- data/test/answer/parser/whois.nic.gl_test.rb +51 -0
- data/test/answer/parser/whois.nic.gov_test.rb +6 -12
- data/test/answer/parser/whois.nic.hu_test.rb +9 -7
- data/test/answer/parser/whois.nic.im_test.rb +47 -0
- data/test/answer/parser/whois.nic.io_test.rb +45 -0
- data/test/answer/parser/whois.nic.it_test.rb +6 -3
- data/test/answer/parser/whois.nic.ly_test.rb +51 -0
- data/test/answer/parser/whois.nic.mu_test.rb +97 -0
- data/test/answer/parser/whois.nic.name_test.rb +6 -12
- data/test/answer/parser/whois.nic.nu_test.rb +59 -0
- data/test/answer/parser/whois.nic.tel_test.rb +51 -0
- data/test/answer/parser/whois.nic.tl_test.rb +51 -0
- data/test/answer/parser/whois.nic.travel_test.rb +51 -0
- data/test/answer/parser/whois.nic.tv_test.rb +9 -5
- data/test/answer/parser/whois.nic.uk_test.rb +63 -0
- data/test/answer/parser/whois.nic.us_test.rb +51 -0
- data/test/answer/parser/whois.norid.no_test.rb +49 -0
- data/test/answer/parser/whois.register.bg_test.rb +49 -0
- data/test/answer/parser/whois.registro.br_test.rb +45 -0
- data/test/answer/parser/whois.registrypro.pro_test.rb +84 -0
- data/test/answer/parser/whois.ripe.net_test.rb +203 -0
- data/test/answer/parser/whois.ripn.net_test.rb +94 -0
- data/test/answer/parser/whois.rotld.ro_test.rb +45 -0
- data/test/answer/parser/whois.samoanic.ws_test.rb +51 -0
- data/test/answer/parser/whois.za.net_test.rb +2 -4
- data/test/answer/parser/whois.za.org_test.rb +2 -4
- data/test/answer/parser_test.rb +71 -48
- data/test/answer_test.rb +57 -21
- data/test/client_test.rb +5 -2
- data/test/errors_test.rb +23 -0
- data/test/list_tld +74 -76
- data/test/testcases/responses/jobswhois.verisign-grs.com/available.txt +44 -0
- data/test/testcases/responses/jobswhois.verisign-grs.com/registered.txt +54 -0
- data/test/testcases/responses/super_struct_test.rb +3 -4
- data/test/testcases/responses/whois.adamsnames.tc/gd/available.txt +2 -0
- data/test/testcases/responses/whois.adamsnames.tc/gd/registered.txt +26 -0
- data/test/testcases/responses/whois.adamsnames.tc/tc/available.txt +2 -0
- data/test/testcases/responses/whois.adamsnames.tc/tc/registered.txt +28 -0
- data/test/testcases/responses/whois.adamsnames.tc/vg/available.txt +2 -0
- data/test/testcases/responses/whois.adamsnames.tc/vg/registered.txt +28 -0
- data/test/testcases/responses/whois.aeda.net.ae/available.txt +1 -0
- data/test/testcases/responses/whois.aeda.net.ae/registered.txt +15 -0
- data/test/testcases/responses/whois.biz/available.txt +25 -0
- data/test/testcases/responses/whois.biz/registered.txt +89 -0
- data/test/testcases/responses/whois.cat/available.txt +18 -0
- data/test/testcases/responses/whois.cat/registered.txt +83 -0
- data/test/testcases/responses/whois.cira.ca/available.txt +9 -0
- data/test/testcases/responses/whois.cira.ca/registered.txt +47 -0
- data/test/testcases/responses/whois.dk-hostmaster.dk/available.txt +15 -0
- data/test/testcases/responses/whois.dk-hostmaster.dk/registered.txt +47 -0
- data/test/testcases/responses/whois.domain-registry.nl/available.txt +21 -0
- data/test/testcases/responses/whois.domain-registry.nl/registered.txt +67 -0
- data/test/testcases/responses/whois.dotmobiregistry.net/available.txt +25 -0
- data/test/testcases/responses/whois.dotmobiregistry.net/registered.txt +81 -0
- data/test/testcases/responses/whois.eu/available.txt +47 -0
- data/test/testcases/responses/whois.eu/registered.txt +63 -0
- data/test/testcases/responses/whois.isnic.is/available.txt +7 -0
- data/test/testcases/responses/whois.isnic.is/registered.txt +57 -0
- data/test/testcases/responses/{whois.afilias-grs.info → whois.meregistry.net}/available.txt +0 -0
- data/test/testcases/responses/whois.meregistry.net/registered.txt +94 -0
- data/test/testcases/responses/whois.museum/available.txt +18 -0
- data/test/testcases/responses/whois.museum/registered.txt +92 -0
- data/test/testcases/responses/whois.nic-se.se/available.txt +21 -0
- data/test/testcases/responses/whois.nic-se.se/registered.txt +37 -0
- data/test/testcases/responses/whois.nic.ac/available.txt +2 -0
- data/test/testcases/responses/whois.nic.ac/registered.txt +2 -0
- data/test/testcases/responses/whois.nic.cc/available.txt +44 -0
- data/test/testcases/responses/whois.nic.cc/registered.txt +58 -0
- data/test/testcases/responses/whois.nic.cd/available.txt +1 -0
- data/test/testcases/responses/whois.nic.cd/registered.txt +85 -0
- data/test/testcases/responses/whois.nic.ch/available.txt +2 -0
- data/test/testcases/responses/whois.nic.ch/registered.txt +28 -0
- data/test/testcases/responses/whois.nic.coop/available.txt +33 -0
- data/test/testcases/responses/whois.nic.coop/registered.txt +123 -0
- data/test/testcases/responses/whois.nic.fr/{available.txt → fr/available.txt} +0 -0
- data/test/testcases/responses/whois.nic.fr/{registered.txt → fr/registered.txt} +0 -0
- data/test/testcases/responses/whois.nic.fr/pm/available.txt +19 -0
- data/test/testcases/responses/whois.nic.fr/pm/registered.txt +88 -0
- data/test/testcases/responses/whois.nic.fr/re/available.txt +19 -0
- data/test/testcases/responses/whois.nic.fr/re/registered.txt +83 -0
- data/test/testcases/responses/whois.nic.fr/wf/available.txt +19 -0
- data/test/testcases/responses/whois.nic.fr/wf/registered.txt +88 -0
- data/test/testcases/responses/whois.nic.fr/yt/available.txt +19 -0
- data/test/testcases/responses/whois.nic.fr/yt/registered.txt +88 -0
- data/test/testcases/responses/whois.nic.gl/available.txt +23 -0
- data/test/testcases/responses/whois.nic.gl/registered.txt +40 -0
- data/test/testcases/responses/whois.nic.hu/available.txt +5 -5
- data/test/testcases/responses/whois.nic.hu/in_progress.txt +5 -5
- data/test/testcases/responses/whois.nic.hu/registered.txt +6 -6
- data/test/testcases/responses/whois.nic.im/available.txt +2 -0
- data/test/testcases/responses/whois.nic.im/registered.txt +45 -0
- data/test/testcases/responses/whois.nic.io/available.txt +2 -0
- data/test/testcases/responses/whois.nic.io/registered.txt +2 -0
- data/test/testcases/responses/whois.nic.ly/available.txt +1 -0
- data/test/testcases/responses/whois.nic.ly/registered.txt +65 -0
- data/test/testcases/responses/whois.nic.mu/ki/available.txt +20 -0
- data/test/testcases/responses/whois.nic.mu/ki/registered.txt +30 -0
- data/test/testcases/responses/whois.nic.mu/mu/available.txt +9 -0
- data/test/testcases/responses/whois.nic.mu/mu/registered.txt +22 -0
- data/test/testcases/responses/whois.nic.nu/available.txt +19 -0
- data/test/testcases/responses/whois.nic.nu/registered.txt +35 -0
- data/test/testcases/responses/whois.nic.tel/available.txt +59 -0
- data/test/testcases/responses/whois.nic.tel/registered.txt +111 -0
- data/test/testcases/responses/whois.nic.tl/available.txt +21 -0
- data/test/testcases/responses/whois.nic.tl/registered.txt +29 -0
- data/test/testcases/responses/whois.nic.travel/available.txt +25 -0
- data/test/testcases/responses/whois.nic.travel/registered.txt +75 -0
- data/test/testcases/responses/whois.nic.uk/available.txt +20 -0
- data/test/testcases/responses/whois.nic.uk/invalid.txt +22 -0
- data/test/testcases/responses/whois.nic.uk/registered.txt +50 -0
- data/test/testcases/responses/whois.nic.us/available.txt +29 -0
- data/test/testcases/responses/whois.nic.us/registered.txt +99 -0
- data/test/testcases/responses/whois.norid.no/available.txt +5 -0
- data/test/testcases/responses/whois.norid.no/registered.txt +34 -0
- data/test/testcases/responses/whois.register.bg/available.txt +1 -0
- data/test/testcases/responses/whois.register.bg/registered.txt +44 -0
- data/test/testcases/responses/whois.registro.br/available.txt +22 -0
- data/test/testcases/responses/whois.registro.br/registered.txt +23 -0
- data/test/testcases/responses/whois.registrypro.pro/available.txt +20 -0
- data/test/testcases/responses/whois.registrypro.pro/registered.txt +62 -0
- data/test/testcases/responses/whois.ripe.net/fo/available.txt +11 -0
- data/test/testcases/responses/whois.ripe.net/fo/registered.txt +45 -0
- data/test/testcases/responses/whois.ripe.net/gm/available.txt +11 -0
- data/test/testcases/responses/whois.ripe.net/gm/registered.txt +37 -0
- data/test/testcases/responses/whois.ripe.net/mc/available.txt +11 -0
- data/test/testcases/responses/whois.ripe.net/mc/registered.txt +36 -0
- data/test/testcases/responses/whois.ripe.net/sm/available.txt +11 -0
- data/test/testcases/responses/whois.ripe.net/sm/registered.txt +60 -0
- data/test/testcases/responses/whois.ripe.net/va/available.txt +11 -0
- data/test/testcases/responses/whois.ripe.net/va/registered.txt +48 -0
- data/test/testcases/responses/whois.ripn.net/ru/available.txt +9 -0
- data/test/testcases/responses/whois.ripn.net/ru/registered.txt +24 -0
- data/test/testcases/responses/whois.ripn.net/su/available.txt +9 -0
- data/test/testcases/responses/whois.ripn.net/su/registered.txt +20 -0
- data/test/testcases/responses/whois.rotld.ro/available.txt +16 -0
- data/test/testcases/responses/whois.rotld.ro/registered.txt +27 -0
- data/test/testcases/responses/whois.samoanic.ws/available.txt +12 -0
- data/test/testcases/responses/whois.samoanic.ws/registered.txt +34 -0
- data/whois.gemspec +19 -19
- metadata +274 -31
- data/lib/whois/answer/parser/README.rdoc +0 -21
- data/lib/whois/definitions/ipv4.txt +0 -214
- data/lib/whois/definitions/ipv6.txt +0 -32
- data/lib/whois/definitions/tld.notes.txt +0 -1
- data/lib/whois/definitions/tlds.txt +0 -354
- data/lib/whois/whois.rb +0 -185
- data/test/testcases/responses/whois.afilias-grs.info/registered.txt +0 -122
- data/test/testcases/responses/whois.nic.fr/MULTIPLE.txt +0 -4
- data/test/whois_test.rb +0 -32
- data/utils/tlds.txt +0 -318
data/lib/whois/whois.rb
DELETED
@@ -1,185 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# = Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# Category:: Net
|
8
|
-
# Package:: Whois
|
9
|
-
# Author:: Simone Carletti <weppos@weppos.net>
|
10
|
-
# License:: MIT License
|
11
|
-
#
|
12
|
-
#--
|
13
|
-
#
|
14
|
-
#++
|
15
|
-
|
16
|
-
|
17
|
-
require 'resolv'
|
18
|
-
|
19
|
-
|
20
|
-
module Whois
|
21
|
-
|
22
|
-
class WhoisException < Exception # :nodoc
|
23
|
-
def initialize(message)
|
24
|
-
::Whois.deprecate "WhoisException is deprecated as of 0.5.0 and will be removed in a future release along with Whois::Whois class."
|
25
|
-
super
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
class WhoisExceptionError < WhoisException # :nodoc
|
30
|
-
def initialize(message)
|
31
|
-
super("Report a bug with error #{message} to http://rubyforge.org/projects/whois/")
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
# This class exists to ensure this GEM is compatible
|
37
|
-
# with the original Ruby Whois release 0.4.2
|
38
|
-
# developed by Cyril Mougel.
|
39
|
-
#
|
40
|
-
# It exposes the same Ruby WHOIS 0.4.2 interface
|
41
|
-
# and echoes deprecation warning for all those features
|
42
|
-
# that are going to be removed in a next version.
|
43
|
-
#
|
44
|
-
# Here's a standard Ruby WHOIS 0.4.2 example usage.
|
45
|
-
#
|
46
|
-
# w = Whois::Whois.new '72.14.207.99'
|
47
|
-
# w.search_whois
|
48
|
-
#
|
49
|
-
# # All return of request
|
50
|
-
# w.all
|
51
|
-
#
|
52
|
-
# # The ip return with object IPAddr
|
53
|
-
# w.ip
|
54
|
-
#
|
55
|
-
# # The server where the request has send
|
56
|
-
# w.server
|
57
|
-
#
|
58
|
-
# # The host of this IPv4
|
59
|
-
# w.host
|
60
|
-
#
|
61
|
-
# WARNING: The Whois::Whois class will be removed in a future release.
|
62
|
-
# You should update your code to the new interface offered by <tt>Whois::Client</tt>.
|
63
|
-
# If you want to save keystrokes, you can even use the handy <tt>Whois.query</tt> method.
|
64
|
-
#
|
65
|
-
# Whois.query '72.14.207.99'
|
66
|
-
# # => whois answer
|
67
|
-
#
|
68
|
-
class Whois # :nodoc
|
69
|
-
|
70
|
-
attr_reader :ip
|
71
|
-
attr_reader :host
|
72
|
-
attr_accessor :host_search
|
73
|
-
|
74
|
-
def initialize(request, host_search = false)
|
75
|
-
::Whois.deprecate "Whois::Whois class is deprecated as of 0.5.0 and will be removed in a future release. Use Whois.query('#{request.to_s}') instead."
|
76
|
-
|
77
|
-
@host_search = host_search
|
78
|
-
@host = nil
|
79
|
-
@client = Client.new
|
80
|
-
|
81
|
-
@ip = if request.instance_of? IPAddr
|
82
|
-
request
|
83
|
-
elsif Resolv::IPv4::Regex =~ request
|
84
|
-
IPAddr.new(request)
|
85
|
-
elsif Resolv::IPv6::Regex =~ request
|
86
|
-
IPAddr.new(request)
|
87
|
-
else
|
88
|
-
begin
|
89
|
-
@ip = IPAddr.new(Resolv.getaddress(request))
|
90
|
-
@host = request
|
91
|
-
rescue Resolv::ResolvError
|
92
|
-
raise WhoisException.new("host #{request} has no DNS result")
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
@host || search_host
|
97
|
-
rescue ServerNotFound => e
|
98
|
-
raise WhoisException.new("no server found for #{request}")
|
99
|
-
end
|
100
|
-
|
101
|
-
def search_whois
|
102
|
-
@all = @client.query(@ip.to_s)
|
103
|
-
end
|
104
|
-
|
105
|
-
def search_host
|
106
|
-
::Whois.deprecate "#search_host will be removed in a future release. Use Resolv.getname(#{@ip.to_s}) in your application to get the same feature."
|
107
|
-
@host = if @host_search
|
108
|
-
Resolv.getname(@ip.to_s)
|
109
|
-
else
|
110
|
-
nil
|
111
|
-
end
|
112
|
-
rescue Resolv::ResolvError
|
113
|
-
@host = nil
|
114
|
-
end
|
115
|
-
|
116
|
-
def all
|
117
|
-
::Whois.deprecate "#all will be removed in a future release. You are responsible for storing the whois answer in a custom variable."
|
118
|
-
@all
|
119
|
-
end
|
120
|
-
|
121
|
-
def server
|
122
|
-
::Whois.deprecate "#server will be removed in a future release. No replacement has been planned for the immediate future."
|
123
|
-
if server = @client.instance_variable_get(:"@server")
|
124
|
-
Server::Server.lookup(server.host)
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
end
|
129
|
-
|
130
|
-
class Server # :nodoc
|
131
|
-
|
132
|
-
class Server # :nodoc
|
133
|
-
@@definitions = [
|
134
|
-
['whois.afrinic.net' , 'Afrinic' ],
|
135
|
-
['whois.ripe.net' , 'Ripe' ],
|
136
|
-
['whois.apnic.net' , 'Apnic' ],
|
137
|
-
['whois.arin.net' , 'Arin' ],
|
138
|
-
['whois.lacnic.net' , 'Lacnic' ],
|
139
|
-
['whois.nic.or.kr' , 'Nicor' ],
|
140
|
-
['whois.nic.ad.jp' , 'Nicad' ],
|
141
|
-
['whois.nic.br' , 'Nicbr' ],
|
142
|
-
[nil , 'Teredo' ],
|
143
|
-
[nil , 'Ipv6ToIpv4' ],
|
144
|
-
['whois.v6nic.net' , 'V6nic' ],
|
145
|
-
['whois.twnic.net' , 'Twnic' ],
|
146
|
-
['whois.6bone.net' , 'Ipv6Bone' ],
|
147
|
-
['rwhois.gin.ntt.net' , 'Ginntt' ],
|
148
|
-
]
|
149
|
-
|
150
|
-
attr_reader :server
|
151
|
-
|
152
|
-
def initialize(server)
|
153
|
-
@server = server
|
154
|
-
end
|
155
|
-
|
156
|
-
def self.lookup(host)
|
157
|
-
@@definitions.each do |server, klassname|
|
158
|
-
if !server.nil? && server == host
|
159
|
-
klass = ::Whois::Server.const_get(klassname)
|
160
|
-
return klass.new(server)
|
161
|
-
end
|
162
|
-
end
|
163
|
-
nil
|
164
|
-
end
|
165
|
-
end
|
166
|
-
|
167
|
-
Afrinic = Class.new(Server)
|
168
|
-
Ripe = Class.new(Server)
|
169
|
-
Apnic = Class.new(Server)
|
170
|
-
Arin = Class.new(Server)
|
171
|
-
Lacnic = Class.new(Server)
|
172
|
-
Nicor = Class.new(Server)
|
173
|
-
Nicad = Class.new(Server)
|
174
|
-
Nicbr = Class.new(Server)
|
175
|
-
Teredo = Class.new(Server)
|
176
|
-
Ipv6ToIpv4 = Class.new(Server)
|
177
|
-
V6nic = Class.new(Server)
|
178
|
-
Twnic = Class.new(Server)
|
179
|
-
Verio = Class.new(Server)
|
180
|
-
Ipv6Bone = Class.new(Server)
|
181
|
-
Ginntt = Class.new(Server)
|
182
|
-
|
183
|
-
end
|
184
|
-
|
185
|
-
end
|
@@ -1,122 +0,0 @@
|
|
1
|
-
Access to CCTLD WHOIS information is provided to assist persons in
|
2
|
-
determining the contents of a domain name registration record in the
|
3
|
-
Afilias registry database. The data in this record is provided by
|
4
|
-
Afilias Limited for informational purposes only, and Afilias does not
|
5
|
-
guarantee its accuracy. This service is intended only for query-based
|
6
|
-
access. You agree that you will use this data only for lawful purposes
|
7
|
-
and that, under no circumstances will you use this data to: (a) allow,
|
8
|
-
enable, or otherwise support the transmission by e-mail, telephone, or
|
9
|
-
facsimile of mass unsolicited, commercial advertising or solicitations
|
10
|
-
to entities other than the data recipient's own existing customers; or
|
11
|
-
(b) enable high volume, automated, electronic processes that send
|
12
|
-
queries or data to the systems of Registry Operator, a Registrar, or
|
13
|
-
Afilias except as reasonably necessary to register domain names or
|
14
|
-
modify existing registrations. All rights reserved. Afilias reserves
|
15
|
-
the right to modify these terms at any time. By submitting this query,
|
16
|
-
you agree to abide by this policy.
|
17
|
-
|
18
|
-
Domain ID:D354967-LRCC
|
19
|
-
Domain Name:GOOGLE.BZ
|
20
|
-
Created On:12-Feb-2006 18:08:52 UTC
|
21
|
-
Last Updated On:21-Jan-2009 13:29:10 UTC
|
22
|
-
Expiration Date:12-Feb-2011 18:08:52 UTC
|
23
|
-
Sponsoring Registrar:MarkMonitor, Inc. (R22-LRCC)
|
24
|
-
Whois Server:whois.markmonitor.com
|
25
|
-
Referral URL:http://www.markmonitor.com
|
26
|
-
Status:CLIENT DELETE PROHIBITED
|
27
|
-
Status:CLIENT TRANSFER PROHIBITED
|
28
|
-
Status:CLIENT UPDATE PROHIBITED
|
29
|
-
Name Server:NS1.GOOGLE.COM
|
30
|
-
Name Server:NS2.GOOGLE.COM
|
31
|
-
Name Server:NS3.GOOGLE.COM
|
32
|
-
Name Server:NS4.GOOGLE.COM
|
33
|
-
Name Server:
|
34
|
-
Name Server:
|
35
|
-
Name Server:
|
36
|
-
Name Server:
|
37
|
-
Name Server:
|
38
|
-
Name Server:
|
39
|
-
Name Server:
|
40
|
-
Name Server:
|
41
|
-
Name Server:
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
MarkMonitor is the Global Leader in Enterprise Brand Protection.
|
46
|
-
|
47
|
-
Domain Management
|
48
|
-
MarkMonitor Brand Protection™
|
49
|
-
AntiFraud Solutions
|
50
|
-
Corporate Consulting Services
|
51
|
-
|
52
|
-
Visit MarkMonitor at www.markmonitor.com
|
53
|
-
Contact us at 1 800 745 9229
|
54
|
-
In Europe, at +44 (0) 20 7840 1300
|
55
|
-
|
56
|
-
|
57
|
-
The Data in MarkMonitor.com's WHOIS database is provided by MarkMonitor.com
|
58
|
-
for information purposes, and to assist persons in obtaining information
|
59
|
-
about or related to a domain name registration record. MarkMonitor.com
|
60
|
-
does not guarantee its accuracy. By submitting a WHOIS query, you agree
|
61
|
-
that you will use this Data only for lawful purposes and that, under no
|
62
|
-
circumstances will you use this Data to: (1) allow, enable, or otherwise
|
63
|
-
support the transmission of mass unsolicited, commercial advertising or
|
64
|
-
solicitations via e-mail (spam); or (2) enable high volume, automated,
|
65
|
-
electronic processes that apply to MarkMonitor.com (or its systems).
|
66
|
-
MarkMonitor.com reserves the right to modify these terms at any time.
|
67
|
-
By submitting this query, you agree to abide by this policy.
|
68
|
-
|
69
|
-
Registrant:
|
70
|
-
DNS Admin
|
71
|
-
Google Inc.
|
72
|
-
1600 Amphitheatre Parkway
|
73
|
-
Mountain View CA 94043
|
74
|
-
US
|
75
|
-
dns-admin@google.com +1.6506234000 Fax: +1.6506188571
|
76
|
-
|
77
|
-
Domain Name: google.bz
|
78
|
-
|
79
|
-
Registrar Name: Markmonitor.com
|
80
|
-
Registrar Whois: whois.markmonitor.com
|
81
|
-
Registrar Homepage: http://www.markmonitor.com
|
82
|
-
|
83
|
-
Administrative Contact:
|
84
|
-
DNS Admin
|
85
|
-
Google Inc.
|
86
|
-
1600 Amphitheatre Parkway
|
87
|
-
Mountain View CA 94043
|
88
|
-
US
|
89
|
-
dns-admin@google.com +1.6506234000 Fax: +1.6506188571
|
90
|
-
Technical Contact, Zone Contact:
|
91
|
-
DNS Admin
|
92
|
-
Google Inc.
|
93
|
-
1600 Amphitheatre Parkway
|
94
|
-
Mountain View CA 94043
|
95
|
-
US
|
96
|
-
dns-admin@google.com +1.6506234000 Fax: +1.6506188571
|
97
|
-
|
98
|
-
Created on..............: 2006-02-12.
|
99
|
-
Expires on..............: 2011-02-12.
|
100
|
-
Record last updated on..: 2009-06-09.
|
101
|
-
|
102
|
-
Domain servers in listed order:
|
103
|
-
|
104
|
-
ns3.google.com
|
105
|
-
ns1.google.com
|
106
|
-
ns2.google.com
|
107
|
-
ns4.google.com
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
MarkMonitor is the Global Leader in Enterprise Brand Protection.
|
113
|
-
|
114
|
-
Domain Management
|
115
|
-
MarkMonitor Brand Protection™
|
116
|
-
AntiFraud Solutions
|
117
|
-
Corporate Consulting Services
|
118
|
-
|
119
|
-
Visit MarkMonitor at www.markmonitor.com
|
120
|
-
Contact us at 1 800 745 9229
|
121
|
-
In Europe, at +44 (0) 20 7840 1300
|
122
|
-
--
|
data/test/whois_test.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class WhoisTest < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def setup
|
6
|
-
@server = Whois::Server.factory(:tld, ".it", "whois.nic.it")
|
7
|
-
@answer = Whois::Answer.new("", @server)
|
8
|
-
end
|
9
|
-
|
10
|
-
def test_query
|
11
|
-
Whois::Client.any_instance.expects(:query).with("foo.com")
|
12
|
-
Whois.query("foo.com")
|
13
|
-
end
|
14
|
-
|
15
|
-
def test_whois
|
16
|
-
Whois::Client.any_instance.expects(:query).with("foo.com")
|
17
|
-
Whois.whois("foo.com")
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_available_question
|
21
|
-
@answer.expects(:available?).returns(true)
|
22
|
-
Whois::Client.any_instance.expects(:query).with("foo.com").returns(@answer)
|
23
|
-
assert Whois.available?("foo.com")
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_registered_question
|
27
|
-
@answer.expects(:registered?).returns(true)
|
28
|
-
Whois::Client.any_instance.expects(:query).with("foo.com").returns(@answer)
|
29
|
-
assert Whois.registered?("foo.com")
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
data/utils/tlds.txt
DELETED
@@ -1,318 +0,0 @@
|
|
1
|
-
.ac,google.ac
|
2
|
-
.ad,andorra.ad
|
3
|
-
.ae,dubaitourism.ae
|
4
|
-
|
5
|
-
|
6
|
-
.br.com,
|
7
|
-
.cn.com,
|
8
|
-
.de.com,
|
9
|
-
.eu.com,
|
10
|
-
.gb.com,
|
11
|
-
.gb.net,
|
12
|
-
.hu.com,
|
13
|
-
.no.com,
|
14
|
-
.qc.com,
|
15
|
-
.ru.com,
|
16
|
-
.sa.com,
|
17
|
-
.se.com,
|
18
|
-
.se.net,
|
19
|
-
.uk.com,
|
20
|
-
.uk.net,
|
21
|
-
.us.com,
|
22
|
-
.uy.com,
|
23
|
-
.za.com,
|
24
|
-
.jpn.com,
|
25
|
-
.web.com,
|
26
|
-
.com,google.com
|
27
|
-
.za.net,aquaria.za.net
|
28
|
-
.net,google.net
|
29
|
-
.eu.org,best.eu.org
|
30
|
-
.za.org,csa.za.org
|
31
|
-
.org,google.org
|
32
|
-
.edu,harvard.edu
|
33
|
-
.gov,usa.gov
|
34
|
-
.int,who.int
|
35
|
-
.mil,defenselink.mil
|
36
|
-
.e164.arpa,0.0.1.8.e164.arpa
|
37
|
-
.in-addr.arpa,2.0.192.in-addr.arpa
|
38
|
-
.arpa,
|
39
|
-
.aero,ivao.aero
|
40
|
-
.asia,keepclicking.asia
|
41
|
-
.biz,google.biz
|
42
|
-
.cat,domini.cat
|
43
|
-
.coop,co-operative.coop
|
44
|
-
.info,google.info
|
45
|
-
.jobs,google.jobs
|
46
|
-
.mobi,google.mobi
|
47
|
-
.museum,about.museum
|
48
|
-
.name,pratham.name
|
49
|
-
.pro,registry.pro
|
50
|
-
.tel,google.tel
|
51
|
-
.travel,
|
52
|
-
.af,google.af
|
53
|
-
.ag,google.ag
|
54
|
-
.ai,gov.ai
|
55
|
-
.al,google.al
|
56
|
-
.am,google.am
|
57
|
-
.an,una.an
|
58
|
-
.ao,dns.ao
|
59
|
-
.aq,acap.aq
|
60
|
-
.ar,nic.ar
|
61
|
-
.as,google.as
|
62
|
-
.at,google.at
|
63
|
-
.au,google.com.au
|
64
|
-
.aw,setarnet.aw
|
65
|
-
.ax,regeringen.ax
|
66
|
-
.az,google.az
|
67
|
-
.ba,google.ba
|
68
|
-
.bb,barbados.bb
|
69
|
-
.bd,bangladesh.gov.bd
|
70
|
-
.be,google.be
|
71
|
-
.bf,onatel.bf
|
72
|
-
.bg,google.bg
|
73
|
-
.bh,inet.com.bh
|
74
|
-
.bi,google.bi
|
75
|
-
.bj,google.bj
|
76
|
-
.bm,gov.bm
|
77
|
-
.bn,brunet.bn
|
78
|
-
.bo,google.bo
|
79
|
-
.br,registro.br
|
80
|
-
.bs,google.bs
|
81
|
-
.bt,nic.bt
|
82
|
-
.bv,
|
83
|
-
.by,google.by
|
84
|
-
.bw,mascom.bw
|
85
|
-
.bz,belizenic.bz
|
86
|
-
.co.ca,whois.co.ca
|
87
|
-
.ca,cica.ca
|
88
|
-
.cc,favicon.cc
|
89
|
-
.cd,google.cd
|
90
|
-
.cf,socatel.cf
|
91
|
-
.cg,google.cg
|
92
|
-
.ch,google.ch
|
93
|
-
.ci,google.ci
|
94
|
-
.ck,oyster.net.ck
|
95
|
-
.cl,google.cl
|
96
|
-
.cm,intelcam.cm
|
97
|
-
.edu.cn,tsinghua.edu.cn
|
98
|
-
.cn,tsinghua.edu.cn
|
99
|
-
.uk.co,
|
100
|
-
.co,banrep.gov.co
|
101
|
-
.cr,tourism.co.cr
|
102
|
-
.cu,cubaweb.cu
|
103
|
-
.cv,governo.cv
|
104
|
-
.cx,analog.cx
|
105
|
-
.cy,cyprusweekly.com.cy
|
106
|
-
.cz,google.cz
|
107
|
-
.de,google.de
|
108
|
-
.dj,google.dj
|
109
|
-
.dk,google.dk
|
110
|
-
.dm,google.dm
|
111
|
-
.do,nic.do
|
112
|
-
.dz,google.dz
|
113
|
-
.ec,google.ec
|
114
|
-
.ee,google.ee
|
115
|
-
.eg,bibalex.gov.eg
|
116
|
-
.er,
|
117
|
-
.es,google.es
|
118
|
-
.et,aau.edu.et
|
119
|
-
.eu,europa.eu
|
120
|
-
.fi,google.fi
|
121
|
-
.fj,google.com.fj
|
122
|
-
.fk,epd.gov.fk
|
123
|
-
.fm,last.fm
|
124
|
-
.fo,portal.fo
|
125
|
-
.fr,google.fr
|
126
|
-
.ga,nic.ga
|
127
|
-
.gb,
|
128
|
-
.gd,google.gd
|
129
|
-
.ge,google.ge
|
130
|
-
.gf,google.gf
|
131
|
-
.gg,google.gg
|
132
|
-
.gh,google.com.gh
|
133
|
-
.gi,ajuntament.gi
|
134
|
-
.gl,google.gl
|
135
|
-
.gm,google.gm
|
136
|
-
.gn,
|
137
|
-
.gp,google.gp
|
138
|
-
.gq,
|
139
|
-
.gr,google.gr
|
140
|
-
.gs,sgisland.gs
|
141
|
-
.gt,www.gt
|
142
|
-
.gu,guamchamber.com.gu
|
143
|
-
.gw,register.gw
|
144
|
-
.gy,google.gy
|
145
|
-
.hk,google.hk"
|
146
|
-
.hm,google.hm
|
147
|
-
.hn,google.hn
|
148
|
-
.hr,google.hr
|
149
|
-
.ht,google.ht
|
150
|
-
.hu,google.hu
|
151
|
-
.id,pandi.or.id
|
152
|
-
.ie,google.ie
|
153
|
-
.il,isoc.org.il
|
154
|
-
.im,google.im
|
155
|
-
.in,google.in
|
156
|
-
.io,google.io
|
157
|
-
.iq,cmc.iq
|
158
|
-
.ir,nic.ir
|
159
|
-
.is,google.is
|
160
|
-
.it,google.it
|
161
|
-
.je,google.je
|
162
|
-
.jm,google.com.jm
|
163
|
-
.jo,google.jo
|
164
|
-
.jp,google.jp
|
165
|
-
.ke,google.co.ke
|
166
|
-
.kg,google.kg
|
167
|
-
.kh,dot.kn
|
168
|
-
.ki,google.ki
|
169
|
-
.km,domaine.km
|
170
|
-
.kn,dot.kn
|
171
|
-
.kp,kcce.kp
|
172
|
-
.kr,google.kr
|
173
|
-
.kw,kotc.com.kw
|
174
|
-
.ky,icta.ky
|
175
|
-
.kz,google.kz
|
176
|
-
.la,google.la
|
177
|
-
.lb,finance.gov.lb
|
178
|
-
.lc,nic.lc
|
179
|
-
.li,google.li
|
180
|
-
.lk,google.lk
|
181
|
-
.lr,micat.gov.lr
|
182
|
-
.ls,google.co.ls
|
183
|
-
.lt,google.lt
|
184
|
-
.lu,google.lu
|
185
|
-
.lv,google.lv
|
186
|
-
.ly,bit.ly
|
187
|
-
.ma,google.ma
|
188
|
-
.mc,rivieraradio.mc
|
189
|
-
.md,google.md
|
190
|
-
.me,google.me
|
191
|
-
.mg,google.mg
|
192
|
-
.mh,
|
193
|
-
.mk,airports.com.mk
|
194
|
-
.ml,sotelma.ml
|
195
|
-
.mm,
|
196
|
-
.mn,google.mn
|
197
|
-
.mo,umac.mo
|
198
|
-
.mp,laurel.mp
|
199
|
-
.mq,
|
200
|
-
.mr,nic.mr
|
201
|
-
.ms,google.ms
|
202
|
-
.mt,nic.org.mt
|
203
|
-
.mu,google.mu
|
204
|
-
.mv,google.mv
|
205
|
-
.mw,google.mw
|
206
|
-
.mx,google.com.mx
|
207
|
-
.my,mynic.net.my
|
208
|
-
.mz,norway.org.mz
|
209
|
-
.na,info.na
|
210
|
-
.nc,cctld.nc
|
211
|
-
.ne,intnet.ne
|
212
|
-
.nf,google.nf
|
213
|
-
.ng,google.com.ng
|
214
|
-
.ni,google.com.ni
|
215
|
-
.nl,google.nl
|
216
|
-
.no,google.no
|
217
|
-
.np,google.com.np
|
218
|
-
.nr,google.nr
|
219
|
-
.nu,google.nu
|
220
|
-
.nz,google.co.nz
|
221
|
-
.om,google.com.om
|
222
|
-
.pa,google.com.pago
|
223
|
-
.pe,google.com.pe
|
224
|
-
.pf,opt.pf
|
225
|
-
.pg,unitech.ac.pg
|
226
|
-
.ph,google.ph
|
227
|
-
.pk,google.pk
|
228
|
-
.co.pl,google.co.pl
|
229
|
-
.pl,google.pl
|
230
|
-
.pm,nic.pm
|
231
|
-
.pn,google.pn
|
232
|
-
.pr,google.pr
|
233
|
-
.ps,www.ps
|
234
|
-
.pt,google.pt
|
235
|
-
.pw,start.pw
|
236
|
-
.py,google.com.py
|
237
|
-
.qa,google.com.qa
|
238
|
-
.re,google.re
|
239
|
-
.ro,google.ro
|
240
|
-
.rs,google.rs
|
241
|
-
.edu.ru,school.edu.ru
|
242
|
-
.ru,google.ru
|
243
|
-
.rw,google.rw
|
244
|
-
.sa,saudinic.net.sa
|
245
|
-
.sb.google.com.sb
|
246
|
-
.sc,google.sc
|
247
|
-
.sd,isoc.sd
|
248
|
-
.se,google.se
|
249
|
-
.sg,google.sg
|
250
|
-
.sh,google.sh
|
251
|
-
.si,google.si
|
252
|
-
.sj,
|
253
|
-
.sk,google.sk
|
254
|
-
.sl,google.sl
|
255
|
-
.sm,google.sm
|
256
|
-
.sn,google.sn
|
257
|
-
.so,nic.so
|
258
|
-
.sr,google.sr
|
259
|
-
.st,google.st
|
260
|
-
.su,google.su
|
261
|
-
.sv,google.com.sv
|
262
|
-
.sy,ste.gov.sy
|
263
|
-
.sz,sispa.org.sz
|
264
|
-
.tc,biz.tc
|
265
|
-
.td,sotel.td
|
266
|
-
.tf,
|
267
|
-
.tg,netmaster.tg
|
268
|
-
.th,google.co.th
|
269
|
-
.tj,google.com.tj
|
270
|
-
.tk,google.tk
|
271
|
-
.tl,google.tl
|
272
|
-
.tm,google.tm
|
273
|
-
.tn,google.tn
|
274
|
-
.to,google.to
|
275
|
-
.tp,www.google.tp
|
276
|
-
.tr,google.com.tr
|
277
|
-
.tt,google.tt
|
278
|
-
.tv,wordpress.tv
|
279
|
-
.tw,google.tw
|
280
|
-
.tz,google.co.tz
|
281
|
-
.ua,google.ua
|
282
|
-
.ug,google.ug
|
283
|
-
.ac.uk,jobs.ac.uk
|
284
|
-
.bl.uk,catalogue.bl.uk
|
285
|
-
.british-library.uk,
|
286
|
-
.gov.uk,statistics.gov.uk
|
287
|
-
.icnet.uk,cgal.icnet.uk
|
288
|
-
.jet.uk,
|
289
|
-
.mod.uk,
|
290
|
-
.nhs.uk,
|
291
|
-
.nls.uk,
|
292
|
-
.parliament.uk,publications.parliament.uk
|
293
|
-
.police.uk,sussex.police.uk
|
294
|
-
.uk,amazon.co.uk
|
295
|
-
.fed.us,fs.fed.us
|
296
|
-
.us,govtrack.us
|
297
|
-
.com.uy,google.com.uy
|
298
|
-
.uy,wrm.org.uy
|
299
|
-
.uz,google.co.uz
|
300
|
-
.va,vatican.va
|
301
|
-
.vc,google.vc
|
302
|
-
.ve,google.co.ve
|
303
|
-
.vg,google.vg
|
304
|
-
.vi,career.vi
|
305
|
-
.vn,dot.vn
|
306
|
-
.vu,google.vu
|
307
|
-
.wf,nic.wf
|
308
|
-
.ws,google.ws
|
309
|
-
.ye,centralbank.gov.ye
|
310
|
-
.yt,nic.yt
|
311
|
-
.yu,nic.yu
|
312
|
-
.ac.za,unisa.ac.za
|
313
|
-
.co.za,google.co.za
|
314
|
-
.gov.za,labour.gov.za
|
315
|
-
.org.za,anc.org.za
|
316
|
-
.za,gov.za
|
317
|
-
.zm,zamnet.zm
|
318
|
-
.zw,google.co.zw
|