Skip to content

Commit e5d3289

Browse files
committed
Fix name for exception
1 parent a8a0926 commit e5d3289

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/auxiliary/admin/smb/psexec_command.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def execute_command(text, bat)
9999
print_status("Executing the command...")
100100
begin
101101
return psexec(execute)
102-
rescue Rex::Proto::DCERPC::Exceptions::Error, Rex::Proto::SMB::Exceptions::Error => exec_command_error
102+
rescue Rex::Proto::DCERPC::Exceptions::Error, Rex::Proto::SMB::Exceptions::Error => e
103103
elog("#{e.class} #{e.message}\n#{e.backtrace * "\n"}", 'rex', LEV_3)
104-
print_error("Unable to execute specified command: #{exec_command_error}")
104+
print_error("Unable to execute specified command: #{e}")
105105
return false
106106
end
107107
end

0 commit comments

Comments
 (0)