コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: benshu/Visual_TCPRecon
        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();
        }