wmap 2.4.4 → 2.4.5

Sign up to get free protection for your applications and to get access to all the features.
data/version.txt CHANGED
@@ -3,11 +3,11 @@
3
3
  ###############################################################################
4
4
  package = wmap
5
5
  # wmap version 2.0 == web_discovery version 1.5.3
6
- version = 2.4.4
7
- date = 2018-01-16
6
+ version = 2.4.5
7
+ date = 2018-11-06
8
8
 
9
- author = Yang Li
9
+ author = Sam (Yang) Li
10
10
  email = yang.li@owasp.org
11
11
  linkedin = http://www.linkedin.com/in/yangli8/
12
- github = https://github.com/yangsec888/wmap
12
+ github = https://github.com/yangsec888/wmap
13
13
  ###############################################################################
data/wmap.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # A pure Ruby library for Internet web application discovery and tracking.
5
5
  #
6
- # Copyright (c) 2012-2015 Yang Li <yang.li@owasp.org>
6
+ # Copyright (c) 2012-2015 Sam (Yang) Li <yang.li@owasp.org>
7
7
  #++
8
8
 
9
9
  # -*- encoding: utf-8 -*-
@@ -17,7 +17,7 @@ f.each do |line|
17
17
  case line
18
18
  when /^(\s)*#/
19
19
  next
20
- when /\=/
20
+ when /\=/
21
21
  entry=line.split("=").map! {|x| x.strip}
22
22
  info[entry[0]]=entry[1]
23
23
  end
@@ -36,12 +36,27 @@ Gem::Specification.new do |s|
36
36
  s.description = "wmap is written to perform Internet web application / service discovery. The discovery results are designed to be automatically tracked by the software."
37
37
  s.email = info["email"]
38
38
  s.executables = ["wmap","wscan","wadd","wadds","wdel","wcheck","wdump","spiderBot","googleBot","updateAll","prime","deprime","refresh","trust","distrust","run_tests"]
39
- s.files = ["CHANGELOG.md", "TODO", "settings/discovery_ports","settings/google_keywords.txt","settings/google_locator.txt","data/cidrs","data/domains","data/sub_domains","data/hosts","data/sites","data/deactivated_sites","data/prime_hosts","lib/wmap/cidr_tracker.rb","lib/wmap/dns_bruter.rb","lib/wmap/domain_tracker.rb","lib/wmap/domain_tracker/sub_domain.rb","lib/wmap/host_tracker.rb","lib/wmap/host_tracker/primary_host.rb","lib/wmap/network_profiler.rb","lib/wmap/port_scanner.rb","lib/wmap/site_tracker.rb","lib/wmap/site_tracker/deactivated_site.rb","lib/wmap/url_checker.rb","lib/wmap/url_crawler.rb","lib/wmap/geoip_tracker.rb","lib/wmap/google_search_scraper.rb","lib/wmap/utils/logger.rb","lib/wmap/utils/domain_root.rb","lib/wmap/utils/url_magic.rb","lib/wmap/utils/utils.rb","lib/wmap/whois.rb","lib/wmap.rb","LICENSE.txt","version.txt","README.rdoc", "wmap.gemspec"]
40
- s.files += Dir['bin/*'] + Dir['demos/*'] + Dir['test/*'] + Dir['ruby_whois_patches/*'] + Dir['dicts/*'] + Dir['logs/wmap.log']
39
+ s.files = ["CHANGELOG.md", "TODO", "settings/discovery_ports","settings/google_keywords.txt","settings/google_locator.txt","data/","LICENSE.txt",
40
+ "version.txt","README.rdoc", "wmap.gemspec"]
41
+ s.files += Dir['lib/wmap/*.rb'] + Dir['lib/wmap/**/*.rb'] + Dir['bin/*'] + Dir['demos/*'] + Dir['test/*'] + Dir['ruby_whois_patches/*'] + Dir['dicts/*'] + Dir['logs/wmap.log']
41
42
  #s.homepage = "none"
