Module: Msf::Module::FullName

Extended by:
ActiveSupport::Concern
Included in:
Msf::Module
Defined in:
lib/msf/core/module/full_name.rb

Overview

Note:

ModuleInfo#name is unrelated to #fullname and should instead be thought of as the title or summary of the module.

Names related to #fullname, such as #fullname, #refname, and #shortname.

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aliased_asObject

Instance Methods


55
56
57
# File 'lib/msf/core/module/full_name.rb', line 55

def aliased_as
  @aliased_as
end

Instance Method Details

#aliasesObject


104
105
106
# File 'lib/msf/core/module/full_name.rb', line 104

def aliases
  self.class.aliases
end

#fullnameObject

Returns the module's framework full reference name. This is the short name that end-users work with (refname) plus the type of module prepended. Ex:

payloads/windows/shell/reverse_tcp


64
65
66
# File 'lib/msf/core/module/full_name.rb', line 64

def fullname
  aliased_as || self.class.fullname
end

#promptnameObject

Returns the module's framework prompt-friendly name.

windows/shell/reverse_tcp


91
92
93
# File 'lib/msf/core/module/full_name.rb', line 91

def promptname
  refname
end

#realnameObject

Always return the module's framework full reference name, even when the module is aliased.


72
73
74
# File 'lib/msf/core/module/full_name.rb', line 72

def realname
  self.class.fullname
end

#refnameObject

Returns the module's framework reference name. This is the short name that end-users work with. Ex:

windows/shell/reverse_tcp


82
83
84
# File 'lib/msf/core/module/full_name.rb', line 82

def refname
  fullname.delete_prefix("#{type}/")
end

#shortnameObject

Returns the module's framework short name.

reverse_tcp


100
101
102
# File 'lib/msf/core/module/full_name.rb', line 100

def shortname
  refname.split('/').last
end