diff --git a/lib/msf/core/exploit/http/server.rb b/lib/msf/core/exploit/http/server.rb index 8b381a4497..b41ccf48cb 100644 --- a/lib/msf/core/exploit/http/server.rb +++ b/lib/msf/core/exploit/http/server.rb @@ -292,7 +292,7 @@ module Exploit::Remote::HttpServer def send_response(cli, body, headers = {}) response = create_response response['Content-Type'] = 'text/html' - response.body = body + response.body = body.to_s.unpack("C*").pack("C*") if (datastore['HTTP::compression']) self.use_zlib # make sure... @@ -324,7 +324,7 @@ module Exploit::Remote::HttpServer response = create_response(302, 'Moved') response['Content-Type'] = 'text/html' response['Location'] = location - response.body = body + response.body = body.to_s.unpack("C*").pack("C*") cli.send_response(response) end @@ -649,6 +649,7 @@ function sprayHeap(shellcode, heapSprayAddr, heapBlockSize) { # # HTML evasions are implemented here. def send_response_html(cli, body, headers = {}) + body = body.to_s.unpack("C*").pack("C*") if datastore['HTML::base64'] != 'none' case datastore['HTML::base64'] when 'plain'