0

I'm automaticng some telnet tasks in C++ based on this library QTelnet. The steps are the following:

  1. Login to server via telnet. Telnet asks for user (I put user + [enter]), then asks for password (I put password + [enter]).

  2. Telnet shows list of options, that can be selected putting the number + [enter]. Picture example: telnet list of options:
    telnet list of options

  3. I select an option, and telnet shows me some fields to fill in, and tells me that when I finish editing press [enter]. Picture example: telnet fill fields:
    telnet fill fields

I have done steps 1 and 2, because it's just replying to the server with the character or word + enter (LF or new line).

I would like to know how telnet handles the data in point 3. How does it separate it? With some special character? Because as I understand it is necessary to differentiate the answer for each field.

Note: The images are only for reference.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
  • `telnet` and the protocol handle almost nothing. Everything you see here is a *function of the terminal*, most likely [ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code)/VT100 escape codes. – tadman May 14 '21 at 18:22
  • It could be possible, but what happens after editing and hitting enter? What data does the client send to the server? – jzumaeta May 18 '21 at 22:38
  • Super easy way to find out: [Wireshark](https://www.wireshark.org) or [`tcpdump`](https://www.tcpdump.org). – tadman May 19 '21 at 01:13

0 Answers0