From d5be41617e27e9b78347d1c4bdde4580d2d17f1e Mon Sep 17 00:00:00 2001 From: Samuel Huckins Date: Tue, 11 Jun 2013 16:20:12 -0500 Subject: [PATCH] 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] --- lib/rapid7/nexpose.rb | 6 +++--- plugins/nexpose.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/rapid7/nexpose.rb b/lib/rapid7/nexpose.rb index a8cc812c51..b916dc5aeb 100644 --- a/lib/rapid7/nexpose.rb +++ b/lib/rapid7/nexpose.rb @@ -2180,7 +2180,7 @@ end attr_reader :connection # Report Template ID strong e.g. full-audit attr_reader :template_id - # pdf|html|xml|text|csv|raw-xml + # pdf|html|xml|text|csv|raw-xml-v2 attr_reader :format # Array of (ReportFilter)* attr_reader :filters @@ -2189,7 +2189,7 @@ end attr_reader :report_decoded - def initialize(connection, template_id = 'full-audit', format = 'raw-xml') + def initialize(connection, template_id = 'full-audit', format = 'raw-xml-v2') @error = false @connection = connection @@ -2263,7 +2263,7 @@ class ReportConfig attr_reader :name # The template ID used for this report definition attr_reader :template_id - # html, db, txt, xml, raw-xml, csv, pdf + # html, db, txt, xml, raw-xml-v2, csv, pdf attr_reader :format # XXX new attr_reader :timezone diff --git a/plugins/nexpose.rb b/plugins/nexpose.rb index 024acba312..e2a42b238c 100644 --- a/plugins/nexpose.rb +++ b/plugins/nexpose.rb @@ -284,7 +284,7 @@ class Plugin::Nexpose < Msf::Plugin msfid = Time.now.to_i - report_formats = ["raw-xml", "ns-xml"] + report_formats = ["raw-xml-v2", "ns-xml"] report_format = report_formats.shift report = Nexpose::ReportConfig.new(@nsc) @@ -495,7 +495,7 @@ class Plugin::Nexpose < Msf::Plugin print_status(" >> Created temporary site ##{site.site_id}") if opt_verbose - report_formats = ["raw-xml", "ns-xml"] + report_formats = ["raw-xml-v2", "ns-xml"] report_format = report_formats.shift report = Nexpose::ReportConfig.new(@nsc) @@ -584,7 +584,7 @@ class Plugin::Nexpose < Msf::Plugin def process_nexpose_data(fmt, data) case fmt - when 'raw-xml' + when 'raw-xml-v2' framework.db.import({:data => data}) when 'ns-xml' framework.db.import({:data => data})