Nessus6 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/export_nessus_results +4 -6
- data/bin/launch_incoming_scans +2 -2
- data/lib/Nessus6/scan.rb +6 -3
- data/lib/Nessus6/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 124565e9d918310372e96f46ecc233111eab7d20
|
4
|
+
data.tar.gz: 25d9dd43bece92dd2637ec503e92749a996fd4b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3802310a4764b6ea9b95f38604be99a7ee328ad03914f8dd76b91f09cb49eaaa9633a65e69112801cb68361b13de42d4c7ab8ff38cab27fb1d29a45c5c1e4ab8
|
7
|
+
data.tar.gz: dc72bfe6665b1bdce87686255203fdf42f3478e3ad2a3ddded5e70df801fff84739bf8edc97ef6ca3ce3e1168ee311e90e40d986303a7dedfd412f9296f887fe
|
data/bin/export_nessus_results
CHANGED
@@ -40,16 +40,14 @@ nessus_location = {
|
|
40
40
|
scan_id: row[3]
|
41
41
|
}
|
42
42
|
opts = { format: :csv }
|
43
|
-
mapped_row[:file_id] = @client.scan.export
|
43
|
+
mapped_row[:file_id] = @client.scan.export(mapped_row[:scan_id], opts)['file']
|
44
44
|
|
45
45
|
# Lock it in a closure so we don't have to have a huge one liner
|
46
46
|
export_status = Proc.new { @client.scan.export_status mapped_row[:scan_id], mapped_row[:file_id] }
|
47
47
|
ready_status = { 'status' => 'ready' }
|
48
48
|
@logger.debug 'Waiting...' while export_status.call != ready_status
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
puts file
|
50
|
+
@client.scan.download mapped_row[:scan_id],
|
51
|
+
mapped_row[:file_id],
|
52
|
+
"#{@results_directory}/#{mapped_row[:request_id]}.csv"
|
55
53
|
end
|
data/bin/launch_incoming_scans
CHANGED
@@ -35,8 +35,8 @@ end
|
|
35
35
|
@send_mail = '/usr/lib/sendmail -t'
|
36
36
|
|
37
37
|
credentials = {
|
38
|
-
access_key: '
|
39
|
-
secret_key: '
|
38
|
+
access_key: 'NA',
|
39
|
+
secret_key: 'NA'
|
40
40
|
}
|
41
41
|
|
42
42
|
nessus_location = {
|
data/lib/Nessus6/scan.rb
CHANGED
@@ -104,10 +104,13 @@ module Nessus6
|
|
104
104
|
# @param file_id [String, Fixnum] The id of the file to download (included in response from /scans/{scan_id}/export)
|
105
105
|
def download(scan_id, file_id, write_path = nil)
|
106
106
|
response = @client.get "scans/#{scan_id}/export/#{file_id}/download"
|
107
|
-
hash_response = verify response,
|
108
|
-
not_found: 'The scan or file does not exist.'
|
109
|
-
|
110
107
|
File.open(write_path, 'w+') { |file| file.write response } unless write_path.nil?
|
108
|
+
begin
|
109
|
+
hash_response = verify response,
|
110
|
+
not_found: 'The scan or file does not exist.'
|
111
|
+
rescue
|
112
|
+
hash_response = nil
|
113
|
+
end
|
111
114
|
hash_response
|
112
115
|
end
|
113
116
|
|
data/lib/Nessus6/version.rb
CHANGED