Class Msf::OptBase
In: lib/msf/core/option_container.rb
Parent: Object

The base class for all options.

Methods

Attributes

advanced  [RW]  Whether or not this is an advanced option.
default  [R]  The default value of the option.
desc  [R]  The description of the option.
enums  [RW]  The list of potential valid values
evasion  [RW]  Whether or not this is an evasion option.
name  [W]  Storing the name of the option.
name  [R]  The name of the option.
owner  [RW]  The module or entity that owns this option.
required  [R]  Whether or not the option is required.

Public Class methods

Initializes a named option with the supplied attribute array. The array is composed of three values.

attrs[0] = required (boolean type) attrs[1] = description (string) attrs[2] = default value attrs[3] = possible enum values

Public Instance methods

Returns true if this is an advanced option.

Returns true if the value supplied is nil and it‘s required to be a valid value

Returns true if this is an evasion option.

Normalizes the supplied value to conform with the type that the option is conveying.

Returns true if this is a required option.

Returns the value of the option as a string.

Returns true if the supplied type is equivalent to this option‘s type.

If it‘s required and the value is nil or empty, then it‘s not valid.

[Validate]