Module: Msf::DBManager::Import::Nessus::XML

Includes:
V1, V2
Included in:
Msf::DBManager::Import::Nessus
Defined in:
lib/msf/core/db_manager/import/nessus/xml.rb

Defined Under Namespace

Modules: V1, V2

Instance Method Summary collapse

Methods included from V2

#handle_nessus_v2, #import_nessus_xml_v2

Methods included from V1

#import_nessus_xml

Instance Method Details

#import_nessus_xml_file(args = {}) ⇒ Object

Import Nessus XML v1 and v2 output

Old versions of openvas exported this as well



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/msf/core/db_manager/import/nessus/xml.rb', line 13

def import_nessus_xml_file(args={})
  filename = args[:filename]

  data = ""
  ::File.open(filename, 'rb') do |f|
    data = f.read(f.stat.size)
  end

  if data.index("NessusClientData_v2")
    import_nessus_xml_v2(args.merge(:data => data))
  else
    import_nessus_xml(args.merge(:data => data))
  end
end