Question

I am trying to suppress the local echo of a password in a telnet session by sending 0xFF 0xFD 0x2D (IAC DO SUPPRESS_LOCAL_ECHO). This works fine.

My trouble is enabling the local echo after the password. I am sending 0xFF 0xFE 0x2D (IAC DONT SUPPRESS_LOCAL_ECHO). But I don't see any of my commands that I type afterwards.

I am using the MS Telnet program to connect.

The IAC is describe here.

The Suppress Local Echo is defined here

Was it helpful?

Solution 4

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top