Three more minor changs to ensure that HTTP response data is always treated as binary.
git-svn-id: file:///home/svn/framework3/trunk@10654 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
dbbd0dc07e
commit
567e42fafa
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue