Banner Example: * Welcome To 101044555@xxxxxxx * ----------------------------- * * ADSL Line : xxxxx 5M * * Warning: * Any unauthorized access to * this system is unlawful, and * may be subject to civil and/or * criminal penalties! * * \ CONFIGURED BY-AY * (o> * //\ * V/_ * || * || * *
namespace TelNetTesting { class Program { static void Main(string[] args) { Console.WriteLine("Please enter the name of a server:"); string server = Console.ReadLine(); TcpClient client = new TcpClient(server, 23); StreamReader sr = new StreamReader(client.GetStream()); StreamWriter sw = new StreamWriter(client.GetStream()); try { sw.WriteLine("exit"); sw.Flush(); string data = sr.ReadLine(); while (data != null) { Console.WriteLine(data); data = sr.ReadLine(); } client.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)