Module: Msf::Module::Deprecated

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

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Extends with ClassMethods


41
42
43
# File 'lib/msf/core/module/deprecated.rb', line 41

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#deprecation_dateDate?

The date on which this module will be removed


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

def deprecation_date; self.class.deprecation_date; end

#replacement_moduleString?

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


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

def replacement_module; self.class.replacement_module; end

#setupObject


45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/msf/core/module/deprecated.rb', line 45

def setup
  print_warning("*"*72)
  print_warning("*%red"+"This module is deprecated!".center(70)+"%clr*")
  if deprecation_date
    print_warning("*"+"It will be removed on or about #{deprecation_date}".center(70)+"*")
  end
  if replacement_module
    print_warning("*"+"Use #{replacement_module} instead".center(70)+"*")
  end
  print_warning("*"*72)
  super
end