All pastes #567011 Raw Edit

Something

public text v1 · immutable
·published 2007-06-14 18:47 UTC
rendered paste body
private void PortScan(string Search, int start, int end)
        {
            for (int CurrPort = start; CurrPort <= end; CurrPort++)
            {
                TcpClient TcpScan = new TcpClient();
                tbStatus.Text = "Scanning Port: " + CurrPort;
                try
                {
                    TcpScan.Connect(Search, CurrPort);
                    tbInfo.AppendText("\r\n" + CurrPort);
                }
                catch
                {
                    tbStatus.Text = "Port " + CurrPort + " Closed.";
                }
            }
        }