Class: Nexpose::Device

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

Overview

Description

Object that represents a single device in an NSC.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, site_id, address, riskfactor = 1, riskscore = 0) ⇒ Device

Returns a new instance of Device.



1483
1484
1485
1486
1487
1488
1489
1490
# File 'lib/nexpose.rb', line 1483

def initialize(id, site_id, address, riskfactor=1, riskscore=0)
	@id = id
	@site_id = site_id
	@address = address
	@riskfactor = riskfactor
	@riskscore = riskscore

end

Instance Attribute Details

#addressObject (readonly)

IP Address or Hostname of this device



1477
1478
1479
# File 'lib/nexpose.rb', line 1477

def address
  @address
end

#idObject (readonly)

A unique device ID (assigned by the NSC)



1473
1474
1475
# File 'lib/nexpose.rb', line 1473

def id
  @id
end

#riskfactorObject (readonly)

User assigned risk multiplier



1479
1480
1481
# File 'lib/nexpose.rb', line 1479

def riskfactor
  @riskfactor
end

#riskscoreObject (readonly)

NeXpose risk score



1481
1482
1483
# File 'lib/nexpose.rb', line 1481

def riskscore
  @riskscore
end

#site_idObject (readonly)

The site ID of this devices site



1475
1476
1477
# File 'lib/nexpose.rb', line 1475

def site_id
  @site_id
end