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


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

#descriptionObject

The action's description


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

def description
  @description
end

#nameObject

The name of the action ('info')


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

def name
  @name
end

#optsObject

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