42
43
  s.post_install_message = "*"*80 + "\n\nThank you for installing the wmap gem - a pure Ruby library for Internet web application discovery and tracking. Please refer to the README.rdoc for more information of using this gem. \n\n" + "*"*80 + "\n"
43
44
  s.require_paths = ["lib"]
44
- s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
45
+ s.required_ruby_version = Gem::Requirement.new(">= 2.1")
46
+
47
+ s.add_dependency 'dnsruby', '>= 1.52'
48
+ s.add_dependency 'geoip', '>= 1.0'
49
+ s.add_dependency 'minitest', '>= 5.0'
50
+ s.add_dependency 'net-ping', '>= 2.0'
51
+ s.add_dependency 'nokogiri', '>= 1.6'
52
+ s.add_dependency 'css_parser', '>= 1.6'
53
+ s.add_dependency 'openssl', '>= 2.0'
54
+ s.add_dependency 'parallel', '>= 1.0'
55
+ s.add_dependency 'whois', '>= 2.7'
56
+ s.add_dependency 'httpclient', '~> 2.0'
57
+ s.add_dependency 'open_uri_redirections', '>= 0.2'
58
+ s.add_dependency 'netaddr', '~> 1.5'
59
+
45
60
  s.rubyforge_project = "wmap"
46
61
  s.rubygems_version = "1.8.24"
47
62
  s.summary = "A pure Ruby web application and service discovery API."
metadata CHANGED
@@ -1,15 +1,183 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.4
4
+ version: 2.4.5
5
5
  platform: ruby
6
6
  authors:
7
- - Yang Li
7
+ - Sam (Yang) Li
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-16 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2018-11-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: dnsruby
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.52'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '1.52'
27
+ - !ruby/object:Gem::Dependency
28
+ name: geoip
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: net-ping
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '2.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '2.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: nokogiri
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '1.6'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '1.6'
83
+ - !ruby/object:Gem::Dependency
84
+ name: css_parser
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '1.6'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '1.6'
97
+ - !ruby/object:Gem::Dependency
98
+ name: openssl
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '2.0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '2.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: parallel
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '1.0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '1.0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: whois
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '2.7'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '2.7'
139
+ - !ruby/object:Gem::Dependency
140
+ name: httpclient
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '2.0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '2.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: open_uri_redirections
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0.2'
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0.2'
167
+ - !ruby/object:Gem::Dependency
168
+ name: netaddr
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '1.5'
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '1.5'
13
181
  description: wmap is written to perform Internet web application / service discovery.
14
182
  The discovery results are designed to be automatically tracked by the software.
15
183
  email: yang.li@owasp.org
@@ -37,6 +205,7 @@ files:
37
205
  - LICENSE.txt
38
206
  - README.rdoc
39
207
  - TODO
208
+ - bin/RHPG
40
209
  - bin/deprime
41
210
  - bin/distrust
42
211
  - bin/googleBot
@@ -45,6 +214,7 @@ files:
45
214
  - bin/run_tests
46
215
  - bin/spiderBot
47
216
  - bin/trust
217
+ - bin/trusts
48
218
  - bin/updateAll
49
219
  - bin/wadd
50
220
  - bin/wadds
@@ -52,14 +222,8 @@ files:
52
222
  - bin/wdel
53
223
  - bin/wdump
54
224
  - bin/wmap
225
+ - bin/wmaps
55
226
  - bin/wscan
56
- - data/cidrs
57
- - data/deactivated_sites
58
- - data/domains
59
- - data/hosts
60
- - data/prime_hosts
61
- - data/sites
62
- - data/sub_domains
63
227
  - demos/bruter.rb
64
228
  - demos/dns_brutes.rb
65
229
  - demos/filter_cidr.rb
@@ -88,7 +252,7 @@ files:
88
252
  - dicts/gtld.txt
