Class: Nexpose::VulnFilter

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

Overview

TODO: review

Description

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Sanitize

#replace_entities

Constructor Details

#initialize(typeMask, severityThreshold, maxAlerts = -1)) ⇒ VulnFilter

Returns a new instance of VulnFilter.



1348
1349
1350
1351
1352
# File 'lib/nexpose.rb', line 1348

def initialize(typeMask, severityThreshold, maxAlerts = -1)
	@typeMask = typeMask
	@maxAlerts = maxAlerts
	@severityThreshold = severityThreshold
end

Instance Attribute Details

#maxAlertsObject (readonly)

Returns the value of attribute maxAlerts.



1345
1346
1347
# File 'lib/nexpose.rb', line 1345

def maxAlerts
  @maxAlerts
end

#severityThresholdObject (readonly)

Returns the value of attribute severityThreshold.



1346
1347
1348
# File 'lib/nexpose.rb', line 1346

def severityThreshold
  @severityThreshold
end

#typeMaskObject (readonly)

Returns the value of attribute typeMask.



1344
1345
1346
# File 'lib/nexpose.rb', line 1344

def typeMask
  @typeMask
end

Instance Method Details

#to_xmlObject



1355
1356
1357
1358
1359
1360
1361
1362
1363
# File 'lib/nexpose.rb', line 1355

def to_xml
	xml = "<vulnFilter "
	xml << %Q{ typeMask="#{replace_entities(typeMask)}"}
	xml << %Q{ maxAlerts="#{replace_entities(maxAlerts)}"}
	xml << %Q{ severityThreshold="#{replace_entities(severityThreshold)}"}
	xml << "/>"

	xml
end