Example #1
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            //process IPs
            string[] ips = GetAllIPs();
            if (ips.Length > 1)
            {
                this.AddListItem(String.Format("WARNING: Multiple IP addresses found: {0}", String.Join(" ,", ips)));
                frmIpPick frmIpPick = new frmIpPick();
                frmIpPick.IpAddresses = ips;
                frmIpPick.RefreshIpList();
                var dlgResult = frmIpPick.ShowDialog();

                if (dlgResult == System.Windows.Forms.DialogResult.OK)
                {
                    this.targetIP = frmIpPick.SelectedIP();
                }
                else
                {
                    return;//user exited dialog, do nothing
                }
            }
            else if (ips.Length == 1)
            {
                this.targetIP = ips[0];
            }
            else
            {
                this.AddListItem("ERROR: No local IP addresses found. Make sure you're connected to a network!");
                return;
            }


            //process stuff
            this.buttonStart.Enabled = false;
            if (!String.IsNullOrEmpty(this.textBoxPasswd.Text))
            {
                this.password = this.textBoxPasswd.Text;
            }
            frmMain.enableARP   = this.checkBoxARP.Checked;
            frmMain.enableDNS   = this.checkBoxDns.Checked;
            frmMain.enableMedia = this.checkBoxMedia.Checked;
            frmMain.enableReg   = this.checkBoxReg.Checked;
            frmMain.enableSync  = this.checkBoxSync.Checked;
            frmMain.enableTCP   = this.checkBoxTCP.Checked;

            //disable stuff
            EnableDisableControls(false);

            //start working
            Thread t = new Thread(new ThreadStart(StartVenom));

            t.IsBackground = true;
            t.Start();
        }
Example #2
0
        private void buttonStart_Click(object sender, EventArgs e)
        {
            //process IPs
            string[] ips = GetAllIPs();
            if (ips.Length > 1)
            {
                this.AddListItem(String.Format("WARNING: Multiple IP addresses found: {0}", String.Join(" ,", ips)));
                frmIpPick frmIpPick = new frmIpPick();
                frmIpPick.IpAddresses = ips;
                frmIpPick.RefreshIpList();
                var dlgResult = frmIpPick.ShowDialog();

                if (dlgResult == System.Windows.Forms.DialogResult.OK)
                {
                    this.targetIP = frmIpPick.SelectedIP();
                }
                else
                {
                    return;//user exited dialog, do nothing
                }
            }
            else if (ips.Length == 1)
            {
                this.targetIP = ips[0];
            }
            else
            {
                this.AddListItem("ERROR: No local IP addresses found. Make sure you're connected to a network!");
                return;
            }


            //process stuff
            this.buttonStart.Enabled = false;
            if (!String.IsNullOrEmpty(this.textBoxPasswd.Text))
            {
                this.password = this.textBoxPasswd.Text;
            }
            frmMain.enableARP = this.checkBoxARP.Checked;
            frmMain.enableDNS = this.checkBoxDns.Checked;
            frmMain.enableMedia = this.checkBoxMedia.Checked;
            frmMain.enableReg = this.checkBoxReg.Checked;
            frmMain.enableSync = this.checkBoxSync.Checked;
            frmMain.enableTCP = this.checkBoxTCP.Checked;

            //disable stuff
            EnableDisableControls(false);

            //start working
            Thread t = new Thread(new ThreadStart(StartVenom));
            t.IsBackground = true;
            t.Start();
        }