private void btnParse_Click(object sender, EventArgs e) { string blank = ""; tv.Nodes.Clear(); he.LoadString(ref blank); lv.Items.Clear(); lvIPs.Items.Clear(); lvFiltered.Items.Clear(); lvDNS.Items.Clear(); startTime = DateTime.Now; string capFile = txtPcap.Text; if (!System.IO.File.Exists(capFile)) { MessageBox.Show("Pcap file not found: " + txtPcap.Text); return; } string baseName = Path.GetFileNameWithoutExtension(capFile); outDir = Directory.GetParent(capFile).FullName; outDir += "\\" + baseName; if (!Directory.Exists(outDir)) { Directory.CreateDirectory(outDir); } outDir += "\\"; this.Text = "Loading pcap file..."; this.Refresh(); rm = new ReconManager(NewStream, NewNode, Complete, DNS, capFile, outDir, this); Thread mThread = new Thread(new ThreadStart(rm.ProcessPcap)); mThread.IsBackground = true; mThread.Start(); }
private void btnParse_Click(object sender, EventArgs e) { string blank = ""; tv.Nodes.Clear(); he.LoadString(ref blank); lv.Items.Clear(); lvIPs.Items.Clear(); lvFiltered.Items.Clear(); lvDNS.Items.Clear(); startTime = DateTime.Now; string capFile = txtPcap.Text; if (!System.IO.File.Exists(capFile)) { MessageBox.Show("Pcap file not found: " + txtPcap.Text); return; } string baseName = Path.GetFileNameWithoutExtension(capFile); outDir = Directory.GetParent(capFile).FullName; outDir += "\\" + baseName; if (!Directory.Exists(outDir)) Directory.CreateDirectory(outDir); outDir += "\\"; this.Text = "Loading pcap file..."; this.Refresh(); rm = new ReconManager(NewStream, NewNode, Complete, DNS, capFile, outDir, this); Thread mThread = new Thread(new ThreadStart(rm.ProcessPcap)); mThread.IsBackground = true; mThread.Start(); }