Beispiel #1
0
        private void InvokeArpReader()
        {
            try
            {
                ARPReader.srcAddress = IPAddress.Parse(textBoxLocalIP.Text);
                ARPReader.netAddress = IPAddress.Parse(textBoxNetwork.Text);
                ARPReader.subnetMask = Convert.ToUInt32(comboBoxSubnetmask.SelectedItem);
                if (this.comboBoxNWD.Text != "Default")
                {
                    ARPReader.networkInterface = Convert.ToUInt16(this.comboBoxNWD.SelectedItem.ToString()) - (uint)1;
                }

                if (checkBoxOneScan.Checked)
                {
                    ARPReader.SetWindow(this);
                    ARPReader.FloodStart();
                    _js.SyncNodes(ModelHost.hostList);
                    ARPReader.ResetWindow();
                }

                else
                {
                    ARPReader.SteadyStart(_js);
                    GUILogic.SteadyActivated = true;
                    _mw.buttonScan.Enabled   = false;
                }
                validEntering = true;
            }

            catch
            {
                MessageBox.Show("Please check the fields again, your enterings seem to be incorrect", "Ups...Something went wrong", MessageBoxButtons.OK, MessageBoxIcon.Error);
                validEntering = false;
            }


            return;
        }
Beispiel #2
0
        public override string Execute(int consoleWidth)
        {
            ARPReader.srcAddress = (IPAddress)pars.GetPar("l").argValues[0];
            ARPReader.netAddress = (IPAddress)pars.GetPar("n").argValues[0];
            ARPReader.subnetMask = (uint)pars.GetPar("s").argValues[0];

            if (OParUsed("i"))
            {
                ARPReader.networkInterface = (uint)pars.GetPar("i").argValues[0] - 1;
            }

            if (OParUsed("o"))
            {
                ARPReader.FloodStart();
                _js.SyncNodes(ModelHost.hostList);
                return("<color><blue>Successfully performed Scan");
            }
            else
            {
                ARPReader.SteadyStart(_js);
                return("<color><blue> Started steady arp reader");
            }
        }
Beispiel #3
0
        public override string Execute(int consoleWidth)
        {
            string _tmp = ARPReader.ListInterfaces();

            return("<color><blue>" + _tmp);
        }
Beispiel #4
0
 public override string Execute(int consoleWidth)
 {
     ARPReader.SteadyStop();
     return("<color><blue>Arp Reader stopped");
 }
Beispiel #5
0
 public override string Execute(int consoleWidth)
 {
     ARPReader.CheckStart();
     _js.SyncNodes(ModelHost.hostList);
     return("<color><blue>Updated list");
 }