KpyM Telnet/SSH Server - Forum
telnet server authentication
omid telnet server authentication
 
Hi,
I'm writing a telnet server for linux. My problem is that I want to run some operations on the client session - for example showing '*' when prompting for password - but i haven't found any way to do this.
I use sockets for the connections and my telnet server works fine and i can connect to it from other computers and run commands on the sever side but i have problems on the client side.
I looked at KpyM and it seems you do something similar. Could you tell me where you do this (specially for the password) in the source code and how because I couldn't find it.

I would appreciate any help. Thanks.

Omid


Kroum Grigorov
 
>for example showing '*' when prompting for password

What KTS does is to tell the telnet client that it will take care to echo back the received data characters. Once you do that it is up to you to send back the chars typed in the client, thus you have control what you want to be visible in the client and what to be masked with '*'
Have a look at this RFC for more info on the ECHO telnet option.
http://www.faqs.org/rfcs/rfc857.html

Kroum


omid
 
Thanks for the advice. This is exactly what I want to do, "take care to echo back", but the problem is I dont no how to. I read the RFC and it explains about echo option but not about how to do this. Everything that I send to the client is displayed as text and not a command.
Could you say in which class and function of KTS you do this so I can do the same in my code.
Thanks.

omid


Kroum Grigorov
 
>but the problem is I dont no how to.
You send the ECHO options straight to the client through your open socket.
For ex:
IAC WILL ECHO -> send to the client these 3 bytes 0xFF 0xFB 0x01

>Could you say in which class and function of KTS you do this
This is in "Consume_client_server" function but I don't think this will make much sense if you look at it out of context.

Kroum


 

© 2007 - 2008 Kroum Grigorov
Powered by phpBB © 2001, 2005 phpBB Group