mikepaterson
Vendor
Some years ago I used a product called MAX/Enterprise (now owned by BMC Software and DEAD) MAX/Enterprise used UniRexx and had added some extensions to redirect STDIN and STDOUT to a connected Telnet session. In this manner you could connect to a remote server, wait for the login prompt (or a timeout) and then enter username, then wait for prompt, entaer password, wait for prompt, key command, wait for output, parse output and based on content decide what to do next. It was all very easy
ret=connect(server,port)
ret=waitfor("login>", 20) /*wait 4 login prompt/timeout */
If ret¬=1 then /* If we got prompt */
say "userid" /* type userid */
else .... /* error processing */
ret=waitfor("password>", 20) /*wait 4 pswd prompt/timeout*/
If ret¬=1 then /* If we got prompt */
say "password" /* type password */
else .... /* error processing */
ret=waitfor(">", 20) /*wait 4 cmd prompt/timeout */
If ret¬=1 then /* If we got prompt */
say "dir/w" /* issue command*/
else .... /* error processing */
do while lines() /* loop round data returned by cmd*/
parse pull data /* grab each line in turn */
etc. etc.
end
These extensions made it really easy to automate a telnet session. My question is : Is there any product or extension available today that allows this easy automation of telnet sessions?
ret=connect(server,port)
ret=waitfor("login>", 20) /*wait 4 login prompt/timeout */
If ret¬=1 then /* If we got prompt */
say "userid" /* type userid */
else .... /* error processing */
ret=waitfor("password>", 20) /*wait 4 pswd prompt/timeout*/
If ret¬=1 then /* If we got prompt */
say "password" /* type password */
else .... /* error processing */
ret=waitfor(">", 20) /*wait 4 cmd prompt/timeout */
If ret¬=1 then /* If we got prompt */
say "dir/w" /* issue command*/
else .... /* error processing */
do while lines() /* loop round data returned by cmd*/
parse pull data /* grab each line in turn */
etc. etc.
end
These extensions made it really easy to automate a telnet session. My question is : Is there any product or extension available today that allows this easy automation of telnet sessions?