wmap 2.7.2 → 2.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -16
- data/bin/refresh +5 -5
- data/lib/wmap.rb +1 -1
- data/lib/wmap/site_tracker.rb +1 -4
- data/lib/wmap/{wp_tracker.rb → site_tracker/wp_tracker.rb} +41 -4
- data/lib/wmap/url_crawler.rb +1 -1
- data/version.txt +2 -2
- data/wmap.gemspec +2 -2
- metadata +4 -59
- data/ruby_whois_patches/base_cocca2.rb +0 -149
- data/ruby_whois_patches/kero.yachay.pe.rb +0 -120
- data/ruby_whois_patches/whois.PublicDomainRegistry.com.rb +0 -124
- data/ruby_whois_patches/whois.above.com.rb +0 -61
- data/ruby_whois_patches/whois.adamsnames.tc.rb +0 -107
- data/ruby_whois_patches/whois.aeda.net.ae.rb +0 -105
- data/ruby_whois_patches/whois.ai.rb +0 -112
- data/ruby_whois_patches/whois.arnes.si.rb +0 -121
- data/ruby_whois_patches/whois.ascio.com.rb +0 -91
- data/ruby_whois_patches/whois.cnnic.cn.rb +0 -123
- data/ruby_whois_patches/whois.corporatedomains.com.rb +0 -67
- data/ruby_whois_patches/whois.crsnic.net.rb +0 -108
- data/ruby_whois_patches/whois.denic.de.rb +0 -174
- data/ruby_whois_patches/whois.dk-hostmaster.dk.rb +0 -120
- data/ruby_whois_patches/whois.dns.be.rb +0 -134
- data/ruby_whois_patches/whois.dns.lu.rb +0 -129
- data/ruby_whois_patches/whois.dns.pl.rb +0 -150
- data/ruby_whois_patches/whois.dns.pt.rb +0 -119
- data/ruby_whois_patches/whois.domain.kg.rb +0 -126
- data/ruby_whois_patches/whois.domainregistry.my.rb +0 -123
- data/ruby_whois_patches/whois.domreg.lt.rb +0 -110
- data/ruby_whois_patches/whois.dot.tk.rb +0 -140
- data/ruby_whois_patches/whois.hkirc.hk.rb +0 -121
- data/ruby_whois_patches/whois.isnic.is.rb +0 -130
- data/ruby_whois_patches/whois.je.rb +0 -119
- data/ruby_whois_patches/whois.jprs.jp.rb +0 -137
- data/ruby_whois_patches/whois.kenic.or.ke.rb +0 -140
- data/ruby_whois_patches/whois.markmonitor.com.rb +0 -118
- data/ruby_whois_patches/whois.melbourneit.com.rb +0 -58
- data/ruby_whois_patches/whois.nic.as.rb +0 -96
- data/ruby_whois_patches/whois.nic.at.rb +0 -109
- data/ruby_whois_patches/whois.nic.ch.rb +0 -141
- data/ruby_whois_patches/whois.nic.cl.rb +0 -117
- data/ruby_whois_patches/whois.nic.ec.rb +0 -157
- data/ruby_whois_patches/whois.nic.im.rb +0 -120
- data/ruby_whois_patches/whois.nic.it.rb +0 -170
- data/ruby_whois_patches/whois.nic.lv.rb +0 -116
- data/ruby_whois_patches/whois.nic.ly.rb +0 -127
- data/ruby_whois_patches/whois.nic.mu.rb +0 -27
- data/ruby_whois_patches/whois.nic.mx.rb +0 -123
- data/ruby_whois_patches/whois.nic.net.sa.rb +0 -111
- data/ruby_whois_patches/whois.nic.or.kr.rb +0 -101
- data/ruby_whois_patches/whois.nic.tel.rb +0 -129
- data/ruby_whois_patches/whois.nic.tr.rb +0 -133
- data/ruby_whois_patches/whois.nic.us.rb +0 -129
- data/ruby_whois_patches/whois.nic.ve.rb +0 -135
- data/ruby_whois_patches/whois.norid.no.rb +0 -127
- data/ruby_whois_patches/whois.pandi.or.id.rb +0 -118
- data/ruby_whois_patches/whois.psi-usa.info.rb +0 -63
- data/ruby_whois_patches/whois.registro.br.rb +0 -109
- data/ruby_whois_patches/whois.registrygate.com.rb +0 -55
- data/ruby_whois_patches/whois.rrpproxy.net.rb +0 -61
- data/ruby_whois_patches/whois.sgnic.sg.rb +0 -130
- data/ruby_whois_patches/whois.srs.net.nz.rb +0 -166
- data/ruby_whois_patches/whois.tucows.com.rb +0 -70
- data/ruby_whois_patches/whois.twnic.net.tw.rb +0 -133
@@ -1,140 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
|
7
|
-
#++
|
8
|
-
|
9
|
-
|
10
|
-
require 'whois/record/parser/base'
|
11
|
-
|
12
|
-
|
13
|
-
module Whois
|
14
|
-
class Record
|
15
|
-
class Parser
|
16
|
-
|
17
|
-
#
|
18
|
-
# = whois.kenic.or.ke parser
|
19
|
-
#
|
20
|
-
# Parser for the whois.kenic.or.ke server.
|
21
|
-
#
|
22
|
-
# NOTE: This parser is just a stub and provides only a few basic methods
|
23
|
-
# to check for domain availability and get domain status.
|
24
|
-
# Please consider to contribute implementing missing methods.
|
25
|
-
# See WhoisNicIt parser for an explanation of all available methods
|
26
|
-
# and examples.
|
27
|
-
#
|
28
|
-
class WhoisKenicOrKe < Base
|
29
|
-
|
30
|
-
property_supported :status do
|
31
|
-
if content_for_scanner =~ /Status:\s+(.+?)\n/
|
32
|
-
case $1.downcase
|
33
|
-
when "active"
|
34
|
-
:registered
|
35
|
-
when "not registered"
|
36
|
-
:available
|
37
|
-
else
|
38
|
-
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
|
39
|
-
end
|
40
|
-
else
|
41
|
-
Whois.bug!(ParserError, "Unable to parse status.")
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
property_supported :available? do
|
46
|
-
status == :available
|
47
|
-
end
|
48
|
-
|
49
|
-
property_supported :registered? do
|
50
|
-
!available?
|
51
|
-
end
|
52
|
-
|
53
|
-
|
54
|
-
property_supported :created_on do
|
55
|
-
if content_for_scanner =~ /Created:\s+(.+?)\n/
|
56
|
-
Time.parse($1)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
property_supported :updated_on do
|
61
|
-
if content_for_scanner =~ /Modified:\s+(.+?)\n/
|
62
|
-
Time.parse($1)
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
property_supported :expires_on do
|
67
|
-
if content_for_scanner =~ /Expires:\s+(.+?)\n/
|
68
|
-
Time.parse($1)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
property_supported :nameservers do
|
73
|
-
if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
|
74
|
-
$1.split("\n").map do |name|
|
75
|
-
Record::Nameserver.new(:name => name.strip)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
# The following methods are implemented by Yang Li on 01/29/2013
|
81
|
-
# ----------------------------------------------------------------------------
|
82
|
-
property_not_supported :domain
|
83
|
-
|
84
|
-
property_not_supported :domain_id
|
85
|
-
|
86
|
-
property_supported :registrar do
|
87
|
-
reg=Record::Registrar.new
|
88
|
-
content_for_scanner.scan(/^.*Registrar(.*):(.+)\n/).map do |entry|
|
89
|
-
reg["name"] = entry[1].strip if entry[0] =~ /Name/i
|
90
|
-
reg["organization"] = entry[1].strip if entry[0] =~ /Name/i
|
91
|
-
end
|
92
|
-
return reg
|
93
|
-
end
|
94
|
-
|
95
|
-
property_supported :admin_contacts do
|
96
|
-
build_contact("Admin Contact", Whois::Record::Contact::TYPE_ADMIN)
|
97
|
-
end
|
98
|
-
|
99
|
-
property_supported :registrant_contacts do
|
100
|
-
build_contact("Registrant", Whois::Record::Contact::TYPE_REGISTRANT)
|
101
|
-
end
|
102
|
-
|
103
|
-
property_supported :technical_contacts do
|
104
|
-
build_contact("Technical Contact", Whois::Record::Contact::TYPE_TECHNICAL)
|
105
|
-
end
|
106
|
-
|
107
|
-
property_supported :billing_contacts do
|
108
|
-
build_contact("Billing Contact", Whois::Record::Contact::TYPE_BILLING)
|
109
|
-
end
|
110
|
-
|
111
|
-
private
|
112
|
-
|
113
|
-
def build_contact(element, type)
|
114
|
-
reg=Record::Contact.new(:type => type)
|
115
|
-
if content_for_scanner =~ /\n\n#{element}:\n((.+\n)+)\n/i
|
116
|
-
con2=$1
|
117
|
-
con1=$1.split(%r{\n}).delete_if { |x| x !~ /(.+):(.+)/ }
|
118
|
-
addr=con2.split(%r{\n}).delete_if { |x| x =~ /(.+):(.+)/ }
|
119
|
-
con1.join("\n").scan(/(.+):(.+)\n/).map do |entry|
|
120
|
-
reg["name"]=entry[1].strip if entry[0]=~/Name/i
|
121
|
-
reg["organization"]=entry[1].strip if entry[0]=~/Organisation/i
|
122
|
-
reg["email"]=entry[1].strip if entry[0]=~ /Email/i
|
123
|
-
reg["phone"]=entry[1].strip if entry[0]=~ /Phone/i
|
124
|
-
end
|
125
|
-
line_num=1
|
126
|
-
addr.each do |line|
|
127
|
-
reg["address"]=line.strip if line_num==2
|
128
|
-
reg["city"]=line.strip if line_num==3
|
129
|
-
reg["country"]=line.strip if line_num==4
|
130
|
-
line_num=line_num+1
|
131
|
-
end
|
132
|
-
end
|
133
|
-
return reg
|
134
|
-
end
|
135
|
-
# ----------------------------------------------------------------------------
|
136
|
-
|
137
|
-
end
|
138
|
-
end
|
139
|
-
end
|
140
|
-
end
|
@@ -1,118 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
|
7
|
-
#++
|
8
|
-
|
9
|
-
|
10
|
-
require 'whois/record/parser/base'
|
11
|
-
|
12
|
-
|
13
|
-
module Whois
|
14
|
-
class Record
|
15
|
-
class Parser
|
16
|
-
|
17
|
-
# Parser for the whois.markmonitor.com server.
|
18
|
-
#
|
19
|
-
# @see Whois::Record::Parser::Example
|
20
|
-
# The Example parser for the list of all available methods.
|
21
|
-
class WhoisMarkmonitorCom < Base
|
22
|
-
|
23
|
-
property_not_supported :status
|
24
|
-
|
25
|
-
# The server is contacted only in case of a registered domain.
|
26
|
-
property_supported :available? do
|
27
|
-
false
|
28
|
-
end
|
29
|
-
|
30
|
-
property_supported :registered? do
|
31
|
-
!available?
|
32
|
-
end
|
33
|
-
|
34
|
-
|
35
|
-
property_supported :created_on do
|
36
|
-
if content_for_scanner =~ /Created on\.+: (.+)\.\n/
|
37
|
-
Time.parse($1)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
property_supported :updated_on do
|
42
|
-
if content_for_scanner =~ /Record last updated on\.+: (.+)\.\n/
|
43
|
-
Time.parse($1)
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
property_supported :expires_on do
|
48
|
-
if content_for_scanner =~ /Expires on\.+: (.+)\.\n/
|
49
|
-
Time.parse($1)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
|
54
|
-
property_supported :registrar do
|
55
|
-
Record::Registrar.new(
|
56
|
-
:name => content_for_scanner.slice(/Registrar Name: (.+)\n/, 1),
|
57
|
-
:url => content_for_scanner.slice(/Registrar Homepage: (.+)\n/, 1)
|
58
|
-
)
|
59
|
-
end
|
60
|
-
|
61
|
-
property_supported :registrant_contacts do
|
62
|
-
build_contact('Registrant:', Record::Contact::TYPE_REGISTRANT)
|
63
|
-
end
|
64
|
-
|
65
|
-
property_supported :admin_contacts do
|
66
|
-
build_contact('Administrative Contact:', Record::Contact::TYPE_ADMIN)
|
67
|
-
end
|
68
|
-
|
69
|
-
property_supported :technical_contacts do
|
70
|
-
build_contact('Technical Contact, Zone Contact:', Record::Contact::TYPE_TECHNICAL)
|
71
|
-
end
|
72
|
-
|
73
|
-
|
74
|
-
property_supported :nameservers do
|
75
|
-
if content_for_scanner =~ /Domain servers in listed order:\n\n((?:\s*[^\s\n]+\n)+)/
|
76
|
-
$1.split("\n").map do |line|
|
77
|
-
Record::Nameserver.new(:name => line.strip)
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
|
83
|
-
private
|
84
|
-
|
85
|
-
def build_contact(element, type)
|
86
|
-
match = content_for_scanner.slice(/#{element}\n((.+\n){6})/, 1)
|
87
|
-
return unless match
|
88
|
-
|
89
|
-
lines = match.split("\n").map(&:strip)
|
90
|
-
|
91
|
-
# 0 DNS Admin
|
92
|
-
# 1 Google Inc.
|
93
|
-
# 2 1600 Amphitheatre Parkway
|
94
|
-
# 3 Mountain View CA 94043
|
95
|
-
# 4 US
|
96
|
-
# 5 dns-admin@google.com +1.6506234000 Fax: +1.6506188571
|
97
|
-
city, state, zip = lines[3].scan(/^(.+) ([A-Z]{2}) ([0-9]+)$/).first
|
98
|
-
email, phone, fax = lines[5].scan(/^(.+) (.+) Fax: (.+)$/).first
|
99
|
-
Record::Contact.new(
|
100
|
-
:type => type,
|
101
|
-
:name => lines[0],
|
102
|
-
:organization => lines[1],
|
103
|
-
:address => lines[2],
|
104
|
-
:city => city,
|
105
|
-
:state => state,
|
106
|
-
:zip => zip,
|
107
|
-
:country_code => lines[4],
|
108
|
-
:email => email,
|
109
|
-
:phone => phone,
|
110
|
-
:fax => fax
|
111
|
-
)
|
112
|
-
end
|
113
|
-
|
114
|
-
end
|
115
|
-
|
116
|
-
end
|
117
|
-
end
|
118
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
|
7
|
-
#++
|
8
|
-
|
9
|
-
require 'whois/record/parser/base'
|
10
|
-
|
11
|
-
module Whois
|
12
|
-
class Record
|
13
|
-
class Parser
|
14
|
-
|
15
|
-
# Parser for the whois.corporatedomains.com server, added by Yang Li 02/05/2013.
|
16
|
-
class WhoisMelbourneitCom < Base
|
17
|
-
|
18
|
-
property_supported :admin_contacts do
|
19
|
-
build_contact("Admin Name", Whois::Record::Contact::TYPE_ADMIN)
|
20
|
-
end
|
21
|
-
|
22
|
-
property_supported :registrant_contacts do
|
23
|
-
build_contact("Domain Name", Whois::Record::Contact::TYPE_REGISTRANT)
|
24
|
-
end
|
25
|
-
|
26
|
-
property_supported :technical_contacts do
|
27
|
-
build_contact("Tech Name", Whois::Record::Contact::TYPE_TECHNICAL)
|
28
|
-
end
|
29
|
-
|
30
|
-
property_not_supported :billing_contacts
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def build_contact(element, type)
|
35
|
-
reg=Record::Contact.new(:type => type)
|
36
|
-
if content_for_scanner =~ /^#{element}\.+((.+\n)+)\n/i
|
37
|
-
line_num=1
|
38
|
-
addrs=''
|
39
|
-
$1.split(%r{\n}).each do |entry|
|
40
|
-
reg["name"]=entry if line_num==1
|
41
|
-
reg["organization"]=entry.strip.split(%r{\.\s}).last if entry =~ /Organisation Name/i
|
42
|
-
reg["phone"]=entry.strip.split(%r{\.\s}).last.strip if entry =~ /Phone/i
|
43
|
-
reg["fax"]=entry.strip.split(%r{\.\s}).last.strip if entry =~ /Fax/i
|
44
|
-
reg["email"]=entry.strip.split(%r{\.\s}).last.strip if entry =~ /Email/i
|
45
|
-
if entry =~ /Address\./i && !entry.strip.split(%r{\.\s})[1].nil?
|
46
|
-
addrs = addrs + entry.strip.split(%r{\.\s})[1] + ", "
|
47
|
-
end
|
48
|
-
reg["address"]=addrs
|
49
|
-
line_num=line_num+1
|
50
|
-
end
|
51
|
-
end
|
52
|
-
return reg
|
53
|
-
end
|
54
|
-
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
@@ -1,96 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
|
7
|
-
#++
|
8
|
-
|
9
|
-
|
10
|
-
require 'whois/record/parser/base'
|
11
|
-
|
12
|
-
|
13
|
-
module Whois
|
14
|
-
class Record
|
15
|
-
class Parser
|
16
|
-
|
17
|
-
#
|
18
|
-
# = whois.nic.as parser
|
19
|
-
#
|
20
|
-
# Parser for the whois.nic.as server.
|
21
|
-
#
|
22
|
-
# NOTE: This parser is just a stub and provides only a few basic methods
|
23
|
-
# to check for domain availability and get domain status.
|
24
|
-
# Please consider to contribute implementing missing methods.
|
25
|
-
# See WhoisNicIt parser for an explanation of all available methods
|
26
|
-
# and examples.
|
27
|
-
#
|
28
|
-
class WhoisNicAs < Base
|
29
|
-
|
30
|
-
property_supported :status do
|
31
|
-
if available?
|
32
|
-
:available
|
33
|
-
else
|
34
|
-
:registered
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
property_supported :available? do
|
39
|
-
!!(content_for_scanner =~ /Domain Not Found/)
|
40
|
-
end
|
41
|
-
|
42
|
-
property_supported :registered? do
|
43
|
-
!available?
|
44
|
-
end
|
45
|
-
|
46
|
-
property_not_supported :created_on
|
47
|
-
|
48
|
-
property_not_supported :updated_on
|
49
|
-
|
50
|
-
property_not_supported :expires_on
|
51
|
-
|
52
|
-
property_supported :nameservers do
|
53
|
-
if content_for_scanner =~ /Nameservers:\s((.+\n)+)\n/
|
54
|
-
$1.split("\n").reject { |value| value.strip.empty? }.map do |line|
|
55
|
-
line.strip =~ /(.+) \((.+)\)/
|
56
|
-
Record::Nameserver.new(:name => $1, :ipv4 => $2)
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
# The following methods are implemented by Yang Li on 02/092013
|
62
|
-
# ----------------------------------------------------------------------------
|
63
|
-
property_supported :domain do
|
64
|
-
return $1 if content_for_scanner =~ /Name:\s+(.*)\n/i
|
65
|
-
end
|
66
|
-
|
67
|
-
property_not_supported :domain_id
|
68
|
-
|
69
|
-
property_not_supported :registrar
|
70
|
-
|
71
|
-
property_supported :registrant_contacts do
|
72
|
-
build_contact("Registered by", Whois::Record::Contact::TYPE_REGISTRANT)
|
73
|
-
end
|
74
|
-
|
75
|
-
property_not_supported :admin_contacts
|
76
|
-
|
77
|
-
property_not_supported :technical_contacts
|
78
|
-
|
79
|
-
property_not_supported :billing_contacts
|
80
|
-
|
81
|
-
private
|
82
|
-
|
83
|
-
def build_contact(element, type)
|
84
|
-
reg=Record::Contact.new(:type => type)
|
85
|
-
content_for_scanner.scan(/^(#{element}.*):\s+(.+)\n/).map do |entry|
|
86
|
-
reg["name"]=entry[1] if entry[0] =~ /#{element}/i
|
87
|
-
reg["organization"]=entry[1] if entry[0]=~ /#{element}/i
|
88
|
-
end
|
89
|
-
return reg
|
90
|
-
end
|
91
|
-
# ----------------------------------------------------------------------------
|
92
|
-
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
@@ -1,109 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Ruby Whois
|
3
|
-
#
|
4
|
-
# An intelligent pure Ruby WHOIS client and parser.
|
5
|
-
#
|
6
|
-
# Copyright (c) 2009-2012 Simone Carletti <weppos@weppos.net>
|
7
|
-
#++
|
8
|
-
|
9
|
-
|
10
|
-
require 'whois/record/parser/base'
|
11
|
-
|
12
|
-
|
13
|
-
module Whois
|
14
|
-
class Record
|
15
|
-
class Parser
|
16
|
-
|
17
|
-
# Parser for the whois.nic.at server.
|
18
|
-
#
|
19
|
-
# @note This parser is just a stub and provides only a few basic methods
|
20
|
-
# to check for domain availability and get domain status.
|
21
|
-
# Please consider to contribute implementing missing methods.
|
22
|
-
#
|
23
|
-
# @see Whois::Record::Parser::Example
|
24
|
-
# The Example parser for the list of all available methods.
|
25
|
-
#
|
26
|
-
class WhoisNicAt < Base
|
27
|
-
|
28
|
-
property_supported :status do
|
29
|
-
if available?
|
30
|
-
:available
|
31
|
-
else
|
32
|
-
:registered
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
property_supported :available? do
|
37
|
-
!!(content_for_scanner =~ /% nothing found/)
|
38
|
-
end
|
39
|
-
|
40
|
-
property_supported :registered? do
|
41
|
-
!available?
|
42
|
-
end
|
43
|
-
|
44
|
-
|
45
|
-
property_not_supported :created_on
|
46
|
-
|
47
|
-
property_supported :updated_on do
|
48
|
-
if content_for_scanner =~ /changed:\s+(.*)\n/
|
49
|
-
Time.parse($1)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
property_not_supported :expires_on
|
54
|
-
|
55
|
-
|
56
|
-
property_supported :nameservers do
|
57
|
-
content_for_scanner.scan(/nserver:\s+(.+)\n/).flatten.map do |name|
|
58
|
-
Record::Nameserver.new(:name => name)
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
# The following methods are implemented by Yang Li on 01/29/2013
|
63
|
-
# ----------------------------------------------------------------------------
|
64
|
-
property_supported :domain do
|
65
|
-
return $1 if content_for_scanner =~ /domain:\s+(.*)\n/i
|
66
|
-
end
|
67
|
-
|
68
|
-
property_not_supported :domain_id
|
69
|
-
|
70
|
-
property_not_supported :registrar
|
71
|
-
|
72
|
-
property_supported :admin_contacts do
|
73
|
-
build_contact(1, Whois::Record::Contact::TYPE_ADMIN)
|
74
|
-
end
|
75
|
-
|
76
|
-
property_supported :registrant_contacts do
|
77
|
-
build_contact(0, Whois::Record::Contact::TYPE_REGISTRANT)
|
78
|
-
end
|
79
|
-
|
80
|
-
property_supported :technical_contacts do
|
81
|
-
build_contact(2, Whois::Record::Contact::TYPE_TECHNICAL)
|
82
|
-
end
|
83
|
-
|
84
|
-
property_not_supported :billing_contacts
|
85
|
-
|
86
|
-
private
|
87
|
-
|
88
|
-
def build_contact(index, type)
|
89
|
-
reg=Record::Contact.new(:type => type)
|
90
|
-
contacts=content_for_scanner.scan(/^(personname:.+\n((.+\n)+))\n/)
|
91
|
-
contacts[index][0].scan(/(.+):(.+)\n/).map do |entry|
|
92
|
-
reg["id"]=entry[1].strip if entry[0] =~ /nic-hdl/i
|
93
|
-
reg["name"]=entry[1].strip if entry[0] =~ /personname/i
|
94
|
-
reg["organization"]=entry[1].strip if entry[0]=~ /organization/i
|
95
|
-
reg["address"]=entry[1].strip if entry[0]=~ /street\saddress/i
|
96
|
-
reg["city"]= entry[1].strip if entry[0]=~ /city/i
|
97
|
-
reg["zip"]=entry[1].strip if entry[0]=~ /postal\scode/i
|
98
|
-
reg["country"]=entry[1].strip if entry[0]=~ /country/i
|
99
|
-
reg["phone"]=entry[1].strip if entry[0]=~ /phone/i
|
100
|
-
reg["fax"]=entry[1].strip if entry[0]=~ /fax\-no/i
|
101
|
-
reg["email"]=entry[1].strip if entry[0]=~ /e\-mail/i
|
102
|
-
end
|
103
|
-
return reg
|
104
|
-
end
|
105
|
-
# ----------------------------------------------------------------------------
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|