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]
unstable
Samuel Huckins 2013-06-11 16:20:12 -05:00
parent a09b3b8023
commit d5be41617e
2 changed files with 6 additions and 6 deletions

View File

@ -2180,7 +2180,7 @@ end
attr_reader :connection attr_reader :connection
# Report Template ID strong e.g. full-audit # Report Template ID strong e.g. full-audit
attr_reader :template_id attr_reader :template_id
# pdf|html|xml|text|csv|raw-xml # pdf|html|xml|text|csv|raw-xml-v2
attr_reader :format attr_reader :format
# Array of (ReportFilter)* # Array of (ReportFilter)*
attr_reader :filters attr_reader :filters
@ -2189,7 +2189,7 @@ end
attr_reader :report_decoded 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 @error = false
@connection = connection @connection = connection
@ -2263,7 +2263,7 @@ class ReportConfig
attr_reader :name attr_reader :name
# The template ID used for this report definition # The template ID used for this report definition
attr_reader :template_id attr_reader :template_id
# html, db, txt, xml, raw-xml, csv, pdf # html, db, txt, xml, raw-xml-v2, csv, pdf
attr_reader :format attr_reader :format
# XXX new # XXX new
attr_reader :timezone attr_reader :timezone

View File

@ -284,7 +284,7 @@ class Plugin::Nexpose < Msf::Plugin
msfid = Time.now.to_i msfid = Time.now.to_i
report_formats = ["raw-xml", "ns-xml"] report_formats = ["raw-xml-v2", "ns-xml"]
report_format = report_formats.shift report_format = report_formats.shift
report = Nexpose::ReportConfig.new(@nsc) 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 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_format = report_formats.shift
report = Nexpose::ReportConfig.new(@nsc) report = Nexpose::ReportConfig.new(@nsc)
@ -584,7 +584,7 @@ class Plugin::Nexpose < Msf::Plugin
def process_nexpose_data(fmt, data) def process_nexpose_data(fmt, data)
case fmt case fmt
when 'raw-xml' when 'raw-xml-v2'
framework.db.import({:data => data}) framework.db.import({:data => data})
when 'ns-xml' when 'ns-xml'
framework.db.import({:data => data}) framework.db.import({:data => data})