From 259bf9695ab2e4f96d99dde0c425509f2175fadd Mon Sep 17 00:00:00 2001 From: James Lee Date: Mon, 2 May 2011 20:40:19 +0000 Subject: [PATCH] don't kill a session when the user ctrl-C's during a command run by sessions -c or a script/postmod git-svn-id: file:///home/svn/framework3/trunk@12513 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/base/sessions/command_shell.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/msf/base/sessions/command_shell.rb b/lib/msf/base/sessions/command_shell.rb index bd41212ce2..e4df914211 100644 --- a/lib/msf/base/sessions/command_shell.rb +++ b/lib/msf/base/sessions/command_shell.rb @@ -146,6 +146,8 @@ class CommandShell end end rescue ::Timeout::Error + rescue ::Interrupt => e + raise e rescue ::Exception => e shell_close raise e