whois 3.5.4 → 3.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -1
- data/lib/whois/record/parser/base_shared3.rb +4 -2
- data/lib/whois/record/parser/whois.dns.lu.rb +61 -8
- data/lib/whois/record/parser/whois.fi.rb +10 -3
- data/lib/whois/record/parser/whois.markmonitor.com.rb +1 -0
- data/lib/whois/record/parser/whois.netcom.cm.rb +5 -0
- data/lib/whois/record/parser/whois.nic.asia.rb +16 -1
- data/lib/whois/record/parser/whois.nic.gd.rb +6 -0
- data/lib/whois/record/parser/whois.nic.xxx.rb +2 -1
- data/lib/whois/record/parser/whois.registrypro.pro.rb +14 -0
- data/lib/whois/record/scanners/base_afilias.rb +1 -2
- data/lib/whois/record/scanners/base_iisse.rb +1 -2
- data/lib/whois/record/scanners/whois.fi.rb +7 -0
- data/lib/whois/version.rb +1 -1
- data/whois.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 133907446387f7270b62a6eabb38c74f4811553a
|
4
|
+
data.tar.gz: 04c7491c8ca5574250478e947ac8f0252e9a51d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7406e3946918780f42ace027b0234bb9e9c1b39dd90c39c6e368f21f2de68c0ddfe7b1eea8c3b3569bee88fb775d5d623c1432f2c2ad04c6bc3aa7b48e5cbfc
|
7
|
+
data.tar.gz: df4a50076cbb1c168e437198abf31e62c43f7ef6ff811d6aa4a966e6c990d26c8cecd25f05309335a3fd287fba45d4c103798fce30c9e5b01aca259b68eb5daa
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,21 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
#### Release 3.5.5
|
3
4
|
|
4
|
-
|
5
|
+
- NEW: Added registrar and contact support for whois.dns.lu (GH-329). [Thanks @huyphan]
|
6
|
+
|
7
|
+
- CHANGED: Updated whois.iis.se and whois.iis.nu to the new response format (GH-328).
|
8
|
+
|
9
|
+
- FIXED: whois.fi parser crashes when the domain is reserved (GH-339). [Thanks @case]
|
10
|
+
|
11
|
+
- FIXED: whois.whois.nic.asia parser crashes when the status is reserved (GH-340). [Thanks @case]
|
12
|
+
|
13
|
+
- FIXED: whois.netcom.cm parser crashes when the status is suspended (GH-333). [Thanks @case]
|
14
|
+
|
15
|
+
- FIXED: whois.nic.gd parser crashes when the domain is reserved (GH-335). [Thanks @case]
|
16
|
+
|
17
|
+
|
18
|
+
#### Release 3.5.4
|
5
19
|
|
6
20
|
- SERVER: Created .QUEBEC, .COLLEGE, .DESI, .FEEDBACK, .ROCKS, .XN, .ASSOCIATES, .CAPITAL, .CAREER, .ENGINEERING, .EUS, .GAL, .GRIPE, .LEASE, .MEDIA, .PICTURES, .REISEN, .SERVICES, .TOWN, .TOYS, .UNIVERSITY, .XN, .FOO, .FROGANS, .PARIS, .SOY, .BLACKFRIDAY, .CLINIC, .FITNESS, .SCHULE, .CARE, .CASH, .DENTAL, .DISCOUNT, .EXCHANGE, .FAIL, .FINANCIAL, .FUND, .FURNITURE, .GRATIS, .INVESTMENTS, .LIMITED, .SURGERY, .TAX, .WTF, .MOSCOW, .XN, .CREDITCARD, .FINANCE, .INSURE, .WTC, .AIRFORCE, .BAYERN, .GLOBO, .ACCOUNTANTS, .CLAIMS, .CREDIT, .DIGITAL
|
7
21
|
|
@@ -37,7 +37,9 @@ module Whois
|
|
37
37
|
|
38
38
|
|
39
39
|
property_supported :status do
|
40
|
-
if
|
40
|
+
if respond_to?(:reserved?) && reserved?
|
41
|
+
:reserved
|
42
|
+
elsif available?
|
41
43
|
:available
|
42
44
|
else
|
43
45
|
:registered
|
@@ -45,7 +47,7 @@ module Whois
|
|
45
47
|
end
|
46
48
|
|
47
49
|
property_supported :available? do
|
48
|
-
!!node("status:available")
|
50
|
+
!(respond_to?(:reserved?) && reserved?) && !!node("status:available")
|
49
51
|
end
|
50
52
|
|
51
53
|
property_supported :registered? do
|
@@ -28,9 +28,10 @@ module Whois
|
|
28
28
|
property_supported :status do
|
29
29
|
if content_for_scanner =~ /domaintype:\s+(.+)\n/
|
30
30
|
case $1.downcase
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
when "active"
|
32
|
+
:registered
|
33
|
+
else
|
34
|
+
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
34
35
|
end
|
35
36
|
else
|
36
37
|
:available
|
@@ -58,18 +59,70 @@ module Whois
|
|
58
59
|
property_not_supported :expires_on
|
59
60
|
|
60
61
|
|
62
|
+
property_supported :registrar do
|
63
|
+
if name = value_for_key('registrar-name')
|
64
|
+
Record::Registrar.new(
|
65
|
+
name: name,
|
66
|
+
url: value_for_key('registrar-url'),
|
67
|
+
)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
property_supported :registrant_contacts do
|
72
|
+
build_contact('org', Record::Contact::TYPE_REGISTRANT)
|
73
|
+
end
|
74
|
+
|
75
|
+
property_supported :admin_contacts do
|
76
|
+
build_contact('adm', Record::Contact::TYPE_ADMINISTRATIVE)
|
77
|
+
end
|
78
|
+
|
79
|
+
property_supported :technical_contacts do
|
80
|
+
build_contact('tec', Record::Contact::TYPE_TECHNICAL)
|
81
|
+
end
|
82
|
+
|
83
|
+
|
61
84
|
property_supported :nameservers do
|
62
|
-
|
85
|
+
values_for_key('nserver').map do |line|
|
63
86
|
if line =~ /(.+) \[(.+)\]/
|
64
|
-
Record::Nameserver.new(:
|
87
|
+
Record::Nameserver.new(name: $1, ipv4: $2)
|
65
88
|
else
|
66
|
-
Record::Nameserver.new(:
|
89
|
+
Record::Nameserver.new(name: line)
|
67
90
|
end
|
68
91
|
end
|
69
92
|
end
|
70
93
|
|
71
|
-
end
|
72
94
|
|
95
|
+
private
|
96
|
+
|
97
|
+
def build_contact(element, type)
|
98
|
+
if name = value_for_key('%s-name' % element)
|
99
|
+
Record::Contact.new(
|
100
|
+
type: type,
|
101
|
+
id: nil,
|
102
|
+
name: name,
|
103
|
+
address: value_for_key('%s-address' % element),
|
104
|
+
city: value_for_key('%s-city' % element),
|
105
|
+
zip: value_for_key('%s-zipcode' % element),
|
106
|
+
country_code: value_for_key('%s-country' % element),
|
107
|
+
email: value_for_key('%s-email' % element)
|
108
|
+
)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
def value_for_key(key)
|
113
|
+
values = values_for_key(key)
|
114
|
+
if values.size > 1
|
115
|
+
values.join(', ')
|
116
|
+
else
|
117
|
+
values.first
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
def values_for_key(key)
|
122
|
+
content_for_scanner.scan(/#{key}:\s+(.+)\n/).flatten
|
123
|
+
end
|
124
|
+
|
125
|
+
end
|
73
126
|
end
|
74
127
|
end
|
75
|
-
end
|
128
|
+
end
|
@@ -39,7 +39,9 @@ module Whois
|
|
39
39
|
|
40
40
|
|
41
41
|
property_supported :status do
|
42
|
-
if
|
42
|
+
if reserved?
|
43
|
+
:reserved
|
44
|
+
elsif registered?
|
43
45
|
case node("status", &:downcase)
|
44
46
|
when "granted"
|
45
47
|
:registered
|
@@ -76,11 +78,11 @@ module Whois
|
|
76
78
|
|
77
79
|
|
78
80
|
property_not_supported :registrar
|
79
|
-
|
81
|
+
|
80
82
|
property_supported :registrant_contacts do
|
81
83
|
node("descr") do |array|
|
82
84
|
address = node("address")
|
83
|
-
|
85
|
+
|
84
86
|
Record::Contact.new(
|
85
87
|
type: Record::Contact::TYPE_REGISTRANT,
|
86
88
|
id: array[1],
|
@@ -105,6 +107,11 @@ module Whois
|
|
105
107
|
end
|
106
108
|
end
|
107
109
|
|
110
|
+
# NEWPROPERTY
|
111
|
+
def reserved?
|
112
|
+
!!content_for_scanner.match(/Domain not available/)
|
113
|
+
end
|
114
|
+
|
108
115
|
end
|
109
116
|
|
110
117
|
end
|
@@ -20,6 +20,7 @@ module Whois
|
|
20
20
|
# The Example parser for the list of all available methods.
|
21
21
|
#
|
22
22
|
class WhoisMarkmonitorCom < BaseIcannCompliant
|
23
|
+
|
23
24
|
self.scanner = Scanners::BaseIcannCompliant, {
|
24
25
|
pattern_available: /^No match for/,
|
25
26
|
pattern_throttled: /^You have exceeded your quota of queries\./,
|
@@ -21,8 +21,17 @@ module Whois
|
|
21
21
|
#
|
22
22
|
class WhoisNicAsia < BaseAfilias
|
23
23
|
|
24
|
+
self.scanner = Scanners::BaseAfilias, {
|
25
|
+
pattern_reserved: /^Reserved by DotAsia\n/,
|
26
|
+
}
|
27
|
+
|
28
|
+
|
24
29
|
property_supported :status do
|
25
|
-
|
30
|
+
if reserved?
|
31
|
+
:reserved
|
32
|
+
else
|
33
|
+
Array.wrap(node("Domain Status"))
|
34
|
+
end
|
26
35
|
end
|
27
36
|
|
28
37
|
|
@@ -61,6 +70,12 @@ module Whois
|
|
61
70
|
end
|
62
71
|
|
63
72
|
|
73
|
+
# NEWPROPERTY
|
74
|
+
def reserved?
|
75
|
+
!!node("status:reserved")
|
76
|
+
end
|
77
|
+
|
78
|
+
|
64
79
|
private
|
65
80
|
|
66
81
|
def build_contact(element, type)
|
@@ -20,6 +20,20 @@ module Whois
|
|
20
20
|
# The Example parser for the list of all available methods.
|
21
21
|
#
|
22
22
|
class WhoisRegistryproPro < BaseAfilias
|
23
|
+
|
24
|
+
property_supported :status do
|
25
|
+
if reserved?
|
26
|
+
:reserved
|
27
|
+
else
|
28
|
+
super()
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# NEWPROPERTY
|
33
|
+
def reserved?
|
34
|
+
!!content_for_scanner.match(/Governmental Reserved Name/)
|
35
|
+
end
|
36
|
+
|
23
37
|
end
|
24
38
|
|
25
39
|
end
|
@@ -34,10 +34,9 @@ module Whois
|
|
34
34
|
tokenizer :scan_disclaimer do
|
35
35
|
if @input.match?(/# Copyright/)
|
36
36
|
lines = []
|
37
|
-
while
|
37
|
+
while @input.scan(/#(.*)\n\n?/)
|
38
38
|
lines << @input[1].strip unless @input[1].strip == ""
|
39
39
|
end
|
40
|
-
@input.skip_until(/# printed with .+ bits\.\n/m)
|
41
40
|
@ast["field:disclaimer"] = lines.join(" ")
|
42
41
|
end
|
43
42
|
end
|
@@ -22,6 +22,7 @@ module Whois
|
|
22
22
|
:scan_available,
|
23
23
|
:scan_disclaimer,
|
24
24
|
:scan_keyvalue,
|
25
|
+
:scan_reserved
|
25
26
|
]
|
26
27
|
|
27
28
|
|
@@ -31,6 +32,12 @@ module Whois
|
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
35
|
+
tokenizer :scan_reserved do
|
36
|
+
if @input.skip(/^Domain not available/)
|
37
|
+
@ast["status:reserved"] = true
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
34
41
|
tokenizer :scan_disclaimer do
|
35
42
|
if @input.match?(/^More information/)
|
36
43
|
@ast["field:disclaimer"] = @input.scan_until(/(.*)\n\n/).strip
|
data/lib/whois/version.rb
CHANGED
data/whois.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: whois 3.5.
|
2
|
+
# stub: whois 3.5.5 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "whois"
|
6
|
-
s.version = "3.5.
|
6
|
+
s.version = "3.5.5"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib"]
|
10
10
|
s.authors = ["Simone Carletti"]
|
11
|
-
s.date = "2014-06-
|
11
|
+
s.date = "2014-06-22"
|
12
12
|
s.description = "Whois is an intelligent WHOIS client and parser written in pure Ruby. It can query registry data for IPv4, IPv6 and top level domains, parse and convert responses into easy-to-use Ruby objects."
|
13
13
|
s.email = ["weppos@weppos.net"]
|
14
14
|
s.executables = ["ruby-whois"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whois
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simone Carletti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|