public CreateDetails GetDetails() { CreateDetails details = null; if (ShowDialog() == DialogResult.OK) { ProcessStartInfo info = new ProcessStartInfo(filenameBox.Text, argsBox.Text); info.WorkingDirectory = startInBox.Text; details = new CreateDetails(info); } return details; }
public CreateDetails GetDetails() { CreateDetails details = null; if (ShowDialog() == DialogResult.OK) { ProcessStartInfo info = new ProcessStartInfo(filenameBox.Text, argsBox.Text); info.WorkingDirectory = startInBox.Text; details = new CreateDetails(info); } return(details); }
private int DoCreation(CreateDetails createDetails) { progress.ProgressUpdate("Creating process and injecting logging agent", 100); ProcessStartInfo psi = createDetails.Info; int processId; RemoteHooking.CreateAndInject(psi.FileName, (psi.Arguments != String.Empty) ? psi.Arguments : null, (psi.WorkingDirectory != String.Empty) ? psi.WorkingDirectory : null, 0, AGENT_DLL, AGENT_DLL, out processId, serverChannelName, details.SoftwallRules); return(processId); }
private void DoStartCapture() { try { PrepareCapture(); int[] processIds; if (details is CreateDetails) { CreateDetails createDetails = details as CreateDetails; int processId = DoCreation(createDetails); processIds = new int[1] { processId }; } else if (details is AttachDetails) { AttachDetails attachDetails = details as AttachDetails; DoInjection(attachDetails); processIds = attachDetails.ProcessIds; } else { throw new NotImplementedException(); } if (WaitForAllClientsToPingUs(processIds)) { progress.OperationComplete(); } else { progress.OperationFailed("Capture aborted."); } } catch (Exception e) { progress.OperationFailed(e.Message); UnprepareCapture(false); } progress = null; startWorkerThread = null; }
private int DoCreation(CreateDetails createDetails) { progress.ProgressUpdate("Creating process and injecting logging agent", 100); ProcessStartInfo psi = createDetails.Info; int processId; RemoteHooking.CreateAndInject(psi.FileName, (psi.Arguments != String.Empty) ? psi.Arguments : null, (psi.WorkingDirectory != String.Empty) ? psi.WorkingDirectory : null, 0, AGENT_DLL, AGENT_DLL, out processId, serverChannelName, details.SoftwallRules); return processId; }