Class: Risu::Parsers::Nessus::PostProcess::NormalizePluginNames

Inherits:
Base::PostProcessBase show all
Defined in:
lib/risu/parsers/nessus/postprocess/normalize_plugin_names.rb

Instance Attribute Summary

Attributes inherited from Base::PostProcessBase

#info

Instance Method Summary collapse

Methods inherited from Base::PostProcessBase

#<=>, #==, #calculate_severity, #create_item, #create_plugin, #has_findings, #has_host_findings, inherited

Constructor Details

#initializeNormalizePluginNames

Returns a new instance of NormalizePluginNames.



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/risu/parsers/nessus/postprocess/normalize_plugin_names.rb', line 29

def initialize
  @info =
  {
    :description => "Normalizes plugin names",
    :plugin_id => 0,
  }

  @strings_to_sanatize =
  [
    "(ERRATICGOPHER)",
    "(SWEET32)",
    "(POODLE)",
    "(BEAST)",
    "(remote check)",
    "(FREAK)",
    "(Bar Mitzvah)",
    "(Logjam)",
    "(uncredentialed check)",
    "(EXPLODINGCAN)",
    "(Foreshadow)",
    "(MSXML)"
  ]
end

Instance Method Details

#runObject



53
54
55
56
57
58
59
60
# File 'lib/risu/parsers/nessus/postprocess/normalize_plugin_names.rb', line 53

def run
  Plugin.all.each do |plugin|
    @strings_to_sanatize.each do |string|
      plugin.plugin_name = plugin.plugin_name.gsub(string, '').strip
      plugin.save!
    end
  end
end