Merge branch '08-067-rescue-crashed-service' of git://github.com/jlee-r7/metasploit-framework into jlee-r7-08-067-rescue-crashed-service

unstable
sinn3r 2012-10-22 16:51:56 -05:00
commit cf2ec4e598
1 changed files with 20 additions and 2 deletions

View File

@ -807,8 +807,18 @@ class Metasploit3 < Msf::Exploit::Remote
def exploit
connect()
smb_login()
begin
connect()
smb_login()
rescue Rex::Proto::SMB::Exceptions::LoginError => e
if (e.message =~ /Connection reset/)
print_error("Connection reset during login")
print_error("This most likely means a previous exploit attempt caused the service to crash")
return
else
raise e
end
end
# Use a copy of the target
mytarget = target
@ -1052,6 +1062,14 @@ class Metasploit3 < Msf::Exploit::Remote
rescue Rex::ConnectionError => e
print_error("Connection failed: #{e.class}: #{e}")
return
rescue Rex::Proto::SMB::Exceptions::LoginError => e
if (e.message =~ /Connection reset/)
print_error("Connection reset during login")
print_error("This most likely means a previous exploit attempt caused the service to crash")
return Msf::Exploit::CheckCode::Unknown
else
raise e
end
end
#