Fixes #2977; error when checking non-interactive channels.

git-svn-id: file:///home/svn/framework3/trunk@10704 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Weeks 2010-10-16 15:21:06 +00:00
parent 62622d51c2
commit 54df2c1e6c
2 changed files with 3 additions and 3 deletions

View File

@ -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")

View File

@ -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