class Nexpose::XML::VulnerabilityDetail
Details for a vulnerability.
Attributes
description[RW]
The HTML Description of this vulnerability.
solution[RW]
The HTML Solution for this vulnerability.
Public Class Methods
new(id, title, severity)
click to toggle source
# File lib/nexpose/vuln.rb, line 198 def initialize(id, title, severity) @id = id @title = title @severity = severity @references = [] end
parse(xml)
click to toggle source
# File lib/nexpose/vuln.rb, line 205 def self.parse(xml) vuln = parse_attributes(xml) vuln.description = REXML::XPath.first(xml, 'description').text vuln.solution = REXML::XPath.first(xml, 'solution').text xml.elements.each('references/reference') do |ref| vuln.references << Reference.new(ref.attributes['source'], ref.text) end vuln end