虽然版本有点老,但确实比较好使。
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();