Address more code review comments
parent
6c5a7a663a
commit
ed5b22a541
|
@ -33,7 +33,7 @@ module ResponseDataHelper
|
|||
if response_wrapper.expected
|
||||
begin
|
||||
body = response_wrapper.response.body
|
||||
if not body.nil? && !body.empty?
|
||||
if !body.nil? && !body.empty?
|
||||
return JSON.parse(body, object_class: OpenStruct)
|
||||
end
|
||||
rescue Exception => e
|
||||
|
@ -56,7 +56,7 @@ module ResponseDataHelper
|
|||
if response_wrapper.expected
|
||||
begin
|
||||
body = response_wrapper.response.body
|
||||
if not body.nil? && !body.empty?
|
||||
if !body.nil? && !body.empty?
|
||||
parsed_body = Array.wrap(JSON.parse(body))
|
||||
rv = []
|
||||
parsed_body.each do |json_object|
|
||||
|
|
|
@ -7,10 +7,10 @@ module Msf::DBManager::DbExport
|
|||
output_file = exporter.send("to_#{opts[:format]}_file".intern, opts[:path]) do |mtype, mstatus, mname|
|
||||
if mtype == :status
|
||||
if mstatus == Msf::DBManager::Export::STATUS_START
|
||||
puts(" >> Starting export of #{mname}")
|
||||
ilog " >> Starting export of #{mname}"
|
||||
end
|
||||
if mstatus == Msf::DBManager::Export::STATUS_COMPLETE
|
||||
puts(" >> Finished export of #{mname}")
|
||||
ilog " >> Finished export of #{mname}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,7 +16,7 @@ module DbExportServlet
|
|||
lambda {
|
||||
begin
|
||||
opts = params.symbolize_keys
|
||||
opts[:path] = File.join(Msf::Config.local_directory, File.basename(opts[:path]))
|
||||
opts[:path] = File.join(Msf::Config.local_directory, "#{File.basename(opts[:path])}-#{SecureRandom.hex}")
|
||||
|
||||
output_file = get_db.run_db_export(opts)
|
||||
|
||||
|
|
Loading…
Reference in New Issue