Module: Metasploit::Model::Module::Rank

Extended by:
ActiveModel::Naming, ActiveSupport::Concern
Includes:
Translation
Defined in:
lib/metasploit/model/module/rank.rb

Overview

Code shared between Mdm::Module::Rank and Metasploit::Framework::Module::Rank.

Constant Summary collapse

NAME_REGEXP =

Regular expression to ensure that #name is a word starting with a capital letter

/\A[A-Z][a-z]+\Z/
NUMBER_BY_NAME =

Converts #name to #number. Used for seeding. Seeds exist so that reports can use module_ranks to get the name of a rank without having to duplicate this constant.

{
    'Manual' => 0,
    'Low' => 100,
    'Average' => 200,
    'Normal' => 300,
    'Good' => 400,
    'Great' => 500,
    'Excellent' => 600
}
NAME_BY_NUMBER =

Converts #number to #name. Used to convert *Ranking constants used in Msf::Modules back to Strings.

NUMBER_BY_NAME.invert

Instance Attribute Summary collapse

Instance Attribute Details

#nameString

The name of the rank.

Returns:

  • (String)


# File 'lib/metasploit/model/module/rank.rb', line 81

#numberInteger

The numerical value of the rank. Higher numbers are better.

Returns:

  • (Integer)


# File 'lib/metasploit/model/module/rank.rb', line 86