How to unsupress local echo

后端 未结 4 783
春和景丽
春和景丽 2021-01-04 23:43

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

相关标签:
4条回答
  • 2021-01-05 00:11

    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.

    0 讨论(0)
  • 2021-01-05 00:20

    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
    
    0 讨论(0)
  • 2021-01-05 00:26

    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.

    0 讨论(0)
  • 2021-01-05 00:35

    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.

    0 讨论(0)
提交回复
热议问题