Skip to content

Commit d5be416

Browse files
committed
Uses raw-xml-v2 Nexpose export for Nexpose import as this adds device-id
back to XML schema and will result in hosts that can be pushed back to Nexpose. [Bug #51521175]
1 parent a09b3b8 commit d5be416

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/rapid7/nexpose.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,7 +2180,7 @@ class ReportAdHoc
21802180
attr_reader :connection
21812181
# Report Template ID strong e.g. full-audit
21822182
attr_reader :template_id
2183-
# pdf|html|xml|text|csv|raw-xml
2183+
# pdf|html|xml|text|csv|raw-xml-v2
21842184
attr_reader :format
21852185
# Array of (ReportFilter)*
21862186
attr_reader :filters
@@ -2189,7 +2189,7 @@ class ReportAdHoc
21892189
attr_reader :report_decoded
21902190

21912191

2192-
def initialize(connection, template_id = 'full-audit', format = 'raw-xml')
2192+
def initialize(connection, template_id = 'full-audit', format = 'raw-xml-v2')
21932193

21942194
@error = false
21952195
@connection = connection
@@ -2263,7 +2263,7 @@ class ReportConfig
22632263
attr_reader :name
22642264
# The template ID used for this report definition
22652265
attr_reader :template_id
2266-
# html, db, txt, xml, raw-xml, csv, pdf
2266+
# html, db, txt, xml, raw-xml-v2, csv, pdf
22672267
attr_reader :format
22682268
# XXX new
22692269
attr_reader :timezone

plugins/nexpose.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def cmd_nexpose_site_import(*args)
284284

285285
msfid = Time.now.to_i
286286

287-
report_formats = ["raw-xml", "ns-xml"]
287+
report_formats = ["raw-xml-v2", "ns-xml"]
288288
report_format = report_formats.shift
289289

290290
report = Nexpose::ReportConfig.new(@nsc)
@@ -495,7 +495,7 @@ def cmd_nexpose_scan(*args)
495495

496496
print_status(" >> Created temporary site ##{site.site_id}") if opt_verbose
497497

498-
report_formats = ["raw-xml", "ns-xml"]
498+
report_formats = ["raw-xml-v2", "ns-xml"]
499499
report_format = report_formats.shift
500500

501501
report = Nexpose::ReportConfig.new(@nsc)
@@ -584,7 +584,7 @@ def cmd_nexpose_disconnect(*args)
584584

585585
def process_nexpose_data(fmt, data)
586586
case fmt
587-
when 'raw-xml'
587+
when 'raw-xml-v2'
588588
framework.db.import({:data => data})
589589
when 'ns-xml'
590590
framework.db.import({:data => data})

0 commit comments

Comments
 (0)