Class: Nexpose::VulnFilter

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

Overview

TODO: review

Description

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Sanitize

#replace_entities

Constructor Details

#initialize(type_mask, severity_threshold, max_alerts = -1)) ⇒ VulnFilter

Returns a new instance of VulnFilter.



492
493
494
495
496
# File 'lib/nexpose/vuln.rb', line 492

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

Instance Attribute Details

#maxAlertsObject (readonly)

Returns the value of attribute maxAlerts.



489
490
491
# File 'lib/nexpose/vuln.rb', line 489

def maxAlerts
  @maxAlerts
end

#severityThresholdObject (readonly)

Returns the value of attribute severityThreshold.



490
491
492
# File 'lib/nexpose/vuln.rb', line 490

def severityThreshold
  @severityThreshold
end

#typeMaskObject (readonly)

Returns the value of attribute typeMask.



488
489
490
# File 'lib/nexpose/vuln.rb', line 488

def typeMask
  @typeMask
end

Instance Method Details

#to_xmlObject



500
501
502
503
504
505
506
507
# File 'lib/nexpose/vuln.rb', line 500

def to_xml
  xml = '<vuln_filter '
  xml << %Q{ type_mask="#{replace_entities(typeMask)}"}
  xml << %Q{ maxAlerts="#{replace_entities(maxAlerts)}"}
  xml << %Q{ severity_threshold="#{replace_entities(severityThreshold)}"}
  xml << '/>'
  xml
end