89
253
  - dicts/hostnames-dict.big
90
254
  - dicts/hostnames-dict.txt
91
- - lib/wmap.rb
255
+ - dicts/tlds.txt
92
256
  - lib/wmap/cidr_tracker.rb
93
257
  - lib/wmap/dns_bruter.rb
94
258
  - lib/wmap/domain_tracker.rb
@@ -108,6 +272,7 @@ files:
108
272
  - lib/wmap/utils/url_magic.rb
109
273
  - lib/wmap/utils/utils.rb
110
274
  - lib/wmap/whois.rb
275
+ - lib/wmap/wp_tracker.rb
111
276
  - logs/wmap.log
112
277
  - ruby_whois_patches/base_cocca2.rb
113
278
  - ruby_whois_patches/kero.yachay.pe.rb
@@ -187,7 +352,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
352
  requirements:
188
353
  - - ">="
189
354
  - !ruby/object:Gem::Version
190
- version: 1.9.2
355
+ version: '2.1'
191
356
  required_rubygems_version: !ruby/object:Gem::Requirement
192
357
  requirements:
193
358
  - - ">="
@@ -195,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
360
  version: '0'
196
361
  requirements: []
197
362
  rubyforge_project: wmap
198
- rubygems_version: 2.4.5.2
363
+ rubygems_version: 2.7.7
199
364
  signing_key:
200
365
  specification_version: 4
201
366
  summary: A pure Ruby web application and service discovery API.
