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 en
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.
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
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.
According to my investigations today:
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.
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.