home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 7
/
FreshFishVol7.bin
/
bbs
/
comm
/
term-4.1.lha
/
term
/
Extras
/
Rexx
/
Local2Screech.term
< prev
next >
Wrap
Text File
|
1993-08-24
|
2KB
|
84 lines
/**
** Perform an automatic login that will get from a fresh dial or local
** terminal to screech, my remote computer of choice.
**
** Written by Jonathan Springer
**
** This program should be installed in the phonebook. I hardcoded the
** prompts into it, but they're all listed at the top.
**
** Note that the user/password field must be current and (unfortunately)
** both passwords must be the same.
**
** A lot of this is pirated from AutoLogin.term which 'Olsen' was nice
** enough to send along with 'term'.
**/
/* Set up the strings. Hope the names are self explanatory. */
firstprompt = 'Local> '
firstcommand = 'c bigvax\r'
firstuserprompt = 'Username: '
firstusername = '\u\r'
firstpassprompt = 'Password: '
firstpass = '\p\r'
secondprompt = 'vax> '
secondcommand = 'rlogin screech\r'
secondpassprompt = 'Password:'
secondpass = '\p\r'
okprompt = 'screech.springjp>'
/* Set the read timeout to an absurd length. */
TIMEOUT SEC 60
/* Emit two CRs to get a server moving. */
SEND '\r\r'
/* Wait for the firstprompt, and if it's okay send firstcommand */
WAIT firstprompt
IF rc ~= 0 THEN EXIT
DELAY 1
SEND firstcommand
SAY "Logging in to first system"
/* Wait for user and password prompts, sending the correct responses
when they arrive. */
WAIT firstuserprompt
IF rc ~= 0 THEN EXIT
DELAY 1
SEND firstusername
WAIT firstpassprompt
IF rc ~= 0 THEN EXIT
DELAY 1
SEND firstpass
/* Do the same things again. */
WAIT secondprompt
IF rc ~= 0 THEN EXIT
DELAY 1
SEND secondcommand
SAY "Logging in to second system"
WAIT secondpassprompt
IF rc ~= 0 THEN EXIT
DELAY 1
SEND secondpass
WAIT okprompt
IF rc ~= 0 THEN EXIT
SAY "All done"
/* That's it, folks. */