File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
modules/exploits/windows/smb Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -84,19 +84,18 @@ def exploit
84
84
begin
85
85
smb_login
86
86
rescue StandardError => autherror
87
- print_error ( " #{ peer } - Unable to authenticate with given credentials: #{ autherror } " )
88
- return
87
+ disconnect
88
+ fail_with ( Exploit :: Failure :: NoAccess , " #{ peer } - Unable to authenticate with given credentials: #{ autherror } " )
89
89
end
90
90
# Execute the powershell command
91
91
begin
92
92
print_status ( "#{ peer } - Executing the payload..." )
93
93
vprint_good ( command )
94
94
return psexec ( command )
95
95
rescue StandardError => exec_command_error
96
- print_error ( " #{ peer } - Unable to execute specified command: #{ exec_command_error } " )
97
- return false
96
+ disconnect
97
+ fail_with ( Exploit :: Failure :: Unknown , " #{ peer } - Unable to execute specified command: #{ exec_command_error } " )
98
98
end
99
- disconnect
100
99
end
101
100
end
102
101
You can’t perform that action at this time.
0 commit comments