Something
public text v1 · immutableprivate 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.";
}
}
}