Land #8779, Adding error handler for ms17-010 exploit where SMBv1 is disabled

bug/bundler_fix
Brent Cook 2017-08-01 14:00:12 -05:00
commit e61cccda0b
No known key found for this signature in database
GPG Key ID: 1FFAA0B24B708F96
1 changed files with 4 additions and 0 deletions

View File

@ -164,6 +164,10 @@ class MetasploitModule < Msf::Exploit::Remote
# Step 1: Connect to IPC$ share
print_status("Connecting to target for exploitation.")
client, tree, sock, os = smb1_anonymous_connect_ipc()
rescue RubySMB::Error::CommunicationError
# Error handler in case SMBv1 disabled on target
raise EternalBlueError, 'Could not make SMBv1 connection'
else
print_good("Connection established for exploitation.")
if verify_target(os)