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,141 +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.ch parser
|
19
|
-
#
|
20
|
-
# Parser for the whois.nic.ch 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 WhoisNicCh < 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 =~ /We do not have an entry/)
|
40
|
-
end
|
41
|
-
|
42
|
-
property_supported :registered? do
|
43
|
-
!available?
|
44
|
-
end
|
45
|
-
|
46
|
-
|
47
|
-
property_not_supported :created_on
|
48
|
-
|
49
|
-
property_not_supported :updated_on
|
50
|
-
|
51
|
-
property_not_supported :expires_on
|
52
|
-
|
53
|
-
|
54
|
-
# Nameservers are listed in the following formats:
|
55
|
-
#
|
56
|
-
# ns1.citrin.ch
|
57
|
-
# ns1.citrin.ch [193.247.72.8]
|
58
|
-
#
|
59
|
-
property_supported :nameservers do
|
60
|
-
if content_for_scanner =~ /Name servers:\n((.+\n)+)(?:\n|\z)/
|
61
|
-
list = {}
|
62
|
-
order = []
|
63
|
-
$1.split("\n").map do |line|
|
64
|
-
if line =~ /(.+)\t\[(.+)\]/
|
65
|
-
name, ip = $1, $2
|
66
|
-
order << name unless order.include?(name)
|
67
|
-
list[name] ||= Record::Nameserver.new(:name => name)
|
68
|
-
list[name].ipv4 = ip if Whois::Server.valid_ipv4?(ip)
|
69
|
-
list[name].ipv6 = ip if Whois::Server.valid_ipv6?(ip)
|
70
|
-
else
|
71
|
-
order << line unless order.include?(line)
|
72
|
-
list[line] ||= Record::Nameserver.new(:name => line)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
order.map { |name| list[name] }
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
# The following methods are implemented by Yang Li on 01/29/2013
|
80
|
-
# ----------------------------------------------------------------------------
|
81
|
-
property_supported :domain do
|
82
|
-
return $1 if content_for_scanner =~ /Domain name:\n(.+\..+)\n/i
|
83
|
-
end
|
84
|
-
|
85
|
-
property_not_supported :domain_id
|
86
|
-
|
87
|
-
property_not_supported :registrar
|
88
|
-
|
89
|
-
property_not_supported :admin_contacts
|
90
|
-
|
91
|
-
property_supported :registrant_contacts do
|
92
|
-
build_contact("Holder of domain name", Whois::Record::Contact::TYPE_REGISTRANT)
|
93
|
-
end
|
94
|
-
|
95
|
-
property_supported :technical_contacts do
|
96
|
-
build_tech_contact("Technical Contact", Whois::Record::Contact::TYPE_TECHNICAL)
|
97
|
-
end
|
98
|
-
|
99
|
-
property_not_supported :billing_contacts
|
100
|
-
|
101
|
-
private
|
102
|
-
|
103
|
-
def build_contact(element, type)
|
104
|
-
reg=Record::Contact.new(:type => type)
|
105
|
-
if content_for_scanner =~ /^(#{element}:\n(.+\n)+)\n/i
|
106
|
-
line_num=1
|
107
|
-
$1.split(%r{\n}).each do |line|
|
108
|
-
reg["name"]=line.strip if line_num==3
|
109
|
-
reg["organization"]=line.strip if line_num==2
|
110
|
-
reg["address"]=line.strip if line_num==4
|
111
|
-
reg["city"]=line.strip if line_num==5
|
112
|
-
reg["country"]=line.strip if line_num==6
|
113
|
-
line_num=line_num+1
|
114
|
-
end
|
115
|
-
end
|
116
|
-
return reg
|
117
|
-
end
|
118
|
-
|
119
|
-
def build_tech_contact(element, type)
|
120
|
-
reg=Record::Contact.new(:type => type)
|
121
|
-
if content_for_scanner =~ /^(#{element}:\n(.+\n)+)\n/i
|
122
|
-
line_num=1
|
123
|
-
$1.split(%r{\n}).each do |line|
|
124
|
-
reg["organization"]=line.strip if line_num==2
|
125
|
-
reg["name"]=line.strip if line_num==3
|
126
|
-
addrs=line.strip if line_num==4
|
127
|
-
addrs="#{addrs}"+"\n"+line.strip if line_num==5
|
128
|
-
reg["address"]=addrs if line_num==5
|
129
|
-
reg["city"]=line.strip if line_num==6
|
130
|
-
reg["country"]=line.strip if line_num==7
|
131
|
-
line_num=line_num+1
|
132
|
-
end
|
133
|
-
end
|
134
|
-
return reg
|
135
|
-
end
|
136
|
-
# ----------------------------------------------------------------------------
|
137
|
-
|
138
|
-
end
|
139
|
-
end
|
140
|
-
end
|
141
|
-
end
|
@@ -1,117 +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.cl parser
|
19
|
-
#
|
20
|
-
# Parser for the whois.nic.cl 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 WhoisNicCl < 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 =~ /^(.+?): no existe$/)
|
40
|
-
end
|
41
|
-
|
42
|
-
property_supported :registered? do
|
43
|
-
!available?
|
44
|
-
end
|
45
|
-
|
46
|
-
property_not_supported :created_on
|
47
|
-
|
48
|
-
# TODO: custom date format with foreign month names
|
49
|
-
# property_supported :updated_on do
|
50
|
-
# if content_for_scanner =~ /changed:\s+(.*)\n/
|
51
|
-
# Time.parse($1.split(" ", 2).last)
|
52
|
-
# end
|
53
|
-
# end
|
54
|
-
|
55
|
-
property_not_supported :expires_on
|
56
|
-
|
57
|
-
property_supported :updated_on do
|
58
|
-
if content_for_scanner =~ /\(data repository last updated on\):\s*(.+)\n/
|
59
|
-
Time.utc(*$1.split("/").reverse)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
property_supported :nameservers do
|
64
|
-
if content_for_scanner =~ /Servidores de nombre \(Domain servers\):\n((.+\n)+)\n/
|
65
|
-
$1.split("\n").map do |line|
|
66
|
-
line.strip!
|
67
|
-
line =~ /(.+) \((.+)\)/
|
68
|
-
Record::Nameserver.new(:name => $1, :ipv4 => $2)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
# The following methods are implemented by Yang Li on 01/24/2013
|
74
|
-
# ----------------------------------------------------------------------------
|
75
|
-
property_supported :domain do
|
76
|
-
return $1 if content_for_scanner =~ /ACE:\s+(.+)\s*.+\n/i
|
77
|
-
end
|
78
|
-
|
79
|
-
property_supported :registrant_contacts do
|
80
|
-
build_contact_rc(Whois::Record::Contact::TYPE_REGISTRANT)
|
81
|
-
end
|
82
|
-
|
83
|
-
property_supported :admin_contacts do
|
84
|
-
build_contact("Administrative Contact", Whois::Record::Contact::TYPE_ADMIN)
|
85
|
-
end
|
86
|
-
|
87
|
-
property_supported :technical_contacts do
|
88
|
-
build_contact("Technical Contact", Whois::Record::Contact::TYPE_TECHNICAL)
|
89
|
-
end
|
90
|
-
|
91
|
-
property_not_supported :billing_contacts
|
92
|
-
|
93
|
-
private
|
94
|
-
|
95
|
-
def build_contact(element, type)
|
96
|
-
reg=Record::Contact.new(:type => type)
|
97
|
-
if content_for_scanner.scan =~ /#{element}\):\n((.+\n)+)\n/
|
98
|
-
$1.scan(/^(.+):(.+)\n/).map do |entry|
|
99
|
-
reg["name"]=entry[1] if entry[0] =~ /Nombre/i
|
100
|
-
reg["organization"]=entry[1] if entry[0]=~ /Organiz/i
|
101
|
-
end
|
102
|
-
end
|
103
|
-
return reg
|
104
|
-
end
|
105
|
-
|
106
|
-
def build_contact_rc(type)
|
107
|
-
reg=Record::Contact.new(:type => type)
|
108
|
-
reg["name"]=content_for_scanner.split(%r{\n})[4].strip
|
109
|
-
reg["organization"]=content_for_scanner.split(%r{\n})[4].strip
|
110
|
-
return reg
|
111
|
-
end
|
112
|
-
# ----------------------------------------------------------------------------
|
113
|
-
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
@@ -1,157 +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.ec parser
|
19
|
-
#
|
20
|
-
# Parser for the whois.nic.ec 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 WhoisNicEc < 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 registered/)
|
40
|
-
end
|
41
|
-
|
42
|
-
property_supported :registered? do
|
43
|
-
!available?
|
44
|
-
end
|
45
|
-
|
46
|
-
property_supported :created_on do
|
47
|
-
t=build_node("Created",content_for_scanner)
|
48
|
-
Time.parse(t)
|
49
|
-
end
|
50
|
-
|
51
|
-
property_supported :updated_on do
|
52
|
-
t=build_node("Modified",content_for_scanner)
|
53
|
-
Time.parse(t)
|
54
|
-
end
|
55
|
-
|
56
|
-
property_supported :expires_on do
|
57
|
-
t=build_node("Expires",content_for_scanner)
|
58
|
-
Time.parse(t)
|
59
|
-
end
|
60
|
-
|
61
|
-
property_supported :nameservers do
|
62
|
-
if content_for_scanner =~ /Servidores de dominio \(Name Servers\)\n((.+\n)+)\n/
|
63
|
-
$1.split("\n").map do |name|
|
64
|
-
Record::Nameserver.new(:name => name)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
# The following methods are implemented by Yang Li on 03/04/2013
|
70
|
-
# ----------------------------------------------------------------------------
|
71
|
-
property_supported :domain do
|
72
|
-
return build_node("Query",content_for_scanner)
|
73
|
-
end
|
74
|
-
|
75
|
-
property_not_supported :domain_id
|
76
|
-
|
77
|
-
property_supported :registrar do
|
78
|
-
reg=Record::Registrar.new
|
79
|
-
if content_for_scanner =~ /^Registrar Information\n((.+\n)+)\n/
|
80
|
-
registrar=$1
|
81
|
-
reg["name"] = build_node("Registrar Name", registrar)
|
82
|
-
reg["organization"] = build_node("Registrar Name", registrar)
|
83
|
-
reg["url"] = build_node("Registration URL", registrar)
|
84
|
-
reg["country"] = build_node("Country", registrar)
|
85
|
-
end
|
86
|
-
return reg
|
87
|
-
end
|
88
|
-
|
89
|
-
property_supported :registrant_contacts do
|
90
|
-
build_contact("Registrant", Whois::Record::Contact::TYPE_REGISTRANT)
|
91
|
-
end
|
92
|
-
|
93
|
-
property_supported :admin_contacts do
|
94
|
-
build_contact("Admin Contact", Whois::Record::Contact::TYPE_ADMIN)
|
95
|
-
end
|
96
|
-
|
97
|
-
property_supported :technical_contacts do
|
98
|
-
build_contact("Technical Contact", Whois::Record::Contact::TYPE_TECHNICAL)
|
99
|
-
end
|
100
|
-
|
101
|
-
property_supported :billing_contacts do
|
102
|
-
build_contact("Billing Contact", Whois::Record::Contact::TYPE_BILLING)
|
103
|
-
end
|
104
|
-
|
105
|
-
private
|
106
|
-
|
107
|
-
def build_contact(element, type)
|
108
|
-
reg=Record::Contact.new(:type => type)
|
109
|
-
if content_for_scanner =~ /^#{element}:\n((.+\n)+)\n\n/
|
110
|
-
contact=$1
|
111
|
-
reg["name"]=build_node("Name", contact)
|
112
|
-
reg["organization"]=build_node("Organisation", contact)
|
113
|
-
if contact =~ /^(Address:\n(.+\n)+)/
|
114
|
-
addrs=$1
|
115
|
-
myaddr=build_address(addrs)
|
116
|
-
reg["address"]=myaddr["address"]
|
117
|
-
reg["city"]=myaddr["city"]
|
118
|
-
reg["zip"]=myaddr["zip"]
|
119
|
-
reg["state"]=myaddr["state"]
|
120
|
-
reg["country_code"]=myaddr["country_code"]
|
121
|
-
end
|
122
|
-
reg["phone"]=build_node("Phone Number",contact)
|
123
|
-
reg["fax"]=build_node("Fax Number",contact)
|
124
|
-
reg["email"]=build_node("Email Address",contact)
|
125
|
-
end
|
126
|
-
return reg
|
127
|
-
end
|
128
|
-
|
129
|
-
def build_node(element,context)
|
130
|
-
return $1.strip if context =~ /^#{element}:(.+)\n/i
|
131
|
-
end
|
132
|
-
|
133
|
-
def build_address(context)
|
134
|
-
addr=Hash.new
|
135
|
-
line_num=1
|
136
|
-
context.split(%r{\n}).each do |line|
|
137
|
-
line=line.chomp.strip
|
138
|
-
addr["address"]=line if line_num==2
|
139
|
-
addr["country_code"]=line if line_num==4
|
140
|
-
if line_num==3
|
141
|
-
addr["city"]=line.split(',')[0]
|
142
|
-
zips=line.split(',')[1].split(' ')
|
143
|
-
unless zips.nil?
|
144
|
-
addr["state"]=zips.shift
|
145
|
-
addr["zip"]=zips.join(' ')
|
146
|
-
end
|
147
|
-
end
|
148
|
-
line_num=line_num+1
|
149
|
-
end
|
150
|
-
return addr
|
151
|
-
end
|
152
|
-
# ----------------------------------------------------------------------------
|
153
|
-
end
|
154
|
-
|
155
|
-
end
|
156
|
-
end
|
157
|
-
end
|
@@ -1,120 +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.im parser
|
19
|
-
#
|
20
|
-
# Parser for the whois.nic.im 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 WhoisNicIm < 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 =~ /was 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_supported :expires_on do
|
51
|
-
if content_for_scanner =~ /Expiry Date:\s+(.*?)\n/
|
52
|
-
Time.parse($1.gsub("/", "-"))
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
property_supported :nameservers do
|
57
|
-
content_for_scanner.scan(/Name Server:\s+(.+)\n/).flatten.map do |name|
|
58
|
-
Record::Nameserver.new(:name => name.chomp("."))
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
# The following methods are implemented by Yang Li on 02/04/2013
|
63
|
-
# ----------------------------------------------------------------------------
|
64
|
-
property_supported :domain do
|
65
|
-
return $1 if content_for_scanner =~ /Domain Name:\s+(.*)\n/i
|
66
|
-
end
|
67
|
-
|
68
|
-
property_not_supported :domain_id
|
69
|
-
|
70
|
-
property_supported :registrar do
|
71
|
-
reg=Record::Registrar.new
|
72
|
-
if content_for_scanner =~ /^Domain Managers\n((.+\n)+)^Administrative\sContact\n/
|
73
|
-
$1.scan(/(.+):(.+)\n/).map do |entry|
|
74
|
-
reg["name"] = entry[1] if entry[0] =~ /Name/i
|
75
|
-
reg["organization"] = entry[1] if entry[0] =~ /Name/i
|
76
|
-
end
|
77
|
-
end
|
78
|
-
return reg
|
79
|
-
end
|
80
|
-
|
81
|
-
property_not_supported :admin_contacts do
|
82
|
-
build_contact("Administrative Contact", Whois::Record::Contact::TYPE_ADMIN)
|
83
|
-
end
|
84
|
-
|
85
|
-
property_supported :registrant_contacts do
|
86
|
-
build_contact("Registrant", Whois::Record::Contact::TYPE_REGISTRANT)
|
87
|
-
end
|
88
|
-
|
89
|
-
property_supported :technical_contacts do
|
90
|
-
build_contact("Technical Contact", Whois::Record::Contact::TYPE_TECHNICAL)
|
91
|
-
end
|
92
|
-
|
93
|
-
property_supported :billing_contacts do
|
94
|
-
build_contact("Billing Contact", Whois::Record::Contact::TYPE_BILLING)
|
95
|
-
end
|
96
|
-
|
97
|
-
private
|
98
|
-
|
99
|
-
def build_contact(element, type)
|
100
|
-
reg=Record::Contact.new(:type => type)
|
101
|
-
if content_for_scanner =~ /#{element}\n((.+\n)+)/i
|
102
|
-
line_num=1
|
103
|
-
$1.split(%r{\n}).each do |line|
|
104
|
-
reg["name"]=line.split(':')[1].strip if line_num==1
|
105
|
-
reg["organization"]=line.split(':')[1].strip if line_num==1
|
106
|
-
reg["address"]=line.strip if line_num==3
|
107
|
-
reg["city"]=line.strip if line_num==4
|
108
|
-
reg["zip"]=line.strip if line_num==5
|
109
|
-
reg["country"]=line.strip if line_num==6
|
110
|
-
line_num=line_num+1
|
111
|
-
end
|
112
|
-
end
|
113
|
-
return reg
|
114
|
-
end
|
115
|
-
# ----------------------------------------------------------------------------
|
116
|
-
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
120
|
-
end
|