heimdall_tools 1.3.33 → 1.3.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/heimdall_tools/nikto_mapper.rb +15 -18
- 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: d54d4b22df45a476f595fcb5e915848a0ab4afdedab5bc01aed87a4aeb98daba
|
4
|
+
data.tar.gz: 9f0b90c76302fe9eea2508d04b9b6df33907ed7a1d775ffc7ac0cc1150573f09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2d99103ccb593b133e51cf5df81d9fa6d31426b24ba4b311840bdcbbf8aaa611c16db127eae2a10a6994113ce182e1d80f0716b341838e7bd1fa1120eced474
|
7
|
+
data.tar.gz: 8368dd53348c22851413faef53ee02515b64a8ef69a5ca02b81174d491b7db3129d158c02ce96733157e21d48bfa2e2922f5c0ab899465761256f4bf58027489
|
@@ -43,7 +43,7 @@ module HeimdallTools
|
|
43
43
|
begin
|
44
44
|
@project = JSON.parse(nikto_json)
|
45
45
|
rescue StandardError => e
|
46
|
-
raise "Invalid Nikto JSON file provided
|
46
|
+
raise "Invalid Nikto JSON file provided\nNote: nikto_mapper does not support multi-target scan results\n\nException: #{e}"
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -66,8 +66,6 @@ module HeimdallTools
|
|
66
66
|
finding['status'] = 'failed'
|
67
67
|
finding['code_desc'] = "URL : #{vulnerability['url'].to_s } Method: #{vulnerability['method'].to_s}"
|
68
68
|
finding['run_time'] = NA_FLOAT
|
69
|
-
|
70
|
-
# Nikto results JSON does not profile scan timestamp; using current time to satisfy HDF format
|
71
69
|
finding['start_time'] = NA_STRING
|
72
70
|
[finding]
|
73
71
|
end
|
@@ -93,21 +91,20 @@ module HeimdallTools
|
|
93
91
|
{ "data": data || NA_STRING, "label": label || NA_STRING }
|
94
92
|
end
|
95
93
|
|
96
|
-
# Nikto report could have multiple vulnerability entries for multiple findings of same issue type.
|
97
|
-
# The meta data is identical across entries
|
98
|
-
# method collapse_duplicates return unique controls with applicable findings collapsed into it.
|
99
|
-
def collapse_duplicates(controls)
|
100
|
-
unique_controls = []
|
101
|
-
|
102
|
-
controls.map { |x| x['id'] }.uniq.each do |id|
|
103
|
-
collapsed_results = controls.select { |x| x['id'].eql?(id) }.map {|x| x['results']}
|
104
|
-
unique_control = controls.find { |x| x['id'].eql?(id) }
|
105
|
-
unique_control['results'] = collapsed_results.flatten
|
106
|
-
unique_controls << unique_control
|
107
|
-
end
|
108
|
-
unique_controls
|
109
|
-
end
|
110
|
-
|
94
|
+
# Nikto report could have multiple vulnerability entries for multiple findings of same issue type.
|
95
|
+
# The meta data is identical across entries
|
96
|
+
# method collapse_duplicates return unique controls with applicable findings collapsed into it.
|
97
|
+
def collapse_duplicates(controls)
|
98
|
+
unique_controls = []
|
99
|
+
|
100
|
+
controls.map { |x| x['id'] }.uniq.each do |id|
|
101
|
+
collapsed_results = controls.select { |x| x['id'].eql?(id) }.map {|x| x['results']}
|
102
|
+
unique_control = controls.find { |x| x['id'].eql?(id) }
|
103
|
+
unique_control['results'] = collapsed_results.flatten
|
104
|
+
unique_controls << unique_control
|
105
|
+
end
|
106
|
+
unique_controls
|
107
|
+
end
|
111
108
|
|
112
109
|
def to_hdf
|
113
110
|
controls = []
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heimdall_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Thew
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-08-
|
13
|
+
date: 2020-08-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: nokogiri
|