in reply to Re^2: telnet with keypress and errmsg problem
in thread telnet with keypress and errmsg problem
The press any key issue:
That's a only quick guess: TERM=dumb LINES=999 perl your-script-name in a unix shell would set 2 environment variables for the command in question. Both are related to terminal settings, with COLUMNS and LINES providing the size of the terminal to apps that don't want to talk to the terminal directly using esc sequences (just don't go there!). At least TERM is honored by a real telnet command. Perl sees them in %ENV, maybe Net::Telnet would use them. Might also be worth a try for the server application.
The telnet protocol offers two modes of operation: IIRC, with line mode the client offers just a truly basic line-oriented terminal to the service, with line-editing done by the client locally, w/o involving the server. In char mode the server would be able to talk to the remote tty (in the shell of an xterm, invoke telnet HOST to an insecure host still running a telnetd (the service), login to HOST's shell. If necessary set TERM=xterm and voila full screen vi or emacs.)
For more info, check e.g. wikipedia, the original telnet protocol rfc 854 or the manpages of telnet and telnetd.
Things to try coping with the press any key prompt (use a telnet client instead of perl for testing these interactively)
sub TELOPT_NAOL () {8}; # Output Line Width sub TELOPT_NAOP () {9}; # Output Page Size sub TELOPT_NAWS () {31}; # Negotiate About Window sub TELOPT_LFLOW () {33}; # Remote Flow Control sub TELOPT_LINEMODE () {34}; # Linemode
If you've found your answer, please append it to this thread :)
|
|---|