handle connection reset more gracefully

git-svn-id: file:///home/svn/framework3/trunk@9192 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-05-01 23:57:10 +00:00
parent cbd675e369
commit c67ad6767c
1 changed files with 10 additions and 12 deletions

View File

@ -9,13 +9,10 @@
# http://metasploit.com/framework/
##
require 'msf/core'
class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::DCERPC
include Msf::Exploit::Remote::SMB
include Msf::Auxiliary::Dos
@ -48,7 +45,6 @@ class Metasploit3 < Msf::Auxiliary
[
OptString.new('SMBPIPE', [ true, "The pipe name to use (browser, srvsvc, wkssvc, ntsvcs)", 'browser']),
], self.class)
end
=begin
@ -104,6 +100,8 @@ class Metasploit3 < Msf::Auxiliary
dcerpc.call(0x0a, stubdata)
rescue Rex::Proto::DCERPC::Exceptions::NoResponse
print_good('Server did not respond, this is expected')
rescue ::Errno::ECONNRESET
print_good('Connection reset by peer (possible success)')
rescue => e
if e.to_s =~ /STATUS_PIPE_DISCONNECTED/
print_good('Server disconnected, this is expected')