Class Msf::Plugin
In: lib/msf/core/plugin.rb
Parent: Object

This module represents an abstract plugin that can be loaded into the context of a framework instance. Plugins are meant to provide an easy way to augment the feature set of the framework by being able to load and unload them during the course of a framework‘s lifetime. For instance, a plugin could be loaded to alter the default behavior of new sessions, such as by scripting meterpreter sessions that are created. The possiblities are endless!

All plugins must exist under the Msf::Plugin namespace. Plugins are reference counted to allow them to be loaded more than once if they‘re a singleton.

Methods

Included Modules

Framework::Offspring Rex::Ref

Public Class methods

Create an instance of the plugin using the supplied framework instance. We use create instead of new directly so that singleton plugins can just return their singleton instance.

Initializes the plugin instance with the supplied framework instance. The opts parameter is a hash of custom arguments that may be useful for a plugin. Some of the pre-defined arguments are:

LocalInput

     The local input handle that implements the Rex::Ui::Text::Input
     interface.

LocalOutput

     The local output handle that implements the Rex::Ui::Output interface.

Public Instance methods

Allows the plugin to clean up as it is being unloaded.

A short description of the plugin.

Flushes any buffered output.

Returns the local input handle if one was passed into the constructor.

Returns the name of the plugin.

Returns the local output handle if one was passed into the constructor.

Prints a message with no decoration.

Prints an error message.

Prints a ‘good’ message.

Prints an undecorated line of information.

Prints a status line.

Protected Instance methods

Adds the console dispatcher.

Removes the console dispatcher.

[Validate]