# Skeleton file for PSU Dandy Dialer for generating LOGIN.CMD # for Trumpet Winsock internal SLIP or PPP and PSU server # # C. J. Sacksteder, 3/16/94 # 8/26/94 Increase timeouts # 11/07/94 Add quotes around password # 11/14/94 Add reprompt for password # 1/13/95 Add redialing on busy # 2/15/95 Add beep when connection is made # 4/17/95 Add check for PPP and do that if set # 4/28/95 Run trumpmin.exe at end # 5/01/95 Bad password response is different from Netblazer # Check no response from modem init string # 5/05/95 Add commented output \r after dial, needed for some # modems and campus numbers. Don't know why. # 1/15/96 Add SET SLIP-COMPRESSED=1 in case OTC script was used # 1/15/96 Take out extra reads that used to be needed for 3-6666 # 4/23/96 Add status messages (need 2.1f for these). # H. D. Knoble, 3/27/97 - Add the three initial SETs to enable this # script to be alternated with OTC288.PSU. #------------------------------------------------------------ #The following will change settings in TRUMPWSK.INI; # it becomes a comment in the generated script. #We may be PPP or SLIP, set VJ Compression on in case SLIP and #OTC was used. display Script generated from file LOGIN.PSU, Version 3.2\n\n # # initialize modem # status Initializing modem . . . output ""\r if [input 10 OK\n] = 0 display Modem is not responding. Try turning off/on. abort end # # Sometimes a second setup string is needed (or so someone told me) # output \r # input 10 OK\n # if you are sure you have to wait for ok, uncomment prev stmt # # Change the 30 below if you want to try dialing longer %tries = 30 repeat status Dialing . . . output \r read 240 $result # some modems need another "read 30 $result" here read 30 $result if pos("BUSY", $result) > 0 sleep 3 %tries = %tries - 1 else %tries = 0 end until %tries = 0 #Some modems, for campus numbers, need to send a CR at this point #output \r status Logging in as . . . input 240 login: output \r input 120 Password: output ""\r read 30 $result # echoed CR read 30 $result # might be bad userid/password message #On bad password, Bell and Watson respond like: # Unable to authenticate to AFS because password was incorrect. # Standard UNIX authentication failed...login incorrect. #Netblazer responds: # Login incorrect %tries = 1 while pos("incorrect", $result) > 0 & %tries < 3 #Netblazer prompts for userid again, Bell and Watson don't if pos("Unable", $result) = 0 input 30 login: output ""\r end input 30 Password: password Enter password for user again: output \p\r read 30 $result read 30 $result %tries = %tries + 1 end if pos("incorrect", $result) > 0 display *******************************************\n display Password wrong 3 times, hanging up . . . \n display *******************************************\n sleep 2 output +++ input 10 OK\n output ath0\r input 10 OK\n else input 120 choice: if %ppp=1 status Requesting PPP service . . . output ppp\r else status Requesting SLIP service . . . output slip\r input 120 IP Address: address 30 input 30 Gateway: display \n display Connected. Your IP address is \i.\n end display \07\07\07 exec trumpmin.exe end