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.



1960
1961
1962
1963
1964
1965
1966
1967
# File 'lib/nexpose.rb', line 1960

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



1954
1955
1956
# File 'lib/nexpose.rb', line 1954

def address
  @address
end

#idObject (readonly)

A unique device ID (assigned by the NSC)



1950
1951
1952
# File 'lib/nexpose.rb', line 1950

def id
  @id
end

#riskfactorObject (readonly)

User assigned risk multiplier



1956
1957
1958
# File 'lib/nexpose.rb', line 1956

def riskfactor
  @riskfactor
end

#riskscoreObject (readonly)

NeXpose risk score



1958
1959
1960
# File 'lib/nexpose.rb', line 1958

def riskscore
  @riskscore
end

#site_idObject (readonly)

The site ID of this devices site



1952
1953
1954
# File 'lib/nexpose.rb', line 1952

def site_id
  @site_id
end