fix multi concurrent
git-svn-id: file:///home/svn/incoming/trunk@3149 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
@@ -44,17 +44,20 @@ exit if (Process.fork()) unless foreground
|
|||||||
begin
|
begin
|
||||||
client = server.accept
|
client = server.accept
|
||||||
|
|
||||||
Thread.new {
|
Thread.new(client) { |cli|
|
||||||
begin
|
begin
|
||||||
Msf::Ui::Console::Driver.new(
|
Msf::Ui::Console::Driver.new(
|
||||||
Msf::Ui::Console::Driver::DefaultPrompt,
|
Msf::Ui::Console::Driver::DefaultPrompt,
|
||||||
Msf::Ui::Console::Driver::DefaultPromptChar,
|
Msf::Ui::Console::Driver::DefaultPromptChar,
|
||||||
'Framework' => $framework,
|
'Framework' => $framework,
|
||||||
'LocalInput' => Rex::Ui::Text::Input::Socket.new(client),
|
'LocalInput' => Rex::Ui::Text::Input::Socket.new(cli),
|
||||||
'LocalOutput' => Rex::Ui::Text::Output::Socket.new(client)).run
|
'LocalOutput' => Rex::Ui::Text::Output::Socket.new(cli)).run
|
||||||
|
|
||||||
client.shutdown
|
begin
|
||||||
client.close
|
cli.shutdown
|
||||||
|
cli.close
|
||||||
|
rescue IOError
|
||||||
|
end
|
||||||
rescue
|
rescue
|
||||||
puts "Error: #{$!}\n\n#{$@.join("\n")}"
|
puts "Error: #{$!}\n\n#{$@.join("\n")}"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user