openvas 0.3.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6094b62731b5348bd12957817944e7cefa4f1374
4
- data.tar.gz: e3f959afb305df9725ea3dada3dd123e4831dcf3
3
+ metadata.gz: 9299f3f36f86da68da156ea869c561664fd95669
4
+ data.tar.gz: be5cf83292c2bda8b06958b87bf1e2877cf16eb6
5
5
  SHA512:
6
- metadata.gz: 94c12bb0387ca5ed328b63ec98a006264ccdee4c999b7d53314d4f07071f11d02d2f4795ab755183454ef7635f877011f3d6a472e0667c0a4eeb5ae413addfcf
7
- data.tar.gz: 1268415590f0b935765e500605458b3bd878f18c851e6db4ca37d47119309585a0377dea851c9f7191f8bc9dc42c8971d8dd15aa07c95982c49e6f3ecde1fa62
6
+ metadata.gz: 929488877d1446adc13ec9f7b392742e23f3073c99ba46d38e1b6b7ceffe55a38bd437d5c23c4bd061178922245ca1478725221d7f6eedc2fa731a218e2bda93
7
+ data.tar.gz: 76301f89dc1c7e4b5e38d32e2fb8d82f889323faa69ebdcce2a5371872a8dd0df619cc69438ce86585710f80f417a351e1f89666cf148363b115a78891d6c687
@@ -4,8 +4,8 @@ require 'time'
4
4
 
5
5
  module Openvas
6
6
  # Class used to interact with OpenVAS' scans results
7
- class Result
8
- attr_accessor :id, :name, :comment, :description, :host, :user, :port, :severity, :created_at, :updated_at
7
+ class Result < Client
8
+ attr_accessor :id, :name, :comment, :description, :host, :user, :port, :severity, :cves, :created_at, :updated_at
9
9
 
10
10
  def initialize(result)
11
11
  @id = result.at_xpath('@id').value
@@ -16,6 +16,7 @@ module Openvas
16
16
  @port = result.at_xpath('port').text
17
17
  @severity = result.at_xpath('severity').text
18
18
  @description = result.at_xpath('description').text
19
+ @cves = result.at_xpath('nvt').at_xpath('cve').text.split(',').map(&:strip)
19
20
 
20
21
  @created_at = Time.parse(result.at_xpath('creation_time').text)
21
22
  @updated_at = Time.parse(result.at_xpath('modification_time').text)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Openvas
4
- VERSION = '0.3.0'
4
+ VERSION = '1.0.0'
5
5
  end
data/openvas.gemspec CHANGED
@@ -7,9 +7,8 @@ require 'openvas/version'
7
7
  Gem::Specification.new do |s|
8
8
  s.name = 'openvas'
9
9
  s.version = Openvas::VERSION
10
- s.date = '2017-12-25'
11
10
  s.summary = 'Openvas API Client (OMP 7.0)'
12
- s.description = 'Easily interface with the Openvas for consuming results'
11
+ s.description = 'Easily interface with the Openvas API OMP 7.0'
13
12
  s.authors = ['Florian Wininger']
14
13
  s.email = 'fw.centrale@gmail.com'
15
14
  s.homepage = 'https://github.com/Cyberwatch/ruby-openvas'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Wininger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-25 00:00:00.000000000 Z
11
+ date: 2018-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -80,7 +80,7 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.52'
83
- description: Easily interface with the Openvas for consuming results
83
+ description: Easily interface with the Openvas API OMP 7.0
84
84
  email: fw.centrale@gmail.com
85
85
  executables: []
86
86
  extensions: []