Module: Msf::Module::Deprecated::ClassMethods

Defined in:
lib/msf/core/module/deprecated.rb

Overview

Additional class methods for deprecated modules

Instance Method Summary collapse

Instance Method Details

#deprecated(deprecation_date = nil, replacement_module = nil) ⇒ void

This method returns an undefined value.

Mark this module as deprecated

Any time this module is run it will print warnings to that effect.

Parameters:

  • deprecation_date (Date, #to_s) (defaults to: nil)

    The date on which this module will be removed

  • replacement_module (String) (defaults to: nil)

    The name of a module that users should be using instead of this deprecated one


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

def deprecated(deprecation_date=nil, replacement_module=nil)
  # Yes, class instance variables.
  @replacement_module = replacement_module
  @deprecation_date = deprecation_date
end

#deprecation_dateDate?

The date on which this module will be removed

Returns:

  • (Date, nil)

See Also:


32
# File 'lib/msf/core/module/deprecated.rb', line 32

def deprecation_date; @deprecation_date; end

#replacement_moduleString?

The name of a module that users should be using instead of this deprecated one

Returns:

  • (String, nil)

See Also:


26
# File 'lib/msf/core/module/deprecated.rb', line 26

def replacement_module; @replacement_module; end