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.



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

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

Instance Attribute Details

#maxAlertsObject (readonly)

Returns the value of attribute maxAlerts.



1471
1472
1473
# File 'lib/nexpose.rb', line 1471

def maxAlerts
  @maxAlerts
end

#severityThresholdObject (readonly)

Returns the value of attribute severityThreshold.



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

def severityThreshold
  @severityThreshold
end

#typeMaskObject (readonly)

Returns the value of attribute typeMask.



1470
1471
1472
# File 'lib/nexpose.rb', line 1470

def typeMask
  @typeMask
end

Instance Method Details

#to_xmlObject



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

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