Class: Msf::Module::AuxiliaryAction

Inherits:
Object
  • Object
show all
Defined in:
lib/msf/core/module/auxiliary_action.rb

Overview

A target for an exploit.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, opts = {}) ⇒ AuxiliaryAction

Creates a new action definition


30
31
32
33
34
# File 'lib/msf/core/module/auxiliary_action.rb', line 30

def initialize(name, opts={})
  self.name        = name
  self.opts        = opts
  self.description = opts['Description'] || ''
end

Instance Attribute Details

#descriptionObject

The action's description


50
51
52
# File 'lib/msf/core/module/auxiliary_action.rb', line 50

def description
  @description
end

#nameObject

The name of the action ('info')


46
47
48
# File 'lib/msf/core/module/auxiliary_action.rb', line 46

def name
  @name
end

#optsObject

Action specific parameters


54
55
56
# File 'lib/msf/core/module/auxiliary_action.rb', line 54

def opts
  @opts
end

Class Method Details

.from_a(ary) ⇒ Object

Serialize from an array to an Action instance.


15
16
17
18
# File 'lib/msf/core/module/auxiliary_action.rb', line 15

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.


23
24
25
# File 'lib/msf/core/module/auxiliary_action.rb', line 23

def self.transform(src)
  Rex::Transformer.transform(src, Array, [ self, String ], 'AuxiliaryAction')
end

Instance Method Details

#[](key) ⇒ Object

Index the options directly.


39
40
41
# File 'lib/msf/core/module/auxiliary_action.rb', line 39

def [](key)
  opts[key]
end