Module: Metasploit::Model::Authority
- Extended by:
- ActiveModel::Naming, ActiveSupport::Concern
- Includes:
- Translation
- Defined in:
- lib/metasploit/model/authority.rb
Overview
Code shared between Mdm::Authority and Metasploit::Framework::Authority.
Defined Under Namespace
Modules: Bid, Cve, Msb, Osvdb, Pmasa, Secunia, UsCertVu, Waraxe, Zdi
Instance Attribute Summary collapse
-
#abbreviation ⇒ String
Abbreviation or initialism for authority, such as CVE for 'Common Vulnerability and Exposures'.
-
#module_instances ⇒ Array<Metasploit::Model::Module::Instance>
readonly
Modules that have a reference with this authority.
-
#obsolete ⇒ false, true
Whether this authority is obsolete and no longer exists on the internet.
-
#references ⇒ Array<Metasploit::Model::Reference>
References that use this authority's scheme for their Reference#authority.
-
#summary ⇒ String?
An expansion of the #abbreviation.
-
#url ⇒ String?
URL to the authority's home page or root URL for their #references database.
-
#vulns ⇒ Array<Metasploit::Model::Vuln>
readonly
Vulnerabilities that have a reference under this authority.
Instance Method Summary collapse
-
#designation_url(designation) ⇒ String?
Returns the URL for a designation.
-
#extension ⇒ Module?
Returns module that include authority specific methods.
-
#extension_name ⇒ String?
Returns name of module that includes authority specific methods.
Instance Attribute Details
#abbreviation ⇒ String
Abbreviation or initialism for authority, such as CVE for 'Common Vulnerability and Exposures'.
|
|
# File 'lib/metasploit/model/authority.rb', line 62
|
#module_instances ⇒ Array<Metasploit::Model::Module::Instance> (readonly)
Modules that have a reference with this authority.
|
|
# File 'lib/metasploit/model/authority.rb', line 48
|
#obsolete ⇒ false, true
Whether this authority is obsolete and no longer exists on the internet.
|
|
# File 'lib/metasploit/model/authority.rb', line 67
|
#references ⇒ Array<Metasploit::Model::Reference>
References that use this authority's scheme for their Reference#authority.
|
|
# File 'lib/metasploit/model/authority.rb', line 42
|
#summary ⇒ String?
An expansion of the #abbreviation.
|
|
# File 'lib/metasploit/model/authority.rb', line 73
|
#url ⇒ String?
URL to the authority's home page or root URL for their #references database.
|
|
# File 'lib/metasploit/model/authority.rb', line 78
|
#vulns ⇒ Array<Metasploit::Model::Vuln> (readonly)
Vulnerabilities that have a reference under this authority.
|
|
# File 'lib/metasploit/model/authority.rb', line 53
|
Instance Method Details
#designation_url(designation) ⇒ String?
Returns the URL for a designation.
93 94 95 96 97 98 99 100 101 |
# File 'lib/metasploit/model/authority.rb', line 93 def designation_url(designation) url = nil if extension url = extension.designation_url(designation) end url end |
#extension ⇒ Module?
Returns module that include authority specific methods.
107 108 109 110 111 112 113 |
# File 'lib/metasploit/model/authority.rb', line 107 def extension begin extension_name.constantize rescue NameError nil end end |
#extension_name ⇒ String?
Returns name of module that includes authority specific methods.
119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/metasploit/model/authority.rb', line 119 def extension_name extension_name = nil unless abbreviation.blank? # underscore before camelize to eliminate -'s relative_model_name = abbreviation.underscore.camelize # don't scope to self.class.name so that authority extension are always resolved the same in Mdm and # Metasploit::Framework. extension_name = "Metasploit::Model::Authority::#{relative_model_name}" end extension_name end |