Пример #1
0
        public void AddNewListener(ScanObject Result)
        {
            CsgoListenerObject Listener = new CsgoListenerObject(Result);

            ListenerList.Add(Listener);
            RefreshListenerListBox();
        }
Пример #2
0
        private void DoScan()
        {
            while (true)
            {
                if (ScanList.Count >= 1)
                {
                    ScanObject CurScan = ScanList[0];
                    bool       IsOpen  = NetScanManager.IsPortOpen(CurScan.Hostname, CurScan.Port);
                    Console.WriteLine("The " + CurScan.Port + " Is" + IsOpen.ToString());
                    if (IsOpen)
                    {
                        ScanResultBox.Items.Add(CurScan);
                    }
                    ScanList.RemoveAt(0);
                    ScanStatusLabel.Text = "Scan left: " + ScanList.Count;
                }

                if (ScanList.Count == 0)
                {
                    if (DoingScan)
                    {
                        DoingScan = false;
                        MessageBox.Show("Scan complete!");
                        ScanStatusLabel.Text = "Scan left: 0";
                    }
                }
                Thread.Sleep(500);
            }
        }
Пример #3
0
 private void AddAllButton_Click(object sender, EventArgs e)
 {
     foreach (object Obj in ScanResultBox.Items)
     {
         ScanObject ScanObj = (ScanObject)Obj;
         AddNewListener(ScanObj);
     }
 }
Пример #4
0
 private void AddResultButton_Click(object sender, EventArgs e)
 {
     if (ScanResultBox.SelectedItem != null)
     {
         ScanObject Selected = (ScanObject)ScanResultBox.SelectedItem;
         AddNewListener(Selected);
     }
 }
Пример #5
0
 public CsgoListenerObject(ScanObject Input)
 {
     this.Hostname = Input.Hostname;
     this.Port     = Input.Port;
     Init();
 }