一个不错的C# Telnet类库

虽然版本有点老,但确实比较好使。

 http://www.klausbasan.de/misc/telnet/  要出国

这里方便大家下载,telnet.zip

使用比较简单:

string f = null;
Terminal tn = new Terminal("192.168.1.1"); // hostname, port, timeout [s], width, height
tn.Connect(); // physcial connection
f = tn.WaitForString("Login:");
if (f == null)
    throw new TerminalException("No login possible");
tn.SendResponse("admin", true);	// send username
tn.Close();
posted on 2010-06-03 12:35  eshizhan  阅读(9530)  评论(0编辑  收藏  举报