; Dial-Up Networking (DUN) login script for ; JHU APL & MCC Centers' Part Time Engineering ; dial-up modem Internet PPP service ; for Windows 95B, Windows NT 4.0 SP3 (Windows 98?) ; Dr. Joe Campbell, 2/5/99 ; Speech Processing, 525.747 ; j.campbell@ieee.org ; http://www.apl.jhu.edu/Classes/Notes/Campbell/ ; Refer to http://www.apl.jhu.edu/ for any updates ; The Baltimore area APL dial-up phone number is: 443-778-5690 ; The DC area APL dial-up phone number is: 240-228-5690 (or 240-228-5733) ; The DC area MCC dial-up phone number is: 301-294-7043 ; (for other areas and updates, refer to the "Unix Information" sheet ; or "Communications" sheet available in the PTE Center computer labs) ; Place this file in: ; Windows NT 4.0 SP3: C:\WINNT\system32\ras ; Windows 95B: C:\Program Files\Accessories ; and select it via the "Script" tab from Dial-Up Networking (DUN) ; TCP/IP Settings: Server assigned IP address ; DNS Servers ("Server" tab, "TCP/IP Settings..." button): ; (see /etc/resolv.conf on UNIX system) ; 128.220.108.100 (apl.jhu.edu domain) ; 128.8.10.90 (d.root-servers.net) ; Configure your e-mail and news tools with these servers: ; SMTP/POP3/IMAP4 (mail) Server: mail.apl.jhu.edu ; NNTP (news) Server: news.apl.jhu.edu ; ----------- Expected interaction @ APL ----------- ; Computer Center for ; The Johns Hopkins University ; Part-Time Programs in Engineering and Applied Science ; ; ; ;User Access Verification ; ;Username: jpcampb ;Password: ; ; Please enter one of the following to connect: ; ; "UNIX" FOR SUN UNIX AT JHU/APL ; "VMS" FOR VMS SYSTEM AT HOMEWOOD ; ; ; ;KCtr-cs>ppp ; ----------- Expected interaction @ MCC ----------- ;User Access Verification ; ;Username: jpcampb ;Password: ;MCCtr-cs>ppp ; ----------- ; Main entry point to script ; proc main ; Change these variables to customize for your ; specific Internet service provider integer nTries = 2 ; This is the first prompt and timeout values string szFirst = "sername:" integer nFirstTimeout = 5 ; This is the password prompt and timeout values string szPW = "assword:" integer nPWTimeout = 5 ; This is the ppp prompt and timeout values string szPPP = ">" integer nPPPTimeout = 5 ; ----------------------------------------------------- ; Attempt to login at most 'nTries' times while 0 < nTries do ; Wait for the first prompt ; timeout after nFirstTimeout seconds waitfor szFirst then DoLogin until nFirstTimeout TryAgain: transmit "^M" ; ping nTries = nTries - 1 endwhile goto BailOut DoLogin: ; Got first prompt, send PPP login name ; from "User name:" field in Connect To dialog transmit $USERID, raw transmit "^M" ; Wait for the password prompt waitfor szPW until nPWTimeout if FALSE == $SUCCESS then goto TryAgain endif ; Send the password ; from "Password:" field in Connect To dialog transmit $PASSWORD, raw transmit "^M" ; Wait for the PPP prompt waitfor szPPP until nPPPTimeout if FALSE == $SUCCESS then goto TryAgain endif ; Select PPP transmit "PPP" transmit "^M" goto Done BailOut: ; Something isn't responding. Halt the script ; and let the user handle it manually. set screen keyboard on halt Done: endproc