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, # Author: Metasploit LLC
# operations and sessions carried over the web interface. # Description: The AJAX console controller of msfweb
#
class ConsoleController < ApplicationController class ConsoleController < ApplicationController
# #

View File

@ -30,10 +30,6 @@ class WebConsole
attr_accessor :prompt attr_accessor :prompt
attr_accessor :killed attr_accessor :killed
def eof?
self.pipe_input.eof?
end
def intrinsic_shell? def intrinsic_shell?
true true
end end
@ -45,9 +41,40 @@ class WebConsole
def _print_prompt def _print_prompt
end 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 def pgets
self.pipe_input.gets self.pipe_input.gets
end 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 end
# #
@ -58,16 +85,8 @@ class WebConsole
def supports_color? def supports_color?
false false
end end
def cmd_exploit(*args)
args.push('-z')
$stderr.puts "Weeeeeeeeeeee!"
super(*args)
end end
end
def initialize(framework, console_id) def initialize(framework, console_id)
# Configure the framework # Configure the framework
self.framework = framework self.framework = framework