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.
|
# vulnerable.
|
||||||
#
|
#
|
||||||
def cmd_rcheck(*args)
|
def cmd_rcheck(*args)
|
||||||
begin
|
self.mod = framework.modules.reload_module(mod)
|
||||||
self.mod = framework.modules.reload_module(mod)
|
self.mod.init_ui(driver.input, driver.output)
|
||||||
|
cmd_check(*args)
|
||||||
cmd_check(*args)
|
|
||||||
rescue
|
|
||||||
log_error("Failed to rcheck: #{$!}")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Reloads an exploit module and launches an exploit.
|
# Reloads an exploit module and launches an exploit.
|
||||||
#
|
#
|
||||||
def cmd_rexploit(*args)
|
def cmd_rexploit(*args)
|
||||||
begin
|
if mod.job_id
|
||||||
if mod.job_id
|
print_status("Stopping existing job...")
|
||||||
print_status("Stopping existing job...")
|
|
||||||
|
|
||||||
framework.jobs.stop_job(mod.job_id)
|
framework.jobs.stop_job(mod.job_id)
|
||||||
mod.job_id = nil
|
mod.job_id = nil
|
||||||
end
|
|
||||||
|
|
||||||
self.mod = framework.modules.reload_module(mod)
|
|
||||||
|
|
||||||
cmd_exploit(*args)
|
|
||||||
rescue
|
|
||||||
log_error("Failed to rexploit: #{$!}")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.mod = framework.modules.reload_module(mod)
|
||||||
|
self.mod.init_ui(driver.input, driver.output)
|
||||||
|
|
||||||
|
cmd_exploit(*args)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue