#INDEX >None 00000513 000023 >PC 00000517 000024 >Mac 00000522 000025 >VMS 00000982 000049 >AOS 00003873 000172 >BHost 00007311 000320 >UNIX 00010172 000448 >XENIX 00010179 000449 >AIX 00010184 000450 >A/UX 00010190 000451 >HP-UX 00010197 000452 >IRIX 00010203 000453 >QNX 00010208 000454 >SCO 00010213 000455 >SunOS 00010220 000456 >Ultrix 00010228 000457 >CEO 00016184 000623 >MVS/TSO 00020261 000790 >VM/CMS 00023482 000940 >WBHOST 00026425 001071 :None :PC :Mac ######################################################### # # Title: PC, Mac, or other systems without logins # Version: 2.00 Date: 02/23/96 # .LOGON return 0 .LOGOFF return 0 .TRANSFER return 0 .UPLOAD ask "enter filename to upload", @filename if null @filename or @STATUS = "-1" return 0 if NOT exist @filename werror "can't open ", @filename return 1 end .UPL10 tupload @filename return 0 .END : :VMS ######################################################### # # Title: Digital Equipment Corp (DEC) VAX VMS # Version: 2.01 Date: 02/23/96 # # LOGON to the remote VAX # .LOGON if null @USERID ask "enter account", @USERID if null @USERID or @STATUS = "-1" return 0 end .LOG10 reps 4 .LOG20 wait 1 tsend cr ttrap 3, "name:", "word:", "$", "authorization fail" if @STATUS = "0" or @STATUS = "4" if reps goto .LOG20 return 3 end if @STATUS = "2" goto .LOG20 if @STATUS = "3" tsend "LOGOFF" goto .LOG20 end .LOG30 wait 1 idle tsend @USERID, cr # enter USERID ttrap 6, "word:", "$", "authorization fail" if @STATUS = "2" return 0 if @STATUS = "0" or @STATUS = "3" tsend "\021\031" goto .LOG20 end if null @PASSWORD ask noecho "enter password", @PASSWORD if null @PASSWORD or @STATUS = "-1" return 0 end wait 1 idle tsend @PASSWORD, cr # enter PASSWORD ttrap 20, "$", "authorization fail" if @STATUS = "1" return 0 # # Incorrect USERID/PASSWORD - perhaps it was corrupted in transit # if reps goto .LOG20 return 3 # # LOGOFF the remote system # .LOGOFF reps 2 # .LGF10 tsend cr # get system prompt ttrap 3, "$", "name:", "word:", "authorization fail" if @STATUS = "2" or @STATUS = "3" or @STATUS = "4" return 0 # if @STATUS = "0" if reps tsend "\021\031" goto .LGF10 end return 0 # can't log off, but don't complain end .LGF20 tsend "LOGOFF", cr .LGF25 wait 1 idle return 0 # # UPLOAD a file to the remote system # .UPLOAD ask "enter filename to upload", @filename if null @filename return 0 if NOT exist @filename werror "can't open ", @filename return 1 end .UPL10 ask "enter remote filename or to upload to system", @remotefn if null @remotefn or @STATUS = "-1" goto .UPL20 tsend "\031", cr ttrap 5, "$" if @STATUS = "0" return 1 # # If no remote filename given, assume file already open on receiving system # tsend "create ",@remotefn,cr ttrap 2 .UPL20 tupload @filename wait 2 idle if null @remotefn return 0 tsend "\032" ttrap 5, "$" if @STATUS = "1" return 0 return 1 # # START file transfer on remote system # .TRANSFER reps 4 .TRANS10 tsend cr ttrap 10, "$", "protocol", "ppp", "%DCL-" if @STATUS = "2" or @STATUS = "3" return 0 if @STATUS = "1" goto .TRANS20 if @STATUS = "0" or @STATUS = "4" if reps tsend "\021\031" goto .TRANS10 end return 1 end .TRANS20 tsend "BLAST /H", cr # invoke BLAST in host mode goto .TRANS10 .END :AOS ######################################################### # # Title: Data General AOS & AOS/VS systems # Version: 2.00 Date: 2/22/96 # # # LOGON to the remote DG # .LOGON if null @USERID ask "enter account", @USERID if null @USERID or @STATUS = "-1" return 0 end .LOG10 reps 5 .LOG20 tsend LF ttrap 5, "name:", "word:", "console locking", ")" if @STATUS = "1" goto .LOG30 if @STATUS = "2" goto .LOG40 if @STATUS = "3" wait 11 goto .LOG20 end if @STATUS = "4" tsend "BYE", LF goto .LOG20 end .LOG25 tsend "\021" if reps goto .LOG20 # # Can't log in, inform user and exit # return 3 # .LOG30 tsend @USERID, LF # enter USERID ttrap 10, "word:", ")" # wait for PASSWORD prompt if @STATUS = "2" return 0 if @STATUS = "0" goto .LOG25 # .LOG40 if null @PASSWORD ask noecho "enter password", @PASSWORD if null @PASSWORD or @STATUS = "-1" return 0 end tsend @PASSWORD, LF # enter PASSWORD ttrap 20 ")", "name - pass" # trap for AOS prompt if @STATUS = "1" return 0 # # Incorrect USERID/PASSWORD - perhaps it was corrupted in transit # if reps goto .LOG20 return 3 # # LOGOFF the remote system # .LOGOFF reps 4 # try 4 times # .LGF10 tsend LF # get system prompt ttrap 5, ")", "name:", "word:", "console locking" if @STATUS = "1" goto .LGF20 # AOS sys prompt if @STATUS = "2" or @STATUS = "3" or @STATUS = "4" return 0 if reps tsend "\021\003\002" goto .LGF10 end # Unable to get anything recognizable - abort # return 3 # .LGF20 tsend "BYE", LF .LGF25 wait 1 idle return 0 # # UPLOAD a file to the remote system # .UPLOAD ask "enter filename to upload", @filename if null @filename or @STATUS = "-1" return 0 if NOT exist @filename werror "can't open ", @filename return 1 end # .UPL10 ask "enter remote filename or to upload to system", @remotefn if null @remotefn goto .UPL20 tsend LF ttrap 5, ")" if 0 return 1 # # If no remote filename given, assume file already open on receiving system # tsend "CHAR/NAS", LF ttrap 5, ")" if @STATUS = "1" goto .UPL20 ttrap 2 return 1 .UPL20 tsend "CRE/I ", @remotefn, LF # create file w/insert ttrap 10 "))", "EXISTS" if @STATUS = "0" or @STATUS = "2" tsend "CHAR/OFF/NAS", LF return 1 end # tupload @filename wait 2 idle # if null @remotefn return 0 tsend LF ttrap 5, "))" if @STATUS = "0" return 1 tsend ")", LF ttrap 5, ")" if @STATUS = "1" tsend "CHAR/OFF/NAS", LF return 0 end return 0 # # START file transfer on remote system # .TRANSFER reps 4 .TRANS10 tsend LF ttrap 10, ")", "protocol", "ppp", "Error" if @STATUS = "2" or @STATUS = "3" return 0 if @STATUS = "0" or @STATUS = "4" if reps tsend "\021\003\001" goto .TRANS10 end return 1 end tsend "X BLAST /H", LF # invoke BLAST in host mode ttrap 8, "protocol", "ppp" if @STATUS not = "0" return 0 goto .TRANS10 .END :BHost ######################################################### # # Title: BHost Systems # Version: 2.50 Date: 02/23/96 # # LOGON to remote BLAST Plus Host system # .LOGON # .LOG10 reps 4 .LOG20 ttrap 6, "in:", "word:", "protocol.", ";0G" if @STATUS = "1" goto .LOG30 if @STATUS = "3" or @STATUS = "4" return 0 tsend cr if reps goto .LOG20 # # Can't log in, inform user and exit # return 3 # .LOG30 if null @USERID ask "enter account", @USERID if @STATUS = "-1" return 0 # user pressed escape end wait 1 idle tsend @USERID, cr # enter USERID ttrap 8, "word:", "tocol.", ";0G", " at " if @STATUS = "0" goto .LOG55 if @STATUS = "2" or @STATUS = "3" return 0 if @STATUS = "4" ttrap 3, "Dialback" return 0 end if null @PASSWORD ask noecho "enter password", @PASSWORD tsend @PASSWORD, cr ttrap 8, "protocol.", ";0G", "nvalid", " at " if @STATUS = "1" or @STATUS = "2" return 0 if @STATUS = "3" set @PASSWORD = "" # bad PASSWORD? if reps goto .LOG20 return 3 end end else wait 1 idle tsend @PASSWORD, cr ttrap 8, "protocol.", ";0G", "nvalid", " at " if @STATUS = "1" or @STATUS = "2" return 0 end .LOG50 if @STATUS = "4" ttrap 3, "Dialback" if @STATUS = "1" ttrap 2, "\015" end return 0 end # # Incorrect USERID/PASSWORD - perhaps it was corrupted in transit # .LOG55 if reps goto .LOG20 return 3 # # LOGOFF the remote system # .LOGOFF reps 2 # try 2 times # .LGF10 tsend cr ttrap 10, "in:", "word:", "Logout", "NO CARRIER", "protocol.", ";0G" if @STATUS = "0" goto .LGF15 if @STATUS = "1" or @STATUS = "2" or @STATUS = "3" or @STATUS = "4" return 0 if @STATUS = "5" tsend ";DISC.", cr ttrap 15, "Logout", ";0G", "NO CARRIER" if @STATUS not = "0" return 0 end tsend "\033\014" ttrap 15, "Logout", ";0G", "NO CARRIER" if @STATUS not = "0" return 0 .LGF15 tsend "\021" # if reps goto .LGF10 # # Unable to get anything recognizable - abort # return 3 # # UPLOAD a file to the remote system (invalid with BHost) # .UPLOAD UPPER @ONERROR if @ONERROR = "STOP" werror "Upload Not Supported by BHOST" end else Write "Upload Not Supported by BHOST" wait 2 end return 0 # # START file transfer on remote system # .TRANSFER reps 2 # .TRANS10 tsend cr ttrap 5, "protocol.", ";0G" if @STATUS not = "0" return 0 .TRANS15 if reps tsend "\021\033\030" goto .TRANS10 end # # Unable to get anything recognizable on remote computer - abort # return 1 .END :UNIX :XENIX :AIX :A/UX :HP-UX :IRIX :QNX :SCO :SunOS :Ultrix ######################################################### # # Title: AT&T Unix and similar systems # Version: 3.75 Date: 02/23/96 # # LOGON to remote UNIX(-like) system # .LOGON if null @USERID # If necessary get login and password ask "enter account", @USERID # Ask Login if null @USERID return 14 # If login not received exit if null @PASSWORD # Check for empty password ask NOECHO "enter password", @PASSWORD # Get Password, If its NULL end # Its supposed to be. end .LOG10 reps 4 # Set Loop to Four .LOG20 ttrap 6, "ogin:", "word:", "$", "#", "%", "NO CARRIER", ":", ">" if @STATUS = "1" goto .LOG30 # Got Login send @USERID if @STATUS = "2" # Got Password, cycle to Login tsend CR # by sending CR goto .LOG20 # Try Again end if @STATUS = "3" or @STATUS = "4" or @STATUS = "5" or @STATUS = "7" or @STATUS = "8" #Got A Prompt, logout tsend LF, "\004", CR #Send Ctrl-D at BOL ttrap 2, "$", "#", "%", "NO CARRIER", "ogin:", ":", ">" #Look again if @STATUS = "0" return 0 #Nothing, give up if @STATUS = "1" or @STATUS = "2" or @STATUS = "3" or @STATUS = "6" or @STATUS = "7" #Shell Prompt tsend "exit", CR # Try Exit Command if reps goto .LOG20 # Try Again end if @STATUS = "4" return 4 # Lost Carrier, Exit if @STATUS = "5" goto .LOG30 # Got Login, so do it end if @STATUS = "6" return 4 # Lost Carrier, exit .LOG25 tsend CR # Send CR if reps goto .LOG20 # and if reps see results return 3 # otherwise return ERROR .LOG30 wait 1 idle # Sync Up with System tsend @USERID, CR # Send USERID ttrap 5, "incorrect", "TERM = (", "word:" # See Results if @STATUS = "3" wait 1 idle #Sync Up tsend @PASSWORD, CR #Send Password ttrap 5, "incorrect", "TERM = (" end if @STATUS = "1" if reps goto .LOG20 #Incorrect Password end if @STATUS = "2" #SCO Asking for TERM Type wait 1 idle #Sync Up if @EMULATE = "PASSTHRU" GETENV "TERM", @value end else if @EMULATE = "TTY" set @value = "dumb" end else set @value = @EMULATE end end lower @value #Change to lower case tsend @value, CR #Set emulation ttrap 3, "$", "#", "%", ":", ">" #Wait for prompt or whatever return 0 #We've made at this point end return 0 # # LOGOFF the remote system # .LOGOFF write "attempting to log off remote system" wait 2 idle # Deal with extraneous output reps 3 # Loop 5 times # .LGF10 tsend CR # Send a Line Feed and look at results ttrap 3, "ogin:", "word:", "NO CARRIER" if @STATUS = "1" or @STATUS = "2" or @STATUS = "3" return 0 # Apearantly we are all ready out end .LGF20 tsend LF, "\004", LF # Try to send Default Kill Character # with LF so next line is not corrupt ttrap 4, "ogin:", "word:", "NO CARRIER", "to terminate" if @STATUS = "0" or @STATUS = "4" tsend "exit", CR # Otherwise lets send exit instead wait 1 idle end # Note there is no ttrap here because truly we do not know if we are # connecting with a modem or not. Telnet for instance does not return # "NO CARRIER". So we are just assuming at this point we are logged off return 0 # # START file transfer on remote system # .TRANSFER reps 2 # Set Up to loop 2 times ttrap 3, "protocol", "ppp" if @status = "1" return 0 end .SENDCR1 wait 1 idle tsend CR # Send CR to see where remote is .CHECKIT ttrap 3, "$", "%", "#", "rotocol", "ppp", ">", ":" if @STATUS = "1" or @STATUS = "2" or @STATUS = "3" or @STATUS = "6" or @STATUS = "7" goto .STARTBPG if @STATUS = "4" or @STATUS = "5" return 0 # Remote bpg started end if @STATUS = "0" # If none of the above found return 1 end goto .SENDCR .STARTBPG # Start BLAST Protocol Generator reps 2 # Restart Reps for BPG .BPGAGAIN tsend "blast -h",CR # invoke BLAST in host mode ttrap 5, "$", "%", "#", ">", ":", "rotocol", "ppp" if @STATUS LT "6" if reps goto .BPGAGAIN return 2 end return 0 # # UPLOAD a file to the remote system # .UPLOAD ask "enter local filename for upload to system", @filename if null @filename return 0 #Removed @STATUS = -1, joo end ask "enter remote filename or to upload to system", @remotefn if null @remotefn goto .UPL20 reps 5 .UPL10 tsend CR ttrap 5, "$", "#", "%", ">", ":" if @STATUS = "0" return 3 end # # If no remote filename given, assume file already open on receiving system # tsend "vi ", @remotefn, CR # Start the ed wait 3 tsend "i" # Put it into append mode .UPL20 tupload @filename # Start Sending Text wait 3 idle # tsend "\033" wait 1 tsend ":x", CR ttrap 8, "$", "%", "#", ">", ":" # Look for prompt if @STATUS = "0" return 3 # Could not find it ERROR end return 0 .END :CEO ######################################## # # Title: Data General CEO AOS & AOS/VS systems running CEO # Version: 2.00 Date: 02/23/96 # # .LOGON if null @USERID ask "enter account", @USERID if null @USERID or @STATUS = "-1" return 0 end reps 5 .LOG20 tsend LF # get response from remote ttrap 5, "name:", "word:", "console locking", ")", "FS01" if @STATUS = "1" goto .LOG30 if @STATUS = "3" wait 11 if @STATUS = "4" tsend "BYE", LF if @STATUS = "5" return 0 .LOG25 tsend "\021" if reps goto .LOG20 # # Can't log in, inform user and exit # return 3 .LOG30 wait 1 idle tsend @USERID, LF # enter USERID ttrap 10, "word:", "FS01" # wait for PASSWORD prompt if @STATUS = "2" return 0 if @STATUS = "0" goto .LOG25 .LOG40 if null @PASSWORD ask noecho "enter password", @PASSWORD if null @PASSWORD or @STATUS = "-1" return 0 end wait 1 idle tsend @PASSWORD, LF # enter PASSWORD ttrap 20, "FS01","name - pass" # trap for AOS prompt if @STATUS = "1" return 0 # # Incorrect USERID/PASSWORD - perhaps it was corrupted in transit # if reps goto .LOG20 return 3 # # LOGOFF the remote system # .LOGOFF reps 3 .LGF10 tsend "\021\036\173" # get logoff prompt ttrap 5, "exit?", "\136\136{", "menu?", "Execute?", "choice:", "Pick one", "name:", ")" if @STATUS = "0" wait 2 idle if reps goto .LGF10 return 3 end if @STATUS = "1" # CEO logoff prompt wait 2 idle tsend "Y", LF ttrap 10, "NEW-LINE", ")" if @STATUS = "0" goto .LGF10 if @STATUS = "2" goto .LGF20 goto .LGF25 end if @STATUS = "2" wait 2 idle tsend LF, LF wait 2 idle goto .LGF10 end if @STATUS = "3" wait 2 idle tsend "Y", LF # sending mail, exit wait 2 idle goto .LGF10 end if @STATUS = "4" wait 2 idle tsend "N", LF # sending mail, exit wait 2 idle goto .LGF10 end if @STATUS = "5" goto .LGF10 if @STATUS = "6" goto .LGF10 if @STATUS = "7" return 0 if @STATUS = "8" wait 1 idle tsend "BYE", LF wait 2 idle return 0 end return 3 # # UPLOAD a file to the remote system # .UPLOAD ask "enter filename to upload", @filename if null @filename or @STATUS = "-1" return 0 if NOT exist @filename werror "can't open ", @filename return 1 end .UPL10 ask "enter remote filename or to upload to system", @remotefn if null @remotefn goto .UPL20 tsend LF ttrap 5, ")" if @STATUS = "0" return 1 # # If no remote filename given, assume file already open on receiving system # tsend "CHAR/NAS",LF ttrap 5, ")" if @STATUS = "1" goto .UPL20 ttrap 2 return 1 .UPL20 tsend "CRE/I ", @remotefn, LF # create file w/insert ttrap 10 "))","EXISTS" if @STATUS = "0" or @STATUS = "2" tsend "CHAR/OFF/NAS", LF return 1 end tupload @filename wait 2 idle if null @remotefn return 0 tsend LF ttrap 5, "))" if @STATUS = "1" tsend ")", LF ttrap 5, ")" if @STATUS = "1" tsend "CHAR/OFF/NAS", LF end return 0 end return 1 # # START file transfer on remote system # .TRANSFER reps 3 .TRANS10 tsend "\036\162" ttrap 10, "What command", ")", "protocol", "ppp", "Error" if @STATUS = "3" or @STATUS = "4" return 0 if @STATUS = "1" tsend "CLI", LF end if @STATUS = "2" ttrap 8, "protocol", "ppp" if @STATUS not = "0" return 0 goto .TRANS10 end if reps tsend "\021" goto .TRANS10 end # # Unable to get anything recognizable on remote computer - abort # return 1 .END :MVS/TSO ############################################################################# # # Title: IBM MVS/TSO routines # Version: 2.02 Date: 02/23/96 # NOTE: This script assumes you are using the standard prompt. Problems # may occur otherwise. # .LOGON # # Initialize flag, get necessary information # # if null @userid # verify existence of userid ask "enter Login ID", @userid if null @userid return 0 end # return ok no error # .LOG10 # ask for password if null @password ask noecho "enter password", @password end # # Try to log in to the remote computer # reps 5 # repeat login procedure up to # 5 times # .LOG20 tsend cr # get response from remote ttrap 10 "LOGON","ID","WORD" if 1 ttrap 3 tsend "LOGON",cr ttrap 5 "ID" if 1 goto .LOG30 end if 2 goto .LOG30 if 3 goto .LOG40 if reps goto .LOG20 # # Can't log in, inform user and exit # return 3 # .LOG30 ttrap 4 tsend @userid, cr # enter userid ttrap 10 "WORD" # wait for password prompt if NOT 1 if reps goto .LOG20 return 3 end # .LOG40 ttrap 4 tsend @password,cr # enter password ttrap 20 "READY","INCORRECT" # trap for unix xenix prompt if 1 return 0 # got a system prompt # # Incorrect userid/password - perhaps it was garbaged. # If we've only tried once, try again, otherwise exit. # if reps goto .LOG20 return 3 # # LOGOFF the remote system # .LOGOFF reps 4 # try 4 times # .LGF10 tsend cr # get system prompt ttrap 10 "READY" if NOT 1 if reps goto .LGF10 return 3 end # .LGF20 # TSO logout tsend "LOGOFF",cr return 0 # # # UPLOAD a file to the remote system # .UPLOAD # .UPL10 ask "enter remote filename or to upload to system", @remotefn if null @remotefn goto .UPL20 tsend cr ttrap 5 "READY" if 0 return 1 # # If no remote filename given, assume file already open on receiving system # reps 2 ttrap 2 tsend "EDIT '",@userid,".",@remotefn,"' TEXT NONUM",cr ttrap 10 "INPUT","EDIT" if 1 goto .UPL20 if 2 tsend cr if 0 return 1 .UPL20 ttrap 2 set @HLINDLY = @LINEDLY set @LINEDLY = "15" tupload @filename set @LINEDLY = @HLINDLY wait 2 idle # if null @remotefn return 0 # .UPL25 tsend cr ttrap 10 "EDIT","INPUT","READY" if 0 or 3 return 1 if NOT 1 and reps goto .UPL25 .UPL30 tsend "END S",cr ttrap 10 "READY" if 1 return 0 return 1 end # # START file transfer on remote system # .TRANSFER reps 3 # .TRANS10 tsend cr ttrap 5 "READY","protocol","ppp" # see what's happening if 2 or 3 return 0 # BLAST is already started if NOT 1 if reps goto .TRANS10 return 1 end # .TRANS20 tsend "BLAST",cr # invoke BLAST in host mode ttrap 20 "ppp", "protocol","READY" # if 1 or 2 return 0 # BLAST started! if reps goto .TRANS20 # # return 1 .END :VM/CMS ############################################################################ # # Title: IBM VM/CMS routines # Version: 2.01 Date: 02/23/96 # # NOTE: This script assumes you are using the standard prompt. Problems # may occur otherwise. # # .LOGON # # Initialize flag, get necessary information # # if null @userid # verify existence of userid ask "enter login", @userid if null @userid return 0 end # .LOG10 # ask for password if null @password ask noecho "enter password", @password reps 5 .LOG20 tsend "h",cr # get response from remote ttrap 10 "restart" if NOT 1 if reps goto .LOG20 return 3 end .LOG30 ttrap 4 tsend "l ",@userid, cr # enter userid ttrap 10 "word:" # wait for password prompt if NOT 1 if reps goto .LOG20 return 3 end # .LOG40 ttrap 4 tsend @password,cr # enter password ttrap 20 "." # trap for system prompt if 1 return 0 # got a system prompt # Incorrect userid/password - perhaps it was garbaged. # If we've only tried once, try again, otherwise exit. # if reps goto .LOG20 return 3 # # LOGOFF the remote system # .LOGOFF reps 4 # try 4 times # .LGF10 tsend cr # get system prompt ttrap 10 "CMS" if NOT 1 if reps goto .LGF10 return 3 end .LGF20 # TSO logout tsend "LOGOFF",cr return 0 # # UPLOAD a file to the remote system # .UPLOAD ask "enter filename to upload", @filename if null @filename return 0 if NOT exist @filename werror "can't open ", @filename return 1 end .UPL10 ask "enter remote filename or to upload to system", @remotefn if null @remotefn goto .UPL20 tsend cr ttrap 5 "cms","CMS" if 0 return 1 # # If no remote filename given, assume file already open on receiving system # reps 2 ttrap 2 tsend "EDIT ",@remotefn," TEXT",cr ttrap 10 "NEW FILE" if 0 return 1 .UPL20 ttrap 2 tsend "INPUT",cr ttrap 10 "INPUT" if NOT 1 return 1 .UPL25 ttrap 4 set @HLINDLY = @LINEDLY set @LINEDLY = "5" tupload @filename set @LINEDLY = @HLINDLY wait 2 idle # if null @remotefn return 0 # tsend cr ttrap 2 tsend "SAVE",cr ttrap 2 tsend "QUIT",cr return 0 # # START file transfer on remote system # .TRANSFER reps 3 # .TRANS10 tsend cr ttrap 5 "CMS",";start","ppp" # see what's happening if 2 or 3 return 0 # BLAST is already started if NOT 1 if reps goto .TRANS10 return 1 end .TRANS20 tsend "BLAST",cr # invoke BLAST in host mode ttrap 20 "ppp", ";start","CMS" if 1 or 2 return 0 # BLAST started! if reps goto .TRANS20 return 1 .END :WBHOST ############################################################################# # # Title: WBHost System Script...Written for version 1.1 of WBHost # Version: 1.26 Date: 02/26/96 # # .LOGON if @USERID = "" return 0 write "Attempting to Login to WBHOST" set @CHARDLY = 100 # Due to WBHost Limitations set @CHARDLY reps 5 # Set the Login Cycle to five .LOG10 tsend CR # Send Carriage Return ttrap 10, "ogin:", "assword: ", "select:", "NO CARRIER" if @STATUS = "0" # Found Nothing if reps goto .LOG10 # Loop Again if not done set @CHARDLY = 0 # Set @CHARDLY back to 0 return 3 # end if @STATUS = "1" write "Sending User ID" wait 1 idle # Wait for a moment of line silence tsend @USERID # Send Login and EOL wait 1 idle # wait for moment of line silence reps 3 # Reset Reps to 3 goto .LOG10 # Loop It... end if @STATUS = "2" write "Sending Password" wait 1 idle # Wait for a moment of line silence tsend @PASSWORD # Send Password and EOL wait 1 idle # wait for moment of line silence reps 3 # Reset Reps to 3 goto .LOG10 # Loop It... end if @STATUS = "3" write "Success" set @CHARDLY = 0 # Set @CHARDLY back to 0 return 0 # Return OKAY end if @STATUS = "4" write "Lost Line...Login Failure" set @CHARDLY = 0 # Set @CHARDLY back to 0 return 4 # Return NO_CARRIER end if reps goto .LOG10 # # All attempts have failed...time to exit with ERROR write "Login Failure" set @CHARDLY = 0 # Set @CHARDLY back to 0 return 3 # # Log Off Portion .LOGOFF write "Attempting to Logoff" set @CHARDLY = 50 # Due to WBHost Limitations set @CHARDLY reps 5 # Setup for loop .LOGOFF10 tsend CR ttrap 10, "99", "ogout (Y", ";starting", "spec:", "ogin:", "NO CARRIER" if @STATUS = "0" # Found Nothing if reps goto .LOGOFF10 # Loop Again if not done set @CHARDLY = 0 # Reset Character Delay return 1 # Return No Login end if @STATUS = "1" # At Main Menu wait 1 idle # Pause for a moment of line silence tsend "99", CR # Send Logout Option goto .LOGOFF10 # Loop Back Through end if @STATUS = "2" # Are You Sure You Want to Logout wait 1 idle # Pause for a moment of line silence tsend "Y", CR # Yes, I am. set @CHARDLY = 0 # Set @CHARDLY back to 0 return 0 # Exit, Hopefully all was well end if @STATUS = "3" # We are in the BLAST protocol tsend ";DISC.", CR # We'll tell it to stop goto .LOGOFF10 # Loop Back Through end if @STATUS = "4" # Doing a file listing, appearantly wait 1 idle # Pause for a moment of line silence tsend CR # Send a Carriage return wait 1 idle # Pause for a moment of line silence goto .LOGOFF10 # Loop Back Through end if @STATUS = "5" or @STATUS = "6" # We are already logged out set @CHARDLY = 0 # Reset Character Delay return 0 # Return OKAY end if reps goto .LOGOFF10 # Should Never Get This Far # But here we are. # # All attempts have failed...time to exit with ERROR write "Failed to Logoff Cleanly" set @CHARDLY = 0 # Set @CHARDLY back to 0 return 2 # Too many tries # # Transfer Section .TRANSFER write "Attempting to Start BLAST on Remote System" set @CHARDLY = 50 reps 5 .TRAN10 tsend CR ttrap 10, "Main Menu", "ogout (Y", ";starting", "spec:", "ogin:", "NO CARRIER" if @STATUS = "0" # Found Nothing if reps goto .TRAN10 # Loop Again if not done write "Unable to Start BLAST on Remote System" set @CHARDLY = 0 # Reset Character Delay return 1 # Return No Login end if @STATUS = "1" # At Main Menu wait 1 idle # Pause for a moment of line silence tsend "B", CR # Send Logout Option goto .TRAN10 # Loop Back Through end if @STATUS = "2" # Are You Sure You Want to Logout wait 1 idle # Pause for a moment of line silence tsend "N",CR # No, I do not goto .TRAN10 # Loop Back Through end if @STATUS = "3" # We are in the BLAST protocol set @CHARDLY = 0 # Set @CHARDLY back to 0 write "Success" return 0 # Exit, Hopefully all was well end if @STATUS = "4" # Doing a file listing, appearantly wait 1 idle # Pause for a moment of line silence tsend CR # Send a Carriage return wait 1 idle # Pause for a moment of line silence goto .TRAN10 # Loop Back Through end if @STATUS = "5" or @STATUS = "6" # We are already logged out set @CHARDLY = 0 # Reset Character Delay return 1 # Return ERROR end if reps goto .TRAN10 # Should Never Get This Far # But here we are. # # All attempts have failed...time to exit with ERROR write "Unable to Start BLAST on Remote System" set @CHARDLY = 0 # Set @CHARDLY back to 0 return 2 # Too many tries # # Upload is not supported by BHOST .UPLOAD UPPER @ONERROR if @ONERROR = "STOP" werror "Upload Not Supported by BHOST" end else Write "Upload Not Supported by BHOST" wait 2 end return 0 .END : # # Filename: SYSTEMS.SCR # Build: 1018 # Programers: Doug Brower (DB), James Olin Oden(JOO), Jon Webster(JW) # Purpose: Automate Login, Logout, Upload and Filetransfers on various # systems. # # <<< STRUCTURE >>> # .LOGON # .LOGOFF # .UPLOAD # .TRANSFER # .END # # <<< ERRORS >>> # .LOGON # @STATUS = 3 Could Not Logon # @STATUS = 4 No Carrier # @STATUS = 9 Not in Shell # @STATUS = 14 Unable to get login # .LOGOFF # @STATUS = 3 Could not logout unable to locate prompt character. # .UPLOAD # @STATUS = 3 Could not locate prompt character. # .TRANSFER # @STATUS = 1 Could not locate prompt character. # @STATUS = 2 Could not start BLAST protocol on remote. # # Generated by sysGen() Version 1.1 # ident "@(#)systems.scr 1.5"