private void ExistingProcessInjection() { lock (thisLock) { List <Process> processList = Process.GetProcessesByName(ProcessName).ToList <Process>(); foreach (Process prc in processList) { //PatchedClients n'est plus utilisé prc.WaitForInputIdle(); string result; try { RemoteHooking.Inject(prc.Id, FilePath, FilePath, ChannelName, Constants.LoginAddresses.ToList(), 5555); result = "Success"; } catch (Exception ex) { Logger.Error("(ProcessInjector) " + ex.Message); result = "Failed"; } ConsoleManager.Debug(string.Format("Existing Process Injection Result: ID={0}; RESULT={1};", prc.Id, result.ToString())); } } }
private void SingleProcessInjection(int processId) { string result; try { RemoteHooking.Inject(processId, FilePath, FilePath, ChannelName, Constants.LoginAddresses.ToList(), 5555); result = "Success"; } catch (Exception ex) { Logger.Error("(SingleProcessInjection) " + ex.Message); result = "Failed"; } ConsoleManager.Debug(string.Format("Single Process Injection Result: ID={0}; RESULT={1};", processId, result.ToString())); }