class Nexpose::FilteredAsset

Asset data as returned by an Asset Filter search.

Attributes

exploit_count[R]
id[R]

Unique identifier of this asset. Also known as device ID.

ip[R]
last_scan[R]
malware_count[R]
name[R]
os[R]
risk_score[R]
site_id[R]

The first Site ID returned for this asset. Not recommended if Asset Linking feature is enabled.

site_ids[R]

Array of Site IDs for the asset. Use when Asset Linking is enabled.

vuln_count[R]

Public Class Methods

new(json) click to toggle source
# File lib/nexpose/filter.rb, line 385
def initialize(json)
  @id            = json['assetID']
  @ip            = json['assetIP']
  @name          = json['assetName']
  @os            = json['assetOSName']
  @exploit_count = json['exploitCount'].to_i
  @malware_count = json['malwareCount'].to_i
  @vuln_count    = json['vulnCount'].to_i
  @risk_score    = json['riskScore'].to_f
  @site_ids      = json['sitePermissions'].map { |site| site['siteID'] }
  @site_id       = @site_ids.first
  @last_scan     = Time.at(json['lastScanDate'].to_i / 1000)
end