data/data/cidrs DELETED
@@ -1,2 +0,0 @@
1
- # Local cidrs file created by Wmap::CidrTracker.save method at: 2015-07-07 12:23:56 -0400
2
- Network CIDR, CIDR RIPE Reference Text, CIDR NETNAME
@@ -1 +0,0 @@
1
- # Local site store created by class Wmap::SiteTracker::DeactivatedSite method save_sites_to_file! at: 2015-04-27 08:43:06 -0400
data/data/domains DELETED
@@ -1,2 +0,0 @@
1
- # Local domains file created by class Wmap::DomainTracker method save_domains_to_file! at: 2015-07-07 12:24:49 -0400
2
- # domain name, free zone transfer detected?
data/data/hosts DELETED
@@ -1 +0,0 @@
1
- # local hosts file created by the Wmap::HostTracker class save_known_hosts_to_file! method at: 2015-04-21 08:59:33 -0400
data/data/prime_hosts DELETED
@@ -1 +0,0 @@
1
- # local hosts file created by the Wmap::HostTracker::PrimaryHost class save_known_hosts_to_file! method at: 2015-07-07 12:25:34 -0400
data/data/sites DELETED
@@ -1,2 +0,0 @@
1
- # Local site store created by class Wmap::SiteTracker method save_sites_to_file! at: 2015-04-22 14:03:45 -0400
2
- # Website,Primary IP,Port,Hosting Status,Server,Response Code,Site MD5 Finger-print,Site Redirection,Timestamp
data/data/sub_domains DELETED
@@ -1,2 +0,0 @@
1
- # Local domains file created by class Wmap::DomainTracker::SubDomain method save_sub_domains_to_file! at: 2018-01-08 10:18:24 -0500
2
- # domain name, free zone transfer detected?
data/lib/wmap.rb DELETED
@@ -1,227 +0,0 @@
1
- #--
2
- # Wmap
3
- #
4
- # A pure Ruby library for the Internet web application discovery and tracking.
5
- #
6
- # Copyright (c) 2012-2015 Yang Li <yang.li@owasp.org>
7
- #++
8
- require 'wmap/utils/domain_root'
9
- require 'wmap/utils/url_magic'
10
- require 'wmap/utils/logger'
11
- require 'wmap/utils/utils'
12
- require 'wmap/cidr_tracker'
13
- require 'wmap/domain_tracker'
14
- require 'wmap/domain_tracker/sub_domain'
15
- require 'wmap/host_tracker'
16
- require 'wmap/host_tracker/primary_host'
17
- require 'wmap/whois'
18
- require 'wmap/url_checker'
19
- require 'wmap/network_profiler'
20
- require 'wmap/port_scanner'
21
- require 'wmap/url_crawler'
22
- require 'wmap/dns_bruter'
23
- require 'wmap/site_tracker'
24
- require 'wmap/site_tracker/deactivated_site'
25
- require 'wmap/geoip_tracker'
26
- require 'wmap/google_search_scraper'
27
-
28
- module Wmap
29
-
30
- NAME = "Wmap"
31
- GEM = "wmap"
32
- VERSION = File.dirname(__FILE__) + "/../version.txt"
33
-
34
- class << self
35
- attr_accessor :known_internet_domains
36
- attr_writer :verbose
37
-
38
- # Simple parser for the project version file
39
- def read_ver
40
- ver=Hash.new
41
- f=File.open(VERSION,'r')
42
- f.each do |line|
43
- line.chomp!
44
- case line
45
- when /^(\s)*#/
46
- next
47
- when /\=/
48
- entry=line.split("=").map! {|x| x.strip}
49
- ver[entry[0]]=entry[1]
50
- end
51
- end
52
- f.close
53
- return ver
54
- end
55
-
56
- # Project banner in ASCII Art 'soft' format, courtesy to http://patorjk.com/software/taag/
57
- def banner
58
- ver=read_ver
59
- art=",--. ,--. ,--. ,--. ,--.
60
- | | | | ,---. | |-. | `.' | ,--,--. ,---. ,---. ,---. ,--.--.
61
- | |.'.| || .-. :| .-. ' | |'.'| |' ,-. || .-. || .-. || .-. :| .--'
62
- | ,'. |\ --.| `-' | | | | |\ '-' || '-' '| '-' '\ --.| |
63
- '--' '--' `----' `---' `--' `--' `--`--'| |-' | |-' `----'`--'
64
- `--' `--' "
65
- string = "-"*80 + "\n" + art + "\n" + "Version: " + ver["version"] + "\tRelease Date: " + ver["date"] + "\nDesigned and developed by: " + ver["author"] + "\nEmail: " + ver["email"] + "\tLinkedIn: " + ver["linkedin"] + "\n" + "-"*80
66
- end
67
-
68
- # Explorer to discover and inventory web application / service automatically
69
- def wmap(seed)
70
- cmd="bin/wmap" + " " + seed
71
- system(cmd)
72
- end
73
-
74
- # Crawler to search url contents for new sites
75
- def crawl(url)
76
- crawler=Wmap::UrlCrawler.new
77
- crawler.crawl(url)
78
- end
79
-
80
- # whois query and sort the result into structured data
81
- def whois(domain)
82
- whois=Wmap::Whois.new(:verbose=>false)
83
- whois.query(domain)
84
- end
85
-
86
- # Fast tcp port scanner on a single host or IP
87
- def scan(host)
88
- scanner=Wmap::PortScanner.new
89
- scanner.scan(host)
90
- end
91
-
92
- # Fast multi-processes tcp port scanner on a list of targets
93
- def scans(target_list)
94
- scanner=Wmap::PortScanner.new
95
- scanner.scans(target_list)
96
- end
97
-
98
- # CIDR Tracking - check the host against the local CIDR seed file, return the CIDR tracking path if found
99
- def track(host)
100
- tracker=Wmap::CidrTracker.new
101
- tracker.cidr_worker(host)
102
- end
103
-
104
- # GeoIP Tracking - check the host / IP against the GeoIP data repository, return the Geographic information if found
105
- def geoip(host)
106
- tracker=Wmap::GeoIPTracker.new
107
- tracker.query(host)
108
- end
109
-
110
- # URL checker - check the status of the remote URL
111
- def check(url)
112
- checker=Wmap::UrlChecker.new(:verbose=>false)
113
- checker.url_worker(url)
114
- end
115
-
116
- # Check if the IP is within the range of the known CIDR blocks
117
- def ip_trusted?(ip)
118
- tracker=Wmap::CidrTracker.new
119
- tracker.ip_trusted?(ip)
120
- end
121
-
122
- # Domain Tracking - check with the trust domain seed file locally, to determine if it's a new internet domain
123
- # NOT to confuse with the Internet 'whois' lookup
124
- def domain_known?(domain)
125
- tracker=Wmap::DomainTracker.new
126
- tracker.domain_known?(domain)
127
- end
128
-
129
- # Host Tracking - check local hosts file to see if this is a hostname known from the host seed file
130
- # NOT to confuse with a regular DNS lookup over the internet
131
- def host_known?(host)
132
- tracker=Wmap::HostTracker.new.host_known?(host)
133
- end
134
-
135
- # Sub-domain tracking - check local hosts file to see if the sub-domain is already known
136
- def sub_domain_known?(host)
137
- tracker=Wmap::HostTracker.new.sub_domain_known?(host)
138
- end
139
-
140
- # IP Tracking - check local hosts file to see if this is an IP known from the seed file
141
- # NOT to confuse with a regular reverse DNS lookup over the internet
142
- def ip_known?(ip)
143
- tracker=Wmap::HostTracker.new.ip_known?(ip)
144
- end
145
-
146
- # DNS Brute Forcer
147
- def dns_brute(domain)
148
- bruter=Wmap::DnsBruter.new
149
- bruter.query(domain)
150
- end
151
-
152
- # Retrieve root domain from a host
153
- def domain_root(host)
154
- Wmap::Utils.get_domain_root(host)
155
- end
156
-
157
- # Log the information into file
158
- def wlog(msg,agent,log_file)
159
- Wmap::Utils.wlog(msg,agent,log_file)
160
- end
161
-
162
- # Host-name mutation for catch easily guessable hostname, i.e. "ww1.example.com" => ["ww1,example.com","ww2.example.com",...]
163
- def mutation (host)
164
- Wmap::DnsBruter.new.hostname_mutation(host)
165
- end
166
-
167
- # Check URL/Site response code
168
- def response_code(url)
169
- checker=Wmap::UrlChecker.new
170
- checker.response_code(url)
171
- end
172
-
173
- # Search the site repository for all entries that match the pattern
174
- def search(pattern)
175
- searcher=Wmap::SiteTracker.new
176
- searcher.search(pattern)
177
- end
178
-
179
- # Dump out the unique sites into a plain file
180
- def dump(file)
181
- store=Wmap::SiteTracker.new
182
- store.save_uniq_sites(file)
183
- end
184
-
185
- # Dump out the unique sites into a XML file
186
- def dump_xml(file)
187
- store=Wmap::SiteTracker.new
188
- store.save_uniq_sites_xml(file)
189
- end
190
-
191
- # Refresh the site information in the local data repository
192
- def refresh(site)
193
- store=Wmap::SiteTracker.new
194
- store.refresh(site)
195
- store.save!
196
- end
197
-
198
- # Refresh the site information in the local data repository
199
- def refresh_all
200
- store=Wmap::SiteTracker.new
201
- store.refresh_all
202
- store.save!
203
- end
204
-
205
- # Search the Google engines and sort out sites known by Google
206
- def google
207
- sites=Wmap::GoogleSearchScraper.new.workers.keys
208
- end
209
-
210
- # Print a site's full information from the repository
211
- def print(site)
212
- searcher=Wmap::SiteTracker.new
213
- searcher.print_site(site)
214
- end
215
-
216
- # Print a site's full information from the repository
217
- def print_all
218
- searcher=Wmap::SiteTracker.new
219
- searcher.print_all_sites
220
- end
221
-
222
- private
223
-
224
-
225
-
226
- end
227
- end