如何处理telnet协商 [英] How to deal with the telnet negotiation

查看:41
本文介绍了如何处理telnet协商的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在用C#编写的telnet客户端示例连接数据采集单元,我可以连接服务器并发送命令,但我总是收到相同的数据(我无法发布图像,数据是{255,253,3,255,254,1,255251,1}).我也做了一些研究,这个问题似乎与telnet协议/协商有关,但我没有更多的想法和经验,我该怎么办,有人可以帮忙看看吗?任何建议和解决方案表示赞赏.

Currently I'm tring an telnet client sample written by C# to connet a data acquisition unit, I could connect the server and send the commands, but I always received the same data (I cound't post images, the data is{255,253,3,255,254,1,255251,1}). I also do some research, seems this problem is related telnet protocol/negotiation, but I don’t have any more idea and experience on that what should I do, could anyboday please help to look at it? any suggestion & solution is appreciated.

其他的,我可以直接用OS的telnet执行相关命令查看正确的数据.

others, I could directly use the telnet of OS to execute related commands to see the correct data.

推荐答案

如果不需要在终端窗口中显示任何内容,请回复 DO &WILL 与 WON'T 所有优惠.用 252 替换 253/254 并发送回服务器.服务器可能会有更多的协商.如上所述再次响应.协商后,登录&除非禁用身份验证,否则应遵循密码.成功登录将遵循版权人和其他信息,直到用户提示到达.现在您可以发送操作系统命令并处理您得到的响应.

If you don't need to display anything in a terminal window, respond to DO & WILL with WON'T to all offers. Replace 253/254 with 252 and send back to server. There maybe more negotiation from the server. Respond again as described above. After negotiation, log-in & password should follow, unless authentication is disabled. A successful log-in will follow copywright and other info till the user-prompt arrives. Now you are able to send OS-commands and process the response you get.

这篇关于如何处理telnet协商的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