Fixes #256. Jobify all auxiliary modules

git-svn-id: file:///home/svn/framework3/trunk@5931 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-11-16 21:28:51 +00:00
parent 2cf715fd92
commit f6464e7116
1 changed files with 5 additions and 12 deletions

View File

@ -334,7 +334,7 @@ module Msf
result = MsfWindow::Auxiliary.new(@mydriver.active_module.fullname, @hash) result = MsfWindow::Auxiliary.new(@mydriver.active_module.fullname, @hash)
action = @mydriver.exploit.datastore['ACTION'] action = @mydriver.exploit.datastore['ACTION']
jobify = false jobify = true
@pipe = Msf::Ui::Gtk2::GtkConsolePipe.new @pipe = Msf::Ui::Gtk2::GtkConsolePipe.new
@ -343,12 +343,7 @@ module Msf
result.append_log_view(msg) result.append_log_view(msg)
end end
@pipe.print_status("Launching auxiliary #{@mydriver.exploit.refname}...") @pipe.print_status("Launching auxiliary #{@mydriver.exploit.refname}...")
# Always run passive modules in the background
if (@mydriver.exploit.passive? or @mydriver.exploit.passive_action?(action))
jobify = true
end
begin begin
Thread.new do Thread.new do
@ -358,14 +353,12 @@ module Msf
'LocalInput' => @pipe, 'LocalInput' => @pipe,
'LocalOutput' => @pipe, 'LocalOutput' => @pipe,
'RunAsJob' => jobify 'RunAsJob' => jobify
) )
@pipe.print_status("Auxiliary #{@mydriver.exploit.refname} completed.")
end end
result.show_all result.show_all
rescue ::Exception => e rescue ::Exception => e
select(nil, nil, nil, 0.01) select(nil, nil, nil, 0.01)
@pipe.print_status("Auxiliary #{@mydriver.exploit.refname} completed.")
return false return false
end end
end end
@ -376,4 +369,4 @@ module Msf
end end
end end
end end