home *** CD-ROM | disk | FTP | other *** search
- flags debug
- timeout 60
- ; This is a second script sample, showing how to connect to multiple
- ; systems with one script file.
- telnet omnigate
- waitfor connection
- flags nocase
- lookfor Login
- write "myname\r" ; this is my account (not really)
- lookfor "Password"
- write "mypassword\r" ; this is my password (not really silly)
- lookfor "-->" ; this is my prompt
- message "Connected to Omnigate Ok"
- detach
- telnet clutx.clarkson.edu
- waitfor connection
- lookfor Login
- write "myname\r"
- lookfor "Password"
- write "mypassword\r"
- lookfor "-->" ; don't you love my prompt...
- message "Connected to Clutx ok"
- detach
- ; now lets rlogin to sun.soe
- rlogin sun.soe
- waitfor connection
- lookfor assword
- write "mypassword\r" ; also not my password
- message "Connected to Sun.soe ok"
- detach
- ; now, lets go back to omnigate and re-attach, then do an ftp
- attach "omnigate"
- flags debug
- echo "\e[2J\e[H" ; clear the window
- flags nodebug
- message "\e[2J\e[H" ; clear the console
- show console ; lets display the console while we
- ; draw this stuff out.
- message "\e(0" ; go to line drawing mode
- message "lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\n"
- message "x x\n"
- message "mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj"
- message "\e(A" ; turn back to normal chars
- message "\e[2;3H" ; move cursor into box for prompt
- onerror forgetit
- ; if the user presses ESCAPE at the ask prompt, we generate an error that
- ; we can use to jump with.
- ask "Enter your FTP Userid (esc to Quit):"
- show console ; the ask command will switch to the console
- ; for me, but it also restores the current
- ; view, so I switch it back to the console
- ; here
- message "\e[2;3H\e[0K\e[5mThanks!\e[0m\e[4;1H" ; pretty stuff here
- flags debug
- write "ftp "
- send myip
- write "\r"
- lookfor "Name"
- send ask
- write "\r"
- flags nocase
- lookfor "password:"
- send password
- write "\r"
- show current
- end
- label forgetit ; person gets here if they pressed escape
- message "\e[2J\e[HFTP Aborted\n"
- show console
- end
-