Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5 from fakenine/add_cves_to_results
Browse files Browse the repository at this point in the history
add CVEs to Result
  • Loading branch information
fwininger committed Jan 8, 2018
2 parents 6f2f65e + 7b0d88d commit 9734df2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/openvas/result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module Openvas
# Class used to interact with OpenVAS' scans results
class Result < Client
attr_accessor :id, :name, :comment, :description, :host, :user, :port, :severity, :created_at, :updated_at
attr_accessor :id, :name, :comment, :description, :host, :user, :port, :severity, :cves, :created_at, :updated_at

def initialize(result)
@id = result.at_xpath('@id').value
Expand All @@ -16,6 +16,7 @@ def initialize(result)
@port = result.at_xpath('port').text
@severity = result.at_xpath('severity').text
@description = result.at_xpath('description').text
@cves = result.at_xpath('nvt').at_xpath('cve').text.split(',').map(&:strip)

@created_at = Time.parse(result.at_xpath('creation_time').text)
@updated_at = Time.parse(result.at_xpath('modification_time').text)
Expand Down

0 comments on commit 9734df2

Please sign in to comment.