ovas 0.0.1 → 0.0.2
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/lib/ovas.rb +9 -17
- 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: a6b3c9f2f170aef0565e1680797c09fd7116b604
|
|
4
|
+
data.tar.gz: 4f59ea1ce2018473cdd5019368ee9ebc39a944d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96210882e11635567674b0d950b22fe89d9803bf4e1016f49d5765b94b7e891bfbed00edf0a2c233bbc504ad75700ae7fd9ab4f670fa83382229c9ea4ed7dfa0
|
|
7
|
+
data.tar.gz: a886bc3b6a97f22e162bcfa7193a464fd84d6341b9a01ef64bd7fa5cc9102bc4f0514358b8204f733901fb1f1f8c63385a52528de31e207ae001c303a53581a7
|
data/lib/ovas.rb
CHANGED
|
@@ -4,7 +4,6 @@ require 'openssl'
|
|
|
4
4
|
require 'rexml/document'
|
|
5
5
|
require 'rexml/text'
|
|
6
6
|
require 'base64'
|
|
7
|
-
require 'byebug'
|
|
8
7
|
|
|
9
8
|
# OpenVASOMP module
|
|
10
9
|
#
|
|
@@ -495,23 +494,16 @@ module OpenVASOMP
|
|
|
495
494
|
# pdf_content=ov.report_get_all()
|
|
496
495
|
#
|
|
497
496
|
def report_get_all ()
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
td["max_hosts"]=target.elements["max_hosts"].text
|
|
508
|
-
td["in_use"]=target.elements["in_use"].text
|
|
509
|
-
list.push td
|
|
497
|
+
begin
|
|
498
|
+
xr=report_get_raw("format"=>"NBE")
|
|
499
|
+
output_file = File.open("tmp/reports_#{Time.now.strftime("%d-%m-%y-%H%M%S")}.xml", "w")
|
|
500
|
+
output_file_path = output_file.path
|
|
501
|
+
output_file.puts(xr)
|
|
502
|
+
output_file.close
|
|
503
|
+
return output_file_path
|
|
504
|
+
rescue
|
|
505
|
+
raise OMPResponseError
|
|
510
506
|
end
|
|
511
|
-
return list
|
|
512
|
-
rescue
|
|
513
|
-
raise OMPResponseError
|
|
514
|
-
end
|
|
515
507
|
end
|
|
516
508
|
|
|
517
509
|
# OMP - get reports and returns raw rexml object as response
|