private void StartClient() { var dlg = new EndPointDialog(); var endPoint = dlg.ShowEndPoint("link://3333"); if (endPoint != null) { var stream = CoreHelper.CreateStreamFromEndPoint(endPoint); var client = new HttpClient(stream); var form = new ClientForm(client); form.Show(); } }
private void StartServer() { var dlg = new EndPointDialog(); var endPoint = dlg.ShowEndPoint("link://3333"); if (endPoint != null) { var listener = CoreHelper.CreateListenerForEndPoint(endPoint); var server = new HttpServer(listener, new[] { "rho.me" }, Program.Instance.HandlerFactory); var form = new HttpServerForm(server); form.Show(); } }
void socketToolStripMenuItem_Click(object sender, EventArgs e) { using (EndPointDialog dialog = new EndPointDialog() { ShowRequestFile = true }) { if (dialog.ShowDialog() == DialogResult.OK) { if (string.IsNullOrEmpty(dialog.RequestFile) || File.Exists(dialog.RequestFile)) { _Fuzzer.AddInput(new TcpQueryFuzzingInput(dialog.EndPoint, dialog.RequestFile)); } } } }
void toolStripStatusLabel2_Click(object sender, EventArgs e) { using (EndPointDialog dialog = new EndPointDialog() { EndPoint = _Fuzzer == null ? null : _Fuzzer.Listen }) { if (dialog.ShowDialog() == DialogResult.OK) { try { _Fuzzer.Listen = dialog.EndPoint; } catch { toolStripStatusLabel2.ForeColor = Color.Red; } } } }