class Nexpose::AssetScan
Summary object of a scan for a particular asset.
Attributes
asset_id[R]
Unique identifier of an asset.
end_time[R]
Time when the asset finished scanning.
engine_name[R]
Name of the scan engine used for the scan.
host_name[R]
Host name of the asset, if discovered.
ip[R]
IP address of the asset.
os[R]
Operating system fingerprint of the asset.
scan_id[R]
Unique identifier for the scan.
site_id[R]
Unique identifier for the site where the scan originated.
site_name[R]
Site
name where the scan originated.
vulns[R]
Number of vulnerabilities discovered on the asset.
Public Class Methods
new(&block)
click to toggle source
Internal constructor to be called by parse_json.
# File lib/nexpose/device.rb, line 266 def initialize(&block) instance_eval(&block) if block_given? end
parse_json(json)
click to toggle source
# File lib/nexpose/device.rb, line 270 def self.parse_json(json) new do @asset_id = json['assetID'].to_i @scan_id = json['scanID'].to_i @site_id = json['siteID'].to_i @ip = json['ipAddress'] @host_name = json['hostname'] @os = json['operatingSystem'] @vulns = json['vulnCount'] @end_time = Time.at(json['completed'].to_i / 1000) @site_name = json['siteName'] @engine_name = json['scanEngineName'] end end