Fixes #215. Reinitialize the input/output after a reload

git-svn-id: file:///home/svn/framework3/trunk@5851 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-11-08 17:48:21 +00:00
parent 5af9abd81d
commit d1052fdaf1
1 changed files with 13 additions and 20 deletions

View File

@ -160,20 +160,15 @@ 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...")
@ -182,11 +177,9 @@ class Exploit
end end
self.mod = framework.modules.reload_module(mod) self.mod = framework.modules.reload_module(mod)
self.mod.init_ui(driver.input, driver.output)
cmd_exploit(*args) cmd_exploit(*args)
rescue
log_error("Failed to rexploit: #{$!}")
end
end end
end end