Prevent session interaction using the web console (since its so broken)

git-svn-id: file:///home/svn/framework3/trunk@4342 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2007-02-10 07:29:05 +00:00
parent a310616f18
commit 4d7e93a272
2 changed files with 35 additions and 15 deletions

View File

@ -1,6 +1,7 @@
# Author: LMH <lmh@info-pull.com>
# Description: The AJAX console controller of msfweb v.3. Handles commands,
# operations and sessions carried over the web interface.
#
# Author: Metasploit LLC
# Description: The AJAX console controller of msfweb
#
class ConsoleController < ApplicationController
#

View File

@ -30,10 +30,6 @@ class WebConsole
attr_accessor :prompt
attr_accessor :killed
def eof?
self.pipe_input.eof?
end
def intrinsic_shell?
true
end
@ -45,9 +41,40 @@ class WebConsole
def _print_prompt
end
#
# Wrapper methods around input pipe
#
def close
self.pipe_input.close
end
def put(*args)
self.pipe_input.put(*args)
end
def gets
self.pipe_input.gets
end
def pgets
self.pipe_input.gets
end
def eof?
self.pipe_input.eof?
end
def fd(*args)
raise ::RuntimeError, "Session interaction should be performed via the Sessions tab"
self.pipe_input.fd(*args)
end
def sysread(*args)
self.pipe_input.sysread(*args)
end
end
#
@ -58,16 +85,8 @@ class WebConsole
def supports_color?
false
end
def cmd_exploit(*args)
args.push('-z')
$stderr.puts "Weeeeeeeeeeee!"
super(*args)
end
end
def initialize(framework, console_id)
# Configure the framework
self.framework = framework