wmap 2.6.9 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/wadds +32 -20
- 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: 0306e6992ff754b34724ecd2c7e538531d747a8a0a7b75f6eabe12698f161ddd
|
4
|
+
data.tar.gz: 3282d7c8a30e6526c201dcb8c3270554b2079bb675d50b16e3753c55f144881c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50a6e01ed24576c33592a1564116ee709ec8f9eaca5122fbe04408e546d4ea5799321dbf5f23ea4b8e3b2e90da0cdb9772733f295d28629cb05be9115c62da89
|
7
|
+
data.tar.gz: 38931b0d2de732debd9e4c09fca532b8f192067e3058ceb86a1db61a86a80bffa9a43b334c79a87e0e6887da83b21af2076044ca45b2bc43bf4b5845fafb1dfb
|
data/bin/wadds
CHANGED
@@ -1,40 +1,52 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Executable to bulk add sites into the tracking data repository
|
3
3
|
require "wmap"
|
4
|
+
require "optparse"
|
4
5
|
|
5
|
-
|
6
|
-
|
6
|
+
# program command line options
|
7
|
+
options = {:data_dir => nil, :target => nil, :verbose => false}
|
8
|
+
parser = OptionParser.new do|opts|
|
9
|
+
opts.banner = Wmap.banner
|
10
|
+
opts.on('-d', '--data_dir data_dir', 'Web Mapper local cache data directory') do |data_dir|
|
11
|
+
options[:data_dir] = data_dir;
|
12
|
+
end
|
13
|
+
opts.on('-t', '--target target', 'Web Mapper target') do |target|
|
14
|
+
options[:target] = target;
|
15
|
+
end
|
16
|
+
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
|
17
|
+
options[:verbose] = v;
|
18
|
+
end
|
19
|
+
opts.on('-h', '--help', 'Displays Help') do
|
20
|
+
puts opts
|
21
|
+
exit 0
|
22
|
+
end
|
7
23
|
end
|
8
|
-
|
24
|
+
parser.parse!
|
9
25
|
puts Wmap.banner
|
10
|
-
print_usage
|
11
|
-
abort "Incorrect program argument!" unless File.exist?(ARGV[0])
|
12
26
|
|
13
|
-
if
|
27
|
+
if options[:data_dir]
|
14
28
|
# Log the command entry
|
15
|
-
Log_dir =
|
16
|
-
|
17
|
-
|
18
|
-
Log_dir = File.dirname(__FILE__)+'/../logs/' + ARGV[1]
|
29
|
+
Log_dir = Pathname.new(options[:data_dir]).join('logs')
|
30
|
+
else
|
31
|
+
Log_dir=Pathname.new(Gem.loaded_specs['wmap'].full_gem_path).join('logs')
|
19
32
|
end
|
20
33
|
Dir.mkdir(Log_dir) unless Dir.exist?(Log_dir)
|
21
|
-
Wmap.wlog("Execute the command: wadds #{ARGV[0]}","wadds",Log_dir+"wmap.log")
|
22
34
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
st.verbose=false
|
27
|
-
elsif ARGV.length == 2
|
35
|
+
Wmap.wlog("Execute the command: wadds #{options[:target]}","wadds",Log_dir+"wmap.log")
|
36
|
+
|
37
|
+
if File.exist?(options[:target]) && options[:data_dir]
|
28
38
|
puts puts "Invoke the SiteTracker."
|
29
39
|
st=Wmap::SiteTracker.instance
|
30
|
-
st.verbose=
|
31
|
-
st.data_dir=
|
40
|
+
st.verbose=options[:verbose]
|
41
|
+
st.data_dir = options[:data_dir]
|
42
|
+
st.sites_file = st.data_dir + "/" + "sites"
|
43
|
+
st.load_site_stores_from_file(st.sites_file)
|
32
44
|
else
|
33
45
|
aborts "Error firing up SiteTracker instance!"
|
34
46
|
end
|
35
47
|
|
36
48
|
# Evaluate the argument and update the data store accordingly
|
37
|
-
sites=st.file_2_list(
|
49
|
+
sites=st.file_2_list(options[:target]).map { |x| st.url_2_site(x) }
|
38
50
|
if sites.length > 0
|
39
51
|
news=st.adds(sites)
|
40
52
|
puts news
|
@@ -42,5 +54,5 @@ if sites.length > 0
|
|
42
54
|
st=nil
|
43
55
|
else
|
44
56
|
st=nil
|
45
|
-
abort "No site entry found in file: #{
|
57
|
+
abort "No site entry found in file: #{options[:target]}. Please check your file format to ensure one site per line."
|
46
58
|
end
|
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 =
|
6
|
+
version = 2.7.0
|
7
|
+
date = 2020-03-09
|
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.7.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:
|
11
|
+
date: 2020-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dnsruby
|