From 89f4d3e2d7e28c877f463ad7982ff6fcdc138a6c Mon Sep 17 00:00:00 2001 From: Robin Wood Date: Fri, 29 Jan 2021 11:17:38 +0000 Subject: [PATCH] Fix for issue #14678 Stops the printing of a rogue nil when exploit completes. See https://github.com/rapid7/metasploit-framework/issues/14678 --- modules/exploits/windows/winrm/winrm_script_exec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/exploits/windows/winrm/winrm_script_exec.rb b/modules/exploits/windows/winrm/winrm_script_exec.rb index 492c40e190..6f280b9d45 100644 --- a/modules/exploits/windows/winrm/winrm_script_exec.rb +++ b/modules/exploits/windows/winrm/winrm_script_exec.rb @@ -80,7 +80,7 @@ class MetasploitModule < Msf::Exploit::Remote commands.each do |command| if command.include? "cscript" streams = winrm_run_cmd_hanging(command) - print_status streams.inspect + print_status(streams.inspect) unless streams.nil? elsif command.include? "del %TEMP%" next else