2005-05-22 19:39:21 +00:00
|
|
|
module Msf
|
|
|
|
module Ui
|
|
|
|
module Console
|
|
|
|
|
|
|
|
module CommandDispatcher
|
|
|
|
|
|
|
|
def initialize(in_driver)
|
|
|
|
self.driver = in_driver
|
|
|
|
end
|
|
|
|
|
2005-05-22 20:28:21 +00:00
|
|
|
def print_error(msg = '')
|
2005-05-22 19:39:21 +00:00
|
|
|
driver.print_error(msg)
|
|
|
|
end
|
|
|
|
|
2005-05-22 20:28:21 +00:00
|
|
|
def print_status(msg = '')
|
2005-05-22 19:39:21 +00:00
|
|
|
driver.print_status(msg)
|
|
|
|
end
|
|
|
|
|
2005-05-22 20:28:21 +00:00
|
|
|
def print_line(msg = '')
|
2005-05-22 19:39:21 +00:00
|
|
|
driver.print_line(msg)
|
|
|
|
end
|
|
|
|
|
2005-05-22 20:28:21 +00:00
|
|
|
def print(msg = '')
|
2005-05-22 19:39:21 +00:00
|
|
|
driver.print(msg)
|
|
|
|
end
|
|
|
|
|
|
|
|
def update_prompt(prompt)
|
|
|
|
driver.update_prompt(prompt)
|
|
|
|
end
|
|
|
|
|
|
|
|
def framework
|
|
|
|
return driver.framework
|
|
|
|
end
|
|
|
|
|
|
|
|
def set_active_module(mod)
|
|
|
|
driver.datastore['_ActiveModule'] = mod
|
|
|
|
end
|
|
|
|
|
|
|
|
def get_active_module
|
|
|
|
return driver.datastore['_ActiveModule']
|
|
|
|
end
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
attr_accessor :driver
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end end end
|
|
|
|
|
|
|
|
require 'Msf/Ui/Console/ModuleCommandDispatcher'
|
|
|
|
require 'Msf/Ui/Console/CommandDispatcher/Core'
|