Skip to content

Commit 31cc516

Browse files
committed
Merge branch 'goliath' into standardize_proxy_errors
2 parents b3642b1 + b86e481 commit 31cc516

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/msf/core/db_manager/http/servlet/loot_servlet.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ def self.get_loot
2525
opts = parse_json_request(request, false)
2626
data = get_db().loots(params.symbolize_keys)
2727
includes = [:host]
28+
data.each do |loot|
29+
loot.data = Base64.urlsafe_encode64(loot.data) if loot.data
30+
end
2831
set_json_response(data, includes)
2932
rescue Exception => e
3033
set_error_on_response(e)
@@ -39,6 +42,7 @@ def self.report_loot
3942
filename = File.basename(opts[:path])
4043
local_path = File.join(Msf::Config.loot_directory, filename)
4144
opts[:path] = process_file(opts[:data], local_path)
45+
opts[:data] = Base64.urlsafe_decode64(opts[:data])
4246
end
4347

4448
get_db().report_loot(opts)

0 commit comments

Comments
 (0)