Skip to content

Commit 5841756

Browse files
committed
Merge branch 'bug/9582-metasploit-imports-and-tasks'
Land rapid7#3299
2 parents 891118a + 8f43c22 commit 5841756

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/msf/core/db.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4262,7 +4262,10 @@ def import_retina_xml(args={}, &block)
42624262
parser = Rex::Parser::RetinaXMLStreamParser.new
42634263
parser.on_found_host = Proc.new do |host|
42644264
hobj = nil
4265-
data = {:workspace => wspace}
4265+
data = {
4266+
:workspace => wspace,
4267+
:task => args[:task]
4268+
}
42664269
addr = host['address']
42674270
next if not addr
42684271

lib/msf/core/db_manager/import_msf_xml.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def import_msf_xml(args={}, &block)
204204

205205
doc.elements.each("/#{btag}/hosts/host") do |host|
206206
host_data = {}
207+
host_data[:task] = args[:task]
207208
host_data[:workspace] = wspace
208209
host_data[:host] = nils_for_nulls(host.elements["address"].text.to_s.strip)
209210
if bl.include? host_data[:host]
@@ -247,6 +248,7 @@ def import_msf_xml(args={}, &block)
247248

248249
host.elements.each('services/service') do |service|
249250
service_data = {}
251+
service_data[:task] = args[:task]
250252
service_data[:workspace] = wspace
251253
service_data[:host] = hobj
252254
service_data[:port] = nils_for_nulls(service.elements["port"].text.to_s.strip).to_i

0 commit comments

Comments
 (0)