Telnet IAC命令回答 [英] Telnet IAC command answering

查看:1130
本文介绍了Telnet IAC命令回答的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试与套接字协商telnet连接。
套接字工作正常,但是服务器正在告诉我这件事:

I'm trying to negotiate a telnet connection with a socket. The socket is working,but the server is telling me that thing:

ÿýÿýÿûÿû

login:

ÿýÿýÿûÿû表示255 253 1 255 253 31 255 251 1 255 251 3

The ÿýÿýÿûÿû means 255 253 1 255 253 31 255 251 1 255 251 3

我阅读了所有RFC文档,但我不明白我应该回复什么才能发送(string ascii数据?)到服务器,我的愿望是成功运行登录提示,然后将命令发送到服务器,如停止或其他。

I read all the RFC docs but I don't understand what should I respond with to be able to send (string ascii data?) to the server, my wish is to run the login prompt successfully and then send commands to a server like "halt" or something else.

提前感谢你的答案。

推荐答案

来自 RFC 854


由于
NVT是未启用任何选项时剩余的,因此DON' T和
将不保证响应将连接保持在
状态,两端都可以处理。因此,所有主机都可以实现他们的
TELNET流程,完全不知道支持不是
的选项,只是拒绝拒绝(即拒绝)任何无法理解的
选项请求。

Since the NVT is what is left when no options are enabled, the DON'T and WON'T responses are guaranteed to leave the connection in a state which both ends can handle. Thus, all hosts may implement their TELNET processes to be totally unaware of options that are not supported, simply returning a rejection to (i.e., refusing) any option request that cannot be understood.

也就是说,对于每个 WILL ,回复 DONT 。对于每个 DO ,回复 WONT

That is, for every WILL, respond DONT. For every DO, respond WONT.

在你的您已收到(请参阅 IANA分配的telnet选项):

In your case, you've received (see IANA assigned telnet options):

255 253 1    IAC DO ECHO
255 253 31   IAC DO NAWS
255 251 1    IAC WILL ECHO
255 251 3    IAC WILL SUPPRESS-GO-AHEAD

所以你应该回复:

255 252 1    IAC WONT ECHO
255 252 31   IAC WONT NAWS
255 254 1    IAC DONT ECHO
255 254 3    IAC DONT SUPPRESS-GO-AHEAD

请注意,您不必知道1,3 ,或31实际上是指。这就是美。您甚至不知道他们的定义就可以拒绝这些选项。您只需默认使用网络虚拟终端。

Note that you don't have to know what 1, 3, or 31 actually mean. That's the beauty. You can refuse those options without even knowing their definition. You'll just default to the network virtual terminal.

这篇关于Telnet IAC命令回答的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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