socket program help
-
Hi all, I'm using C to write a socket program.I want to add in that server program that it will accept only the password from the client if it's "mypassword": i'm not writing any client program. the client will be the built in linux Telnet program so the session will be between the server and client as follows 1. telnet 192.11.11.9 password "mypassword". 2.then the server if recieved the password "mypassword" it will connect if not it will close the connection. I want to know how i can make the server program recognize that the pasword is right or wrong..how i can write it in the server Thanks
-
Hi all, I'm using C to write a socket program.I want to add in that server program that it will accept only the password from the client if it's "mypassword": i'm not writing any client program. the client will be the built in linux Telnet program so the session will be between the server and client as follows 1. telnet 192.11.11.9 password "mypassword". 2.then the server if recieved the password "mypassword" it will connect if not it will close the connection. I want to know how i can make the server program recognize that the pasword is right or wrong..how i can write it in the server Thanks
-
Hi all, I'm using C to write a socket program.I want to add in that server program that it will accept only the password from the client if it's "mypassword": i'm not writing any client program. the client will be the built in linux Telnet program so the session will be between the server and client as follows 1. telnet 192.11.11.9 password "mypassword". 2.then the server if recieved the password "mypassword" it will connect if not it will close the connection. I want to know how i can make the server program recognize that the pasword is right or wrong..how i can write it in the server Thanks
You could write an interactive login sequence. For example your server sends the text line "Enter your authorisation" immediately when a client connects, then evaluate the first newline terminated response from the client. However, this simple approach works with most telnet clients only on a non standard port (other than port TCP 23)... I would strongly recommend to implement the full telnet protocol or at least look for IAC sequences in the server code (RFC 854). Hope this helps.