Files
metasploit-gs/lib/msf/core/module/auxiliary_action.rb
T
HD Moore c0a8b6cf22 Fixed auxiliarytarget issue, updated frame.rb to handle on-demand module loading
git-svn-id: file:///home/svn/incoming/trunk@3551 4d416f70-5f16-0410-b530-b9f4589650da
2006-03-04 16:46:15 +00:00

56 lines
781 B
Ruby

require 'msf/core'
###
#
# A target for an exploit.
#
###
class Msf::Module::AuxiliaryAction
#
# Serialize from an array to an Action instance.
#
def self.from_a(ary)
return nil if ary.nil?
self.new(*ary)
end
#
# Transforms the supplied source into an array of AuxiliaryActions.
#
def self.transform(src)
Rex::Transformer.transform(src, Array, [ self, String ], 'AuxiliaryAction')
end
#
# Creates a new action definition
#
def initialize(name, opts={})
self.name = name
self.opts = opts
end
#
# Index the options directly.
#
def [](key)
opts[key]
end
#
# The name of the action ('info')
#
attr_reader :name
#
# Action specific parameters
#
attr_reader :opts
protected
attr_writer :name, :opts # :nodoc:
end