# Copyright (c) 1993, 1995 David WU (dyw@iohk.com) # All Rights Reserved # This script contains modifications of the original login.cmd # in Trumpet Winsock version 2.0a # SUCH MODIFICATION IS UNPUBLISHED PROPRIETARY SOURCE CODE OF # David WU (dyw@iohk.com) # The copyright notice above does not evidence any # actual or intended publication of such source code. # If you use this or further modify this you MUST include # this copyright notice # # Revised on Feb 28, 98 - inclusion of 56K modem pool # Sk Pang, IOHK # # set up some strings for dialling up # if ![load $username] if [username "Enter your login username"] save $username end end # better not use saved password for security reasons #if ![load $password] # if [password "Enter your login password"] # save $password # end #end $modemsetup = "&c1" $prompt = "host:" $userprompt = "ogin:" $passprompt = "assword:" $number1 = "23143123" $number2 = "30018200" %attempts = 10 # #---------------------------------------------------------- # # initialize modem # output atz\n if ! [input 10 OK\n] display Modem is not responding\n abort end # # setup our modem commands # output at$modemsetup\n input 10 OK\n # # send phone number # $number = $number1 $pnets = "No" if [ query $pnets "Check Mail? Y(PNETS chargeable)/N" ] if $pnets = "y" $number = $number2 end if $pnets = "Y" $number = $number2 end end %n = 0 repeat if %n = %attempts display Too many dial attempts\n abort end output atdt$number\n %ok = [input 60 CONNECT] %n = %n + 1 until %ok input 10 \n # # wait till it's safe to send because some modem's hang up # if you transmit during the connection phase # wait 30 dcd # # now prod the terminal server (for old modem pool) # if $number = $number1 output \n input 30 $prompt if %ppp # # jump into ppp mode # output "ppp"\n # else # # jump into slip mode # output "slip"\n # end end # # wait for the username prompt # input 30 $userprompt output $username\n # # and the password # input 30 $passprompt #output $password\n password Enter your password output \p\n # # now prod the terminal server (for 56K modem pool) # if $number = $number2 input 30 $prompt if %ppp # # jump into ppp mode # output "2"\n # else # # jump into slip mode # output "3"\n # end end # # we are now connected and logged in # display \n display Connected. # # now we are finished. #