modules should not handle exceptions like this. if you're just going to print a backtrace, let the dispatcher deal with it so we can get logs
git-svn-id: file:///home/svn/framework3/trunk@7353 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
34d76a72e0
commit
68564f9d5e
|
@ -84,16 +84,10 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
return if ((p = regenerate_payload(cli)) == nil)
|
||||
|
||||
# Transmit the response to the client
|
||||
begin
|
||||
send_response(cli, generate_zip(p), { 'Content-Type' => 'application/zip' } )
|
||||
|
||||
# Handle the payload
|
||||
handler(cli)
|
||||
rescue ::Exception => e
|
||||
$stderr.puts "Error: #{e}"
|
||||
$stderr.puts e.backtrace.join("\n")+"\n\n"
|
||||
end
|
||||
|
||||
send_response(cli, generate_zip(p), { 'Content-Type' => 'application/zip' } )
|
||||
|
||||
# Handle the payload
|
||||
handler(cli)
|
||||
end
|
||||
|
||||
def generate_zip(shellcode)
|
||||
|
|
|
@ -135,11 +135,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
handler
|
||||
|
||||
rescue EOFError
|
||||
rescue => e
|
||||
$stderr.puts "Error: #{e} #{e.class}"
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue