Class: Msf::Module::AuxiliaryAction
- Inherits:
-
Object
- Object
- Msf::Module::AuxiliaryAction
- Defined in:
- lib/msf/core/module/auxiliary_action.rb
Overview
A target for an exploit.
Instance Attribute Summary collapse
-
#description ⇒ Object
The action’s description.
-
#name ⇒ Object
The name of the action (‘info’).
-
#opts ⇒ Object
Action specific parameters.
Class Method Summary collapse
-
.from_a(ary) ⇒ Object
Serialize from an array to an Action instance.
-
.transform(src) ⇒ Object
Transforms the supplied source into an array of AuxiliaryActions.
Instance Method Summary collapse
-
#[](key) ⇒ Object
Index the options directly.
-
#initialize(name, opts = {}) ⇒ AuxiliaryAction
constructor
Creates a new action definition.
Constructor Details
#initialize(name, opts = {}) ⇒ AuxiliaryAction
Creates a new action definition
29 30 31 32 33 |
# File 'lib/msf/core/module/auxiliary_action.rb', line 29 def initialize(name, opts={}) self.name = name self.opts = opts self.description = opts['Description'] || '' end |
Instance Attribute Details
#description ⇒ Object
The action’s description
49 50 51 |
# File 'lib/msf/core/module/auxiliary_action.rb', line 49 def description @description end |
#name ⇒ Object
The name of the action (‘info’)
45 46 47 |
# File 'lib/msf/core/module/auxiliary_action.rb', line 45 def name @name end |
#opts ⇒ Object
Action specific parameters
53 54 55 |
# File 'lib/msf/core/module/auxiliary_action.rb', line 53 def opts @opts end |
Class Method Details
.from_a(ary) ⇒ Object
Serialize from an array to an Action instance.
14 15 16 17 |
# File 'lib/msf/core/module/auxiliary_action.rb', line 14 def self.from_a(ary) return nil if ary.nil? self.new(*ary) end |
.transform(src) ⇒ Object
Transforms the supplied source into an array of AuxiliaryActions.
22 23 24 |
# File 'lib/msf/core/module/auxiliary_action.rb', line 22 def self.transform(src) Rex::Transformer.transform(src, Array, [ self, String ], 'AuxiliaryAction') end |
Instance Method Details
#[](key) ⇒ Object
Index the options directly.
38 39 40 |
# File 'lib/msf/core/module/auxiliary_action.rb', line 38 def [](key) opts[key] end |