Land #8779, Adding error handler for ms17-010 exploit where SMBv1 is disabled
commit
e61cccda0b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue