How to unsupress local echo

試著忘記壹切 提交于 2019-11-30 19:09:18

During your telnet sessions in telnet.exe you can pop up the telnet prompt by pressing Ctrl + ]

After that, type "set localecho" or "unset localecho" to switch localecho on or off.

Press Enter to return to your telnet session.

Wrong sequence above. According to some document i found, my sequence should be wrong (WILL/WONT flipped). However it worked with Putty and MS Telnet - strange.

Please try this:

// Supress Echo on client:
out.write(0xFF);    // IAC
out.write(0xFB);    // WILL
out.write(0x01);    // ECHO

// Enable again with:
out.write(0xFF);    // IAC
out.write(0xFC);    // WONT
out.write(0x01);    // ECHO

According to my investigations today:

  1. The MS Telnet client accepts 'set localecho' and 'unset localecho' but does nothing with them except record the state. It doesn't send anything on the wire. The real state of the client remains 'no local echo' no matter what you do and what 'd' says.

  2. The MS Telnet server sends IAC,WILL,ECHO, and in reply accepts IAC,DO,ECHO, and IAC,DONT,ECHO, but completely ignores them, remaining in WILL ECHO state throughout. You can send IAC,DO,ECHO or IAC,DONT,ECHO later on and it won't even reply.

Accordingly, if you are either using the MS client to speak to a non-MS Telnet server or using another client to speak to the MS Telnet server you better stay in no-local-echo mode, otherwise you will get dual echoing.

Windows Vista 64.

Send a backspace and then a *. This will backup the cursor and then print a * over the character they just printed. If it is a slow connection the character may be there for some amount of time. Also look for the '\n' and don't try to over write that.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!