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
@@ -0,0 +1,71 @@
|
|
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.gov.za parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.gov.za 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 WhoisGovZa < 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 match found for/)
|
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 =~ /Date : (.+)\n/
|
56
|
+
Time.parse($1)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
property_not_supported :updated_on
|
61
|
+
|
62
|
+
property_not_supported :expires_on
|
63
|
+
|
64
|
+
|
65
|
+
property_not_supported :nameservers
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,72 @@
|
|
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.iam.net.ma parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.iam.net.ma 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 WhoisIamNetMa < 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 =~ /^%error 230 No Objects Found/)
|
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 =~ /domain:Created:(.+?)\n/
|
56
|
+
Time.parse($1)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
property_supported :updated_on do
|
61
|
+
@updated_on ||= if content_for_scanner =~ /domain:Updated:(.+?)\n/
|
62
|
+
Time.parse($1)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
property_not_supported :expires_on
|
67
|
+
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,85 @@
|
|
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.ja.net parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.ja.net 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 WhoisJaNet < 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 such domain (.+)/)
|
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 =~ /^Entry created:\n\s+(.+?)\n/
|
56
|
+
Time.parse($1)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
property_supported :updated_on do
|
61
|
+
@updated_on ||= if content_for_scanner =~ /^Entry updated:\n\s+(.+?)\n/
|
62
|
+
Time.parse($1)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
property_supported :expires_on do
|
67
|
+
@expires_on ||= if content_for_scanner =~ /^Renewal date:\n\s+(.+?)\n/
|
68
|
+
Time.parse($1)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
|
73
|
+
property_supported :nameservers do
|
74
|
+
@nameservers ||= if content_for_scanner =~ /^Servers:\n((.+\n)+)\n/
|
75
|
+
$1.split("\n").map { |value| value.strip.split("\t").first }
|
76
|
+
else
|
77
|
+
[]
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -35,7 +35,7 @@ module Whois
|
|
35
35
|
class WhoisNicCd < Base
|
36
36
|
|
37
37
|
property_supported :status do
|
38
|
-
@status ||= content_for_scanner.scan(
|
38
|
+
@status ||= content_for_scanner.scan(/^\s+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 =~
|
51
|
+
@created_on ||= if content_for_scanner =~ /^\s+Creation 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 =~
|
59
|
+
@expires_on ||= if content_for_scanner =~ /^\s+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 ||= if content_for_scanner =~
|
66
|
+
@nameservers ||= if content_for_scanner =~ /^\s+Name Servers:\n((.+\n)+)\n/
|
67
67
|
$1.split("\n").map { |value| value.strip.downcase }
|
68
68
|
else
|
69
69
|
[]
|
@@ -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.nic.ci parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.nic.ci 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 WhoisNicCi < 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 =~ /^Domain (.+?) not found/)
|
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: (.+?)\n/
|
56
|
+
Time.parse($1)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
property_not_supported :updated_on
|
61
|
+
|
62
|
+
property_supported :expires_on do
|
63
|
+
@expires_on ||= if content_for_scanner =~ /Expiration date: (.+?)\n/
|
64
|
+
Time.parse($1)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
property_supported :nameservers do
|
70
|
+
@nameservers ||= content_for_scanner.scan(/Nameserver: (.+?)\n/).flatten
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -43,7 +43,7 @@ module Whois
|
|
43
43
|
end
|
44
44
|
|
45
45
|
property_supported :available? do
|
46
|
-
@available ||= !!(content_for_scanner =~
|
46
|
+
@available ||= !!(content_for_scanner =~ /^% No entries found for the selected source/)
|
47
47
|
end
|
48
48
|
|
49
49
|
property_supported :registered? do
|
@@ -56,19 +56,19 @@ module Whois
|
|
56
56
|
|
57
57
|
|
58
58
|
property_supported :created_on do
|
59
|
-
@created_on ||= if content_for_scanner =~ /Record created on (
|
59
|
+
@created_on ||= if content_for_scanner =~ /Record created on (.+?).\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 =~ /Record last updated on (
|
65
|
+
@updated_on ||= if content_for_scanner =~ /Record last updated on (.+?).\n/
|
66
66
|
Time.parse($1)
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
70
|
property_supported :expires_on do
|
71
|
-
@expires_on ||= if content_for_scanner =~ /Record expires on (
|
71
|
+
@expires_on ||= if content_for_scanner =~ /Record expires on (.+?).\n/
|
72
72
|
Time.parse($1)
|
73
73
|
end
|
74
74
|
end
|
@@ -0,0 +1,75 @@
|
|
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.pr parser
|
26
|
+
#
|
27
|
+
# Parser for the whois.nic.or 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 WhoisNicPr < 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 =~ /^Domain: (.+?)\n/)
|
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 on:(.+?)\n/
|
56
|
+
Time.parse($1)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
property_not_supported :updated_on
|
61
|
+
|
62
|
+
property_supported :expires_on do
|
63
|
+
@expires_on ||= if content_for_scanner =~ /Expires on:(.+?)\n/
|
64
|
+
Time.parse($1)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
property_not_supported :nameservers
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|