Fix background exploit jobs

git-svn-id: file:///home/svn/framework3/trunk@5943 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-11-17 19:51:09 +00:00
parent 5b225cea89
commit 2bc4ca41b3
1 changed files with 8 additions and 17 deletions

View File

@ -133,22 +133,13 @@ class ExploitDriver
# 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)
self.job_id = 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
self.job_id = exploit.framework.jobs.start_job(
"Exploit: #{exploit.refname}",
ctx,
Proc.new { |ctx| job_run_proc(ctx) },
Proc.new { |ctx| job_cleanup_proc(ctx) }
)
end
if (use_job or exploit.stance == Msf::Exploit::Stance::Passive)
self.job_id = 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
job_run_proc(ctx)
job_cleanup_proc(ctx)
@ -217,4 +208,4 @@ protected
end
end
end