class Nexpose::Asset

Asset object as return from the 2.1 API.

Attributes

assessment[R]

Assessment summary of the asset, including most recent scan info. [Lazy]

exploits[R]

Vulnerability exploits to which this asset is susceptible. [Lazy]

files[R]

Files and directories that have been enumerated on the asset. [Lazy]

group_accounts[R]

Group accounts enumerated on the asset. [Lazy]

host_names[R]

Known host names found for the asset.

host_type[R]

The host type of the asset. One of: GUEST, HYPERVISOR, PHYSICAL, MOBILE.

id[R]

Unique identifier of the asset on the Nexpose console.

ip[R]

Primary IP address of the asset.

mac[R]

MAC address of the asset.

malware_kits[R]

Malware kits to which this asset is susceptible. [Lazy]

os_cpe[R]

The CPE for the asset's operating system.

os_name[R]

Operating system name.

services[R]

Service endpoints enumerated on the asset. [Lazy]

software[R]

Software enumerated on the asset. [Lazy]

unique_identifiers[RW]

Unique system identifiers on the asset.

user_accounts[R]

User accounts enumerated on the asset. [Lazy]

vulnerabilities[R]

Vulnerabilities detected on the asset. [Lazy]

vulnerability_instances[R]

Vulnerability instances detected on the asset. [Lazy]

Public Class Methods

load(nsc, id) click to toggle source

Load an asset from the provided console.

@param [Connection] nsc Active connection to a Nexpose console. @param [Fixnum] id Unique identifier of an asset. @return [Asset] The requested asset, if found.

# File lib/nexpose/asset.rb, line 55
def self.load(nsc, id)
  uri  = "/api/2.1/assets/#{id}"
  resp = AJAX.get(nsc, uri, AJAX::CONTENT_TYPE::JSON)
  hash = JSON.parse(resp, symbolize_names: true)
  new.object_from_hash(nsc, hash)
end
new() click to toggle source
# File lib/nexpose/asset.rb, line 44
def initialize
  @addresses  = []
  @host_names = []
end