fix Failure scoping (needed for libraries)
parent
b2be6bb75c
commit
0308f80c0e
|
@ -265,7 +265,7 @@ module Exploit::Remote::SMB::Client::Psexec
|
||||||
begin
|
begin
|
||||||
psexec(command)
|
psexec(command)
|
||||||
rescue StandardError => exec_command_error
|
rescue StandardError => exec_command_error
|
||||||
fail_with(Failure::Unknown, "#{peer} - Unable to execute specified command: #{exec_command_error}")
|
fail_with(Msf::Exploit::Failure::Unknown, "#{peer} - Unable to execute specified command: #{exec_command_error}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -608,7 +608,7 @@ class Msftidy
|
||||||
end
|
end
|
||||||
|
|
||||||
if ln =~ /^\s*fail_with\(/
|
if ln =~ /^\s*fail_with\(/
|
||||||
unless ln =~ /^\s*fail_with\(Failure\:\:(?:None|Unknown|Unreachable|BadConfig|Disconnected|NotFound|UnexpectedReply|TimeoutExpired|UserInterrupt|NoAccess|NoTarget|NotVulnerable|PayloadFailed),/
|
unless ln =~ /^\s*fail_with\(.*Failure\:\:(?:None|Unknown|Unreachable|BadConfig|Disconnected|NotFound|UnexpectedReply|TimeoutExpired|UserInterrupt|NoAccess|NoTarget|NotVulnerable|PayloadFailed),/
|
||||||
error("fail_with requires a valid Failure:: reason as first parameter: #{ln}", idx)
|
error("fail_with requires a valid Failure:: reason as first parameter: #{ln}", idx)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue