Force UTF-8 encoding for zombie HTTP headers
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user