whois 2.6.4 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +39 -0
- data/LICENSE +2 -2
- data/README.md +1 -1
- data/lib/whois/definitions/tlds.rb +5 -4
- data/lib/whois/record/parser/NOTES.txt +0 -8
- data/lib/whois/record/parser/base_afilias.rb +2 -3
- data/lib/whois/record/parser/base_cocca.rb +6 -4
- data/lib/whois/record/parser/base_shared1.rb +120 -0
- data/lib/whois/record/parser/base_shared2.rb +143 -0
- data/lib/whois/record/parser/base_whoisd.rb +3 -3
- data/lib/whois/record/parser/whois.biz.rb +6 -113
- data/lib/whois/record/parser/whois.centralnic.com.rb +0 -1
- data/lib/whois/record/parser/whois.cmc.iq.rb +24 -0
- data/lib/whois/record/parser/whois.dk-hostmaster.dk.rb +10 -9
- data/lib/whois/record/parser/whois.dns.pl.rb +5 -1
- data/lib/whois/record/parser/whois.domain-registry.nl.rb +15 -12
- data/lib/whois/record/parser/whois.godaddy.com.rb +3 -2
- data/lib/whois/record/parser/whois.jprs.jp.rb +2 -0
- data/lib/whois/record/parser/whois.monic.mo.rb +90 -0
- data/lib/whois/record/parser/whois.na-nic.com.na.rb +8 -4
- data/lib/whois/record/parser/whois.netcom.cm.rb +2 -64
- data/lib/whois/record/parser/whois.networksolutions.com.rb +3 -0
- data/lib/whois/record/parser/whois.nic.co.rb +4 -49
- data/lib/whois/record/parser/whois.nic.dm.rb +142 -0
- data/lib/whois/record/parser/whois.nic.fo.rb +1 -1
- data/lib/whois/record/parser/whois.nic.gs.rb +9 -5
- data/lib/whois/record/parser/whois.nic.name.rb +26 -12
- data/lib/whois/record/parser/whois.nic.net.nf.rb +13 -7
- data/lib/whois/record/parser/whois.register.com.rb +158 -0
- data/lib/whois/record/parser/whois.registry.om.rb +2 -99
- data/lib/whois/record/parser/whois.registry.qa.rb +5 -95
- data/lib/whois/record/parser/whois.tld.ee.rb +1 -1
- data/lib/whois/record/parser/whois1.nic.bi.rb +23 -0
- data/lib/whois/record/scanners/base.rb +4 -0
- data/lib/whois/record/scanners/{afilias.rb → base_afilias.rb} +2 -2
- data/lib/whois/record/scanners/{whois.registry.om.rb → base_shared1.rb} +2 -5
- data/lib/whois/record/scanners/{whois.biz.rb → base_shared2.rb} +4 -3
- data/lib/whois/record/scanners/{whoisd.rb → base_whoisd.rb} +2 -2
- data/lib/whois/record/scanners/whois.nic.dm.rb +52 -0
- data/lib/whois/version.rb +2 -2
- data/whois.gemspec +4 -4
- metadata +15 -8
- data/lib/whois/record/scanners/whois.registry.qa.rb +0 -39
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,44 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Release 2.7.0
|
4
|
+
|
5
|
+
* SERVER: Added .IQ TLD server (GH-171).
|
6
|
+
|
7
|
+
* SERVER: Added .XN--MGB9AWBF (عمان, Oman) IDN TLD server.
|
8
|
+
|
9
|
+
* SERVER: Added .BI TLD server (GH-113).
|
10
|
+
|
11
|
+
* SERVER: Added .DM TLD server (GH-43).
|
12
|
+
|
13
|
+
* SERVER: Added .MO TLD server.
|
14
|
+
|
15
|
+
* NEW: Added full whois.register.com parser.
|
16
|
+
|
17
|
+
* NEW: whois.networksolutions.com parser now recognizes throttled responses (GH-182). [Thanks @JustinCampbell]
|
18
|
+
|
19
|
+
* NEW: Added full whois.cmc.iq parser (GH-171).
|
20
|
+
|
21
|
+
* NEW: Added full whois1.nic.bi parser (GH-113).
|
22
|
+
|
23
|
+
* NEW: Added full whois.nic.dm parser (GH-43).
|
24
|
+
|
25
|
+
* NEW: Added full whois.nic.co parser.
|
26
|
+
|
27
|
+
* NEW: Added full whois.monic.mo parser.
|
28
|
+
|
29
|
+
* FIXED: Fixed whois.register.com parser for enom formats (GH-181). [Thanks @JustinCampbell]
|
30
|
+
|
31
|
+
* FIXED: whois.jprs.js parser should support status `Suspended`.
|
32
|
+
|
33
|
+
* FIXED: whois.dk-hostmaster.dk parser should support status `Deactivated`.
|
34
|
+
|
35
|
+
* FIXED: whois.domain-registry.nl parser should support status `Inactive`.
|
36
|
+
|
37
|
+
* CHANGED: Changed .NAME to a formatted adapter to fetch additional properties.
|
38
|
+
|
39
|
+
* CHANGED: whois.dns.pl now supports expires_on (GH-185). [Thanks @y3ti]
|
40
|
+
|
41
|
+
|
3
42
|
## Release 2.6.4
|
4
43
|
|
5
44
|
* SERVER: Added .CW TLD server.
|
data/LICENSE
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
The MIT License
|
2
|
-
|
3
1
|
Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
|
4
2
|
|
3
|
+
MIT License
|
4
|
+
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
a copy of this software and associated documentation files (the
|
7
7
|
"Software"), to deal in the Software without restriction, including
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
*Whois* is a OS-independent library and doesn't require any external binaries or C libraries: it is a 100% Ruby software.
|
8
8
|
|
9
|
-
This library was developed to power [
|
9
|
+
This library was developed to power [RoboWhois](https://www.robowhois.com/) and [RoboDomain](https://www.robodomain.com/). It has been performing queries in production since July 2009.
|
10
10
|
|
11
11
|
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.
|
12
12
|
|
@@ -45,7 +45,7 @@ Whois::Server.define :tld, ".info", "whois.afilias.info"
|
|
45
45
|
Whois::Server.define :tld, ".jobs", "jobswhois.verisign-grs.com", { :adapter => :verisign }
|
46
46
|
Whois::Server.define :tld, ".mobi", "whois.dotmobiregistry.net"
|
47
47
|
Whois::Server.define :tld, ".museum", "whois.museum"
|
48
|
-
Whois::Server.define :tld, ".name", "whois.nic.name"
|
48
|
+
Whois::Server.define :tld, ".name", "whois.nic.name", { :adapter => :formatted, :format => "domain=%s" }
|
49
49
|
Whois::Server.define :tld, ".pro", "whois.registrypro.pro"
|
50
50
|
Whois::Server.define :tld, ".tel", "whois.nic.tel"
|
51
51
|
Whois::Server.define :tld, ".travel", "whois.nic.travel"
|
@@ -75,7 +75,7 @@ Whois::Server.define :tld, ".be", "whois.dns.be"
|
|
75
75
|
Whois::Server.define :tld, ".bf", nil, { :adapter => :none }
|
76
76
|
Whois::Server.define :tld, ".bg", "whois.register.bg"
|
77
77
|
Whois::Server.define :tld, ".bh", nil, { :adapter => :none }
|
78
|
-
Whois::Server.define :tld, ".bi",
|
78
|
+
Whois::Server.define :tld, ".bi", "whois1.nic.bi"
|
79
79
|
Whois::Server.define :tld, ".bj", "whois.nic.bj"
|
80
80
|
Whois::Server.define :tld, ".bm", nil, { :adapter => :web, :url => "http://207.228.133.14/cgi-bin/lansaweb?procfun+BMWHO+BMWHO2+WHO" }
|
81
81
|
Whois::Server.define :tld, ".bn", nil, { :adapter => :none }
|
@@ -169,7 +169,7 @@ Whois::Server.define :tld, ".il", "whois.isoc.org.il"
|
|
169
169
|
Whois::Server.define :tld, ".im", "whois.nic.im"
|
170
170
|
Whois::Server.define :tld, ".in", "whois.registry.in"
|
171
171
|
Whois::Server.define :tld, ".io", "whois.nic.io"
|
172
|
-
Whois::Server.define :tld, ".iq",
|
172
|
+
Whois::Server.define :tld, ".iq", "whois.cmc.iq"
|
173
173
|
Whois::Server.define :tld, ".ir", "whois.nic.ir"
|
174
174
|
Whois::Server.define :tld, ".is", "whois.isnic.is"
|
175
175
|
Whois::Server.define :tld, ".it", "whois.nic.it"
|
@@ -209,7 +209,7 @@ Whois::Server.define :tld, ".mk", nil, { :adapter => :web, :url => "http://dns.m
|
|
209
209
|
Whois::Server.define :tld, ".ml", nil, { :adapter => :none }
|
210
210
|
Whois::Server.define :tld, ".mm", nil, { :adapter => :none }
|
211
211
|
Whois::Server.define :tld, ".mn", "whois.afilias-grs.info", { :adapter => :afilias }
|
212
|
-
Whois::Server.define :tld, ".mo",
|
212
|
+
Whois::Server.define :tld, ".mo", "whois.monic.mo"
|
213
213
|
Whois::Server.define :tld, ".mp", nil, { :adapter => :none }
|
214
214
|
Whois::Server.define :tld, ".mq", nil, { :adapter => :web, :url => "https://www.dom-enic.com/whois.html" }
|
215
215
|
Whois::Server.define :tld, ".mr", nil, { :adapter => :none }
|
@@ -347,6 +347,7 @@ Whois::Server.define :tld, ".xn--j6w193g", "whois.hkirc.hk"
|
|
347
347
|
Whois::Server.define :tld, ".xn--kprw13d", "whois.twnic.net.tw"
|
348
348
|
Whois::Server.define :tld, ".xn--kpry57d", "whois.twnic.net.tw"
|
349
349
|
Whois::Server.define :tld, ".xn--lgbbat1ad8j", "whois.nic.dz"
|
350
|
+
Whois::Server.define :tld, ".xn--mgb9awbf", "whois.registry.om"
|
350
351
|
Whois::Server.define :tld, ".xn--mgba3a4f16a", "whois.nic.ir"
|
351
352
|
Whois::Server.define :tld, ".xn--mgbaam7a8h", "whois.aeda.net.ae"
|
352
353
|
Whois::Server.define :tld, ".xn--mgbayh7gpa", nil, { :adapter => :web, :url => "http://idn.jo/whois_a.aspx" }
|
@@ -1,12 +1,6 @@
|
|
1
1
|
# Scanners
|
2
2
|
|
3
3
|
|
4
|
-
## Types
|
5
|
-
|
6
|
-
- verisign : indented keyvalue with text
|
7
|
-
- cnnic : keyvalue
|
8
|
-
- biz : keyvalue + lastupdate + disclaimer
|
9
|
-
|
10
4
|
---
|
11
5
|
|
12
6
|
# afilias
|
@@ -25,9 +19,7 @@
|
|
25
19
|
|
26
20
|
|
27
21
|
.us
|
28
|
-
.biz
|
29
22
|
.travel
|
30
|
-
whois.nic.co
|
31
23
|
|
32
24
|
whois.museum
|
33
25
|
whois.cat
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
require 'whois/record/parser/base'
|
11
|
-
require 'whois/record/scanners/
|
11
|
+
require 'whois/record/scanners/base_afilias'
|
12
12
|
|
13
13
|
|
14
14
|
module Whois
|
@@ -18,7 +18,6 @@ module Whois
|
|
18
18
|
# Base parser for Afilias servers.
|
19
19
|
#
|
20
20
|
# @abstract
|
21
|
-
#
|
22
21
|
class BaseAfilias < Base
|
23
22
|
include Scanners::Ast
|
24
23
|
|
@@ -113,7 +112,7 @@ module Whois
|
|
113
112
|
#
|
114
113
|
# @return [Hash]
|
115
114
|
def parse
|
116
|
-
Scanners::
|
115
|
+
Scanners::BaseAfilias.new(content_for_scanner).parse
|
117
116
|
end
|
118
117
|
|
119
118
|
|
@@ -17,7 +17,6 @@ module Whois
|
|
17
17
|
# Base parser for CoCCA servers.
|
18
18
|
#
|
19
19
|
# @abstract
|
20
|
-
#
|
21
20
|
class BaseCocca < Base
|
22
21
|
|
23
22
|
property_supported :domain do
|
@@ -31,9 +30,12 @@ module Whois
|
|
31
30
|
property_supported :status do
|
32
31
|
if content_for_scanner =~ /Status:\s+(.+?)\n/
|
33
32
|
case $1.downcase
|
34
|
-
when "active"
|
35
|
-
|
36
|
-
when "
|
33
|
+
when "active"
|
34
|
+
:registered
|
35
|
+
when "delegated"
|
36
|
+
:registered
|
37
|
+
when "not registered"
|
38
|
+
:available
|
37
39
|
else
|
38
40
|
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
39
41
|
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
#--
|
2
|
+
# Ruby Whois
|
3
|
+
#
|
4
|
+
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
+
#
|
6
|
+
# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
|
7
|
+
#++
|
8
|
+
|
9
|
+
|
10
|
+
require 'whois/record/parser/base'
|
11
|
+
require 'whois/record/scanners/base_shared1'
|
12
|
+
|
13
|
+
|
14
|
+
module Whois
|
15
|
+
class Record
|
16
|
+
class Parser
|
17
|
+
|
18
|
+
# Shared parser 1.
|
19
|
+
#
|
20
|
+
# @abstract
|
21
|
+
#
|
22
|
+
# @since RELEASE
|
23
|
+
class BaseShared1 < Base
|
24
|
+
include Scanners::Ast
|
25
|
+
|
26
|
+
property_not_supported :disclaimer
|
27
|
+
|
28
|
+
|
29
|
+
property_supported :domain do
|
30
|
+
node('Domain Name')
|
31
|
+
end
|
32
|
+
|
33
|
+
property_not_supported :domain_id
|
34
|
+
|
35
|
+
|
36
|
+
property_not_supported :referral_whois
|
37
|
+
|
38
|
+
property_not_supported :referral_url
|
39
|
+
|
40
|
+
|
41
|
+
property_supported :status do
|
42
|
+
Array.wrap(node("Status"))
|
43
|
+
end
|
44
|
+
|
45
|
+
property_supported :available? do
|
46
|
+
!!node('status:available')
|
47
|
+
end
|
48
|
+
|
49
|
+
property_supported :registered? do
|
50
|
+
!available?
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
property_not_supported :created_on
|
55
|
+
|
56
|
+
property_not_supported :updated_on
|
57
|
+
|
58
|
+
property_not_supported :expires_on
|
59
|
+
|
60
|
+
|
61
|
+
property_supported :registrar do
|
62
|
+
node('Registrar Name') do |name|
|
63
|
+
Record::Registrar.new(
|
64
|
+
:id => node('Registrar ID'),
|
65
|
+
:name => node('Registrar Name'),
|
66
|
+
:organization => node('Registrar Name')
|
67
|
+
)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
property_supported :registrant_contacts do
|
73
|
+
build_contact('Registrant', Whois::Record::Contact::TYPE_REGISTRANT)
|
74
|
+
end
|
75
|
+
|
76
|
+
property_not_supported :admin_contacts
|
77
|
+
|
78
|
+
property_supported :technical_contacts do
|
79
|
+
build_contact('Tech', Whois::Record::Contact::TYPE_TECHNICAL)
|
80
|
+
end
|
81
|
+
|
82
|
+
|
83
|
+
property_supported :nameservers do
|
84
|
+
node('Name Server') do |value|
|
85
|
+
ipv4s = node('Name Server IP') || Array.new(value.size)
|
86
|
+
value.zip(ipv4s).map do |name, ipv4|
|
87
|
+
Nameserver.new(:name => name, :ipv4 => ipv4)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
# Initializes a new {Scanners::BaseShared1} instance
|
94
|
+
# passing the {#content_for_scanner}
|
95
|
+
# and calls +parse+ on it.
|
96
|
+
#
|
97
|
+
# @return [Hash]
|
98
|
+
def parse
|
99
|
+
Scanners::BaseShared1.new(content_for_scanner).parse
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
private
|
104
|
+
|
105
|
+
def build_contact(element, type)
|
106
|
+
node("#{element} Contact ID") do
|
107
|
+
Record::Contact.new(
|
108
|
+
:type => type,
|
109
|
+
:id => node("#{element} Contact ID"),
|
110
|
+
:name => node("#{element} Contact Name"),
|
111
|
+
:email => node("#{element} Contact Email")
|
112
|
+
)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,143 @@
|
|
1
|
+
#--
|
2
|
+
# Ruby Whois
|
3
|
+
#
|
4
|
+
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
+
#
|
6
|
+
# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
|
7
|
+
#++
|
8
|
+
|
9
|
+
|
10
|
+
require 'whois/record/parser/base'
|
11
|
+
require 'whois/record/scanners/base_shared2'
|
12
|
+
|
13
|
+
|
14
|
+
module Whois
|
15
|
+
class Record
|
16
|
+
class Parser
|
17
|
+
|
18
|
+
# Shared parser 2.
|
19
|
+
#
|
20
|
+
# @abstract
|
21
|
+
#
|
22
|
+
# @since RELEASE
|
23
|
+
class BaseShared2 < Base
|
24
|
+
include Scanners::Ast
|
25
|
+
|
26
|
+
# Actually the :disclaimer is supported,
|
27
|
+
# but extracting it with the current scanner
|
28
|
+
# would require too much effort.
|
29
|
+
# property_supported :disclaimer
|
30
|
+
|
31
|
+
|
32
|
+
property_supported :domain do
|
33
|
+
node("Domain Name", &:downcase)
|
34
|
+
end
|
35
|
+
|
36
|
+
property_supported :domain_id do
|
37
|
+
node("Domain ID")
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
property_not_supported :referral_whois
|
42
|
+
|
43
|
+
property_not_supported :referral_url
|
44
|
+
|
45
|
+
|
46
|
+
property_supported :status do
|
47
|
+
node("Domain Status")
|
48
|
+
end
|
49
|
+
|
50
|
+
property_supported :available? do
|
51
|
+
!!node("status:available")
|
52
|
+
end
|
53
|
+
|
54
|
+
property_supported :registered? do
|
55
|
+
!available?
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
property_supported :created_on do
|
60
|
+
node("Domain Registration Date") { |value| Time.parse(value) }
|
61
|
+
end
|
62
|
+
|
63
|
+
property_supported :updated_on do
|
64
|
+
node("Domain Last Updated Date") { |value| Time.parse(value) }
|
65
|
+
end
|
66
|
+
|
67
|
+
property_supported :expires_on do
|
68
|
+
node("Domain Expiration Date") { |value| Time.parse(value) }
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
property_supported :registrar do
|
73
|
+
node("Sponsoring Registrar") do |str|
|
74
|
+
Record::Registrar.new(
|
75
|
+
:id => node("Sponsoring Registrar IANA ID"),
|
76
|
+
:name => node("Sponsoring Registrar")
|
77
|
+
)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
property_supported :registrant_contacts do
|
83
|
+
build_contact("Registrant", Whois::Record::Contact::TYPE_REGISTRANT)
|
84
|
+
end
|
85
|
+
|
86
|
+
property_supported :admin_contacts do
|
87
|
+
build_contact("Administrative Contact", Whois::Record::Contact::TYPE_ADMIN)
|
88
|
+
end
|
89
|
+
|
90
|
+
property_supported :technical_contacts do
|
91
|
+
build_contact("Technical Contact", Whois::Record::Contact::TYPE_TECHNICAL)
|
92
|
+
end
|
93
|
+
|
94
|
+
|
95
|
+
property_supported :nameservers do
|
96
|
+
Array.wrap(node("Name Server")).map do |name|
|
97
|
+
Nameserver.new(:name => name.downcase)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
# Initializes a new {Scanners::BaseShared2} instance
|
103
|
+
# passing the {#content_for_scanner}
|
104
|
+
# and calls +parse+ on it.
|
105
|
+
#
|
106
|
+
# @return [Hash]
|
107
|
+
def parse
|
108
|
+
Scanners::BaseShared2.new(content_for_scanner).parse
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
private
|
113
|
+
|
114
|
+
def build_contact(element, type)
|
115
|
+
node("#{element} ID") do |str|
|
116
|
+
address = (1..3).
|
117
|
+
map { |i| node("#{element} Address#{i}") }.
|
118
|
+
delete_if(&:nil?).
|
119
|
+
join("\n")
|
120
|
+
|
121
|
+
Record::Contact.new(
|
122
|
+
:type => type,
|
123
|
+
:id => node("#{element} ID"),
|
124
|
+
:name => node("#{element} Name"),
|
125
|
+
:organization => node("#{element} Organization"),
|
126
|
+
:address => address,
|
127
|
+
:city => node("#{element} City"),
|
128
|
+
:zip => node("#{element} Postal Code"),
|
129
|
+
:state => node("#{element} State/Province"),
|
130
|
+
:country => node("#{element} Country"),
|
131
|
+
:country_code => node("#{element} Country Code"),
|
132
|
+
:phone => node("#{element} Phone Number"),
|
133
|
+
:fax => node("#{element} Facsimile Number"),
|
134
|
+
:email => node("#{element} Email")
|
135
|
+
)
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
end
|
140
|
+
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
|
10
10
|
require 'whois/record/parser/base'
|
11
|
-
require 'whois/record/scanners/
|
11
|
+
require 'whois/record/scanners/base_whoisd'
|
12
12
|
|
13
13
|
|
14
14
|
module Whois
|
@@ -19,7 +19,7 @@ module Whois
|
|
19
19
|
#
|
20
20
|
# @abstract
|
21
21
|
#
|
22
|
-
# @since
|
22
|
+
# @since 2.6.4
|
23
23
|
class BaseWhoisd < Base
|
24
24
|
include Scanners::Ast
|
25
25
|
|
@@ -116,7 +116,7 @@ module Whois
|
|
116
116
|
#
|
117
117
|
# @return [Hash]
|
118
118
|
def parse
|
119
|
-
Scanners::
|
119
|
+
Scanners::BaseWhoisd.new(content_for_scanner).parse
|
120
120
|
end
|
121
121
|
|
122
122
|
|