diff --git a/lib/metasploit/framework/data_service/remote/http/response_data_helper.rb b/lib/metasploit/framework/data_service/remote/http/response_data_helper.rb index 61a66e9d5e..1a7eb37ba8 100644 --- a/lib/metasploit/framework/data_service/remote/http/response_data_helper.rb +++ b/lib/metasploit/framework/data_service/remote/http/response_data_helper.rb @@ -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| diff --git a/lib/msf/core/db_manager/db_export.rb b/lib/msf/core/db_manager/db_export.rb index 3c7163aa58..8b95428105 100644 --- a/lib/msf/core/db_manager/db_export.rb +++ b/lib/msf/core/db_manager/db_export.rb @@ -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 diff --git a/lib/msf/core/db_manager/http/servlet/db_export_servlet.rb b/lib/msf/core/db_manager/http/servlet/db_export_servlet.rb index 1c08bf7a97..37507e6d6e 100644 --- a/lib/msf/core/db_manager/http/servlet/db_export_servlet.rb +++ b/lib/msf/core/db_manager/http/servlet/db_export_servlet.rb @@ -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)