| Title: | Traditional Video Terminals and Monitors |
| Notice: | See 3230 for Sun River information |
| Moderator: | REGENT::LASKO |
| Created: | Tue Mar 18 1986 |
| Last Modified: | Thu May 22 1997 |
| Last Successful Update: | Fri Jun 06 1997 |
| Number of topics: | 3256 |
| Total number of notes: | 14159 |
Hi, I hope this is the right conference to ask this in.
At first it might sound like this belongs in a programming notesfile,
but bear with me. :')
I am trying to write a Telnet client as an excercise in Visual C++
programming.
I've got it so that I can connect up to a remote host and receive
text from the host and print it out etc. But I can't get past the
"Username:" prompt. (I'm testing to a VMS system).
At first I tried sending one byte at a time to the remote host. Each
key that the user pressed would get sent out the windows socket to
the remote host. When trying to type a username at the "Username"
prompt, the remote host would echo back the character I typed, and
then do a CR/LF, blow past the "password" prompt, and say "User
Authorization failure" and ask me for a username again!
Then I tried buffering the chars until a CR, and then send the whole
line to the remote host. (I had to convert the DOS CR to a LF before
sending). This allowed me to type a full username in (although I
wouldn't see what was being typed because the remote host wasn't
getting any data to echo back until I pressed CR), but once I entered
the line, I saw the username get echoed back by the host, but instead
of getting a "password" prompt next, I got some unprintable chars, and
that's it. Everything else I typed would get echoed back after I
entered the line, and then several unprintable chars. I suspect that
there's some special code sequence thats happening before the
"Password:" prompt is sent, that has to do with blanking out the
password as it's typed. But since I'm not interpreting any escape
sequences yet in my program, I don't understand why the remote host
is acting so "different" when it goes to send the "password" prompt.
SHouldn't I see all chars sent from the remote host if I'm printing
all printable characters? What's happening at the password prompt
that would cause me to stop receiving printable characters from the
remote host?
Does anyone know?
-Ken
| T.R | Title | User | Personal Name | Date | Lines |
|---|---|---|---|---|---|
| 3247.1 | what's ascii code 255 for? | METALX::SWANSON | Victim of Changes | Thu Feb 06 1997 13:20 | 22 |
One more question:
I'm going by an example program that someone has started and said
they didn't have time to finish, so they posted it to the Web for
anyone who's interested to hack up.
In one section of the example program, it responds to the ASCII
code 255 being sent from the remote host. If a 255 is received,
followed by a 253, and a third byte, then it sends 255 252 <3rd byte>
back to the host.
Does anyone know what the purpose of that is? The code wasn't
commented. I put the same functionality into my program, but it didn't
help the problem described in .0
I looked at an ASCII table, but instead of having a character or
abbreviation for that code, the box in the table was greyed out!
Any help is appreciated.
-Ken
| |||||
| 3247.2 | METALX::SWANSON | Victim of Changes | Fri Feb 07 1997 09:43 | 5 | |
Nevermind on .0, I found the problem. If someone could answer .1 though, that would be helpful! Ken | |||||
| 3247.3 | JAMIN::OSMAN | Eric Osman, dtn 226-7122 | Tue Feb 11 1997 15:41 | 10 | |
If you don't have the telnet RFP yet, you should get it. There's lots of stuff that can be sent *other* than printable characters, like whole conversations regarding terminal type and stuff like that. I wrote telnet for vtstar. If you send me email, I can give you a copy of our source module. /Eric | |||||