whois 3.4.2 → 3.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +91 -107
- data/bin/ruby-whois +2 -2
- data/data/tld.json +4 -4
- data/lib/whois/record/parser/base_cocca2.rb +1 -1
- data/lib/whois/record/parser/{whois.nic.cc.rb → base_verisign.rb} +23 -11
- data/lib/whois/record/parser/ccwhois.verisign-grs.com.rb +27 -0
- data/lib/whois/record/parser/jobswhois.verisign-grs.com.rb +2 -75
- data/lib/whois/record/parser/whois.hkirc.hk.rb +1 -1
- data/lib/whois/record/parser/whois.markmonitor.com.rb +5 -94
- data/lib/whois/record/parser/whois.nic.af.rb +0 -6
- data/lib/whois/record/parser/whois.nic.cd.rb +6 -0
- data/lib/whois/record/parser/whois.nic.dz.rb +3 -7
- data/lib/whois/record/parser/whois.nic.gl.rb +2 -2
- data/lib/whois/record/parser/whois.nic.gs.rb +6 -0
- data/lib/whois/record/parser/whois.nic.mu.rb +6 -0
- data/lib/whois/record/parser/whois.nic.name.rb +1 -1
- data/lib/whois/record/parser/whois.nic.net.ng.rb +6 -0
- data/lib/whois/record/parser/whois.nic.net.sb.rb +6 -0
- data/lib/whois/record/parser/whois.nic.tv.rb +6 -68
- data/lib/whois/record/parser/whois.pnina.ps.rb +8 -8
- data/lib/whois/record/parser/whois.rotld.ro.rb +3 -3
- data/lib/whois/record/parser/whois.tld.sy.rb +6 -0
- data/lib/whois/record/parser/whois.usp.ac.fj.rb +3 -2
- data/lib/whois/record/parser/whois.verisign-grs.com.rb +46 -0
- data/lib/whois/record/parser/{whois.samoanic.ws.rb → whois.website.ws.rb} +8 -10
- data/lib/whois/version.rb +1 -1
- data/whois.gemspec +5 -5
- metadata +7 -6
- data/lib/whois/record/parser/whois.crsnic.net.rb +0 -112
@@ -0,0 +1,27 @@
|
|
1
|
+
#--
|
2
|
+
# Ruby Whois
|
3
|
+
#
|
4
|
+
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
+
#
|
6
|
+
# Copyright (c) 2009-2013 Simone Carletti <weppos@weppos.net>
|
7
|
+
#++
|
8
|
+
|
9
|
+
|
10
|
+
require 'whois/record/parser/base_verisign'
|
11
|
+
|
12
|
+
|
13
|
+
module Whois
|
14
|
+
class Record
|
15
|
+
class Parser
|
16
|
+
|
17
|
+
# Parser for the ccwhois.verisign-grs.com server.
|
18
|
+
#
|
19
|
+
# @see Whois::Record::Parser::Example
|
20
|
+
# The Example parser for the list of all available methods.
|
21
|
+
#
|
22
|
+
class CcwhoisVerisignGrsCom < BaseVerisign
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -7,8 +7,7 @@
|
|
7
7
|
#++
|
8
8
|
|
9
9
|
|
10
|
-
require 'whois/record/parser/
|
11
|
-
require 'whois/record/scanners/verisign'
|
10
|
+
require 'whois/record/parser/base_verisign'
|
12
11
|
|
13
12
|
|
14
13
|
module Whois
|
@@ -20,79 +19,7 @@ module Whois
|
|
20
19
|
# @see Whois::Record::Parser::Example
|
21
20
|
# The Example parser for the list of all available methods.
|
22
21
|
#
|
23
|
-
class JobswhoisVerisignGrsCom <
|
24
|
-
include Scanners::Scannable
|
25
|
-
|
26
|
-
self.scanner = Scanners::Verisign
|
27
|
-
|
28
|
-
|
29
|
-
property_supported :disclaimer do
|
30
|
-
node("Disclaimer")
|
31
|
-
end
|
32
|
-
|
33
|
-
|
34
|
-
property_supported :domain do
|
35
|
-
node("Domain Name", &:downcase)
|
36
|
-
end
|
37
|
-
|
38
|
-
property_supported :domain_id do
|
39
|
-
node("Domain ID")
|
40
|
-
end
|
41
|
-
|
42
|
-
|
43
|
-
property_supported :status do
|
44
|
-
node("Domain Status")
|
45
|
-
end
|
46
|
-
|
47
|
-
property_supported :available? do
|
48
|
-
node("Sponsoring Registrar").nil?
|
49
|
-
end
|
50
|
-
|
51
|
-
property_supported :registered? do
|
52
|
-
!available?
|
53
|
-
end
|
54
|
-
|
55
|
-
|
56
|
-
property_supported :created_on do
|
57
|
-
node("Creation Date") { |value| Time.parse(value) }
|
58
|
-
end
|
59
|
-
|
60
|
-
property_supported :updated_on do
|
61
|
-
node("Updated Date") { |value| Time.parse(value) }
|
62
|
-
end
|
63
|
-
|
64
|
-
property_supported :expires_on do
|
65
|
-
node("Expiration Date") { |value| Time.parse(value) }
|
66
|
-
end
|
67
|
-
|
68
|
-
|
69
|
-
property_supported :registrar do
|
70
|
-
node("Sponsoring Registrar") do |value|
|
71
|
-
Whois::Record::Registrar.new(
|
72
|
-
:id => node("Sponsoring Registrar IANA ID"),
|
73
|
-
:name => value,
|
74
|
-
:organization => value,
|
75
|
-
:url => referral_url
|
76
|
-
)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
|
81
|
-
property_supported :nameservers do
|
82
|
-
Array.wrap(node("Name Server")).reject { |value| value =~ /no nameserver/i }.map do |name|
|
83
|
-
Nameserver.new(:name => name.downcase)
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
|
88
|
-
def referral_whois
|
89
|
-
node("Whois Server")
|
90
|
-
end
|
91
|
-
|
92
|
-
def referral_url
|
93
|
-
node("Referral URL")
|
94
|
-
end
|
95
|
-
|
22
|
+
class JobswhoisVerisignGrsCom < BaseVerisign
|
96
23
|
end
|
97
24
|
|
98
25
|
end
|
@@ -7,7 +7,7 @@
|
|
7
7
|
#++
|
8
8
|
|
9
9
|
|
10
|
-
require 'whois/record/parser/
|
10
|
+
require 'whois/record/parser/base_icann_compliant'
|
11
11
|
|
12
12
|
|
13
13
|
module Whois
|
@@ -19,99 +19,10 @@ module Whois
|
|
19
19
|
# @see Whois::Record::Parser::Example
|
20
20
|
# The Example parser for the list of all available methods.
|
21
21
|
#
|
22
|
-
class WhoisMarkmonitorCom <
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
# The server is contacted only in case of a registered domain.
|
27
|
-
property_supported :available? do
|
28
|
-
false
|
29
|
-
end
|
30
|
-
|
31
|
-
property_supported :registered? do
|
32
|
-
!available?
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
property_supported :created_on do
|
37
|
-
if content_for_scanner =~ /Created on\.+: (.+)\.\n/
|
38
|
-
Time.parse($1)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
property_supported :updated_on do
|
43
|
-
if content_for_scanner =~ /Record last updated on\.+: (.+)\.\n/
|
44
|
-
Time.parse($1)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
property_supported :expires_on do
|
49
|
-
if content_for_scanner =~ /Expires on\.+: (.+)\.\n/
|
50
|
-
Time.parse($1)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
|
55
|
-
property_supported :registrar do
|
56
|
-
Record::Registrar.new(
|
57
|
-
name: content_for_scanner.slice(/Registrar Name: (.+)\n/, 1),
|
58
|
-
url: content_for_scanner.slice(/Registrar Homepage: (.+)\n/, 1)
|
59
|
-
)
|
60
|
-
end
|
61
|
-
|
62
|
-
property_supported :registrant_contacts do
|
63
|
-
build_contact('Registrant:', Record::Contact::TYPE_REGISTRANT)
|
64
|
-
end
|
65
|
-
|
66
|
-
property_supported :admin_contacts do
|
67
|
-
build_contact('Administrative Contact:', Record::Contact::TYPE_ADMINISTRATIVE)
|
68
|
-
end
|
69
|
-
|
70
|
-
property_supported :technical_contacts do
|
71
|
-
build_contact('Technical Contact, Zone Contact:', Record::Contact::TYPE_TECHNICAL)
|
72
|
-
end
|
73
|
-
|
74
|
-
|
75
|
-
property_supported :nameservers do
|
76
|
-
if content_for_scanner =~ /Domain servers in listed order:\n\n((?:\s*[^\s\n]+\n)+)/
|
77
|
-
$1.split("\n").map do |line|
|
78
|
-
Record::Nameserver.new(:name => line.strip)
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
|
84
|
-
private
|
85
|
-
|
86
|
-
def build_contact(element, type)
|
87
|
-
match = content_for_scanner.slice(/#{element}\n((.+\n){6})/, 1)
|
88
|
-
return unless match
|
89
|
-
|
90
|
-
lines = match.split("\n").map(&:strip)
|
91
|
-
|
92
|
-
# 0 DNS Admin
|
93
|
-
# 1 Google Inc.
|
94
|
-
# 2 1600 Amphitheatre Parkway
|
95
|
-
# 3 Mountain View CA 94043
|
96
|
-
# 4 US
|
97
|
-
# 5 dns-admin@google.com +1.6506234000 Fax: +1.6506188571
|
98
|
-
city, state, zip = lines[3].scan(/^(.+) ([A-Z]{2}) ([0-9]+)$/).first
|
99
|
-
email, phone, fax = lines[5].scan(/^(.+) (.+) Fax: (.+)$/).first
|
100
|
-
Record::Contact.new(
|
101
|
-
:type => type,
|
102
|
-
:name => lines[0],
|
103
|
-
:organization => lines[1],
|
104
|
-
:address => lines[2],
|
105
|
-
:city => city,
|
106
|
-
:state => state,
|
107
|
-
:zip => zip,
|
108
|
-
:country_code => lines[4],
|
109
|
-
:email => email,
|
110
|
-
:phone => phone,
|
111
|
-
:fax => fax
|
112
|
-
)
|
113
|
-
end
|
114
|
-
|
22
|
+
class WhoisMarkmonitorCom < BaseIcannCompliant
|
23
|
+
self.scanner = Scanners::BaseIcannCompliant, {
|
24
|
+
pattern_available: /^No match for/
|
25
|
+
}
|
115
26
|
end
|
116
27
|
|
117
28
|
end
|
@@ -20,12 +20,6 @@ module Whois
|
|
20
20
|
# The Example parser for the list of all available methods.
|
21
21
|
#
|
22
22
|
class WhoisNicAf < BaseCocca2
|
23
|
-
|
24
|
-
property_supported :status do
|
25
|
-
list = Array.wrap(node("Domain Status")).map(&:downcase)
|
26
|
-
list.include?("no object found") ? :available : super()
|
27
|
-
end
|
28
|
-
|
29
23
|
end
|
30
24
|
|
31
25
|
end
|
@@ -20,6 +20,12 @@ module Whois
|
|
20
20
|
# The Example parser for the list of all available methods.
|
21
21
|
#
|
22
22
|
class WhoisNicCd < BaseCocca2
|
23
|
+
|
24
|
+
property_supported :status do
|
25
|
+
list = Array.wrap(node("Domain Status")).map(&:downcase)
|
26
|
+
list.include?("available") ? :available : super()
|
27
|
+
end
|
28
|
+
|
23
29
|
end
|
24
30
|
|
25
31
|
end
|
@@ -28,14 +28,10 @@ module Whois
|
|
28
28
|
class WhoisNicDz < Base
|
29
29
|
|
30
30
|
property_supported :status do
|
31
|
-
if
|
32
|
-
case $1.downcase
|
33
|
-
when "actif" then :registered
|
34
|
-
else
|
35
|
-
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
36
|
-
end
|
37
|
-
else
|
31
|
+
if available?
|
38
32
|
:available
|
33
|
+
else
|
34
|
+
:registered
|
39
35
|
end
|
40
36
|
end
|
41
37
|
|
@@ -7,7 +7,7 @@
|
|
7
7
|
#++
|
8
8
|
|
9
9
|
|
10
|
-
require 'whois/record/parser/
|
10
|
+
require 'whois/record/parser/base_cocca2'
|
11
11
|
|
12
12
|
|
13
13
|
module Whois
|
@@ -19,7 +19,7 @@ module Whois
|
|
19
19
|
# @see Whois::Record::Parser::Example
|
20
20
|
# The Example parser for the list of all available methods.
|
21
21
|
#
|
22
|
-
class WhoisNicGl <
|
22
|
+
class WhoisNicGl < BaseCocca2
|
23
23
|
end
|
24
24
|
|
25
25
|
end
|
@@ -20,6 +20,12 @@ module Whois
|
|
20
20
|
# The Example parser for the list of all available methods.
|
21
21
|
#
|
22
22
|
class WhoisNicGs < BaseCocca2
|
23
|
+
|
24
|
+
property_supported :status do
|
25
|
+
list = Array.wrap(node("Domain Status")).map(&:downcase)
|
26
|
+
list.include?("available") ? :available : super()
|
27
|
+
end
|
28
|
+
|
23
29
|
end
|
24
30
|
|
25
31
|
end
|
@@ -20,6 +20,12 @@ module Whois
|
|
20
20
|
# The Example parser for the list of all available methods.
|
21
21
|
#
|
22
22
|
class WhoisNicMu < BaseCocca2
|
23
|
+
|
24
|
+
property_supported :status do
|
25
|
+
list = Array.wrap(node("Domain Status")).map(&:downcase)
|
26
|
+
list.include?("available") ? :available : super()
|
27
|
+
end
|
28
|
+
|
23
29
|
end
|
24
30
|
|
25
31
|
end
|
@@ -16,6 +16,12 @@ module Whois
|
|
16
16
|
|
17
17
|
# Parser for the whois.nic.net.ng server.
|
18
18
|
class WhoisNicNetNg < BaseCocca2
|
19
|
+
|
20
|
+
property_supported :status do
|
21
|
+
list = Array.wrap(node("Domain Status")).map(&:downcase)
|
22
|
+
list.include?("available") ? :available : super()
|
23
|
+
end
|
24
|
+
|
19
25
|
end
|
20
26
|
|
21
27
|
end
|
@@ -20,6 +20,12 @@ module Whois
|
|
20
20
|
# The Example parser for the list of all available methods.
|
21
21
|
#
|
22
22
|
class WhoisNicNetSb < BaseCocca2
|
23
|
+
|
24
|
+
property_supported :status do
|
25
|
+
list = Array.wrap(node("Domain Status")).map(&:downcase)
|
26
|
+
list.include?("available") ? :available : super()
|
27
|
+
end
|
28
|
+
|
23
29
|
end
|
24
30
|
|
25
31
|
end
|
@@ -7,8 +7,7 @@
|
|
7
7
|
#++
|
8
8
|
|
9
9
|
|
10
|
-
require 'whois/record/parser/
|
11
|
-
require 'whois/record/scanners/verisign'
|
10
|
+
require 'whois/record/parser/base_verisign'
|
12
11
|
|
13
12
|
|
14
13
|
module Whois
|
@@ -16,72 +15,11 @@ module Whois
|
|
16
15
|
class Parser
|
17
16
|
|
18
17
|
# Parser for the whois.nic.tv server.
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
property_supported :disclaimer do
|
26
|
-
node("Disclaimer")
|
27
|
-
end
|
28
|
-
|
29
|
-
|
30
|
-
property_supported :domain do
|
31
|
-
node("Domain Name") { |raw| raw.downcase }
|
32
|
-
end
|
33
|
-
|
34
|
-
property_not_supported :domain_id
|
35
|
-
|
36
|
-
|
37
|
-
property_supported :status do
|
38
|
-
node("Status")
|
39
|
-
end
|
40
|
-
|
41
|
-
property_supported :available? do
|
42
|
-
node("Registrar").nil?
|
43
|
-
end
|
44
|
-
|
45
|
-
property_supported :registered? do
|
46
|
-
!available?
|
47
|
-
end
|
48
|
-
|
49
|
-
|
50
|
-
property_supported :created_on do
|
51
|
-
node("Creation Date") { |raw| Time.parse(raw) }
|
52
|
-
end
|
53
|
-
|
54
|
-
property_supported :updated_on do
|
55
|
-
node("Updated Date") { |raw| Time.parse(raw) }
|
56
|
-
end
|
57
|
-
|
58
|
-
property_supported :expires_on do
|
59
|
-
node("Expiration Date") { |raw| Time.parse(raw) }
|
60
|
-
end
|
61
|
-
|
62
|
-
|
63
|
-
property_supported :registrar do
|
64
|
-
# Return nil because when the response contains more than one registrar section
|
65
|
-
# the response can be messy. See, for instance, the Verisign response for google.com.
|
66
|
-
nil
|
67
|
-
end
|
68
|
-
|
69
|
-
|
70
|
-
property_supported :nameservers do
|
71
|
-
Array.wrap(node("Name Server")).reject { |value| value =~ /no nameserver/i }.map do |name|
|
72
|
-
Record::Nameserver.new(:name => name.downcase)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
|
77
|
-
def referral_whois
|
78
|
-
node("Whois Server")
|
79
|
-
end
|
80
|
-
|
81
|
-
def referral_url
|
82
|
-
node("Referral URL")
|
83
|
-
end
|
84
|
-
|
18
|
+
#
|
19
|
+
# @see Whois::Record::Parser::Example
|
20
|
+
# The Example parser for the list of all available methods.
|
21
|
+
#
|
22
|
+
class WhoisNicTv < BaseVerisign
|
85
23
|
end
|
86
24
|
|
87
25
|
end
|