Class: CMSScanner::Vulnerability
- Inherits:
-
Object
- Object
- CMSScanner::Vulnerability
- Includes:
- References
- Defined in:
- lib/cms_scanner/vulnerability.rb
Overview
Generic Vulnerability
Instance Attribute Summary collapse
-
#cvss ⇒ Object
readonly
Returns the value of attribute cvss.
-
#fixed_in ⇒ Object
readonly
Returns the value of attribute fixed_in.
-
#introduced_in ⇒ Object
readonly
Returns the value of attribute introduced_in.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
param [ Vulnerability ] other.
-
#initialize(title, references: {}, type: nil, fixed_in: nil, introduced_in: nil, cvss: nil) ⇒ Vulnerability
constructor
A new instance of Vulnerability.
Methods included from References
#cve_url, #cve_urls, #cves, #exploitdb_ids, #exploitdb_url, #exploitdb_urls, #msf_modules, #msf_url, #msf_urls, #packetstorm_ids, #packetstorm_url, #packetstorm_urls, #references, #references=, #references_urls, #securityfocus_ids, #securityfocus_url, #securityfocus_urls, #urls, #youtube_url, #youtube_urls
Constructor Details
#initialize(title, references: {}, type: nil, fixed_in: nil, introduced_in: nil, cvss: nil) ⇒ Vulnerability
Returns a new instance of Vulnerability.
25 26 27 28 29 30 31 32 33 |
# File 'lib/cms_scanner/vulnerability.rb', line 25 def initialize(title, references: {}, type: nil, fixed_in: nil, introduced_in: nil, cvss: nil) @title = title @type = type @fixed_in = fixed_in @introduced_in = introduced_in @cvss = { score: cvss[:score], vector: cvss[:vector] } if cvss self.references = references end |
Instance Attribute Details
#cvss ⇒ Object (readonly)
Returns the value of attribute cvss.
8 9 10 |
# File 'lib/cms_scanner/vulnerability.rb', line 8 def cvss @cvss end |
#fixed_in ⇒ Object (readonly)
Returns the value of attribute fixed_in.
8 9 10 |
# File 'lib/cms_scanner/vulnerability.rb', line 8 def fixed_in @fixed_in end |
#introduced_in ⇒ Object (readonly)
Returns the value of attribute introduced_in.
8 9 10 |
# File 'lib/cms_scanner/vulnerability.rb', line 8 def introduced_in @introduced_in end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
8 9 10 |
# File 'lib/cms_scanner/vulnerability.rb', line 8 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/cms_scanner/vulnerability.rb', line 8 def type @type end |
Instance Method Details
#==(other) ⇒ Boolean
param [ Vulnerability ] other
38 39 40 41 42 43 44 |
# File 'lib/cms_scanner/vulnerability.rb', line 38 def ==(other) title == other.title && type == other.type && references == other.references && fixed_in == other.fixed_in && cvss == other.cvss end |