Ejemplo n.º 1
0
 static void TcpScan(List <int> ports, String host)
 {
     foreach (int port in ports)
     {
         Console.Write("\rsending port {0}", port);
         // send one request every 50 milliseconds
         // hack here using threads to create a false timeout
         TcpClient connection = new TcpClientWithTimeout(host, port, 50).Connect();
     }
     Console.WriteLine();
 }
Ejemplo n.º 2
0
        static void TcpScan(List<int> ports, String host)
        {
            foreach (int port in ports)
            {

                Console.Write("\rsending port {0}", port);
                // send one request every 50 milliseconds
                // hack here using threads to create a false timeout
                TcpClient connection = new TcpClientWithTimeout(host, port, 50).Connect();
            }
            Console.WriteLine();
        }