Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple telnet server - how to hide password? 1

Status
Not open for further replies.

nickd87

Technical User
Jan 18, 2006
110
AU
Hi guys

I have written a really simple telnet server using the Winsock control. When a client connects, it asks for a password.

Is there any way I can replicate Unix system logins and how they hide the password from showing when it is typed in?

Thanks

Nick
 
If you rely on local echo at the Telnet client, probably not. If your server is eching input, then just stop echoing when you ask for a password.

You can try working with the options described in RFC 857 - Telnet Echo Option though. Be warned that some Telnet clients don't seem capable of handling it.

I suspect most of your "Unix systems" (what, you never tried the Telnet Service that comes in many versions of Windows?) just echo the heck out of everything and stop during password entry as I described above.
 
For anyone that might one day have the same requirement, all I did was create a boolean variable that is true when a user has authenticated and false when not, and one where the username has been sent or not. Each time there is a DataArrival event, check the booleans and send spaces when prompting for a password, and echo the text in all other circumstances.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top