whois 1.5.1 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +53 -1
- data/lib/whois/answer/parser/NOTES.txt +37 -13
- data/lib/whois/answer/parser/kero.yachay.pe.rb +78 -0
- data/lib/whois/answer/parser/whois.audns.net.au.rb +1 -9
- data/lib/whois/answer/parser/whois.domain-registry.nl.rb +1 -0
- data/lib/whois/answer/parser/whois.domainregistry.my.rb +81 -0
- data/lib/whois/answer/parser/whois.educause.edu.rb +3 -3
- data/lib/whois/answer/parser/whois.na-nic.com.na.rb +90 -0
- data/lib/whois/answer/parser/whois.netcom.cm.rb +2 -0
- data/lib/whois/answer/parser/whois.nic.ac.rb +12 -7
- data/lib/whois/answer/parser/whois.nic.ag.rb +1 -1
- data/lib/whois/answer/parser/whois.nic.cd.rb +1 -1
- data/lib/whois/answer/parser/whois.nic.fr.rb +3 -0
- data/lib/whois/answer/parser/whois.nic.gl.rb +11 -7
- data/lib/whois/answer/parser/whois.nic.gs.rb +3 -3
- data/lib/whois/answer/parser/whois.nic.io.rb +38 -6
- data/lib/whois/answer/parser/whois.nic.ki.rb +90 -0
- data/lib/whois/answer/parser/whois.nic.md.rb +35 -6
- data/lib/whois/answer/parser/whois.nic.mg.rb +90 -0
- data/lib/whois/answer/parser/whois.nic.ms.rb +90 -0
- data/lib/whois/answer/parser/whois.nic.mu.rb +5 -3
- data/lib/whois/answer/parser/whois.nic.net.nf.rb +90 -0
- data/lib/whois/answer/parser/whois.nic.net.ng.rb +90 -0
- data/lib/whois/answer/parser/whois.nic.tm.rb +99 -0
- data/lib/whois/answer/parser/whois.nic.uk.rb +7 -4
- data/lib/whois/answer/parser/whois.nic.ve.rb +8 -5
- data/lib/whois/answer/parser/whois.pnina.ps.rb +86 -0
- data/lib/whois/answer/parser/whois.tznic.or.tz.rb +85 -0
- data/lib/whois/definitions/tlds.rb +8 -8
- data/lib/whois/version.rb +2 -2
- data/whois.gemspec +3 -3
- metadata +16 -5
@@ -0,0 +1,90 @@
|
|
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 'whois/answer/parser/base'
|
18
|
+
|
19
|
+
|
20
|
+
module Whois
|
21
|
+
class Answer
|
22
|
+
class Parser
|
23
|
+
|
24
|
+
#
|
25
|
+
# = whois.nic.ki parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.nic.ki server.
|
28
|
+
#
|
29
|
+
# NOTE: This parser is just a stub and provides only a few basic methods
|
30
|
+
# to check for domain availability and get domain status.
|
31
|
+
# Please consider to contribute implementing missing methods.
|
32
|
+
# See WhoisNicIt parser for an explanation of all available methods
|
33
|
+
# and examples.
|
34
|
+
#
|
35
|
+
class WhoisNicKi < Base
|
36
|
+
|
37
|
+
property_supported :status do
|
38
|
+
@status ||= if content_for_scanner =~ /Status:\s+(.+?)\n/
|
39
|
+
case $1.downcase
|
40
|
+
when "active" then :registered
|
41
|
+
when "not registered" then :available
|
42
|
+
else
|
43
|
+
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
44
|
+
end
|
45
|
+
else
|
46
|
+
Whois.bug!(ParserError, "Unable to parse status.")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
property_supported :available? do
|
51
|
+
@available ||= (status == :available)
|
52
|
+
end
|
53
|
+
|
54
|
+
property_supported :registered? do
|
55
|
+
@registered ||= !available?
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
property_supported :created_on do
|
60
|
+
@created_on ||= if content_for_scanner =~ /Created:\s+(.+?)\n/
|
61
|
+
Time.parse($1)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
property_supported :updated_on do
|
66
|
+
@updated_on ||= if content_for_scanner =~ /Modified:\s+(.+?)\n/
|
67
|
+
Time.parse($1)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
property_supported :expires_on do
|
72
|
+
@expires_on ||= if content_for_scanner =~ /Expires:\s+(.+?)\n/
|
73
|
+
Time.parse($1)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
property_supported :nameservers do
|
79
|
+
@nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
|
80
|
+
$1.split("\n").map(&:strip)
|
81
|
+
else
|
82
|
+
[]
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -26,14 +26,25 @@ module Whois
|
|
26
26
|
#
|
27
27
|
# Parser for the whois.nic.md server.
|
28
28
|
#
|
29
|
-
# NOTE: This parser is just a stub and provides only a few basic methods
|
30
|
-
# to check for domain availability and get domain status.
|
31
|
-
# Please consider to contribute implementing missing methods.
|
32
|
-
# See WhoisNicIt parser for an explanation of all available methods
|
33
|
-
# and examples.
|
34
|
-
#
|
35
29
|
class WhoisNicMd < Base
|
36
30
|
|
31
|
+
property_not_supported :disclaimer
|
32
|
+
|
33
|
+
|
34
|
+
property_supported :domain do
|
35
|
+
@domain ||= if content_for_scanner =~ /Domain name:\s(.+?)\n/
|
36
|
+
$1
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
property_not_supported :domain_id
|
41
|
+
|
42
|
+
|
43
|
+
property_not_supported :referral_whois
|
44
|
+
|
45
|
+
property_not_supported :referral_url
|
46
|
+
|
47
|
+
|
37
48
|
property_supported :status do
|
38
49
|
@status ||= if available?
|
39
50
|
:available
|
@@ -66,6 +77,24 @@ module Whois
|
|
66
77
|
end
|
67
78
|
|
68
79
|
|
80
|
+
property_not_supported :registrar
|
81
|
+
|
82
|
+
|
83
|
+
property_supported :registrant_contact do
|
84
|
+
@registrant_contact ||= if content_for_scanner =~ /Registrant:\s+(.+?)\n/
|
85
|
+
Whois::Answer::Contact.new(
|
86
|
+
nil,
|
87
|
+
Whois::Answer::Contact::TYPE_REGISTRANT,
|
88
|
+
$1
|
89
|
+
)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
property_not_supported :admin_contact
|
94
|
+
|
95
|
+
property_not_supported :technical_contact
|
96
|
+
|
97
|
+
|
69
98
|
property_supported :nameservers do
|
70
99
|
@nameservers ||= content_for_scanner.scan(/Name server:\s(.+?)\n/).flatten.map { |value| value.split(" ").first }
|
71
100
|
end
|
@@ -0,0 +1,90 @@
|
|
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 'whois/answer/parser/base'
|
18
|
+
|
19
|
+
|
20
|
+
module Whois
|
21
|
+
class Answer
|
22
|
+
class Parser
|
23
|
+
|
24
|
+
#
|
25
|
+
# = whois.nic.mg parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.nic.mg server.
|
28
|
+
#
|
29
|
+
# NOTE: This parser is just a stub and provides only a few basic methods
|
30
|
+
# to check for domain availability and get domain status.
|
31
|
+
# Please consider to contribute implementing missing methods.
|
32
|
+
# See WhoisNicIt parser for an explanation of all available methods
|
33
|
+
# and examples.
|
34
|
+
#
|
35
|
+
class WhoisNicMg < Base
|
36
|
+
|
37
|
+
property_supported :status do
|
38
|
+
@status ||= if content_for_scanner =~ /Status:\s+(.+?)\n/
|
39
|
+
case $1.downcase
|
40
|
+
when "active" then :registered
|
41
|
+
when "not registered" then :available
|
42
|
+
else
|
43
|
+
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
44
|
+
end
|
45
|
+
else
|
46
|
+
Whois.bug!(ParserError, "Unable to parse status.")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
property_supported :available? do
|
51
|
+
@available ||= (status == :available)
|
52
|
+
end
|
53
|
+
|
54
|
+
property_supported :registered? do
|
55
|
+
@registered ||= !available?
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
property_supported :created_on do
|
60
|
+
@created_on ||= if content_for_scanner =~ /Created:\s+(.+?)\n/
|
61
|
+
Time.parse($1)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
property_supported :updated_on do
|
66
|
+
@updated_on ||= if content_for_scanner =~ /Modified:\s+(.+?)\n/
|
67
|
+
Time.parse($1)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
property_supported :expires_on do
|
72
|
+
@expires_on ||= if content_for_scanner =~ /Expires:\s+(.+?)\n/
|
73
|
+
Time.parse($1)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
property_supported :nameservers do
|
79
|
+
@nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
|
80
|
+
$1.split("\n").map { |value| value.strip.downcase }
|
81
|
+
else
|
82
|
+
[]
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,90 @@
|
|
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 'whois/answer/parser/base'
|
18
|
+
|
19
|
+
|
20
|
+
module Whois
|
21
|
+
class Answer
|
22
|
+
class Parser
|
23
|
+
|
24
|
+
#
|
25
|
+
# = whois.nic.ms parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.nic.ms server.
|
28
|
+
#
|
29
|
+
# NOTE: This parser is just a stub and provides only a few basic methods
|
30
|
+
# to check for domain availability and get domain status.
|
31
|
+
# Please consider to contribute implementing missing methods.
|
32
|
+
# See WhoisNicIt parser for an explanation of all available methods
|
33
|
+
# and examples.
|
34
|
+
#
|
35
|
+
class WhoisNicMs < Base
|
36
|
+
|
37
|
+
property_supported :status do
|
38
|
+
@status ||= if content_for_scanner =~ /Status:\s+(.+?)\n/
|
39
|
+
case $1.downcase
|
40
|
+
when "active" then :registered
|
41
|
+
when "not registered" then :available
|
42
|
+
else
|
43
|
+
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
44
|
+
end
|
45
|
+
else
|
46
|
+
Whois.bug!(ParserError, "Unable to parse status.")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
property_supported :available? do
|
51
|
+
@available ||= (status == :available)
|
52
|
+
end
|
53
|
+
|
54
|
+
property_supported :registered? do
|
55
|
+
@registered ||= !available?
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
property_supported :created_on do
|
60
|
+
@created_on ||= if content_for_scanner =~ /Created:\s+(.+?)\n/
|
61
|
+
Time.parse($1)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
property_supported :updated_on do
|
66
|
+
@updated_on ||= if content_for_scanner =~ /Modified:\s+(.+?)\n/
|
67
|
+
Time.parse($1)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
property_supported :expires_on do
|
72
|
+
@expires_on ||= if content_for_scanner =~ /Expires:\s+(.+?)\n/
|
73
|
+
Time.parse($1)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
property_supported :nameservers do
|
79
|
+
@nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
|
80
|
+
$1.split("\n").map { |value| value.strip.downcase }
|
81
|
+
else
|
82
|
+
[]
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -39,6 +39,8 @@ module Whois
|
|
39
39
|
case $1.downcase
|
40
40
|
when "active" then :registered
|
41
41
|
when "not registered" then :available
|
42
|
+
else
|
43
|
+
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
42
44
|
end
|
43
45
|
else
|
44
46
|
Whois.bug!(ParserError, "Unable to parse status.")
|
@@ -55,19 +57,19 @@ module Whois
|
|
55
57
|
|
56
58
|
|
57
59
|
property_supported :created_on do
|
58
|
-
@created_on ||= if content_for_scanner =~ /Created:\s+(
|
60
|
+
@created_on ||= if content_for_scanner =~ /Created:\s+(.+?)\n/
|
59
61
|
Time.parse($1)
|
60
62
|
end
|
61
63
|
end
|
62
64
|
|
63
65
|
property_supported :updated_on do
|
64
|
-
@updated_on ||= if content_for_scanner =~ /Modified:\s+(
|
66
|
+
@updated_on ||= if content_for_scanner =~ /Modified:\s+(.+?)\n/
|
65
67
|
Time.parse($1)
|
66
68
|
end
|
67
69
|
end
|
68
70
|
|
69
71
|
property_supported :expires_on do
|
70
|
-
@expires_on ||= if content_for_scanner =~ /Expires:\s+(
|
72
|
+
@expires_on ||= if content_for_scanner =~ /Expires:\s+(.+?)\n/
|
71
73
|
Time.parse($1)
|
72
74
|
end
|
73
75
|
end
|
@@ -0,0 +1,90 @@
|
|
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 'whois/answer/parser/base'
|
18
|
+
|
19
|
+
|
20
|
+
module Whois
|
21
|
+
class Answer
|
22
|
+
class Parser
|
23
|
+
|
24
|
+
#
|
25
|
+
# = whois.nic.net.nf parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.nic.net.nf server.
|
28
|
+
#
|
29
|
+
# NOTE: This parser is just a stub and provides only a few basic methods
|
30
|
+
# to check for domain availability and get domain status.
|
31
|
+
# Please consider to contribute implementing missing methods.
|
32
|
+
# See WhoisNicIt parser for an explanation of all available methods
|
33
|
+
# and examples.
|
34
|
+
#
|
35
|
+
class WhoisNicNetNf < Base
|
36
|
+
|
37
|
+
property_supported :status do
|
38
|
+
@status ||= if content_for_scanner =~ /Status:\s+(.+?)\n/
|
39
|
+
case $1.downcase
|
40
|
+
when "active" then :registered
|
41
|
+
when "not registered" then :available
|
42
|
+
else
|
43
|
+
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
44
|
+
end
|
45
|
+
else
|
46
|
+
Whois.bug!(ParserError, "Unable to parse status.")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
property_supported :available? do
|
51
|
+
@available ||= (status == :available)
|
52
|
+
end
|
53
|
+
|
54
|
+
property_supported :registered? do
|
55
|
+
@registered ||= !available?
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
property_supported :created_on do
|
60
|
+
@created_on ||= if content_for_scanner =~ /Created:\s+(.+?)\n/
|
61
|
+
Time.parse($1)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
property_supported :updated_on do
|
66
|
+
@updated_on ||= if content_for_scanner =~ /Modified:\s+(.+?)\n/
|
67
|
+
Time.parse($1)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
property_supported :expires_on do
|
72
|
+
@expires_on ||= if content_for_scanner =~ /Expires:\s+(.+?)\n/
|
73
|
+
Time.parse($1)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
property_supported :nameservers do
|
79
|
+
@nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
|
80
|
+
$1.split("\n").map { |value| value.strip.downcase }
|
81
|
+
else
|
82
|
+
[]
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,90 @@
|
|
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 'whois/answer/parser/base'
|
18
|
+
|
19
|
+
|
20
|
+
module Whois
|
21
|
+
class Answer
|
22
|
+
class Parser
|
23
|
+
|
24
|
+
#
|
25
|
+
# = whois.nic.net.ng parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.nic.net.ng server.
|
28
|
+
#
|
29
|
+
# NOTE: This parser is just a stub and provides only a few basic methods
|
30
|
+
# to check for domain availability and get domain status.
|
31
|
+
# Please consider to contribute implementing missing methods.
|
32
|
+
# See WhoisNicIt parser for an explanation of all available methods
|
33
|
+
# and examples.
|
34
|
+
#
|
35
|
+
class WhoisNicNetNg < Base
|
36
|
+
|
37
|
+
property_supported :status do
|
38
|
+
@status ||= if content_for_scanner =~ /Status:\s+(.+?)\n/
|
39
|
+
case $1.downcase
|
40
|
+
when "active" then :registered
|
41
|
+
when "not registered" then :available
|
42
|
+
else
|
43
|
+
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
44
|
+
end
|
45
|
+
else
|
46
|
+
Whois.bug!(ParserError, "Unable to parse status.")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
property_supported :available? do
|
51
|
+
@available ||= (status == :available)
|
52
|
+
end
|
53
|
+
|
54
|
+
property_supported :registered? do
|
55
|
+
@registered ||= !available?
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
property_supported :created_on do
|
60
|
+
@created_on ||= if content_for_scanner =~ /Created:\s+(.+?)\n/
|
61
|
+
Time.parse($1)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
property_supported :updated_on do
|
66
|
+
@updated_on ||= if content_for_scanner =~ /Modified:\s+(.+?)\n/
|
67
|
+
Time.parse($1)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
property_supported :expires_on do
|
72
|
+
@expires_on ||= if content_for_scanner =~ /Expires:\s+(.+?)\n/
|
73
|
+
Time.parse($1)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
property_supported :nameservers do
|
79
|
+
@nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
|
80
|
+
$1.split("\n").map { |value| value.strip.downcase }
|
81
|
+
else
|
82
|
+
[]
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,99 @@
|
|
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 'whois/answer/parser/base'
|
18
|
+
|
19
|
+
|
20
|
+
module Whois
|
21
|
+
class Answer
|
22
|
+
class Parser
|
23
|
+
|
24
|
+
#
|
25
|
+
# = whois.nic.tm parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.nic.tm server.
|
28
|
+
#
|
29
|
+
class WhoisNicTm < Base
|
30
|
+
|
31
|
+
property_not_supported :disclaimer
|
32
|
+
|
33
|
+
|
34
|
+
property_supported :domain do
|
35
|
+
@domain ||= if content_for_scanner =~ /Domain "(.+?)"/
|
36
|
+
$1.downcase
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
property_not_supported :domain_id
|
41
|
+
|
42
|
+
|
43
|
+
property_not_supported :referral_whois
|
44
|
+
|
45
|
+
property_not_supported :referral_url
|
46
|
+
|
47
|
+
|
48
|
+
property_supported :status do
|
49
|
+
@status ||= if available?
|
50
|
+
:available
|
51
|
+
else
|
52
|
+
:registered
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
property_supported :available? do
|
57
|
+
@available ||= !!(content_for_scanner =~ /- Available/)
|
58
|
+
end
|
59
|
+
|
60
|
+
property_supported :registered? do
|
61
|
+
@registered ||= !available?
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
property_not_supported :created_on
|
66
|
+
|
67
|
+
property_not_supported :updated_on
|
68
|
+
|
69
|
+
property_not_supported :expires_on
|
70
|
+
|
71
|
+
|
72
|
+
property_not_supported :registrar
|
73
|
+
|
74
|
+
property_not_supported :registrant_contact
|
75
|
+
|
76
|
+
property_not_supported :admin_contact
|
77
|
+
|
78
|
+
property_not_supported :technical_contact
|
79
|
+
|
80
|
+
|
81
|
+
property_not_supported :nameservers
|
82
|
+
|
83
|
+
|
84
|
+
# NEWPROPERTY
|
85
|
+
def changed?(other)
|
86
|
+
!unchanged?(other)
|
87
|
+
end
|
88
|
+
|
89
|
+
# NEWPROPERTY
|
90
|
+
def unchanged?(other)
|
91
|
+
self.equal?(other) ||
|
92
|
+
self.content_for_scanner == other.content_for_scanner
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -39,10 +39,11 @@ module Whois
|
|
39
39
|
property_supported :status do
|
40
40
|
@status ||= if content_for_scanner =~ /\s+Registration status:\s+(.+?)\n/
|
41
41
|
case $1.downcase
|
42
|
-
when "registered until renewal date."
|
43
|
-
when "
|
42
|
+
when "registered until renewal date." then :registered
|
43
|
+
when "registration request being processed." then :registered
|
44
|
+
when "renewal request being processed." then :registered
|
44
45
|
# NEWSTATUS
|
45
|
-
when "renewal required."
|
46
|
+
when "renewal required." then :registered
|
46
47
|
else
|
47
48
|
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
48
49
|
end
|
@@ -81,7 +82,9 @@ module Whois
|
|
81
82
|
|
82
83
|
property_supported :nameservers do
|
83
84
|
@nameservers ||= if content_for_scanner =~ /Name servers:\n((.+\n)+)\n/
|
84
|
-
$1.split("\n").
|
85
|
+
$1.split("\n").
|
86
|
+
reject { |value| value =~ /No name servers listed/ }.
|
87
|
+
map { |value| value.strip.split(/\s+/).first }
|
85
88
|
else
|
86
89
|
[]
|
87
90
|
end
|
@@ -47,7 +47,7 @@ module Whois
|
|
47
47
|
end
|
48
48
|
|
49
49
|
property_supported :available? do
|
50
|
-
@available ||= !!(content_for_scanner =~ /No match for "(
|
50
|
+
@available ||= !!(content_for_scanner =~ /No match for "(.+?)"/)
|
51
51
|
end
|
52
52
|
|
53
53
|
property_supported :registered? do
|
@@ -56,19 +56,22 @@ module Whois
|
|
56
56
|
|
57
57
|
|
58
58
|
property_supported :created_on do
|
59
|
-
@created_on ||= if content_for_scanner =~ /Fecha de Creacion: (
|
59
|
+
@created_on ||= if content_for_scanner =~ /Fecha de Creacion: (.+?)\n/
|
60
60
|
Time.parse($1)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
64
|
property_supported :updated_on do
|
65
|
-
@updated_on ||= if content_for_scanner =~ /Ultima Actualizacion: (
|
65
|
+
@updated_on ||= if content_for_scanner =~ /Ultima Actualizacion: (.+?)\n/
|
66
66
|
Time.parse($1)
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
-
|
71
|
-
|
70
|
+
property_supported :expires_on do
|
71
|
+
@expires_on ||= if content_for_scanner =~ /Fecha de Vencimiento: (.+?)\n/
|
72
|
+
Time.parse($1)
|
73
|
+
end
|
74
|
+
end
|
72
75
|
|
73
76
|
property_supported :nameservers do
|
74
77
|
@nameservers ||= if content_for_scanner =~ /Servidor\(es\) de Nombres de Dominio:\n\n((.+\n)+)\n/
|