Module: Msf::DBManager::DBExport

Included in:
Msf::DBManager
Defined in:
lib/msf/core/db_manager/db_export.rb

Instance Method Summary collapse

Instance Method Details

#run_db_export(opts) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/msf/core/db_manager/db_export.rb', line 3

def run_db_export(opts)
  wspace = Msf::Util::DBManager.process_opts_workspace(opts, framework)
  exporter = Msf::DBExport.new(wspace)

  output_file = exporter.send("to_#{opts[:format]}_file".intern, opts[:path]) do |mtype, mstatus, mname|
    if mtype == :status
      if mstatus == Msf::DBExport::STATUS_START
        ilog "    >> Starting export of #{mname}"
      end
      if mstatus == Msf::DBExport::STATUS_COMPLETE
        ilog "    >> Finished export of #{mname}"
      end
    end
  end

  File.expand_path(output_file)
end