Class Msf::Ui::Console::Driver
In: lib/msf/ui/console/driver.rb
Parent: Msf::Ui::Driver

This class implements a user interface driver on a console interface.

Methods

Included Modules

FrameworkEventManager Rex::Ui::Text::DispatcherShell

Constants

ConfigCore = "framework/core"
ConfigGroup = "framework/ui/console"
DefaultPrompt = "%umsf"
DefaultPromptChar = ">%c"

Attributes

active_module  [RW]  The active module associated with the driver.
active_session  [RW]  The active session associated with the driver.
command_passthru  [R]  Whether or not commands can be passed through.
framework  [R]  The framework instance associated with this driver.

Public Class methods

Initializes a console driver instance with the supplied prompt string and prompt character. The optional hash can take extra values that will serve to initialize the console driver.

The optional hash values can include:

AllowCommandPassthru

     Whether or not unknown commands should be passed through and executed by
     the local system.

Public Instance methods

If defanged is true, dangerous functionality, such as exploitation, irb, and command shell passthru is disabled. In this case, an exception is raised.

Loads configuration for the console.

Loads configuration that needs to be analyzed before the framework instance is created.

Processes the resource script file for the console.

Called before things actually get rolling such that banners can be displayed, scripts can be processed, and other fun can be had.

Called when a variable is set to a specific value. This allows the console to do extra processing, such as enabling logging or doing some other kind of task. If this routine returns false it will indicate that the variable is not being set to a valid value.

Called when a variable is unset. If this routine returns false it is an indication that the variable should not be allowed to be unset.

Saves configuration for the console.

Creates the resource script file for the console.

Protected Instance methods

This method handles adjusting the global log level threshold.

If an unknown command was passed, try to see if it‘s a valid local executable. This is only allowed if command passthru has been permitted

[Validate]