Class: Msf::Plugin::Lab
- Inherits:
-
Msf::Plugin
- Object
- Msf::Plugin
- Msf::Plugin::Lab
- Defined in:
- plugins/lab.rb
Defined Under Namespace
Classes: LabCommandDispatcher
Instance Attribute Summary collapse
-
#controller ⇒ Object
The constructor is called when an instance of the plugin is created.
Attributes inherited from Msf::Plugin
Attributes included from Framework::Offspring
Instance Method Summary collapse
-
#cleanup ⇒ Object
The cleanup routine for plugins gives them a chance to undo any actions they may have done to the framework.
-
#desc ⇒ Object
This method returns a brief description of the plugin.
-
#initialize(framework, opts) ⇒ Lab
constructor
A new instance of Lab.
-
#name ⇒ Object
This method returns a short, friendly name for the plugin.
Methods inherited from Msf::Plugin
#add_console_dispatcher, create, #flush, #input, #output, #print, #print_error, #print_good, #print_line, #print_status, #print_warning, #remove_console_dispatcher
Constructor Details
#initialize(framework, opts) ⇒ Lab
Returns a new instance of Lab.
529 530 531 532 533 534 535 536 537 538 539 |
# File 'plugins/lab.rb', line 529 def initialize(framework, opts) super ## Register the commands above console_dispatcher = add_console_dispatcher(LabCommandDispatcher) @controller = ::Lab::Controllers::VmController.new ## Share the vms console_dispatcher.controller = @controller end |
Instance Attribute Details
#controller ⇒ Object
The constructor is called when an instance of the plugin is created. The framework instance that the plugin is being associated with is passed in the framework parameter. Plugins should call the parent constructor when inheriting from Msf::Plugin to ensure that the framework attribute on their instance gets set.
527 528 529 |
# File 'plugins/lab.rb', line 527 def controller @controller end |
Instance Method Details
#cleanup ⇒ Object
The cleanup routine for plugins gives them a chance to undo any actions they may have done to the framework. For instance, if a console dispatcher was added, then it should be removed in the cleanup routine.
546 547 548 549 550 |
# File 'plugins/lab.rb', line 546 def cleanup # If we had previously registered a console dispatcher with the console, # deregister it now. remove_console_dispatcher('Lab') end |
#desc ⇒ Object
This method returns a brief description of the plugin. It should be no more than 60 characters, but there are no hard limits.
563 564 565 |
# File 'plugins/lab.rb', line 563 def desc 'Adds the ability to manage VMs' end |
#name ⇒ Object
This method returns a short, friendly name for the plugin.
555 556 557 |
# File 'plugins/lab.rb', line 555 def name 'lab' end |