Class: Nexpose::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/nexpose/device.rb

Overview

Object that represents a single device in a Nexpose security console.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, address, site_id, risk_factor = 1.0, risk_score = 0.0) ⇒ Device

Returns a new instance of Device.



178
179
180
181
182
183
184
# File 'lib/nexpose/device.rb', line 178

def initialize(id, address, site_id, risk_factor = 1.0, risk_score = 0.0)
  @id          = id.to_i
  @address     = address
  @site_id     = site_id.to_i
  @risk_factor = risk_factor.to_f
  @risk_score  = risk_score.to_f
end

Instance Attribute Details

#addressObject (readonly)

IP Address or Hostname of this device.



170
171
172
# File 'lib/nexpose/device.rb', line 170

def address
  @address
end

#idObject (readonly)

A unique device ID (assigned automatically by the Nexpose console).



168
169
170
# File 'lib/nexpose/device.rb', line 168

def id
  @id
end

#risk_factorObject (readonly)

User assigned risk multiplier.



172
173
174
# File 'lib/nexpose/device.rb', line 172

def risk_factor
  @risk_factor
end

#risk_scoreObject (readonly)

Nexpose risk score.



174
175
176
# File 'lib/nexpose/device.rb', line 174

def risk_score
  @risk_score
end

#site_idObject (readonly)

Site ID that this device is associated with.



176
177
178
# File 'lib/nexpose/device.rb', line 176

def site_id
  @site_id
end