From 018eac82dd33786ecbb68c1d161087d16469b8ef Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Tue, 6 Oct 2020 18:16:40 +0200 Subject: [PATCH] idk where the additional bytes came from --- win/powercat.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/powercat.ps1 b/win/powercat.ps1 index 03947dd..fedf065 100644 --- a/win/powercat.ps1 +++ b/win/powercat.ps1 @@ -169,7 +169,7 @@ Examples: { if($Host.UI.RawUI.KeyAvailable) { - if(@(17,27) -contains ($Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown").VirtualKeyCode)) + if(@(17,27) -contains ($Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown,IncludeKeyUp").VirtualKeyCode)) { Write-Verbose "CTRL or ESC caught. Stopping UDP Setup..." $FuncVars["Socket"].Close() @@ -451,7 +451,7 @@ Examples: { if($Host.UI.RawUI.KeyAvailable) { - if(@(17,27) -contains ($Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown").VirtualKeyCode)) + if(@(17,27) -contains ($Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown,IncludeKeyUp").VirtualKeyCode)) { Write-Verbose "CTRL or ESC caught. Stopping TCP Setup..." if($FuncVars["l"]){$Socket.Stop()}