! ! InterSLIP gateway script for a Unix shell using SLiRP ! Script originally written for use with TIA by Bill Arnett (billa@netcom.com) ! Modified/Hacked for SLiRP by Dameon D. Welch (dwelch@phoneboy.com) ! ! I made a special version of this script for people that get an additional ! prompt before a login (for example, prompting by a terminal server). ! It has not been throughly tested, so use at your own risk. ! ! Users may have to modify the lines marked with "<<-------- " @originate SetTries 124 matchclr matchstr 1 1 "elnet>" ! <<-------- telnet prompt matchread 100 note "no telnet prompt; trying again" write "\13" matchclr matchstr 1 1 "elnet>" ! <<-------- telnet prompt matchread 200 note "no telnet prompt; trying once more" write "\13" matchclr matchstr 1 1 "elnet>" ! <<-------- telnet prompt matchread 300 note "no telnet prompt; giving up" exit -1 @label 1 note "Sending response to telnet" write "hostname.foo.com\10" ! <<-------- telnet response here matchclr matchstr 1 2 "ogin:" ! <<-------- "login:" prompt matchread 100 note "no login prompt; trying again" write "\13" matchclr matchstr 1 2 "ogin:" ! <<-------- "login:" prompt matchread 200 note "no login prompt; trying once more" write "\13" matchclr matchstr 1 2 "ogin:" ! <<-------- "login:" prompt matchread 300 note "no login prompt; giving up" exit -1 @label 2 note "Sending userid" write "^5\10" matchclr matchstr 1 3 "assword:" ! <<-------- "password:" prompt matchread 200 note "no password prompt" pause 60 exit -1 @label 3 note "Sending password" write "^6\10" pause 20 note "Waiting for prompt" matchclr matchstr 1 5 "% " ! <<-------- shell prompt matchstr 2 7 "incorrect" matchread 200 note "No shell prompt; trying again" write "\13" matchclr matchstr 1 5 "% " ! <<-------- shell prompt matchread 300 note "No shell; giving up" pause 60 exit -1 @label 5 note "Starting SLiRP" SetTries 0 write "exec slirp\13" ! <<-------- start slirp; quit shell. matchclr matchstr 1 6 "Ready" matchread 200 note "SLiRP not responding" pause 60 exit -1 @label 6 note "OK" exit 0 @label 7 note "incorrect password; giving up" pause 60 exit -1