Browse Source

idk where the additional bytes came from

Roman Hergenreder 3 years ago
parent
commit
018eac82dd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      win/powercat.ps1

+ 2 - 2
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()}