🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Telnet protocol trouble

Started by
18 comments, last by tcs 23 years, 9 months ago
OK, first off, did you read ALL the different RFC dealing with telnet ? if not, try there.
I was assuming that you had, and thus trying to offer another way to do it (because, check your unix C manual, there is a way not to echo anything when getting input).

If you haven''t read all, then here comes the quote :
quote:
The echoing option alone will normally not be sufficient to effect what is commonly understood to be remote computer echoing of characters typed on a terminal keyboard--the SUPPRESS-GO AHEAD option will normally have to be invoked in conjunction with the ECHO option to effect character-at-a-time remote echoing.


So, it seems that you''d have to send IAC WONT ECHO, then IAC WILL SUPRESS-GO-AHEAD *before* the password is entered ... then reactivate them once the password has been given, using the opposite telnet functions : IAC WILL ECHO, then IAC WONT SUPRESS-GO-AHEAD

Now ... let me know if it works

Otherwise I really haven''t a clue about telnet, but hey, I certainly know how to read a RFC

youpla :-P
-----------------------------Sancte Isidore ora pro nobis !
Advertisement
Yes, this would work. Yes, it actually works... ...with a telnet client that supports such stuff !!! It works with UNIX telnet and CRT but not with windows telnet. And that''s pretty shitty...
Why is this sooo hard ;-)) Any more ideas ?


Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
Ok, jsut tell me one thing, do you check the "local echo" in the windows telnet ??? BEcause if you do, I don't think telnet itself can change anything about it. If I remember correctly, this local echo was implemented to counter those ECHO and GO-AHEAD-SUPRESS options ... if the user *want* to see his password being displayed, then you shouldn't worry too much . There *are* stupid people around, you know

One thing, are you coding a program that is server and receive telent connections, or are you doing a telnet client ??
Because I still believe if you are coding a server, you could use the simple solution I offered in the first place ... (if a program is not sending any output to the standard output, I don't see why it would be sent through the telnet connection, hence the problem wouldn't even exist)


Edited by - ahw on September 20, 2000 6:31:38 AM
-----------------------------Sancte Isidore ora pro nobis !
The problem is that windows telnet ignores the options entirely. If you don''t check echo, it never echoes. If you check echo, it always echoes... It doesn''t seem to process options, other tlnet clients work just fine...

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
OK then, what C function are you using when you get the password ??? If it''s a scanf, try with something else. On DOS, there is a getch function (that takes characters one at a time, without echoing), or the getpass function (that takes an 8 characters string, without echoing as well); the only problem is that I am not sure those two are standard C, since they are part of the conio.h and this is not standard across compilers. But look for alternative input functions, and you should find the appropriate one that doesn''t echo, then *TRY IT* and see what happens ...

youpla :-P

-----------------------------Sancte Isidore ora pro nobis !
No no no ! I''m coding a telnet server, not a Win32 Console program. The communication from server to client goes over a socket, not over stdin / stdout ! I can''t use stuff like getc because my input comes from a socket, not from the stdinput.I tried to write the server in echo all mode. This works fine cause I can decide what to echo. But it doesn''t seem to work with CRT cause it buffers a whole line and then sends it to the server. This means that only a full line get echoed. If just win32 would be as advanced as UNIX Telnet or CRT...



Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
fair enough, I realise my mistake now, was just still thinking in the UNIX way, where an input or output is whatever you want it to be, I was thinking you had ''mapped'' your input to a socket. I remember we could do some pretty cool tricks like that, especially for network programming ...

This windows telnet is one of the crappiest tools I have ever seen ... Honestly, you shouldn''t even bother trying to make your program so it works for that one, because I haven''t seen any program work correctly anyway. I mean, I have been working for 2 years now using telnet to connect on a Unix account, and this piece of crap never worked correctly on a normal vanilla UNIX system. So really, don''t blame yourself on that one, if it works on something like CRT, I say you are doing a good job. If you really wanna go ahead and make it work for windows telnet, good luck !

I am just wondering why no one else answer this thread ?
-----------------------------Sancte Isidore ora pro nobis !
Hi,

I finally found something all telnet clients seem to suppport, ANSI escapes. There was a cool list on planetsourcecode.com

This doesn''t shadow the password, but I can clear the line after the password has been entered. And I can do other useful stuff like a DOS style ''cls'' command.

Windows Telnet is really crappy, like all windows network tools. And just like f.e. DOS, they are just small and crappy versions of the big UNIX ones.

BTW: I stuffed all those telnet parsing and escaping into my socket class. If you are interested you can downloads it from the code archive on my site !

And thank you for your help !


Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
when you say ANSI escape sequences, are you talking about the old ones like ESC[2j or something like that to clear a line ?
Jeez I thought thoses ones were dead ! So I didn''t keep my memos for nothing.

Hey, let us know when you get the hole thing fixed !
-----------------------------Sancte Isidore ora pro nobis !
No, they are not dead. They are a very important part of the telnet protocol ! Without them, you can''t move the cursor on the screen (like in Lynx over telnet) or change colors (like BitchX over telnet). Complex inout masks like pine wouldn''t be possible and even good old vi can''t make a cursor jump to the last line.

Has anyone experience with w2000 telnet ? Any improvement in the escape / options handling ???


Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity

This topic is closed to new replies.

Advertisement