Fixes #2977; error when checking non-interactive channels.
git-svn-id: file:///home/svn/framework3/trunk@10704 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
62622d51c2
commit
54df2c1e6c
|
@ -129,7 +129,7 @@ class Session < Base
|
|||
#@framework.events.on_session_command(s, buff)
|
||||
interacting = false
|
||||
s.channels.each_value do |ch|
|
||||
interacting ||= ch.interacting
|
||||
interacting ||= ch.respond_to?('interacting') && ch.interacting
|
||||
end
|
||||
if interacting
|
||||
s.user_input.put(buff+"\n")
|
||||
|
|
|
@ -107,7 +107,7 @@ class WebConsole
|
|||
#background interactive meterpreter channel
|
||||
if(self.console.active_session.channels)
|
||||
self.console.active_session.channels.each_value do |ch|
|
||||
if(ch.interacting)
|
||||
if(ch.respond_to?('interacting') && ch.interacting)
|
||||
ch.detach()
|
||||
return
|
||||
end
|
||||
|
@ -124,7 +124,7 @@ class WebConsole
|
|||
#close interactive meterpreter channel
|
||||
if(self.console.active_session.channels)
|
||||
self.console.active_session.channels.each_value do |ch|
|
||||
if(ch.interacting)
|
||||
if(ch.respond_to?('interacting') && ch.interacting)
|
||||
ch.close()
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue