whois 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +44 -1
- data/bin/ruby-whois +3 -3
- data/lib/whois/answer/parser/NOTES.txt +4 -0
- data/lib/whois/answer/parser/whois.aero.rb +1 -1
- data/lib/whois/answer/parser/whois.cnnic.cn.rb +4 -4
- data/lib/whois/answer/parser/whois.co.pl.rb +106 -0
- data/lib/whois/answer/parser/whois.co.ug.rb +1 -1
- data/lib/whois/answer/parser/whois.coza.net.za.rb +106 -0
- data/lib/whois/answer/parser/whois.dk-hostmaster.dk.rb +1 -1
- data/lib/whois/answer/parser/whois.dns.pl.rb +77 -0
- data/lib/whois/answer/parser/whois.gov.za.rb +71 -0
- data/lib/whois/answer/parser/whois.iam.net.ma.rb +72 -0
- data/lib/whois/answer/parser/whois.ja.net.rb +85 -0
- data/lib/whois/answer/parser/whois.nic.cd.rb +4 -4
- data/lib/whois/answer/parser/whois.nic.ci.rb +77 -0
- data/lib/whois/answer/parser/whois.nic.ck.rb +1 -1
- data/lib/whois/answer/parser/whois.nic.nu.rb +3 -3
- data/lib/whois/answer/parser/whois.nic.pr.rb +75 -0
- data/lib/whois/answer/parser/whois.nic.sh.rb +99 -0
- data/lib/whois/answer/parser/whois.nic.sl.rb +83 -0
- data/lib/whois/answer/parser/whois.org.za.rb +96 -0
- data/lib/whois/answer/parser/whois.registry.gy.rb +90 -0
- data/lib/whois/answer/parser/whois.registry.hm.rb +79 -0
- data/lib/whois/answer/parser/whois.sgnic.sg.rb +77 -0
- data/lib/whois/answer/parser/whois.sk-nic.sk.rb +81 -0
- data/lib/whois/answer/parser/whois.thnic.co.th.rb +85 -0
- data/lib/whois/answer/parser/whois.twnic.net.tw.rb +81 -0
- data/lib/whois/definitions/tlds.rb +3 -3
- data/lib/whois/version.rb +1 -1
- data/whois.gemspec +2 -2
- metadata +21 -4
data/CHANGELOG.rdoc
CHANGED
@@ -1,6 +1,49 @@
|
|
1
1
|
= Changelog
|
2
2
|
|
3
3
|
|
4
|
+
== Release 1.6.2
|
5
|
+
|
6
|
+
* SERVER: Updated the .sg TLD definition.
|
7
|
+
|
8
|
+
* SERVER: Updated the .th TLD definition.
|
9
|
+
|
10
|
+
* SERVER: Updated the .org.za TLD definition.
|
11
|
+
|
12
|
+
* NEW: Added simple .sg TLD parser (whois.sgnic.sg).
|
13
|
+
|
14
|
+
* NEW: Added .sh TLD parser (whois.nic.sh).
|
15
|
+
|
16
|
+
* NEW: Added simple .sk TLD parser (whois.sgnic.sg).
|
17
|
+
|
18
|
+
* NEW: Added simple .sl TLD parser (whois.nic.sl).
|
19
|
+
|
20
|
+
* NEW: Added simple .th TLD parser (whois.thnic.co.th).
|
21
|
+
|
22
|
+
* NEW: Added simple .tw TLD parser (whois.twnic.net.tw).
|
23
|
+
|
24
|
+
* NEW: Added simple .ac.uk, .gov.uk TLD parser (whois.ja.net).
|
25
|
+
|
26
|
+
* NEW: Added .org.za TLD parser (whois.org.za).
|
27
|
+
|
28
|
+
* NEW: Added simple .gov.za TLD parser (whois.gov.za).
|
29
|
+
|
30
|
+
* NEW: Added .co.za TLD parser (whois.coza.net.za).
|
31
|
+
|
32
|
+
* NEW: Added simple .ci TLD parser (whois.nic.ci). (#39)
|
33
|
+
|
34
|
+
* NEW: Added simple .gy TLD parser (whois.registry.gy). (#45)
|
35
|
+
|
36
|
+
* NEW: Added simple .hm TLD parser (whois.registry.hm). (#46)
|
37
|
+
|
38
|
+
* NEW: Added simple .pl TLD parser (whois.dns.pl).
|
39
|
+
|
40
|
+
* NEW: Added .co.pl TLD parser (whois.co.pl).
|
41
|
+
|
42
|
+
* NEW: Added simple .pr TLD parser (whois.nic.pr).
|
43
|
+
|
44
|
+
* FIXED: The CLI help message uses whois instead or ruby-whois.
|
45
|
+
|
46
|
+
|
4
47
|
== Release 1.6.1
|
5
48
|
|
6
49
|
* FIXED: Fixed unknown status `Inactive' for kero.yachay.pe.
|
@@ -38,7 +81,7 @@
|
|
38
81
|
|
39
82
|
* NEW: Added simple .ps TLD parser (whois.pnina.ps).
|
40
83
|
|
41
|
-
* NEW: Added simple .ki TLD parser (whois.
|
84
|
+
* NEW: Added simple .ki TLD parser (whois.nic.ki).
|
42
85
|
|
43
86
|
* NEW: Added .tm TLD parser (whois.nic.tm).
|
44
87
|
|
data/bin/ruby-whois
CHANGED
@@ -10,11 +10,11 @@ require 'whois'
|
|
10
10
|
options = OpenStruct.new
|
11
11
|
OptionParser.new do |opts|
|
12
12
|
opts.banner = "Whois: an intelligent pure Ruby Whois client"
|
13
|
-
opts.define_head "Usage: whois [options] object"
|
13
|
+
opts.define_head "Usage: ruby-whois [options] object"
|
14
14
|
opts.separator ""
|
15
15
|
opts.separator "Examples:"
|
16
|
-
opts.separator " whois ruby-lang.com"
|
17
|
-
opts.separator " whois 213.149.247.64"
|
16
|
+
opts.separator " ruby-whois ruby-lang.com"
|
17
|
+
opts.separator " ruby-whois 213.149.247.64"
|
18
18
|
opts.separator ""
|
19
19
|
opts.separator "Options:"
|
20
20
|
|
@@ -75,7 +75,7 @@ module Whois
|
|
75
75
|
|
76
76
|
|
77
77
|
property_supported :nameservers do
|
78
|
-
@nameservers ||= content_for_scanner.scan(/Name Server:([^\s]
|
78
|
+
@nameservers ||= content_for_scanner.scan(/Name Server:([^\s]+)\n/).flatten.map(&:downcase)
|
79
79
|
end
|
80
80
|
|
81
81
|
end
|
@@ -35,7 +35,7 @@ module Whois
|
|
35
35
|
class WhoisCnnicCn < Base
|
36
36
|
|
37
37
|
property_supported :status do
|
38
|
-
@status ||= content_for_scanner.scan(/Domain Status:\s+(
|
38
|
+
@status ||= content_for_scanner.scan(/Domain Status:\s+(.+)\n/).flatten
|
39
39
|
end
|
40
40
|
|
41
41
|
property_supported :available? do
|
@@ -48,7 +48,7 @@ module Whois
|
|
48
48
|
|
49
49
|
|
50
50
|
property_supported :created_on do
|
51
|
-
@created_on ||= if content_for_scanner =~ /Registration Date:\s+(
|
51
|
+
@created_on ||= if content_for_scanner =~ /Registration Date:\s+(.+)\n/
|
52
52
|
Time.parse($1)
|
53
53
|
end
|
54
54
|
end
|
@@ -56,14 +56,14 @@ module Whois
|
|
56
56
|
property_not_supported :updated_on
|
57
57
|
|
58
58
|
property_supported :expires_on do
|
59
|
-
@expires_on ||= if content_for_scanner =~ /Expiration Date:\s+(
|
59
|
+
@expires_on ||= if content_for_scanner =~ /Expiration Date:\s+(.+)\n/
|
60
60
|
Time.parse($1)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
64
|
|
65
65
|
property_supported :nameservers do
|
66
|
-
@nameservers ||= content_for_scanner.scan(/Name Server:(
|
66
|
+
@nameservers ||= content_for_scanner.scan(/Name Server:(.+)\n/).flatten.map(&:downcase)
|
67
67
|
end
|
68
68
|
|
69
69
|
end
|
@@ -0,0 +1,106 @@
|
|
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.co.pl parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.co.pl server.
|
28
|
+
#
|
29
|
+
class WhoisCoPl < Base
|
30
|
+
|
31
|
+
property_not_supported :disclaimer
|
32
|
+
|
33
|
+
|
34
|
+
property_supported :domain do
|
35
|
+
@domain ||= if content_for_scanner =~ /domain:\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
|
+
|
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 =~ /^% Unfortunately, No Results Were Found/)
|
58
|
+
end
|
59
|
+
|
60
|
+
property_supported :registered? do
|
61
|
+
@registered ||= !available?
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
property_not_supported :created_on
|
66
|
+
|
67
|
+
property_supported :updated_on do
|
68
|
+
@updated_on ||= if content_for_scanner =~ /changed:\s+(.+?)\n/
|
69
|
+
Time.parse($1)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
property_not_supported :expires_on
|
74
|
+
|
75
|
+
|
76
|
+
property_not_supported :registrar
|
77
|
+
|
78
|
+
|
79
|
+
property_not_supported :registrant_contact
|
80
|
+
|
81
|
+
property_not_supported :admin_contact
|
82
|
+
|
83
|
+
property_not_supported :technical_contact
|
84
|
+
|
85
|
+
|
86
|
+
property_supported :nameservers do
|
87
|
+
@nameservers ||= content_for_scanner.scan(/nserver:\s+(.+)\n/).flatten
|
88
|
+
end
|
89
|
+
|
90
|
+
|
91
|
+
# NEWPROPERTY
|
92
|
+
property_supported :changed? do |other|
|
93
|
+
!unchanged?(other)
|
94
|
+
end
|
95
|
+
|
96
|
+
# NEWPROPERTY
|
97
|
+
property_supported :unchanged? do |other|
|
98
|
+
(self === other) ||
|
99
|
+
(self.content == other.content)
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -47,7 +47,7 @@ module Whois
|
|
47
47
|
end
|
48
48
|
|
49
49
|
property_supported :available? do
|
50
|
-
@available ||= !!(content_for_scanner =~
|
50
|
+
@available ||= !!(content_for_scanner =~ /^% No entries found for the selected source/)
|
51
51
|
end
|
52
52
|
|
53
53
|
property_supported :registered? do
|
@@ -0,0 +1,106 @@
|
|
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.coza.net.za parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.coza.net.za server.
|
28
|
+
#
|
29
|
+
class WhoisCozaNetZa < Base
|
30
|
+
|
31
|
+
property_not_supported :disclaimer
|
32
|
+
|
33
|
+
|
34
|
+
property_not_supported :domain
|
35
|
+
|
36
|
+
property_not_supported :domain_id
|
37
|
+
|
38
|
+
|
39
|
+
property_not_supported :referral_whois
|
40
|
+
|
41
|
+
property_not_supported :referral_url
|
42
|
+
|
43
|
+
|
44
|
+
property_supported :status do
|
45
|
+
@status ||= if available?
|
46
|
+
:available
|
47
|
+
else
|
48
|
+
:registered
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
property_supported :available? do
|
53
|
+
@available ||= content_for_scanner.strip == "Available"
|
54
|
+
end
|
55
|
+
|
56
|
+
property_supported :registered? do
|
57
|
+
@registered ||= !available?
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
property_not_supported :created_on
|
62
|
+
|
63
|
+
property_not_supported :updated_on
|
64
|
+
|
65
|
+
property_not_supported :expires_on
|
66
|
+
|
67
|
+
|
68
|
+
property_not_supported :registrar
|
69
|
+
|
70
|
+
|
71
|
+
property_not_supported :registrant_contact
|
72
|
+
|
73
|
+
property_not_supported :admin_contact
|
74
|
+
|
75
|
+
property_not_supported :technical_contact
|
76
|
+
|
77
|
+
|
78
|
+
property_not_supported :nameservers
|
79
|
+
|
80
|
+
|
81
|
+
# NEWPROPERTY
|
82
|
+
property_supported :changed? do |other|
|
83
|
+
!unchanged?(other)
|
84
|
+
end
|
85
|
+
|
86
|
+
# NEWPROPERTY
|
87
|
+
property_supported :unchanged? do |other|
|
88
|
+
(self === other) ||
|
89
|
+
(self.content == other.content)
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
protected
|
94
|
+
|
95
|
+
# Very often the .to server returns a partial response, which is a response
|
96
|
+
# containing an emtpy line.
|
97
|
+
# It seems to be a very poorly-designed throttle mecanism.
|
98
|
+
def incomplete_response?
|
99
|
+
content_for_scanner.strip == ""
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -47,7 +47,7 @@ module Whois
|
|
47
47
|
end
|
48
48
|
|
49
49
|
property_supported :available? do
|
50
|
-
@available ||= !!(content_for_scanner =~
|
50
|
+
@available ||= !!(content_for_scanner =~ /^No entries found for the selected source/)
|
51
51
|
end
|
52
52
|
|
53
53
|
property_supported :registered? do
|
@@ -0,0 +1,77 @@
|
|
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.dns.pl parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.dns.pl 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 WhoisDnsPl < Base
|
36
|
+
|
37
|
+
property_supported :status do
|
38
|
+
@status ||= if available?
|
39
|
+
:available
|
40
|
+
else
|
41
|
+
:registered
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
property_supported :available? do
|
46
|
+
@available ||= !!(content_for_scanner =~ /^No information available about domain name/)
|
47
|
+
end
|
48
|
+
|
49
|
+
property_supported :registered? do
|
50
|
+
@registered ||= !available?
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
property_supported :created_on do
|
55
|
+
@created_on ||= if content_for_scanner =~ /created:\s+(.+?)\n/
|
56
|
+
Time.parse($1)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
property_supported :updated_on do
|
61
|
+
@updated_on ||= if content_for_scanner =~ /last modified:\s+(.+?)\n/
|
62
|
+
Time.parse($1)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
property_not_supported :expires_on
|
67
|
+
|
68
|
+
|
69
|
+
property_supported :nameservers do
|
70
|
+
@nameservers ||= content_for_scanner.scan(/nameservers:\s+(.+)\n(.+)\n/).flatten.map { |value| value.strip.chomp(".") }
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|