Cross-platform telnet ncurses session automation solution

Background

Part of my network and telco experience involves automating telnet sessions when legacy equipment does not offer simple solutions in other interfaces. Many older pieces of equipment can only be accessed via ship ports (RS-232 serial ports), SNMP, or telnet. Sometimes telnet is the only way to access certain information, but telnet is designed as a human interface and therefore requires a screen cleaning. In addition, there is also the problem of scraper screens where only parts are updated to save bandwidth (see ncurses ). In my work, I used ActiveState Expect and the Python telnet library.

Question

What languages ​​and libraries can automate telnet sessions and have the following requirements:

  • Suitable for large projects (for example, Tcl does not seem to scale, and Python seems deprecated in my experience).
  • Cross-platform (for example, Pexpect does not work on Windows and ActiveState Waiting behaves differently on Windows plus requires DEP for new machines that need to be disabled)
  • Ability to screen cleanup sessions that repaint portions of the screen (similar to ncurses behavior in command line programs)
  • Free as in beer!

A preferred solution also includes the following:

  • Easy to distribute (for example, it is not necessary to install some huge runtime on the machine.)
  • Also works for SSH, serial connections and other command line interfaces.
+3
1

/Expect/term _expect ActiveTcl. , , . .

+2

Source: https://habr.com/ru/post/1728367/


All Articles