Bug fix for passive-exploits
Bug fix for a crash in the DB import for XML git-svn-id: file:///home/svn/framework3/trunk@3920 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
7396e71845
commit
ec987e0f28
|
@ -129,15 +129,25 @@ class ExploitDriver
|
|||
# Set up the run context
|
||||
ctx = [ exploit, payload ]
|
||||
|
||||
|
||||
# If we are being instructed to run as a job then let's create that job
|
||||
# like a good person.
|
||||
if (use_job)
|
||||
if (exploit.stance == Msf::Exploit::Stance::Passive)
|
||||
exploit.framework.jobs.start_bg_job(
|
||||
"Exploit: #{exploit.refname}",
|
||||
ctx,
|
||||
Proc.new { |ctx| job_run_proc(ctx) },
|
||||
Proc.new { |ctx| job_cleanup_proc(ctx) }
|
||||
)
|
||||
else
|
||||
exploit.framework.jobs.start_job(
|
||||
"Exploit: #{exploit.refname}",
|
||||
ctx,
|
||||
Proc.new { |ctx| job_run_proc(ctx) },
|
||||
Proc.new { |ctx| job_cleanup_proc(ctx) })
|
||||
# Otherwise, run inline.
|
||||
Proc.new { |ctx| job_cleanup_proc(ctx) }
|
||||
)
|
||||
end
|
||||
else
|
||||
job_run_proc(ctx)
|
||||
job_cleanup_proc(ctx)
|
||||
|
|
|
@ -376,7 +376,10 @@ module Db
|
|||
host.elements['ports'].elements.each('port') do |port|
|
||||
prot = port.attributes['protocol']
|
||||
pnum = port.attributes['portid']
|
||||
|
||||
next if not port.elements['state']
|
||||
stat = port.elements['state'].attributes['state']
|
||||
|
||||
next if not port.elements['service']
|
||||
name = port.elements['service'].attributes['name']
|
||||
prod = port.elements['service'].attributes['product']
|
||||
|
|
Loading…
Reference in New Issue