wmap 2.4.9 → 2.5.0
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/bin/updateAll +2 -1
- data/lib/wmap/domain_tracker.rb +5 -5
- data/lib/wmap/host_tracker.rb +19 -19
- data/lib/wmap/site_tracker.rb +10 -6
- data/version.txt +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d240d91e365ae3d5d0e43cf0cc9921f334d309c963c95da7599bf2a64743142
|
4
|
+
data.tar.gz: a64728d73c6e6a07772edd42fd1c46cb3748feb6f67705691e6c20dc6962bd2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 889518a8645797863f7c9b879b46802566a8c05c9f1f18dfc26326380bb387ad7905ab0daa48fda6981c5e52d21efab6c64abb327117c0cbb5661d490947cd0b
|
7
|
+
data.tar.gz: a2928c8147507c19571ce4294d981525848d6767696a63a58d1db016a5a81a4ec3ee9da07a3ccea927ae7a12259731730abaa66474e35b69f480cb3a05a7afd7
|
data/bin/updateAll
CHANGED
@@ -9,7 +9,7 @@ Log_dir=File.dirname(__FILE__)+'/../logs/'
|
|
9
9
|
Wmap.wlog("Execute the command: updateAll","updateAll",Log_dir+"wmap.log")
|
10
10
|
|
11
11
|
abort "Incorrect program argument - no argument needed! Proper Usage: updateAll" unless ARGV.length==0
|
12
|
-
|
12
|
+
=begin
|
13
13
|
puts "You're about to update Wmap data repository. It'll take a long time. And the Internet connection must be un-interrupted during the process. You're also expected to backup the data folder before proceeding. Are you ready? (Yes/No)"
|
14
14
|
STDOUT.flush
|
15
15
|
answer=gets.chomp
|
@@ -18,6 +18,7 @@ if answer =~ /yes/i
|
|
18
18
|
else
|
19
19
|
abort "You got it. Mission is successfully aborted. "
|
20
20
|
end
|
21
|
+
=end
|
21
22
|
# Update sub-domain table
|
22
23
|
sd=Wmap::DomainTracker::SubDomain.instance
|
23
24
|
sd.update_from_host_store!
|
data/lib/wmap/domain_tracker.rb
CHANGED
@@ -108,8 +108,8 @@ class Wmap::DomainTracker
|
|
108
108
|
|
109
109
|
# 'setter' to add domain entry to the cache one at a time
|
110
110
|
def add(host)
|
111
|
-
|
112
|
-
|
111
|
+
begin
|
112
|
+
puts "Add entry to the local domains cache table: #{host}" if @verbose
|
113
113
|
return nil if host.nil? or host.empty?
|
114
114
|
host=host.strip.downcase
|
115
115
|
if @known_internet_domains.key?(host)
|
@@ -146,9 +146,9 @@ class Wmap::DomainTracker
|
|
146
146
|
puts "Problem add domain #{host} - please use legal root domain or sub domain only."
|
147
147
|
end
|
148
148
|
end
|
149
|
-
|
150
|
-
|
151
|
-
|
149
|
+
rescue => ee
|
150
|
+
puts "Exception on method #{__method__}: #{ee}" if @verbose
|
151
|
+
end
|
152
152
|
end
|
153
153
|
|
154
154
|
# 'setter' to add domain entry to the cache in batch (from a file)
|
data/lib/wmap/host_tracker.rb
CHANGED
@@ -104,8 +104,8 @@ class Wmap::HostTracker
|
|
104
104
|
|
105
105
|
# Setter to add host entry to the cache once at a time
|
106
106
|
def add(host)
|
107
|
-
|
108
|
-
|
107
|
+
begin
|
108
|
+
puts "Add entry to the local host repository: #{host}"
|
109
109
|
host=host.strip.downcase unless host.nil?
|
110
110
|
unless @known_hosts.key?(host)
|
111
111
|
ip=host_2_ip(host)
|
@@ -145,14 +145,14 @@ class Wmap::HostTracker
|
|
145
145
|
else
|
146
146
|
puts "Host is already exist. Skip: #{host}"
|
147
147
|
end
|
148
|
-
|
149
|
-
|
150
|
-
|
148
|
+
rescue => ee
|
149
|
+
puts "Exception on method #{__method__}: #{ee}" if @verbose
|
150
|
+
end
|
151
151
|
end
|
152
152
|
|
153
153
|
# Setter to add host entry to the local hosts in batch (from an array)
|
154
154
|
def bulk_add(list, num=@max_parallel)
|
155
|
-
|
155
|
+
begin
|
156
156
|
puts "Add entries to the local host repository: #{list}"
|
157
157
|
results=Hash.new
|
158
158
|
if list.size > 0
|
@@ -175,9 +175,9 @@ class Wmap::HostTracker
|
|
175
175
|
puts "Error: empty list - no entry is loaded. Please check your input list and try again."
|
176
176
|
end
|
177
177
|
return results
|
178
|
-
|
179
|
-
|
180
|
-
|
178
|
+
rescue => ee
|
179
|
+
puts "Exception on method #{__method__}: #{ee}"
|
180
|
+
end
|
181
181
|
end
|
182
182
|
alias_method :adds, :bulk_add
|
183
183
|
|
@@ -249,7 +249,7 @@ class Wmap::HostTracker
|
|
249
249
|
|
250
250
|
# Setter to refresh the entry from the cache one at a time
|
251
251
|
def refresh(host)
|
252
|
-
|
252
|
+
begin
|
253
253
|
puts "Refresh the local host repository for host: #{host} "
|
254
254
|
host=host.strip.downcase
|
255
255
|
if @known_hosts.key?(host)
|
@@ -273,15 +273,15 @@ class Wmap::HostTracker
|
|
273
273
|
else
|
274
274
|
puts "Error entry non exist: #{host}"
|
275
275
|
end
|
276
|
-
|
277
|
-
|
278
|
-
|
276
|
+
rescue => ee
|
277
|
+
puts "Exception on method #{__method__}: #{ee}"
|
278
|
+
end
|
279
279
|
end
|
280
280
|
|
281
281
|
# Refresh all the entries in the local hosts by querying the Internet
|
282
282
|
def refresh_all
|
283
|
-
|
284
|
-
|
283
|
+
begin
|
284
|
+
puts "Refresh all the entries in the local host repository in one shot."
|
285
285
|
changes=Hash.new
|
286
286
|
hosts=@known_hosts.keys
|
287
287
|
@known_hosts=Hash.new
|
@@ -297,15 +297,15 @@ class Wmap::HostTracker
|
|
297
297
|
#changes.map { |x| puts x }
|
298
298
|
puts "Done refreshing the local hosts."
|
299
299
|
return changes
|
300
|
-
|
301
|
-
|
302
|
-
|
300
|
+
rescue => ee
|
301
|
+
puts "Exception on method #{__method__}: #{ee}"
|
302
|
+
end
|
303
303
|
end
|
304
304
|
|
305
305
|
# Extract known root domains from the local host repository @known_hosts
|
306
306
|
def get_root_domains
|
307
|
-
puts "Dump out all active root domains from the cache."
|
308
307
|
begin
|
308
|
+
puts "Dump out all active root domains from the cache."
|
309
309
|
zones=Array.new
|
310
310
|
(@known_hosts.keys-["",nil]).map do |hostname|
|
311
311
|
next if is_ip?(hostname)
|
data/lib/wmap/site_tracker.rb
CHANGED
@@ -103,7 +103,7 @@ class Wmap::SiteTracker
|
|
103
103
|
|
104
104
|
# Setter to add site entry to the cache one at a time
|
105
105
|
def add(site)
|
106
|
-
|
106
|
+
begin
|
107
107
|
puts "Add entry to the site store: #{site}"
|
108
108
|
# Preliminary sanity check
|
109
109
|
site=site.strip.downcase unless site.nil?
|
@@ -229,18 +229,22 @@ class Wmap::SiteTracker
|
|
229
229
|
end
|
230
230
|
deact=nil
|
231
231
|
my_tracker=nil
|
232
|
+
host_tracker=nil
|
232
233
|
return checker
|
233
234
|
else
|
234
235
|
puts "Problem found: untrusted Internet domain or IP. Skip #{site}"
|
235
236
|
deact=nil
|
236
237
|
my_tracker=nil
|
238
|
+
host_tracker=nil
|
237
239
|
return nil
|
238
240
|
end
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
241
|
+
rescue => ee
|
242
|
+
puts "Exception on method #{__method__}: #{ee}"
|
243
|
+
checker=nil
|
244
|
+
deact=nil
|
245
|
+
host_tracker=nil
|
246
|
+
return nil
|
247
|
+
end
|
244
248
|
end
|
245
249
|
|
246
250
|
# Setter to add site entry to the cache table in batch (from a file)
|
data/version.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
###############################################################################
|
4
4
|
package = wmap
|
5
5
|
# wmap version 2.0 == web_discovery version 1.5.3
|
6
|
-
version = 2.
|
7
|
-
date = 2019-02-
|
6
|
+
version = 2.5.0
|
7
|
+
date = 2019-02-21
|
8
8
|
|
9
9
|
author = Sam (Yang) Li
|
10
10
|
email = yang.li@owasp.org
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wmap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam (Yang) Li
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dnsruby
|