All pastes #567024 Raw Edit

Something

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