wmap 2.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +141 -0
- data/LICENSE.txt +15 -0
- data/README.rdoc +98 -0
- data/TODO +13 -0
- data/bin/deprime +21 -0
- data/bin/distrust +38 -0
- data/bin/googleBot +23 -0
- data/bin/prime +21 -0
- data/bin/refresh +26 -0
- data/bin/run_tests +16 -0
- data/bin/spiderBot +26 -0
- data/bin/trust +38 -0
- data/bin/updateAll +57 -0
- data/bin/wadd +25 -0
- data/bin/wadds +26 -0
- data/bin/wcheck +28 -0
- data/bin/wdel +25 -0
- data/bin/wdump +21 -0
- data/bin/wmap +151 -0
- data/bin/wscan +32 -0
- data/data/cidrs +2 -0
- data/data/deactivated_sites +1 -0
- data/data/domains +2 -0
- data/data/hosts +1 -0
- data/data/prime_hosts +1 -0
- data/data/sites +2 -0
- data/data/sub_domains +2 -0
- data/demos/bruter.rb +27 -0
- data/demos/dns_brutes.rb +28 -0
- data/demos/filter_cidr.rb +18 -0
- data/demos/filter_crawls.rb +5 -0
- data/demos/filter_domain.rb +25 -0
- data/demos/filter_geoip.rb +26 -0
- data/demos/filter_known_services.rb +59 -0
- data/demos/filter_netinfo.rb +23 -0
- data/demos/filter_prime.rb +25 -0
- data/demos/filter_profiler.rb +3 -0
- data/demos/filter_redirection.rb +19 -0
- data/demos/filter_site.rb +40 -0
- data/demos/filter_siteip.rb +31 -0
- data/demos/filter_status.rb +17 -0
- data/demos/filter_timestamp.rb +23 -0
- data/demos/filter_url.rb +19 -0
- data/demos/new_fnd.rb +66 -0
- data/demos/nmap_parser.pl +138 -0
- data/demos/site_format.rb +18 -0
- data/demos/whois_domain.rb +78 -0
- data/dicts/GeoIP.dat +0 -0
- data/dicts/GeoIPASNum.dat +0 -0
- data/dicts/GeoLiteCity.dat +0 -0
- data/dicts/ccsld.txt +2646 -0
- data/dicts/cctld.txt +243 -0
- data/dicts/gtld.txt +25 -0
- data/dicts/hostnames-dict.big +1402 -0
- data/dicts/hostnames-dict.txt +101 -0
- data/lib/wmap/cidr_tracker.rb +327 -0
- data/lib/wmap/dns_bruter.rb +308 -0
- data/lib/wmap/domain_tracker/sub_domain.rb +142 -0
- data/lib/wmap/domain_tracker.rb +342 -0
- data/lib/wmap/geoip_tracker.rb +72 -0
- data/lib/wmap/google_search_scraper.rb +177 -0
- data/lib/wmap/host_tracker/primary_host.rb +130 -0
- data/lib/wmap/host_tracker.rb +550 -0
- data/lib/wmap/network_profiler.rb +144 -0
- data/lib/wmap/port_scanner.rb +208 -0
- data/lib/wmap/site_tracker/deactivated_site.rb +85 -0
- data/lib/wmap/site_tracker.rb +937 -0
- data/lib/wmap/url_checker.rb +314 -0
- data/lib/wmap/url_crawler.rb +381 -0
- data/lib/wmap/utils/domain_root.rb +184 -0
- data/lib/wmap/utils/logger.rb +53 -0
- data/lib/wmap/utils/url_magic.rb +343 -0
- data/lib/wmap/utils/utils.rb +333 -0
- data/lib/wmap/whois.rb +76 -0
- data/lib/wmap.rb +227 -0
- data/logs/wmap.log +17 -0
- data/ruby_whois_patches/base_cocca2.rb +149 -0
- data/ruby_whois_patches/kero.yachay.pe.rb +120 -0
- data/ruby_whois_patches/whois.PublicDomainRegistry.com.rb +124 -0
- data/ruby_whois_patches/whois.above.com.rb +61 -0
- data/ruby_whois_patches/whois.adamsnames.tc.rb +107 -0
- data/ruby_whois_patches/whois.aeda.net.ae.rb +105 -0
- data/ruby_whois_patches/whois.ai.rb +112 -0
- data/ruby_whois_patches/whois.arnes.si.rb +121 -0
- data/ruby_whois_patches/whois.ascio.com.rb +91 -0
- data/ruby_whois_patches/whois.cnnic.cn.rb +123 -0
- data/ruby_whois_patches/whois.corporatedomains.com.rb +67 -0
- data/ruby_whois_patches/whois.crsnic.net.rb +108 -0
- data/ruby_whois_patches/whois.denic.de.rb +174 -0
- data/ruby_whois_patches/whois.dk-hostmaster.dk.rb +120 -0
- data/ruby_whois_patches/whois.dns.be.rb +134 -0
- data/ruby_whois_patches/whois.dns.lu.rb +129 -0
- data/ruby_whois_patches/whois.dns.pl.rb +150 -0
- data/ruby_whois_patches/whois.dns.pt.rb +119 -0
- data/ruby_whois_patches/whois.domain.kg.rb +126 -0
- data/ruby_whois_patches/whois.domainregistry.my.rb +123 -0
- data/ruby_whois_patches/whois.domreg.lt.rb +110 -0
- data/ruby_whois_patches/whois.dot.tk.rb +140 -0
- data/ruby_whois_patches/whois.hkirc.hk.rb +121 -0
- data/ruby_whois_patches/whois.isnic.is.rb +130 -0
- data/ruby_whois_patches/whois.je.rb +119 -0
- data/ruby_whois_patches/whois.jprs.jp.rb +137 -0
- data/ruby_whois_patches/whois.kenic.or.ke.rb +140 -0
- data/ruby_whois_patches/whois.markmonitor.com.rb +118 -0
- data/ruby_whois_patches/whois.melbourneit.com.rb +58 -0
- data/ruby_whois_patches/whois.nic.as.rb +96 -0
- data/ruby_whois_patches/whois.nic.at.rb +109 -0
- data/ruby_whois_patches/whois.nic.ch.rb +141 -0
- data/ruby_whois_patches/whois.nic.cl.rb +117 -0
- data/ruby_whois_patches/whois.nic.ec.rb +157 -0
- data/ruby_whois_patches/whois.nic.im.rb +120 -0
- data/ruby_whois_patches/whois.nic.it.rb +170 -0
- data/ruby_whois_patches/whois.nic.lv.rb +116 -0
- data/ruby_whois_patches/whois.nic.ly.rb +127 -0
- data/ruby_whois_patches/whois.nic.mu.rb +27 -0
- data/ruby_whois_patches/whois.nic.mx.rb +123 -0
- data/ruby_whois_patches/whois.nic.net.sa.rb +111 -0
- data/ruby_whois_patches/whois.nic.or.kr.rb +101 -0
- data/ruby_whois_patches/whois.nic.tel.rb +129 -0
- data/ruby_whois_patches/whois.nic.tr.rb +133 -0
- data/ruby_whois_patches/whois.nic.us.rb +129 -0
- data/ruby_whois_patches/whois.nic.ve.rb +135 -0
- data/ruby_whois_patches/whois.norid.no.rb +127 -0
- data/ruby_whois_patches/whois.pandi.or.id.rb +118 -0
- data/ruby_whois_patches/whois.psi-usa.info.rb +63 -0
- data/ruby_whois_patches/whois.registro.br.rb +109 -0
- data/ruby_whois_patches/whois.registrygate.com.rb +55 -0
- data/ruby_whois_patches/whois.rrpproxy.net.rb +61 -0
- data/ruby_whois_patches/whois.sgnic.sg.rb +130 -0
- data/ruby_whois_patches/whois.srs.net.nz.rb +166 -0
- data/ruby_whois_patches/whois.tucows.com.rb +70 -0
- data/ruby_whois_patches/whois.twnic.net.tw.rb +133 -0
- data/settings/discovery_ports +24 -0
- data/settings/google_keywords.txt +9 -0
- data/settings/google_locator.txt +23 -0
- data/test/domain_tracker_test.rb +31 -0
- data/test/utils_test.rb +168 -0
- data/version.txt +13 -0
- data/wmap.gemspec +49 -0
- metadata +202 -0
@@ -0,0 +1,55 @@
|
|
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.registrygate.com server, added by Yang Li 02/10/2013.
|
16
|
+
class WhoisRegistrygateCom < Base
|
17
|
+
|
18
|
+
property_supported :admin_contacts do
|
19
|
+
build_contact("admin-", Whois::Record::Contact::TYPE_ADMIN)
|
20
|
+
end
|
21
|
+
|
22
|
+
property_supported :registrant_contacts do
|
23
|
+
build_contact("owner-", Whois::Record::Contact::TYPE_REGISTRANT)
|
24
|
+
end
|
25
|
+
|
26
|
+
property_supported :technical_contacts do
|
27
|
+
build_contact("tech-", 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
|
+
content_for_scanner.scan(/^(#{element}.*):\s+(.+)\n/).map do |entry|
|
37
|
+
reg["id"]=entry[1] if entry[0] =~ /id/i
|
38
|
+
reg["name"]=entry[1] if entry[0] =~ /name/i
|
39
|
+
reg["organization"]=entry[1] if entry[0]=~ /org/i
|
40
|
+
reg["address"]=entry[1] if entry[0]=~ /address/i
|
41
|
+
reg["city"]= entry[1] if entry[0]=~ /city/i
|
42
|
+
reg["zip"]=entry[1] if entry[0]=~ /pcode/i
|
43
|
+
reg["state"]=entry[1] if entry[0]=~ /state/i
|
44
|
+
reg["country_code"]=entry[1] if entry[0]=~ /country/i
|
45
|
+
reg["phone"]=entry[1] if entry[0]=~ /phone/i
|
46
|
+
reg["fax"]=entry[1] if entry[0]=~ /fax/i
|
47
|
+
reg["email"]=entry[1] if entry[0]=~ /email/i
|
48
|
+
end
|
49
|
+
return reg
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,61 @@
|
|
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.rrpproxy.net server, added by Yang Li 02/10/2013.
|
16
|
+
class WhoisRrpproxyNet < Base
|
17
|
+
|
18
|
+
property_supported :admin_contacts do
|
19
|
+
build_contact("admin-", Whois::Record::Contact::TYPE_ADMIN)
|
20
|
+
end
|
21
|
+
|
22
|
+
property_supported :registrant_contacts do
|
23
|
+
build_contact("owner-", Whois::Record::Contact::TYPE_REGISTRANT)
|
24
|
+
end
|
25
|
+
|
26
|
+
property_supported :technical_contacts do
|
27
|
+
build_contact("tech-", 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
|
+
content_for_scanner.scan(/^(#{element}.*):\s*(.+)\n/).map do |entry|
|
37
|
+
reg["id"]=entry[1] if entry[0] =~ /contact/i
|
38
|
+
if entry[0] =~ /(fname|lname)/i
|
39
|
+
if reg["name"].nil?
|
40
|
+
reg["name"]=entry[1]
|
41
|
+
else
|
42
|
+
reg["name"]=reg["name"]+" "+entry[1]
|
43
|
+
end
|
44
|
+
end
|
45
|
+
reg["organization"]=entry[1] if entry[0]=~ /organization/i
|
46
|
+
reg["address"]=entry[1] if entry[0]=~ /street/i
|
47
|
+
reg["city"]= entry[1] if entry[0]=~ /city/i
|
48
|
+
reg["zip"]=entry[1] if entry[0]=~ /zip/i
|
49
|
+
reg["state"]=entry[1] if entry[0]=~ /state/i
|
50
|
+
reg["country_code"]=entry[1] if entry[0]=~ /country/i
|
51
|
+
reg["phone"]=entry[1] if entry[0]=~ /phone/i
|
52
|
+
reg["fax"]=entry[1] if entry[0]=~ /fax/i
|
53
|
+
reg["email"]=entry[1] if entry[0]=~ /email/i
|
54
|
+
end
|
55
|
+
return reg
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,130 @@
|
|
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.sgnic.sg parser
|
19
|
+
#
|
20
|
+
# Parser for the whois.sgnic.sg 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 WhoisSgnicSg < Base
|
29
|
+
|
30
|
+
property_supported :status do
|
31
|
+
content_for_scanner.scan(/^\s+Domain Status:\s+(.+?)\n/).flatten
|
32
|
+
end
|
33
|
+
|
34
|
+
property_supported :available? do
|
35
|
+
!!(content_for_scanner.strip == "Domain Not Found")
|
36
|
+
end
|
37
|
+
|
38
|
+
property_supported :registered? do
|
39
|
+
!available?
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
property_supported :created_on do
|
44
|
+
if content_for_scanner =~ /^\s+Creation Date:\s+(.*)\n/
|
45
|
+
Time.parse($1)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# This method is modified by Yang on 01/15/2013
|
50
|
+
property_supported :updated_on do
|
51
|
+
if content_for_scanner =~ /^\s+Modified Date:\s+(.*)\n/
|
52
|
+
Time.parse($1)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
property_supported :expires_on do
|
57
|
+
if content_for_scanner =~ /^\s+Expiration Date:\s+(.*)\n/
|
58
|
+
Time.parse($1)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
property_supported :nameservers do
|
63
|
+
if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
|
64
|
+
values = case value = $1.downcase
|
65
|
+
# schema-1
|
66
|
+
when /^(?:\s+([\w.-]+)\n){2,}/
|
67
|
+
value.scan(/\s+([\w.-]+)\n/).map do |match|
|
68
|
+
{ :name => match[0] }
|
69
|
+
end
|
70
|
+
when /^(?:\s+([\w.-]+)\s+\((.+)\)\n){2,}/
|
71
|
+
value.scan(/\s+([\w.-]+)\s+\((.+)\)\n/).map do |match|
|
72
|
+
{ :name => match[0], :ipv4 => match[1] }
|
73
|
+
end
|
74
|
+
# schema-2
|
75
|
+
when /^(?:\s+([\w.-]+)){2,}/
|
76
|
+
value.strip.split(/\s+/).map do |name|
|
77
|
+
{ :name => name }
|
78
|
+
end
|
79
|
+
else
|
80
|
+
Whois.bug!(ParserError, "Unknown nameservers format `#{value}'")
|
81
|
+
end
|
82
|
+
|
83
|
+
values.map do |params|
|
84
|
+
Record::Nameserver.new(params)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# The following methods are implemented by Yang on 1/15/2013
|
90
|
+
# ----------------------------------------------------------------------------
|
91
|
+
property_supported :domain do
|
92
|
+
return $1 if content_for_scanner =~ /Domain Name:\s+(.*)\s+\n/i
|
93
|
+
end
|
94
|
+
|
95
|
+
property_not_supported :domain_id
|
96
|
+
|
97
|
+
property_supported :registrar do
|
98
|
+
return $1 if content_for_scanner =~ /Registrar:\s+(.*)\s+\n/i
|
99
|
+
end
|
100
|
+
|
101
|
+
property_supported :admin_contacts do
|
102
|
+
build_contact("Administrative Contact", Whois::Record::Contact::TYPE_ADMIN)
|
103
|
+
end
|
104
|
+
|
105
|
+
property_supported :registrant_contacts do
|
106
|
+
build_contact("Registrant", Whois::Record::Contact::TYPE_REGISTRANT)
|
107
|
+
end
|
108
|
+
|
109
|
+
property_supported :technical_contacts do
|
110
|
+
build_contact("Technical Contact", Whois::Record::Contact::TYPE_TECHNICAL)
|
111
|
+
end
|
112
|
+
|
113
|
+
private
|
114
|
+
|
115
|
+
def build_contact(element, type)
|
116
|
+
reg=Record::Contact.new(:type => type)
|
117
|
+
values=$1 if content_for_scanner =~ /#{element}:\n\s*\n((.+\n)+)\n/
|
118
|
+
values.scan(/^\s+(.+):\s*(.+)\s*\n/).map do |entry|
|
119
|
+
reg["name"]=entry[1] if entry[0] =~ /Name/i
|
120
|
+
reg["email"]=entry[1] if entry[0]=~ /Email/i
|
121
|
+
end
|
122
|
+
return reg
|
123
|
+
end
|
124
|
+
# ----------------------------------------------------------------------------
|
125
|
+
|
126
|
+
end
|
127
|
+
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
@@ -0,0 +1,166 @@
|
|
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.srs.net.nz 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 WhoisSrsNetNz < Base
|
27
|
+
|
28
|
+
# @see http://dnc.org.nz/content/srs-whois-spec-1.0.html
|
29
|
+
property_supported :status do
|
30
|
+
if content_for_scanner =~ /query_status:\s(.+)\n/
|
31
|
+
case (s = $1.downcase)
|
32
|
+
when "200 active"
|
33
|
+
:registered
|
34
|
+
# The domain is no longer active but is in the period prior
|
35
|
+
# to being released for general registrations
|
36
|
+
when "210 pendingrelease"
|
37
|
+
:redemption
|
38
|
+
when "220 available"
|
39
|
+
:available
|
40
|
+
when "404 request denied"
|
41
|
+
:error
|
42
|
+
when /invalid characters/
|
43
|
+
:invalid
|
44
|
+
else
|
45
|
+
Whois.bug!(ParserError, "Unknown status `#{s}'.")
|
46
|
+
end
|
47
|
+
else
|
48
|
+
Whois.bug!(ParserError, "Unable to parse status.")
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
property_supported :available? do
|
53
|
+
status == :available
|
54
|
+
end
|
55
|
+
|
56
|
+
property_supported :registered? do
|
57
|
+
status == :registered || status == :redemption
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
property_supported :created_on do
|
62
|
+
if content_for_scanner =~ /domain_dateregistered:\s(.+)\n/
|
63
|
+
Time.parse($1)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
property_supported :updated_on do
|
68
|
+
if content_for_scanner =~ /domain_datelastmodified:\s(.+)\n/
|
69
|
+
Time.parse($1)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
property_supported :expires_on do
|
74
|
+
if content_for_scanner =~ /domain_datebilleduntil:\s(.+)\n/
|
75
|
+
Time.parse($1)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
property_supported :nameservers do
|
80
|
+
content_for_scanner.scan(/ns_name_[\d]+:\s(.+)\n/).flatten.map do |name|
|
81
|
+
Record::Nameserver.new(:name => name)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Checks whether the response has been throttled.
|
86
|
+
#
|
87
|
+
# @return [Boolean]
|
88
|
+
#
|
89
|
+
# @example
|
90
|
+
# query_status: 440 Request Denied
|
91
|
+
#
|
92
|
+
def response_throttled?
|
93
|
+
cached_properties_fetch(:response_throttled?) do
|
94
|
+
!!(content_for_scanner =~ /^query_status: 440 Request Denied/)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# NEWPROPERTY
|
99
|
+
def valid?
|
100
|
+
cached_properties_fetch(:valid?) do
|
101
|
+
!invalid?
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
# NEWPROPERTY
|
106
|
+
def invalid?
|
107
|
+
cached_properties_fetch(:invalid?) do
|
108
|
+
status == :invalid
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# The following methods are implemented by Yang Li on 01/24/2013
|
113
|
+
# ----------------------------------------------------------------------------
|
114
|
+
property_supported :domain do
|
115
|
+
return $1 if content_for_scanner =~ /domain_name:\s+(.*)\n/i
|
116
|
+
end
|
117
|
+
|
118
|
+
property_not_supported :domain_id
|
119
|
+
|
120
|
+
property_supported :registrar do
|
121
|
+
reg=Record::Registrar.new
|
122
|
+
content_for_scanner.scan(/^registrar_(.+):\s+(.+)\n/).map do |entry|
|
123
|
+
reg["name"] = entry[1] if entry[0] =~ /name/i
|
124
|
+
reg["organization"] = entry[1] if entry[0] =~ /name/i
|
125
|
+
reg["id"] = entry[1] if entry[0] =~ /phone/i
|
126
|
+
reg["url"] = entry[1] if entry[0] =~ /email/i
|
127
|
+
end
|
128
|
+
return reg
|
129
|
+
end
|
130
|
+
|
131
|
+
property_supported :registrant_contacts do
|
132
|
+
build_contact("registrant_", Whois::Record::Contact::TYPE_REGISTRANT)
|
133
|
+
end
|
134
|
+
|
135
|
+
property_supported :admin_contacts do
|
136
|
+
build_contact("admin_", Whois::Record::Contact::TYPE_ADMIN)
|
137
|
+
end
|
138
|
+
|
139
|
+
property_supported :technical_contacts do
|
140
|
+
build_contact("technical_", Whois::Record::Contact::TYPE_TECHNICAL)
|
141
|
+
end
|
142
|
+
|
143
|
+
property_not_supported :billing_contacts
|
144
|
+
|
145
|
+
private
|
146
|
+
|
147
|
+
def build_contact(element, type)
|
148
|
+
reg=Record::Contact.new(:type => type)
|
149
|
+
content_for_scanner.scan(/^#{element}(.+):\s+(.+)\n/).map do |entry|
|
150
|
+
reg["name"]=entry[1] if entry[0] =~ /name/i
|
151
|
+
reg["organization"]=entry[1] if entry[0]=~ /name/i
|
152
|
+
reg["address"]=entry[1] if entry[0]=~ /address1/i
|
153
|
+
reg["city"]= entry[1] if entry[0]=~ /city/i
|
154
|
+
reg["country"]=entry[1] if entry[0]=~ /country/i
|
155
|
+
reg["phone"]=entry[1] if entry[0]=~ /phone/i
|
156
|
+
reg["fax"]=entry[1] if entry[0]=~ /fax/i
|
157
|
+
reg["email"]=entry[1] if entry[0]=~ /email/i
|
158
|
+
end
|
159
|
+
return reg
|
160
|
+
end
|
161
|
+
# ----------------------------------------------------------------------------
|
162
|
+
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
@@ -0,0 +1,70 @@
|
|
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.tucows.com server, added by Yang Li 02/10/2013.
|
16
|
+
class WhoisTucowsCom < Base
|
17
|
+
|
18
|
+
property_supported :registrar do
|
19
|
+
reg=Record::Registrar.new
|
20
|
+
if content_for_scanner =~ /Registration Service Provider:\n((.+\n)+)\n/
|
21
|
+
line_num=1
|
22
|
+
$1.split(%r{\n}).each do |entry|
|
23
|
+
reg["name"] = entry.strip.split(',')[0] if line_num==1
|
24
|
+
reg["organization"] = entry.strip.split(',')[0] if line_num==1
|
25
|
+
reg["url"] = entry.strip.split(',')[1] if line_num==1
|
26
|
+
line_num=line_num+1
|
27
|
+
end
|
28
|
+
end
|
29
|
+
return reg
|
30
|
+
end
|
31
|
+
|
32
|
+
property_supported :admin_contacts do
|
33
|
+
build_contact("Administrative Contact", Whois::Record::Contact::TYPE_ADMIN)
|
34
|
+
end
|
35
|
+
|
36
|
+
property_supported :registrant_contacts do
|
37
|
+
build_contact("Registrant", Whois::Record::Contact::TYPE_REGISTRANT)
|
38
|
+
end
|
39
|
+
|
40
|
+
property_supported :technical_contacts do
|
41
|
+
build_contact("Technical Contact", Whois::Record::Contact::TYPE_TECHNICAL)
|
42
|
+
end
|
43
|
+
|
44
|
+
property_not_supported :billing_contacts
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def build_contact(element, type)
|
49
|
+
reg=Record::Contact.new(:type => type)
|
50
|
+
if content_for_scanner =~ /#{element}:\n((.+\n)+)\n/i
|
51
|
+
line_num=1
|
52
|
+
addrs=''
|
53
|
+
$1.split(%r{\n}).each do |entry|
|
54
|
+
reg["name"]=entry.strip if line_num==1
|
55
|
+
reg["organization"]=entry.strip if line_num==1
|
56
|
+
reg["address"]=entry.strip if line_num==2
|
57
|
+
reg["phone"]=$1 if entry =~ /(\d{7,})/i
|
58
|
+
reg["fax"]=entry.strip.split('Fax:').last.strip if entry =~ /Fax/i
|
59
|
+
reg["email"]=$1 if entry =~ /(\w+\@.+\.\w+)/i
|
60
|
+
line_num=line_num+1
|
61
|
+
end
|
62
|
+
end
|
63
|
+
return reg
|
64
|
+
end
|
65
|
+
# ----------------------------------------------------------------------------
|
66
|
+
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,133 @@
|
|
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.twnic.net.tw
|
19
|
+
#
|
20
|
+
# Parser for the whois.twnic.net.tw 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 WhoisTwnicNetTw < 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.strip == "No Found")
|
40
|
+
end
|
41
|
+
|
42
|
+
property_supported :registered? do
|
43
|
+
!available?
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
property_supported :created_on do
|
48
|
+
if content_for_scanner =~ /Record created on ([^ ]+) .+\n/
|
49
|
+
Time.parse($1)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
property_not_supported :updated_on
|
54
|
+
|
55
|
+
property_supported :expires_on do
|
56
|
+
if content_for_scanner =~ /Record expires on ([^ ]+) .+\n/
|
57
|
+
Time.parse($1)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
property_supported :nameservers do
|
62
|
+
if content_for_scanner =~ /Domain servers in listed order:\n((.+\n)+)\n/
|
63
|
+
$1.split("\n").map do |name|
|
64
|
+
Record::Nameserver.new(:name => name.strip)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# The following methods are implemented by Yang Li on 01/28/2013
|
70
|
+
# ----------------------------------------------------------------------------
|
71
|
+
property_supported :domain do
|
72
|
+
return $1 if content_for_scanner =~ /Domain Name:\s+(.*)\n/i
|
73
|
+
end
|
74
|
+
|
75
|
+
property_not_supported :domain_id
|
76
|
+
|
77
|
+
property_not_supported :registrar
|
78
|
+
|
79
|
+
property_not_supported :billing_contacts
|
80
|
+
|
81
|
+
property_supported :registrant_contacts do
|
82
|
+
build_contact("Registrant", Whois::Record::Contact::TYPE_REGISTRANT)
|
83
|
+
end
|
84
|
+
|
85
|
+
property_supported :technical_contacts do
|
86
|
+
build_contact_1("Technical Contact", Whois::Record::Contact::TYPE_TECHNICAL)
|
87
|
+
end
|
88
|
+
|
89
|
+
property_supported :admin_contacts do
|
90
|
+
build_contact_1("Administrative Contact", Whois::Record::Contact::TYPE_ADMIN)
|
91
|
+
end
|
92
|
+
|
93
|
+
private
|
94
|
+
|
95
|
+
def build_contact(element, type)
|
96
|
+
reg=Record::Contact.new(:type => type)
|
97
|
+
if content_for_scanner =~ /#{element}:\n((.+\n)+)\n/i
|
98
|
+
line_num=1
|
99
|
+
$1.split(%r{\n}).each do |line|
|
100
|
+
reg["organization"]=line.strip if line_num==1
|
101
|
+
reg["name"]=line.split(%r{\s{2,}})[1] if line_num==2
|
102
|
+
reg["email"]=line.split(%r{\s{2,}})[2] if line_num==2
|
103
|
+
reg["phone"]=line.strip if line_num==3
|
104
|
+
reg["fax"]=line.strip if line_num==4
|
105
|
+
reg["address"]=line.strip if line_num==5
|
106
|
+
reg["city"]=line.strip if line_num==6
|
107
|
+
reg["country_code"]=line.strip if line_num==7
|
108
|
+
line_num=line_num+1
|
109
|
+
end
|
110
|
+
end
|
111
|
+
return reg
|
112
|
+
end
|
113
|
+
|
114
|
+
def build_contact_1(element, type)
|
115
|
+
reg=Record::Contact.new(:type => type)
|
116
|
+
if content_for_scanner =~ /#{element}:\n((.+\n)+)\n/i
|
117
|
+
line_num=1
|
118
|
+
$1.split(%r{\n}).each do |line|
|
119
|
+
reg["name"]=line.split(%r{\s{2,}})[1] if line_num==1
|
120
|
+
reg["email"]=line.split(%r{\s{2,}})[2] if line_num==1
|
121
|
+
reg["phone"]=line.strip if line_num==2
|
122
|
+
reg["fax"]=line.strip if line_num==3
|
123
|
+
line_num=line_num+1
|
124
|
+
end
|
125
|
+
end
|
126
|
+
return reg
|
127
|
+
end
|
128
|
+
# ----------------------------------------------------------------------------
|
129
|
+
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Default Common TCP ports for HTTP(S) service discovery
|
2
|
+
# Used by the Wmap::PortScanner class
|
3
|
+
80
|
4
|
+
81
|
5
|
+
443
|
6
|
+
591
|
7
|
+
901
|
8
|
+
2086
|
9
|
+
2087
|
10
|
+
2095
|
11
|
+
2096
|
12
|
+
3128
|
13
|
+
4443
|
14
|
+
8000
|
15
|
+
8001
|
16
|
+
8080
|
17
|
+
8118
|
18
|
+
8443
|
19
|
+
8888
|
20
|
+
9000
|
21
|
+
9090
|
22
|
+
9443
|
23
|
+
9999
|
24
|
+
20720
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Default list of Google search keywords (known company legal names, for example) for the service discovery, one entry at per line
|
2
|
+
# Used by the Wmap::GoogleSearchScraper class
|
3
|
+
|
4
|
+
# Official whole name
|
5
|
+
Google Inc.
|
6
|
+
|
7
|
+
# 2014 purchase
|
8
|
+
DeepMind Technologies
|
9
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Default list of all major Google search engines for our google discovery, in one entry per line format
|
2
|
+
# To be used by the Wmap::GoogleSearchScraper class
|
3
|
+
# Refer to: http://seobabes.blog.com/seo/list-of-all-google-search-engines-in-different-country/ for more details
|
4
|
+
|
5
|
+
http://www.google.ca/
|
6
|
+
http://www.google.ch/
|
7
|
+
http://www.google.co.in/
|
8
|
+
http://www.google.co.jp/
|
9
|
+
http://www.google.co.kr/
|
10
|
+
http://www.google.com/
|
11
|
+
http://www.google.com.au/
|
12
|
+
http://www.google.com.hk/
|
13
|
+
http://www.google.co.nz/
|
14
|
+
http://www.google.co.uk/
|
15
|
+
http://www.google.co.za/
|
16
|
+
http://www.google.de/
|
17
|
+
http://www.google.es/
|
18
|
+
http://www.google.fr/
|
19
|
+
http://www.google.ie/
|
20
|
+
http://www.google.lt/
|
21
|
+
http://www.google.nl/
|
22
|
+
http://www.google.ru/
|
23
|
+
http://www.google.se/
|