Ensure that the Content-Type is set to text/html by default.

git-svn-id: file:///home/svn/framework3/trunk@5615 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2008-08-08 02:37:54 +00:00
parent 8fb167d7ff
commit 3cf81f257e
2 changed files with 6 additions and 6 deletions

View File

@ -392,12 +392,12 @@ protected
#
# Creates an HTTP response packet.
#
def create_response(code = 200, message = "OK",
proto = Rex::Proto::Http::DefaultProtocol)
return Rex::Proto::Http::Response.new(code, message, proto);
def create_response(code = 200, message = "OK", proto = Rex::Proto::Http::DefaultProtocol)
res = Rex::Proto::Http::Response.new(code, message, proto);
res['Content-Type'] = 'text/html'
res
end
#
# Transmits a response to the supplied client, default content-type is text/html
#
@ -463,7 +463,7 @@ protected
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /404.html was not found on this server.</p>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.2.9 (Unix) Server at #{datastore['LHOST']} Port #{datastore['SRVPORT']}</address>
</body></html>

View File

@ -197,7 +197,7 @@ class Auxiliary::Server::BrowserAutoPwn < Msf::Auxiliary
response = build_sploit_response(cli, request)
response['Expires'] = '0'
response['Cache-Control'] = 'must-revalidate'
cli.send_response(response)
else
print_error("I don't know how to handle this request #{request.uri}, sending 404")