Class: Nexpose::VulnSynopsis
- Inherits:
-
VulnFinding
- Object
- VulnFinding
- Nexpose::VulnSynopsis
- Defined in:
- lib/nexpose/vuln.rb
Overview
Vulnerability synopsis information pulled from AJAX requests. Data uses a numeric, console-specific vuln ID, which may need to be cross-referenced to the String ID to be used elsewhere.
Instance Attribute Summary
Attributes inherited from VulnFinding
#console_id, #cvss_score, #cvss_vector, #exploit, #id, #instances, #malware, #published, #risk, #severity, #title, #verified
Instance Method Summary collapse
-
#initialize(hash) ⇒ VulnSynopsis
constructor
A new instance of VulnSynopsis.
Constructor Details
#initialize(hash) ⇒ VulnSynopsis
Returns a new instance of VulnSynopsis.
276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/nexpose/vuln.rb', line 276 def initialize(hash) @id = hash['Vuln ID'].to_i @title = hash['Vulnerability'] @cvss_vector = hash['CVSS Base Vector'] @cvss_score = hash['CVSS Score'].to_f @risk = hash['Risk'].to_f @published = Time.at(hash['Published On'].to_i / 1000) @severity = hash['Severity'].to_i @instances = hash['Instances'].to_i @exploit = hash['ExploitSource'] @malware = hash['MalwareSource'] == 'true' end |