Class Msf::Config
In: lib/msf/base/config.rb
Parent: Hash

This class wraps interaction with global configuration that can be used as a persistent storage point for configuration, logs, and other such fun things.

Methods

Constants

InstallRoot = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..'))   The installation root directory for the distribution
FileSep = File::SEPARATOR   Default values
Defaults = { 'ConfigDirectory' => get_config_root, 'ConfigFile' => "config", 'ModuleDirectory' => "modules", 'ScriptDirectory' => "scripts", 'LogDirectory' => "logs", 'SessionLogDirectory' => "logs/sessions", 'PluginDirectory' => "plugins", 'DataDirectory' => "data"

Public Class methods

Calls the instance method.

Calls the instance method.

Calls the instance method.

Determines the base configuration directory.

Calls the instance method.

Returns the framework installation root.

Calls the instance method.

Calls the instance method.

Calls the instance method.

Updates the config class’ self with the default hash.

Calls the instance method.

Calls the instance method.

Calls the instance method.

Calls the instance method.

Calls the instance method.

Calls the instance method.

Public Instance methods

Returns the configuration directory default.

Returns the full path to the configuration file.

Returns the data directory

Initializes configuration, creating directories as necessary.

Returns the installation root directory

Loads configuration from the supplied file path, or the default one if none is specified.

Returns the directory that log files should be stored in.

Returns the global module directory.

Returns the directory that plugins are stored in.

Saves configuration to the path specified in the ConfigFile hash key or the default path is one isn‘t specified. The options should be group references that have named value pairs. Example:

save(

  'ExampleGroup' =>
     {
        'Foo' => 'Cat'
     })

Returns the path that scripts can be loaded from.

Returns the directory in which session log files are to reside.

Returns the user-specific module base path

Returns the user-specific script base path

[Validate]