Fixes #215. Reinitialize the input/output after a reload
git-svn-id: file:///home/svn/framework3/trunk@5851 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
5af9abd81d
commit
d1052fdaf1
|
@ -160,33 +160,26 @@ class Exploit
|
|||
# vulnerable.
|
||||
#
|
||||
def cmd_rcheck(*args)
|
||||
begin
|
||||
self.mod = framework.modules.reload_module(mod)
|
||||
|
||||
cmd_check(*args)
|
||||
rescue
|
||||
log_error("Failed to rcheck: #{$!}")
|
||||
end
|
||||
self.mod = framework.modules.reload_module(mod)
|
||||
self.mod.init_ui(driver.input, driver.output)
|
||||
cmd_check(*args)
|
||||
end
|
||||
|
||||
#
|
||||
# Reloads an exploit module and launches an exploit.
|
||||
#
|
||||
def cmd_rexploit(*args)
|
||||
begin
|
||||
if mod.job_id
|
||||
print_status("Stopping existing job...")
|
||||
if mod.job_id
|
||||
print_status("Stopping existing job...")
|
||||
|
||||
framework.jobs.stop_job(mod.job_id)
|
||||
mod.job_id = nil
|
||||
end
|
||||
|
||||
self.mod = framework.modules.reload_module(mod)
|
||||
|
||||
cmd_exploit(*args)
|
||||
rescue
|
||||
log_error("Failed to rexploit: #{$!}")
|
||||
framework.jobs.stop_job(mod.job_id)
|
||||
mod.job_id = nil
|
||||
end
|
||||
|
||||
self.mod = framework.modules.reload_module(mod)
|
||||
self.mod.init_ui(driver.input, driver.output)
|
||||
|
||||
cmd_exploit(*args)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue