Class: Nexpose::VulnSynopsis

Inherits:
VulnFinding show all
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

Constructor Details

#initialize(hash) ⇒ VulnSynopsis

Returns a new instance of VulnSynopsis.



274
275
276
277
278
279
280
281
282
283
284
285
# File 'lib/nexpose/vuln.rb', line 274

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