C# Telnet 库
是否有适用于 C#(而非 ASP .NET)的优秀免费 telnet 库? 我在谷歌上找到了一些,但它们都有这样或那样的问题(不支持登录/密码,不支持脚本模式)。
我假设 MS 仍然没有包含 telnet 库作为 .NET v3.5 的一部分,因为如果有的话我找不到它。 但我很想错了。
Is there a good, free telnet library available for C# (not ASP .NET)? I have found a few on google, but they all have one issue or another (don't support login/password, don't support a scripted mode).
I am assuming that MS still has not included a telnet library as part of .NET v3.5 as I couldn't find it if it was. I would loooooove to be wrong though.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
我发现的最好的 C# Telnet Lib 称为 Minimalistic Telnet 。 非常容易理解、使用和修改。 它非常适合我需要配置的思科路由器。
Best C# Telnet Lib I've found is called Minimalistic Telnet. Very easy to understand, use and modify. It works great for the Cisco routers I need to configure.
这是我的代码终于可以工作了
Here is my code that is finally working
另一种具有不同概念: http://www.klausbasan.de/misc/telnet /index.html
Another one with a different concept: http://www.klausbasan.de/misc/telnet/index.html
我最终找到了 MinimalistTelnet 并根据我的用途进行了调整。 由于我尝试连接的独特**设备,我最终需要能够大量修改代码。
** 在这种情况下,独特可以有效地解释为脑死亡。
I ended up finding MinimalistTelnet and adapted it to my uses. I ended up needing to be able to heavily modify the code due to the unique** device that I am attempting to attach to.
** Unique in this instance can be validly interpreted as brain-dead.
我目前正在评估两个可能感兴趣的 .NET (v2.0) C# Telnet 库:
希望这有帮助。
问候,
安迪.
I am currently evaluating two .NET (v2.0) C# Telnet libraries that may be of interest:
Hope this helps.
Regards,
Andy.
另一个,它是一个较旧的项目,但共享完整的源代码: http://telnetcsharp.codeplex.com/
Another one, it is an older project but shares the complete source code: http://telnetcsharp.codeplex.com/
我非常怀疑 telnet 库是否会成为 .Net BCL 的一部分,尽管您确实拥有几乎完整的套接字支持,因此模拟 telnet 客户端不会太难,Telnet 在其一般实现中是一项传统且正在消亡的技术,其中存在通常坐落在一个漂亮的新现代外观后面。 就 Unix/Linux 变体而言,您会发现开箱即用的 SSH 和启用 telnet 通常被认为是不好的做法。
您可以查看:
http://granados.sourceforge.net/ - .Net 的 SSH 库
http://www.tamirgal.com/home/dev.aspx?Item= SharpSsh
您仍然需要放置自己的包装器来处理事件,以便以脚本方式输入输入。
I doubt very much a telnet library will ever be part of the .Net BCL, although you do have almost full socket support so it wouldnt be too hard to emulate a telnet client, Telnet in its general implementation is a legacy and dying technology that where exists generally sits behind a nice new modern facade. In terms of Unix/Linux variants you'll find that out the box its SSH and enabling telnet is generally considered poor practice.
You could check out:
http://granados.sourceforge.net/ - SSH Library for .Net
http://www.tamirgal.com/home/dev.aspx?Item=SharpSsh
You'll still need to put in place your own wrapper to handle events for feeding in input in a scripted manner.