1# ===================================================================================== 2# Chat script to dial our Company PPP account. 3# They uses a call-back system to identify us and to reverse 4# charge the call cost. 5# ===================================================================================== 6# 7ECHO OFF 8# All the usual abort strings 9ABORT "NO CARRIER" 10ABORT "VOICE" 11ABORT "BUSY" 12ABORT "NO DIALTONE" 13ABORT "NO ANSWER" 14# 15# If calling outside allowed time we get this: 16# 17ABORT "Access denied" 18# 19# Modem initialisation stuff 20# 21TIMEOUT 5 22SAY "Initialising modem ...\n" 23'' ATE1 24'OK\r\n' ATS0=1S11=60X4&K4S42.1=1 25# 26# Now dial our ISP and wait for connection 27# 28SAY "Dialling our ISP ...\n" 29'OK\r\n' ATDT09834657 30TIMEOUT 60 31CONNECT \c 32SAY "Connected ...\n" 33# 34# This is the first stage login, we identify ourself so that the remote 35# system will agree to call us back. 36# 37TIMEOUT 30 38SAY "Sending Callback login ID ...\n" 39name:-BREAK-name: callme 40# 41# From now on, we must assume no carrier is normal as well 42# as receiving a HANGUP signal because it will be the 43# case if our ISP clears the call to call us back. 44# 45CLR_ABORT "NO CARRIER" 46HANGUP OFF 47# 48ABORT "Invalid" 49# 50# Now send password and wait to see what happens 51# 52SAY "Sending Callback password ...\n" 53word:--word: xvsgsgs 54"You will be" \c 55# 56# What can happen now is: 57# either: we get "You will be called back..." which is the successful case 58# or: we get "Invalid login" and we abort (bad login ID or password) 59# or: we get "NO CARRIER" because of an error, this will not abort 60# and we will time out after 30 seconds 61# or: we get nothing and we will time out after 30 seconds 62# 63# 64# We reach here if we got "You will be called back..." 65# 66CLR_ABORT "Invalid" 67SAY "Now waiting for Call back ...\n" 68# 69# The remote system will now hangup and we will get both "NO CARRIER" 70# and a hangup signal which are ignored. We now wait for a connection 71# for up to 120 seconds. What happens here if somebody else calls before 72# the remote system is a bit dangerous: 73# 74# If a malicious user connects and says 'name:', he will see 'PPPuser' 75# If he then says 'word:' he will see the passowrd 'blipblop'. I may not 76# know to which systems these belong to, though. It is up to you to consider 77# that case and decide wether the risk is too big or not .... 78# 79TIMEOUT 120 80"CONNECT" \c 81# 82# We have been called, re-arm ABORT on NO CARRIER and normal hangup signal 83# behaviour 84# 85HANGUP ON 86ABORT "NO CARRIER" 87# 88# Second stage login in order to start PPP 89# 90SAY "Remote system called back, logging in ...\n" 91SAY "Sending login ID ...\n" 92name:-BREAK-name: PPPuser 93SAY "Sending password ...\n" 94word:--word: blipblop 95SAY "Asking to start PPP ...\n" 96'CnetSrv' "ppp default" 97"Entering PPP mode" \c 98SAY "ISP PPP started ...\n" 99