Address more code review comments

GSoC/Meterpreter_Web_Console
James Barnett 2018-03-22 21:47:59 -05:00
parent 6c5a7a663a
commit ed5b22a541
No known key found for this signature in database
GPG Key ID: 647983861A4EC5EA
3 changed files with 5 additions and 5 deletions

View File

@ -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|

View File

@ -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

View File

@ -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)