Exemplo n.º 1
0
 /// <summary>
 /// Reconnects clients by stopping fake ARP requests
 /// </summary>
 public void ReconnectClients() //selective reconnection not availabe at this time and frankly, not that useful
 {
     DisconnectReconnect.Reconnect();
     foreach (ListViewItem entry in _view.ListView1.Items)
     {
         entry.SubItems[3].Text = "Activado";
     }
     _view.ToolStripStatus.Text = "Has devuelto la conexión";
 }
Exemplo n.º 2
0
 /// <summary>
 /// Populate the LAN clients
 /// </summary>
 public void RefreshClients()
 {
     if (_view.ToolStripComboBoxDeviceList.Text != "")                      //if a network interface has been selected
     {
         if (_view.ToolStripStatusScan.Text.IndexOf("Escaneando...") == -1) //if a scan isn't active already
         {
             DisconnectReconnect.Reconnect();                               //first disengage spoofing threads
             _view.ToolStripStatus.Text = "Listo";
             GetClientList.GetAllClients(_view, _view.ToolStripComboBoxDeviceList.Text);
         }
     }
     else
     {
         MessageBox.Show("Por favor, seleccione una interfaz.\nPuede hacerlo en EDITAR -> Seleccionar interfaz", "Interfaz", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Populate the LAN clients
 /// </summary>
 public void RefreshClients()
 {
     if (_view.ToolStripComboBoxDeviceList.Text != "")                 //if a network interface has been selected
     {
         if (_view.ToolStripStatusScan.Text.IndexOf("Scanning") == -1) //if a scan isn't active already
         {
             DisconnectReconnect.Reconnect();                          //first disengage spoofing threads
             _view.ToolStripStatus.Text = "Ready";
             GetClientList.GetAllClients(_view, _view.ToolStripComboBoxDeviceList.Text);
         }
     }
     else
     {
         MessageBox.Show("Please select a network interface!", "Interface", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Reconnects clients by stopping fake ARP requests
        /// </summary>
        public void ReconnectClients()//Not used
        {
            DisconnectReconnect.Reconnect();
            IEnumerable <Device> list = _view.ListView1.Objects.Cast <Device>().ToList();

            foreach (Device entry in list)
            {
                entry.DeviceStatus = "Online";
                _view.ListView1.UpdateObject(entry);
            }
            _view.StatusLabel.Text = "Stopped";

            _view.PictureBox.BeginInvoke(new Action(() =>
            {
                _view.PictureBox.Image = NetStalker.Properties.Resources.icons8_ok_96px;
            }));
        }
Exemplo n.º 5
0
 /// <summary>
 /// Disconnects clients selected in the listview
 /// </summary>
 public void DisconnectSelectedClients()
 {
     if (_view.ListView1.SelectedItems.Count > 0)
     {
         Dictionary <IPAddress, PhysicalAddress> targetlist = new Dictionary <IPAddress, PhysicalAddress>();
         int parseindex = 0;
         foreach (ListViewItem listitem in _view.ListView1.SelectedItems)
         {
             targetlist.Add(IPAddress.Parse(listitem.SubItems[1].Text), PhysicalAddress.Parse(listitem.SubItems[2].Text.Replace(":", "-")));
             _view.MainForm.BeginInvoke(new Action(() =>
             {
                 _view.ListView1.SelectedItems[parseindex++].SubItems[3].Text = "Desactivado";
                 _view.ToolStripStatus.Text = "Has quitado la conexión";
             }));
         }
         DisconnectReconnect.Disconnect(_view, targetlist, GetGatewayIP(_view.ToolStripComboBoxDeviceList.Text), GetGatewayMAC(_view.ToolStripComboBoxDeviceList.Text), _view.ToolStripComboBoxDeviceList.Text);
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// Disconnects clients selected in the listview
        /// </summary>
        public void DisconnectSelectedClients()//Not used
        {
            try
            {
                if (_view.ListView1.SelectedObjects.Count > 0)
                {
                    Dictionary <IPAddress, PhysicalAddress> targetlist = new Dictionary <IPAddress, PhysicalAddress>();
                    foreach (Device listitem in _view.ListView1.SelectedObjects)
                    {
                        targetlist.Add(listitem.IP,
                                       listitem.MAC);
                        listitem.DeviceStatus = "Offline";
                        _view.ListView1.UpdateObject(listitem);
                        _view.MainForm.BeginInvoke(new Action(() =>
                        {
                            _view.StatusLabel.Text = "Spoofing active";
                        }));
                    }

                    DisconnectReconnect.Disconnect(_view.ListView1, targetlist,
                                                   GetGatewayIP(NetStalker.Properties.Settings.Default.friendlyname),
                                                   GetGatewayMAC(NetStalker.Properties.Settings.Default.friendlyname),
                                                   NetStalker.Properties.Settings.Default.friendlyname);

                    _view.PictureBox.BeginInvoke(new Action(() =>
                    {
                        _view.PictureBox.Image = NetStalker.Properties.Resources.image__4_25;
                    }));
                }
            }
            catch (GatewayTargeted)
            {
                MetroMessageBox.Show(_view.MainForm, "This operation can not target the gateway!", "Warning",
                                     MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            catch (LocalHostTargeted)
            {
                MetroMessageBox.Show(_view.MainForm, "This operation can not target your own ip address!", "Warning",
                                     MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }