diff --git a/lib/msf/core/exploit/smb/client/psexec.rb b/lib/msf/core/exploit/smb/client/psexec.rb index 5d8a78c366..a9e9e33309 100644 --- a/lib/msf/core/exploit/smb/client/psexec.rb +++ b/lib/msf/core/exploit/smb/client/psexec.rb @@ -265,7 +265,7 @@ module Exploit::Remote::SMB::Client::Psexec begin psexec(command) 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 diff --git a/tools/dev/msftidy.rb b/tools/dev/msftidy.rb index ac61268e65..e9bfd984d6 100755 --- a/tools/dev/msftidy.rb +++ b/tools/dev/msftidy.rb @@ -607,7 +607,7 @@ class Msftidy end 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) end end