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/README.rdoc
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
Whois is an intelligent pure Ruby WHOIS client and parser.
|
4
4
|
|
5
|
-
It is a
|
5
|
+
It is a OS-independent library and doesn't require external C libraries or Gems: it is a 100% Ruby software with all the advantages and disadvantages that it involves.
|
6
6
|
|
7
|
-
This software was developed to power RoboDomain[http://www.robodomain.com] and, since July 2009, it
|
7
|
+
This software was developed to power {RoboDomain}[http://www.robodomain.com] and, since July 2009, it ran more than thousands requests.
|
8
8
|
|
9
9
|
An extensive test suite is available to verify the library correctness but you must be aware that registrant might change Whois interfaces without notice and at any time causing queries to specific hosts to stop working.
|
10
10
|
|
@@ -15,16 +15,16 @@ An extensive test suite is available to verify the library correctness but you m
|
|
15
15
|
* Intelligent Ruby client
|
16
16
|
* Flexible and extensible configuration with support for user-defined servers
|
17
17
|
* Powerful whois response parser
|
18
|
-
* Support for
|
18
|
+
* Support for IPv6, IPv4 and top level domain whois queries
|
19
19
|
* Object oriented design
|
20
|
-
* Compatible with Ruby 1.8.6 and
|
20
|
+
* Compatible with Ruby 1.8.6 and newer, including Ruby 1.9
|
21
21
|
|
22
22
|
|
23
23
|
== Requirements
|
24
24
|
|
25
25
|
* Ruby >= 1.8.6 (not tested with previous versions)
|
26
26
|
|
27
|
-
Whois has been {successfully tested}[http://
|
27
|
+
Whois has been {successfully tested}[http://www.ruby-whois.org/documentation/installation.html] against the following Ruby platforms:
|
28
28
|
|
29
29
|
* Ruby 1.8.6 / 1.8.7 / 1.9.1
|
30
30
|
* MacRuby 0.4
|
@@ -44,13 +44,13 @@ You might need administrator privileges on your system to install it.
|
|
44
44
|
|
45
45
|
== Getting Started
|
46
46
|
|
47
|
-
Note. This section covers only the essentials for getting started with the Whois library. The {documentation}[http://
|
47
|
+
Note. This section covers only the essentials for getting started with the Whois library. The {documentation}[http://www.ruby-whois.org/documentation.html] provides a more accurate explanation including tutorials, more examples and technical details about the client/server/answer/parser architecture.
|
48
48
|
|
49
49
|
=== Querying the Server
|
50
50
|
|
51
|
-
Whois provides the ability to get WHOIS information for hostnames,
|
51
|
+
Whois provides the ability to get WHOIS information for hostnames, IPv4 and IPv6 addresses. The client is smart enough to guess the best WHOIS server according to given query, send the request and return the response.
|
52
52
|
|
53
|
-
|
53
|
+
Check out the following examples:
|
54
54
|
|
55
55
|
# Domain Whois
|
56
56
|
w = Whois::Client.new
|
@@ -97,7 +97,7 @@ As of release 0.8, a WHOIS query no longer returns a simple string. Instead, you
|
|
97
97
|
a.created_on
|
98
98
|
# => Fri Dec 10 00:00:00 +0100 1999
|
99
99
|
|
100
|
-
t = a.
|
100
|
+
t = a.technical
|
101
101
|
# => #<Whois::Answer::Contact>
|
102
102
|
t.id
|
103
103
|
# => "TS7016-ITNIC"
|
@@ -128,30 +128,23 @@ Off course, you can customize the timeout value setting a different value. If ti
|
|
128
128
|
|
129
129
|
== Acknowledgments
|
130
130
|
|
131
|
-
First of all, I would like to express my most sincere thanks to Cyril Mougel, the author of the first Ruby Whois GEM that has been available since 2007. Cyril has been kind enough to yield me the privilege of using the RubyForge Whois project and the Whois package name to publish this library.
|
132
|
-
To express all my gratitude, the Release 0.5.0 of the new Ruby Whois is 100% compatible with Cyril's Whois (as of release 0.4.2).
|
131
|
+
First of all, I would like to express my most sincere thanks to Cyril Mougel, the author of the first Ruby Whois GEM that has been available since 2007. Cyril has been kind enough to yield me the privilege of using the RubyForge Whois project and the Whois package name to publish this library. To express all my gratitude, the release 0.5.0 and all sub sequential versions of the new Whois up to 0.9.x are 100% compatible with Cyril's Whois.
|
133
132
|
|
134
|
-
Whois is largely inspired by other notable Whois projects, most of all the Debian Whois library written and
|
133
|
+
Whois is largely inspired by other notable Whois projects, most of all the Debian Whois library written and maintained by Marco D'Itri. Other good ideas and design decisions come from the PERL Net::DRI package.
|
135
134
|
|
136
135
|
I would lie if I say I'm completely unaware of the other Ruby Whois projects. Before starting this Ruby Whois library I deeply investigated the available resources and, despite none of them was a good candidate for a refactoring, some of them expose a really cool API.
|
137
136
|
They didn't directly influence this library or any design decision, but they have been a really interesting code-reading.
|
138
137
|
|
139
|
-
The parser architecture
|
138
|
+
The parser architecture has been inspired by the PHPWhois[http://phpwhois.sourceforge.net/] project. The authors puts lot of effort to create whois-specific parsers normalizing the different responses in a single tree-based structure. So far, this is the only one opensource project that offers such this feature in all the programming language ecosystem.
|
140
139
|
|
141
140
|
Despite I spent weeks reading source code from the available whois libraries, Ruby Whois has been built from scratch trying to focus on long-term maintainability and flexibility and cannot be considered a Ruby port of any of other existing Whois libraries.
|
142
141
|
|
143
142
|
|
144
|
-
==
|
143
|
+
== Note for Whois 0.4 users
|
145
144
|
|
146
145
|
As of release 0.5.0, the Whois GEM has been completely rewritten. As I explained in the Acknowledgment section, Cyril Mougel (the author of the original Whois package) yield me the privilege to use the Whois RubyForge project for my new Whois client.
|
147
146
|
|
148
|
-
|
149
|
-
|
150
|
-
The adapter will be removed in a future version so make sure to check your application for deprecation warnings and fix them before upgrading to a newest release that doesn't belong to the 0.5.x series.
|
151
|
-
|
152
|
-
Ruby Whois 0.4.2 is released under the MIT license.
|
153
|
-
|
154
|
-
Copyright (c) 2007 by Cyril Mougel (cyril.mougel@gmail.com)
|
147
|
+
All versions between Whois 0.5.0 and 0.9.x include a compatibility adapter and the corresponding deprecation warnings to help you migrate to the new API. Starting from Whois 1.0.0, the library is no longer backward compatible with Cyril's Whois.
|
155
148
|
|
156
149
|
|
157
150
|
== Author
|
@@ -161,24 +154,24 @@ Author:: {Simone Carletti}[http://www.simonecarletti.com/] <weppos@weppos.net>
|
|
161
154
|
|
162
155
|
== Thanks to
|
163
156
|
|
164
|
-
* {Cyril Mougel}[http://blog.shingara.fr/]
|
165
|
-
* {Gábor Vészi}[http://well.done.hu/] .hu whois parser
|
166
|
-
* {Aaron Mueller}[http://aaron-mueller.de/] .de whois parser
|
157
|
+
* {Cyril Mougel}[http://blog.shingara.fr/] - Author of the initial Whois GEM
|
158
|
+
* {Gábor Vészi}[http://well.done.hu/] - .hu whois parser
|
159
|
+
* {Aaron Mueller}[http://aaron-mueller.de/] - .de whois parser
|
160
|
+
* Mikkel Mondrup Kristensen - Improvements and updates to many WHOIS parsers
|
167
161
|
|
168
162
|
|
169
163
|
== FeedBack and Bug reports
|
170
164
|
|
171
165
|
If you use this library and find yourself missing any functionality I have missed, please {let me know}[mailto:weppos@weppos.net].
|
172
166
|
|
173
|
-
Bug reports and Feature suggestions {are welcomed}[http://
|
167
|
+
Bug reports and Feature suggestions {are welcomed}[http://github.com/weppos/whois/issues].
|
174
168
|
|
175
169
|
|
176
|
-
==
|
170
|
+
== More
|
177
171
|
|
178
|
-
* {Homepage}[http://
|
179
|
-
* {GitHub}[http://github.com/weppos/whois]
|
180
|
-
* {
|
181
|
-
* {API}[http://whois.rubyforge.org/]
|
172
|
+
* {Homepage}[http://ruby-whois.org]
|
173
|
+
* {GitHub Repository}[http://github.com/weppos/whois]
|
174
|
+
* {API Documentation}[http://whois.rubyforge.org]
|
182
175
|
* {Discussion Group}[http://groups.google.com/group/ruby-whois]
|
183
176
|
|
184
177
|
|
@@ -189,5 +182,5 @@ See the CHANGELOG.rdoc file for details.
|
|
189
182
|
|
190
183
|
== License
|
191
184
|
|
192
|
-
Copyright (c) 2009 Simone Carletti, Whois is released under the MIT license.
|
185
|
+
Copyright (c) 2009-2010 Simone Carletti, Whois is released under the MIT license.
|
193
186
|
|
data/Rakefile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__) + "/lib")
|
2
2
|
|
3
|
+
require 'whois'
|
3
4
|
require 'rubygems'
|
4
5
|
require 'rake'
|
5
6
|
require 'echoe'
|
6
|
-
require 'whois'
|
7
7
|
require 'rake/rdoctask'
|
8
8
|
require 'hanna/rdoctask'
|
9
9
|
|
@@ -21,20 +21,20 @@ Echoe.new(PKG_NAME, PKG_VERSION) do |p|
|
|
21
21
|
p.author = "Simone Carletti"
|
22
22
|
p.email = "weppos@weppos.net"
|
23
23
|
p.summary = "An intelligent pure Ruby WHOIS client and parser."
|
24
|
-
p.url = "http://
|
24
|
+
p.url = "http://www.ruby-whois.org"
|
25
25
|
p.project = RUBYFORGE_PROJECT
|
26
26
|
p.description = <<-EOD
|
27
27
|
Whois is an intelligent WHOIS client and parser written in pure Ruby. \
|
28
|
-
It can query registry data for
|
28
|
+
It can query registry data for IPv4, IPv6 and top level domains, \
|
29
29
|
parse and convert responses into easy-to-use Ruby objects.
|
30
30
|
EOD
|
31
31
|
|
32
32
|
p.need_zip = true
|
33
33
|
|
34
|
-
p.development_dependencies += ["rake
|
35
|
-
"hanna
|
36
|
-
"echoe
|
37
|
-
"mocha
|
34
|
+
p.development_dependencies += ["rake 0.8.7",
|
35
|
+
"hanna 0.1.12",
|
36
|
+
"echoe 4.1",
|
37
|
+
"mocha 0.9.8"]
|
38
38
|
|
39
39
|
p.rdoc_options = ["--inline-source", "-T", "hanna"]
|
40
40
|
p.rcov_options = ["-Itest -x mocha,rcov,Rakefile"]
|
data/bin/ruby-whois
CHANGED
@@ -46,6 +46,12 @@ OptionParser.new do |opts|
|
|
46
46
|
end
|
47
47
|
|
48
48
|
qstring = ARGV.shift
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
|
50
|
+
begin
|
51
|
+
@client = Whois::Client.new(:timeout => options.timeout)
|
52
|
+
puts @client.query(qstring)
|
53
|
+
rescue Whois::Error => e
|
54
|
+
abort(e.message)
|
55
|
+
rescue Timeout::Error => e
|
56
|
+
abort("Request Timeout")
|
57
|
+
end
|
data/data/ip_del_list
CHANGED
@@ -6,9 +6,11 @@
|
|
6
6
|
#
|
7
7
|
# http://www.iana.org/assignments/ipv4-address-space
|
8
8
|
#
|
9
|
+
2.0.0.0/8 ripe
|
9
10
|
24.132.0.0/14 ripe
|
10
11
|
41.0.0.0/8 afrinic
|
11
12
|
43.0.0.0/8 v6nic
|
13
|
+
46.0.0.0/8 ripe
|
12
14
|
51.0.0.0/8 ripe
|
13
15
|
# whois -r -K -h whois.apnic.net -i admin-c IM76-AP
|
14
16
|
59.0.0.0/11 whois.nic.or.kr
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/perl
|
2
|
+
|
3
|
+
use warnings;
|
4
|
+
use strict;
|
5
|
+
|
6
|
+
while (<>) {
|
7
|
+
chomp;
|
8
|
+
s/#.*$//;
|
9
|
+
s/^\s+//; s/\s+$//;
|
10
|
+
next if /^$/;
|
11
|
+
|
12
|
+
die "format error: $_" unless
|
13
|
+
(my ($a, $b, $c) = /^([a-z0-9.-]+)\s+([a-z0-9-]+)(?:\s+(.+))?$/);
|
14
|
+
|
15
|
+
if ($c) {
|
16
|
+
print qq( { "$a",\t"$b",\t"$c" },\n);
|
17
|
+
} else {
|
18
|
+
print qq( { "$a",\t"$b",\tNULL },\n);
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
data/data/make_tld_serv.pl
CHANGED
@@ -1,22 +1,23 @@
|
|
1
|
-
#!/usr/bin/perl
|
1
|
+
#!/usr/bin/perl
|
2
2
|
|
3
|
+
use warnings;
|
3
4
|
use strict;
|
4
5
|
|
5
6
|
while (<>) {
|
6
7
|
chomp;
|
7
|
-
s
|
8
|
-
s/\s
|
8
|
+
s/#.*$//;
|
9
|
+
s/^\s+//; s/\s+$//;
|
9
10
|
next if /^$/;
|
11
|
+
|
10
12
|
die "format error: $_" unless
|
11
13
|
(my ($a, $b) = /^([\w\d\.-]+)\s+([\w\d\.:-]+|[A-Z]+\s+.*)$/);
|
14
|
+
|
12
15
|
$b =~ s/^W(?:EB)?\s+/\\x01/;
|
13
|
-
$b =~ s/^
|
16
|
+
$b =~ s/^VERISIGN\s+/\\x04/;
|
14
17
|
$b = "\\x03" if $b eq 'NONE';
|
15
|
-
$b = "\\x04" if $b eq 'CRSNIC';
|
16
18
|
$b = "\\x07" if $b eq 'PIR';
|
17
19
|
$b = "\\x08" if $b eq 'AFILIAS';
|
18
|
-
$b = "\\x09" if $b eq 'NICCC';
|
19
20
|
$b = "\\x0C" if $b eq 'ARPA';
|
20
|
-
print
|
21
|
+
print qq( "$a",\t"$b",\n);
|
21
22
|
}
|
22
23
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# server name charset optional parameters
|
2
|
+
whois.corenic.net utf-8 -C UTF-8
|
3
|
+
whois.cat utf-8 -C UTF-8
|
4
|
+
whois.museum utf-8 -C UTF-8
|
5
|
+
|
6
|
+
whois.nic.br iso-8859-1
|
7
|
+
whois.cira.ca iso-8859-1
|
8
|
+
whois.nic.ch utf-8
|
9
|
+
whois.nic.cl iso-8859-1
|
10
|
+
whois.cnnic.net.cn utf-8
|
11
|
+
whois.nic.cz utf-8
|
12
|
+
whois.denic.de utf-8
|
13
|
+
whois.enum.denic.de utf-8
|
14
|
+
whois.dk-hostmaster.dk utf-8 --charset=utf-8
|
15
|
+
whois.eenet.ee iso-8859-1
|
16
|
+
whois.eu utf-8
|
17
|
+
whois.ficora.fi iso-8859-1
|
18
|
+
whois.nic.fr iso-8859-1
|
19
|
+
whois.hkdnr.net.hk utf-8
|
20
|
+
whois.nic.hu iso-8859-1
|
21
|
+
whois.isnic.is iso-8859-1
|
22
|
+
whois.jprs.jp iso-2022-jp
|
23
|
+
whois.nic.ad.jp iso-2022-jp
|
24
|
+
whois.nic.or.kr euc-kr
|
25
|
+
whois.nic.li utf-8
|
26
|
+
whois.domreg.lt utf-8
|
27
|
+
whois.dns.lu iso-8859-1
|
28
|
+
whois.nic.mu utf-8
|
29
|
+
whois.norid.no iso-8859-1
|
30
|
+
whois.nic.nu utf-8
|
31
|
+
whois.dns.pt iso-8859-1
|
32
|
+
whois.nic-se.se utf-8
|
33
|
+
whois.nic.tr utf-8
|
34
|
+
whois.twnic.net utf-8
|
35
|
+
whois.net.ua koi8-u
|
36
|
+
whois.nic.org.uy utf-8
|
37
|
+
|
data/data/tld_serv_list
CHANGED
@@ -73,13 +73,14 @@
|
|
73
73
|
.az WEB http://www.nic.az/AzCheck.htm
|
74
74
|
.ba WEB http://www.nic.ba/stream/whois/
|
75
75
|
.bb WEB http://www.barbadosdomains.net/search_domain.php
|
76
|
-
.bd www.whois.com.bd # http://www.btcl.net.bd/faq_dotbd.php
|
76
|
+
.bd WEB http://www.whois.com.bd/ # http://www.btcl.net.bd/faq_dotbd.php www.register.com.bd FIXME APPARENTLY NOT OFFICIAL!
|
77
77
|
.be whois.dns.be
|
78
|
-
.bf NONE #
|
78
|
+
.bf NONE # http://www.artel.bf/ http://www.onatel.bf/internet/domaine.htm
|
79
79
|
.bg whois.register.bg
|
80
80
|
.bh NONE # www.inet.com.bh
|
81
|
-
.bi WEB http://
|
81
|
+
.bi WEB http://whois.nic.bi/register/whois.hei # whois.nic.bi wrong referral?
|
82
82
|
.bj whois.nic.bj
|
83
|
+
#.bl
|
83
84
|
.bm WEB http://207.228.133.14/cgi-bin/lansaweb?procfun+BMWHO+BMWHO2+WHO
|
84
85
|
.bn NONE # www.brunet.bn
|
85
86
|
.bo WEB http://www.nic.bo/
|
@@ -100,7 +101,7 @@
|
|
100
101
|
.ci www.nic.ci
|
101
102
|
.ck whois.nic.ck
|
102
103
|
.cl whois.nic.cl
|
103
|
-
.cm
|
104
|
+
.cm WEB http://netcom.cm/whois.php
|
104
105
|
.edu.cn whois.edu.cn
|
105
106
|
.cn whois.cnnic.net.cn
|
106
107
|
.uk.co whois.uk.co
|
@@ -117,9 +118,9 @@
|
|
117
118
|
.dm whois.nic.dm
|
118
119
|
.do WEB http://www.nic.do/whois-h.php3
|
119
120
|
.dz WEB https://www.nic.dz/
|
120
|
-
.ec WEB http://www.nic.ec/whois/eng/whois.asp
|
121
|
+
.ec WEB http://www.nic.ec/whois/eng/whois.asp # whois.nic.ec is restricted
|
121
122
|
.ee whois.eenet.ee
|
122
|
-
.eg NONE # http://lookup.egregistry.eg/
|
123
|
+
.eg NONE # http://lookup.egregistry.eg/english.aspx
|
123
124
|
#.eh
|
124
125
|
.er NONE # http://www.afridns.org/er/tld_er.txt
|
125
126
|
.es WEB https://www.nic.es/
|
@@ -134,8 +135,8 @@
|
|
134
135
|
.ga NONE # www.nic.ga
|
135
136
|
.gb NONE
|
136
137
|
.gd whois.adamsnames.tc
|
137
|
-
.ge WEB http://
|
138
|
-
.gf
|
138
|
+
.ge WEB http://www.registration.ge/
|
139
|
+
.gf WEB http://www.nic.gf/?id=whois
|
139
140
|
.gg whois.gg
|
140
141
|
.gh WEB http://www.nic.gh/customer/search_c.htm
|
141
142
|
.gi AFILIAS
|
@@ -148,7 +149,7 @@
|
|
148
149
|
.gs whois.nic.gs
|
149
150
|
.gt WEB http://www.gt/whois.htm
|
150
151
|
.gu WEB http://gadao.gov.gu/domainsearch.htm
|
151
|
-
.gw NONE # www.
|
152
|
+
.gw NONE # www.gwregister.com
|
152
153
|
.gy whois.registry.gy
|
153
154
|
.hk whois.hkdnr.net.hk
|
154
155
|
.hm whois.registry.hm
|
@@ -156,7 +157,7 @@
|
|
156
157
|
.hr WEB http://www.dns.hr/pretrazivanje.html
|
157
158
|
.ht whois.nic.ht
|
158
159
|
.hu whois.nic.hu
|
159
|
-
.id whois.
|
160
|
+
.id whois.pandi.or.id
|
160
161
|
.ie whois.domainregistry.ie
|
161
162
|
.il whois.isoc.org.il
|
162
163
|
.im whois.nic.im
|
@@ -164,7 +165,7 @@
|
|
164
165
|
.io whois.nic.io
|
165
166
|
.iq NONE # http://www.cmc.iq/english/iq/iqregister1.htm
|
166
167
|
.ir whois.nic.ir
|
167
|
-
.is whois.
|
168
|
+
.is whois.isnic.is
|
168
169
|
.it whois.nic.it
|
169
170
|
.je whois.je
|
170
171
|
.jm NONE # NIC? uwimona.edu.jm http://nic.jm
|
@@ -172,10 +173,10 @@
|
|
172
173
|
.jp whois.jprs.jp
|
173
174
|
.ke whois.kenic.or.ke
|
174
175
|
.kg whois.domain.kg
|
175
|
-
.kh NONE # http://www.mptc.gov.kh/ http://www.nic.net.kh/
|
176
|
-
.ki
|
176
|
+
.kh NONE # http://www.mptc.gov.kh/DomainNameRegistrationForm.aspx http://www.nic.net.kh/
|
177
|
+
.ki whois.nic.mu
|
177
178
|
.km NONE # www.domaine.km
|
178
|
-
.kn
|
179
|
+
.kn WEB http://www.nic.kn/
|
179
180
|
.kp whois.kcce.kp
|
180
181
|
.kr whois.nic.or.kr
|
181
182
|
.kw WEB http://www.kw/
|
@@ -187,7 +188,7 @@
|
|
187
188
|
.li whois.nic.li
|
188
189
|
.lk whois.nic.lk
|
189
190
|
.lr NONE # http://www.psg.com/dns/lr/
|
190
|
-
.ls WEB http://www.co.ls/data/
|
191
|
+
.ls WEB http://www.co.ls/data/co.asp
|
191
192
|
.lt whois.domreg.lt
|
192
193
|
.lu whois.dns.lu
|
193
194
|
.lv whois.nic.lv
|
@@ -196,15 +197,16 @@
|
|
196
197
|
.mc whois.ripe.net
|
197
198
|
.md WEB http://www.dns.md/wh1.php # whois.nic.md is restricted
|
198
199
|
.me whois.meregistry.net # afilias
|
200
|
+
#.mf
|
199
201
|
.mg whois.nic.mg
|
200
202
|
.mh NONE # www.nic.net.mh
|
201
203
|
.mk WEB http://dns.marnet.net.mk/registar.php
|
202
204
|
.ml NONE # NIC? www.sotelma.ml
|
203
|
-
.mm
|
205
|
+
.mm NONE # NO NIC
|
204
206
|
.mn AFILIAS
|
205
207
|
.mo WEB http://www.monic.net.mo/
|
206
208
|
.mp NONE # get.mp
|
207
|
-
.mq whois.nic.mq
|
209
|
+
.mq NONE # whois.nic.mq
|
208
210
|
.mr NONE # www.nic.mr
|
209
211
|
.ms whois.nic.ms
|
210
212
|
.mt WEB https://www.nic.org.mt/dotmt/ # whois.nic.org.mt is restricted
|
@@ -212,7 +214,7 @@
|
|
212
214
|
.mv NONE # NIC? www.dhiraagu.com.mv
|
213
215
|
.mw WEB http://www.registrar.mw/
|
214
216
|
.mx whois.nic.mx
|
215
|
-
.my whois.
|
217
|
+
.my whois.domainregistry.my
|
216
218
|
.mz NONE # NIC? www.uem.mz
|
217
219
|
.na whois.na-nic.com.na
|
218
220
|
.nc whois.cctld.nc
|
@@ -222,7 +224,7 @@
|
|
222
224
|
.ni WEB http://www.nic.ni/consulta.htm
|
223
225
|
.nl whois.domain-registry.nl
|
224
226
|
.no whois.norid.no
|
225
|
-
.np WEB http://
|
227
|
+
.np WEB http://register.mos.com.np/userSearchInc.asp
|
226
228
|
.nr WEB http://www.cenpac.net.nr/dns/whois.html
|
227
229
|
.nu whois.nic.nu
|
228
230
|
.nz whois.srs.net.nz
|
@@ -240,7 +242,7 @@
|
|
240
242
|
.pr whois.nic.pr
|
241
243
|
.ps WEB http://www.nic.ps/whois/whois.html
|
242
244
|
.pt whois.dns.pt
|
243
|
-
.pw
|
245
|
+
.pw NONE # NO NIC
|
244
246
|
.py WEB http://www.nic.py/consultas.html
|
245
247
|
.qa NONE # http://www.qtel.com.qa/InternetFeatures.do
|
246
248
|
.re whois.nic.fr
|
@@ -250,7 +252,7 @@
|
|
250
252
|
.ru whois.ripn.net
|
251
253
|
.rw WEB http://www.nic.rw/cgi-bin/whoisrw.pl
|
252
254
|
.sa saudinic.net.sa
|
253
|
-
.sb whois.
|
255
|
+
.sb whois.coccaregistry.net
|
254
256
|
.sc AFILIAS # www.nic.sc
|
255
257
|
.sd NONE # http://isoc.sd/ (CHECK LATER)
|
256
258
|
.se whois.nic-se.se
|
@@ -263,7 +265,7 @@
|
|
263
265
|
.sm whois.ripe.net
|
264
266
|
.sn whois.nic.sn
|
265
267
|
.so NONE # www.nic.so (CHECK LATER, recently delegated)
|
266
|
-
.sr
|
268
|
+
.sr NONE # www.register.sr
|
267
269
|
.st whois.nic.st
|
268
270
|
.su whois.ripn.net
|
269
271
|
.sv WEB http://www.uca.edu.sv/dns/ # http://www.svnet.org.sv/
|
@@ -274,16 +276,15 @@
|
|
274
276
|
.tf whois.nic.tf
|
275
277
|
.tg WEB http://www.nic.tg/
|
276
278
|
.th whois.thnic.net
|
277
|
-
.tj
|
279
|
+
.tj WEB http://www.nic.tj/whois.html
|
278
280
|
.tk whois.dot.tk
|
279
281
|
.tl whois.nic.tl
|
280
282
|
.tm whois.nic.tm
|
281
283
|
.tn WEB http://whois.ati.tn/
|
282
284
|
.to whois.tonic.to
|
283
|
-
.tp
|
284
|
-
.tr whois.
|
285
|
+
.tp NONE # phase out in progress
|
286
|
+
.tr whois.nic.tr
|
285
287
|
.tt WEB http://www.nic.tt/cgi-bin/search.pl
|
286
|
-
#.tv whois.nic.tv
|
287
288
|
.tv VERISIGN whois.nic.tv
|
288
289
|
.tw whois.twnic.net
|
289
290
|
.tz WEB http://whois.tznic.or.tz/
|
@@ -301,6 +302,7 @@
|
|
301
302
|
.parliament.uk NONE
|
302
303
|
.police.uk NONE
|
303
304
|
.uk whois.nic.uk
|
305
|
+
#.um
|
304
306
|
.fed.us whois.nic.gov
|
305
307
|
.us whois.nic.us
|
306
308
|
.com.uy WEB https://nic.anteldata.com.uy/dns/
|
@@ -313,11 +315,11 @@
|
|
313
315
|
.vi WEB http://www.nic.vi/whoisform.htm
|
314
316
|
.vn WEB http://www.vnnic.vn/english/
|
315
317
|
.vu WEB http://www.vunic.vu/whois.html
|
316
|
-
.wf whois.nic.
|
318
|
+
.wf whois.nic.fr
|
317
319
|
.ws whois.samoanic.ws
|
318
320
|
.ye NONE # NIC? www.nominet.org.ye http://www.y.net.ye/services/domain_name.htm
|
319
|
-
.yt whois.nic.
|
320
|
-
.yu NONE # www.nic.yu - phase out date: 30
|
321
|
+
.yt whois.nic.fr
|
322
|
+
.yu NONE # www.nic.yu - phase out date: 30 March 2009
|
321
323
|
.ac.za whois.ac.za
|
322
324
|
.co.za whois.coza.net.za
|
323
325
|
.gov.za whois.gov.za
|
@@ -341,7 +343,7 @@
|
|
341
343
|
-cz whois.nic.cz
|
342
344
|
-dk whois.dk-hostmaster.dk
|
343
345
|
-il whois.isoc.org.il
|
344
|
-
-is whois.
|
346
|
+
-is whois.isnic.is
|
345
347
|
-kg whois.domain.kg
|
346
348
|
-ti whois.telstra.net
|
347
349
|
-tw whois.twnic.net
|