Fixes #526. Correct socket name and call to super in the socket output io
git-svn-id: file:///home/svn/framework3/trunk@7548 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
9b1935eb2a
commit
a92fbb1ff4
|
@ -13,6 +13,7 @@ class Output::Socket < Rex::Ui::Text::Output
|
||||||
|
|
||||||
def initialize(sock)
|
def initialize(sock)
|
||||||
@sock = sock
|
@sock = sock
|
||||||
|
super()
|
||||||
end
|
end
|
||||||
|
|
||||||
def supports_color?
|
def supports_color?
|
||||||
|
@ -20,7 +21,7 @@ class Output::Socket < Rex::Ui::Text::Output
|
||||||
when true
|
when true
|
||||||
# Allow color if the user forces it on
|
# Allow color if the user forces it on
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -39,3 +40,4 @@ end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ class Plugin::Msfd < Msf::Plugin
|
||||||
client.close
|
client.close
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
msg = "Msfd: New connection from #{cli.peerhost}"
|
msg = "Msfd: New connection from #{client.peerhost}"
|
||||||
ilog(msg, 'core')
|
ilog(msg, 'core')
|
||||||
print_status(msg)
|
print_status(msg)
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ class Plugin::Msfd < Msf::Plugin
|
||||||
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(cli),
|
'LocalInput' => Rex::Ui::Text::Input::Socket.new(cli),
|
||||||
'LocalOutput' => Rex::Ui::Text::Output::Socket.new(cli),
|
'LocalOutput' => Rex::Ui::Text::Output::Socket.new(cli),
|
||||||
'AllowCommandPassthru' => false).run
|
'AllowCommandPassthru' => false).run
|
||||||
rescue
|
rescue
|
||||||
|
@ -130,7 +130,7 @@ class Plugin::Msfd < Msf::Plugin
|
||||||
msg = "Msfd: Closing client connection with #{cli.peerhost}"
|
msg = "Msfd: Closing client connection with #{cli.peerhost}"
|
||||||
ilog(msg, 'core')
|
ilog(msg, 'core')
|
||||||
print_status(msg)
|
print_status(msg)
|
||||||
begin
|
begin
|
||||||
cli.shutdown
|
cli.shutdown
|
||||||
cli.close
|
cli.close
|
||||||
rescue IOError
|
rescue IOError
|
||||||
|
@ -158,3 +158,4 @@ protected
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue