mIRC Home    About    Download    Register    News    Help

Print Thread
#73425 03/03/04 10:15 AM
Joined: Mar 2004
Posts: 1
S
Shayde Offline OP
Mostly harmless
OP Offline
Mostly harmless
S
Joined: Mar 2004
Posts: 1
Hi,
my problem is this.. I can quite easily set up a telnet server and do everything I want it to do.. I intend to implement a logon system.. now.. here is my problem.. When you log on to the server using any telnet client, the password appears on the screen as you type it. Considering this is going to be a sort of shell... It's imperitive that the password doesn't appear.

Any suggestions are much appreciated.
Thanks,
Shayde.

Joined: Dec 2002
Posts: 349
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 349
Doing a quick dig on google reveals a 'hide-your-input' control code. I'm not sure of it exactly, looks like you're in for a lot of reading smile

Sorry I can't be of more help.

Joined: Sep 2003
Posts: 38
O
Ameglian cow
Offline
Ameglian cow
O
Joined: Sep 2003
Posts: 38
Look at the Telnet RFCs listed on Google, especially RFC 857. If you're really interested in TCP/IP-related things, check out TCP/IP Illustrated, Volume 1 (where I easily looked up how to make the aliases below) and later volumes.
Code:
; Send IAC DO ECHO (255 253 1) to have the client echo keypresses to the user
alias startecho sockwrite $1 $+($chr(255), $chr(253), $chr(1))
; Send IAC DONT ECHO (255 254 1) to have the client hide keypresses
alias stopecho sockwrite $1 $+($chr(255), $chr(254), $chr(1))

When using these, a Telnet client will generally respond with IAC WILL ECHO (255 251 1) or IAC WONT ECHO (255 252 1), so you'll need to handle or ignore these sequences in your sockread event.

Joined: Sep 2003
Posts: 38
O
Ameglian cow
Offline
Ameglian cow
O
Joined: Sep 2003
Posts: 38
I got it backwards. You want to send that the server will handle echoing the password (and just don't send the characters back), then you want to send that the server will not handle echoing the text afterwards.

So :
Code:
; Send IAC WONT ECHO (255 252 1) to have the client handle the echoing
alias showinput sockwrite $1 $+($chr(255), $chr(252), $chr(1))
; Send IAC WILL ECHO (255 251 1) to have the server handle the echoing
alias hideinput sockwrite $1 $+($chr(255), $chr(251), $chr(1))


Also, if you connect to a server that hides the password correctly, that is what you'll see.


Link Copied to Clipboard