!---------------------------------------------------------------------- ! Fully-commented InterSLIP dialing script ! version 1.1, Wed 31 May 1995 ! ! InterCon has graciously provided InterSLIP ! gratis to the net.community but they neglected to show us how to ! script it. (Don't bother lookingin the InterSLIP docs.) This is my ! attempt to fill the void. ! ! This script is composed of two parts: the "outer" part configures a ! modem and dials a number (forever) as specified in the InterSLIP ! control panel. The "inner" portion acts when you're connected, and ! will reflect what your provider's answering terminal server does. ! ! Copyright (c) 1993-1995 by Michael Sattler. All rights reserved. ! ! Please e-mail any suggestions, comments, corrections, and questions ! to me, Michael Sattler . ! ! InterCon stuff is at ! !---------------------------------------------------------------------- ! Assumptions: ! ! Your modem will return the strings "CONNECT" and "BUSY". Check the ! docs for your particular brand of modem to see how to configure this. ! Many do this by default; try "AT&F1" (revert to default factory ! settings). ! ! Your modem uses the string "AT" to initiate command sequences. ! ! Your modem uses the string "ATH" to hang up. ! ! Your modem recognizes the string "+++" as the attention sequence. ! ! The matchexp string for the Portmaster IP and your IP must be ! configured to match the class of address being served. I don't ! understand why the default string shouldn't always be ! "[0-9]*\.[0-9]*\.[0-9]*.[0-9]*" - if you know please tell me. ! !---------------------------------------------------------------------- ! ! S U C C E S S !!! ! ! N O W N A V I G A T E T H E R E S P O N S E S O F ! T H E ! "O T H E R S I D E" O F T H E C O N N E C T I O N ! !---------------------------------------------------------------------- @connected note "Waiting for login prompt." pause 15 ! give the human a chance to read matchclr write "\13" matchstr 1 send-username "login:" matchread 50 note "No login prompt, quitting." jump general-error-handler ! ! Got the login prompt. Send the username (login name). ! @send-username note "Logged in as '^5'." pause 15 ! give the human a chance to read write "^5\13" pause 20 ! let modem digest prev command note "Waiting for password prompt." pause 15 ! give the human a chance to read matchclr matchstr 1 send-password "Password:" matchread 180 note "No password prompt, quitting." jump general-error-handler ! ! Got the password prompt. Send the password. ! @send-password note "Sending password." pause 15 ! give the human a chance to read write "^6\13" pause 20 ! let modem digest prev command ! ! The terminal server will say something like: ! SL/IP session from (140.174.229.99) to 140.174.229.204 beginning... ! ! Get the Portmaster IP from the terminal server string. ! matchclr matchexp 1 got-portmaster "[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9]*\.[0-9]*" matchread 120 note "Invalid password, quitting." jump general-error-handler ! ! Get your IP from the terminal server string. ! @got-portmaster note "Portmaster address is ^0." !pause 15 ! give the human a chance to read matchclr matchexp 1 got-my-ip "[0-9][0-9][0-9]\.[0-9]*\.[0-9]*\.[0-9]*" matchread 120 note "Can't get my IP address, quitting." jump general-error-handler ! ! Got your IP address. Show it to the user. ! @got-my-ip note "My IP is ^0." pause 15 ! give the human a chance to read ! ! Get MacTCP to use your IP address. ! setip "^0" pause 20 ! let modem digest prev command note "You're on the net; enjoy!" pause 15 ! give the human a chance to read exit 0 !<-------- added while in Eivissa ! ! For future compatibility define @answer and @hangup ! @answer @hangup ! ! Exit normally. ! exit 0 ! !---------------------------------------------------------------------- ! General purpose error handler. Let the message appear, ! beep, and then pause for a second. ! @general-error-handler pause 30 sound pause 30 exit -1 !---------------------------------------------------------------------- ! end of the script !----------------------------------------------------------------------