I am wondering if it is possible to write an interactive script to run telnet or nc. I want to write a graphical front end with menus (default selections and such) for point and click... a telnet server is on the other end.
The issue I have is that the connection can't be broken once started. I can't have a program flow like this:
Code:
first:
(item 1 selected)
telnet << item1script
(connection broken)
then:
(item 3 selected)
telnet << item3script
(connection broken)
The script has to flow like this:
Code:
start_telnet
(item 1 selected)
send_command_1
receive_data
display_data
(item 4 selected)
send_command_4
receive_data
display_data
(item 1 selected)
send_command_1
receive_data
display_data
(quit selected)
connection_broken_and_quit
Is this at all possible? Maybe someone already has this capability written? I have been on google for hours... Any help would be appreciated, thanks in advance.