diff --git a/core/main/handlers/browserdetails.rb b/core/main/handlers/browserdetails.rb index 31f63e107..c68b0afe2 100644 --- a/core/main/handlers/browserdetails.rb +++ b/core/main/handlers/browserdetails.rb @@ -70,7 +70,7 @@ module BeEF @http_headers = Hash.new http_header = @data['request'].env.select { |k, v| k.to_s.start_with? 'HTTP_' } .each { |key, value| - @http_headers[key.sub(/^HTTP_/, '')] = value + @http_headers[key.sub(/^HTTP_/, '')] = value.force_encoding('UTF-8') } zombie.httpheaders = @http_headers.to_json zombie.save diff --git a/core/main/handlers/commands.rb b/core/main/handlers/commands.rb index 5d0611abc..9a7376f01 100644 --- a/core/main/handlers/commands.rb +++ b/core/main/handlers/commands.rb @@ -31,7 +31,7 @@ module BeEF @http_params = @data['request'].params @http_header = Hash.new http_header = @data['request'].env.select { |k, v| k.to_s.start_with? 'HTTP_' }.each { |key, value| - @http_header[key.sub(/^HTTP_/, '')] = value + @http_header[key.sub(/^HTTP_/, '')] = value.force_encoding('UTF-8') } # @note get and check command id from the request