コード例 #1
0
ファイル: FormMain.cs プロジェクト: msignataur/EvilFOCA
        private void AddAttackToListViewEx(Attack attack)
        {
            ListViewItem lvi = new ListViewItem();
            lvi.Tag = attack;

            lvi.Text = attack.attackType.ToString(); // type
            lvi.SubItems.Add(""); // control
            lvi.SubItems.Add(""); // active
            listViewExAttacks.Items.Add(lvi);
            if (attack is MitmAttack)
            {
                if (attack.attackType == AttackType.SlaacMitm)
                {
                    ControlSlaacMitm contr = new ControlSlaacMitm(attack);
                    listViewExAttacks.AddEmbeddedControl(contr, 1, listViewExAttacks.Items.Count - 1);
                    lvi.SubItems[1].Tag = contr;
                }

                else
                {
                    ControlMitmAttack contr = new ControlMitmAttack(attack);
                    listViewExAttacks.AddEmbeddedControl(contr, 1, listViewExAttacks.Items.Count - 1);
                    lvi.SubItems[1].Tag = contr;
                }
            }
            else if (attack is DNSHijackAttack)
            {
                ControlDNSHijacking contr = new ControlDNSHijacking(attack);
                listViewExAttacks.AddEmbeddedControl(contr, 1, listViewExAttacks.Items.Count - 1);
                lvi.SubItems[1].Tag = contr;
            }
            else if (attack is InvalidMacSpoofAttackIpv4Attack)
            {
                ControlInvalidMacIpv4 contr = new ControlInvalidMacIpv4(attack);
                listViewExAttacks.AddEmbeddedControl(contr, 1, listViewExAttacks.Items.Count - 1);
                lvi.SubItems[1].Tag = contr;
            }
            else if (attack is DhcpIPv6)
            {
                ControlDHCPv6 contr = new ControlDHCPv6(attack);
                listViewExAttacks.AddEmbeddedControl(contr, 1, listViewExAttacks.Items.Count - 1);
                lvi.SubItems[1].Tag = contr;
            }
            else if (attack is DoSSLAACAttack)
            {
                ControlDosSlaac contr = new ControlDosSlaac(attack);
                listViewExAttacks.AddEmbeddedControl(contr, 1, listViewExAttacks.Items.Count - 1);
                lvi.SubItems[1].Tag = contr;
            }

            CheckBox cbActive = new CheckBox();
            if (attack.attackStatus == AttackStatus.Attacking)
                cbActive.Checked = true;
            else
                cbActive.Checked = false;
            cbActive.Tag = attack;
            cbActive.CheckedChanged += new EventHandler(cbActive_CheckedChanged);
            listViewExAttacks.AddEmbeddedControl(cbActive, 2, listViewExAttacks.Items.Count - 1);
        }
コード例 #2
0
ファイル: Data.cs プロジェクト: ignaciots/EvilFOCA
 public void AddAttack(Attack attack)
 {
     attacks.Add(attack);
 }
コード例 #3
0
 public ControlMitmAttack(Attack attack)
 {
     this.attack = attack;
     InitializeComponent();
 }
コード例 #4
0
ファイル: ControlDosSlaac.cs プロジェクト: ignaciots/EvilFOCA
 public ControlDosSlaac(Attack attack)
 {
     InitializeComponent();
     this.attack = attack;
 }
コード例 #5
0
ファイル: ControlDHCPv6.cs プロジェクト: ignaciots/EvilFOCA
 public ControlDHCPv6(Attack attack)
 {
     this.attack = attack;
     InitializeComponent();
 }
コード例 #6
0
 public ControlInvalidMacIpv4(Attack attack)
 {
     this.attack = attack;
     InitializeComponent();
 }
コード例 #7
0
 public ControlSlaacMitm(Attack attack)
 {
     this.attack = attack;
     InitializeComponent();
 }
コード例 #8
0
 public ControlDNSHijacking(Attack attack)
 {
     this.attack = attack;
     InitializeComponent();
 }
コード例 #9
0
ファイル: Data.cs プロジェクト: ztxyzu/EvilFOCA
 public void AddAttack(Attack attack)
 {
     attacks.Add(attack);
 }