From 5c55f98e6aa3bdc4d96e6179adae196986a85f99 Mon Sep 17 00:00:00 2001 From: LM <34066913+LightningMods@users.noreply.github.com> Date: Sat, 15 Feb 2025 20:56:46 -0500 Subject: [PATCH] Formatting fix --- send_payload.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/send_payload.ps1 b/send_payload.ps1 index e6d6d81..e1b08f1 100644 --- a/send_payload.ps1 +++ b/send_payload.ps1 @@ -60,10 +60,10 @@ try { $tcpClient.Close() # Ensure the client is closed exit # Exit the script if connection fails } - else { - $tcpClient.EndConnect($connectResult) # Complete the connection - } - + + # Complete the connection + $tcpClient.EndConnect($connectResult) + # Get the network stream $stream = $tcpClient.GetStream() @@ -88,7 +88,6 @@ try { catch { Write-Error "An error occurred: $($_.Exception.Message), press any key to exit" Write-Error $_.Exception.StackTrace - [System.Console]::ReadKey() | Out-Null } finally { # Ensure resources are cleaned up even if an error occurs