Annotation of coherent/g/usr/lib/uucp/tay104/contrib/Login.LAT, revision 1.1

1.1     ! root        1: #!xchat
        !             2: # @(#) login.LAT V1.2 Tue Sep  1 13:25:28 1992
        !             3: #
        !             4: # xchat script for logging into a VMS system through a LAT
        !             5: # terminal server port. If no VMS password parameter supplied,
        !             6: # skips password phase of VMS login. If LAT-password supplied,
        !             7: # will log into LAT server using that password. NOTE: does not
        !             8: # handle the situation where a LAT password is needed but no
        !             9: # VMS password is needed.
        !            10: #
        !            11: # Usage:
        !            12: #      xchat login.LAT sysname username [ password [ LAT-password ] ]
        !            13: #
        !            14: # History:
        !            15: #  rbd Fri Aug 14 13:37:06 1992        
        !            16: #    Changes for Lantronix ETS-16. It says "type help at the Local> 
        !            17: #    prompt..." then it gives the prompt for real! Prompt may need
        !            18: #    to be something other than "Local>". We match the real Local> 
        !            19: #    prompt by matching        the leading newline!
        !            20: #
        !            21: #  rbd Tue Sep  1 13:04:32 1992 
        !            22: #    Remove absolute path name from log file. Now defaults per config.
        !            23: #
        !            24: start:
        !            25:        dbgfile Login.Log
        !            26:        dbgset  15
        !            27:        sleep   2000                    # Wait 2 seconds
        !            28:        flush                           # Flush typeahead
        !            29:        ifnstr  svrstart        3       # Skip server password if not given
        !            30: #
        !            31: # Starting point if server password supplied. Handle situation
        !            32: # where the server line may have been left waiting for username
        !            33: # or at local> prompt.
        !            34: #
        !            35: getsvrpwp:
        !            36:        zero
        !            37: l0:
        !            38:        count                           # Get server's password prompt
        !            39:        ifgtr   deadmux         5       # die if 5 cr's don't do it
        !            40:        send    \r
        !            41:        timeout l0              1000    # Wait and try again
        !            42:        expect  dosvrpw         ssword>
        !            43:        expect  svrlogin        ername>
        !            44:        expect  connect         \nLocal>
        !            45: #
        !            46: # Send server's password. Fail if don't get Username
        !            47: # or Local> prompt.
        !            48: #
        !            49: dosvrpw:
        !            50:        zero
        !            51: l2:
        !            52:        sendstr 3
        !            53:        send \r
        !            54:        timeout badsvrpw        5000    # Die if invalid
        !            55:        expect  svrlogin        ername>
        !            56:        expect  connect         \nLocal>
        !            57: #
        !            58: # Starting point if NO server password supplied. Handle situation
        !            59: # where the server line may have been left at local> prompt.
        !            60: #
        !            61: svrstart:
        !            62:        zero
        !            63: l1:
        !            64:        count                           # Get username> or local> prompt
        !            65:        ifgtr   deadmux         5       # Die if 5 cr's don't do it
        !            66:        send    \r
        !            67:        timeout l1              1000    # Wait and try again
        !            68:        expect  svrlogin        ername>
        !            69:        expect  connect         \nLocal>
        !            70: #
        !            71: # Server asked for a username. Just give 'uucp'.
        !            72: #
        !            73: svrlogin:
        !            74:        send    uucp\r
        !            75:        timeout deadmux         2000
        !            76:        expect  connect         \nLocal>
        !            77: #
        !            78: # At this point, we have the Local> prompt. Send the connect
        !            79: # command for the specified LAT host service name, and wait for
        !            80: # VMS "Username:" prompt. Die after 10 seconds.
        !            81: #
        !            82: connect:
        !            83:        send    c\s
        !            84:        sendstr 0
        !            85:        send    \r
        !            86:        timeout nologin         10000
        !            87:        expect  gotlogin        ername:
        !            88: #
        !            89: # Got VMS "Username:" prompt. Send the username. If a password
        !            90: # was given, wait for the "Password:" prompt. Die after 10 seconds.
        !            91: # if no password was given, we're done!
        !            92: #
        !            93: gotlogin:
        !            94:        sendstr 1
        !            95:        send    \r
        !            96:        ifnstr  done            2
        !            97:        timeout nopasswd        10000
        !            98:        expect  gotpasswd       ssword:
        !            99: #
        !           100: # Got VMS "Password:" prompt. Send the password and we're done!
        !           101: #
        !           102: gotpasswd:
        !           103:        sendstr 2
        !           104:        send    \r
        !           105: #
        !           106: # Success!
        !           107: #
        !           108: done:
        !           109:        success
        !           110: #
        !           111: # ERROR HANDLERS
        !           112: #
        !           113: #
        !           114: # LAT server appears dead. Fail.
        !           115: #
        !           116: deadmux:
        !           117:        logerr  No response from LAT server
        !           118:        failed
        !           119: #
        !           120: # The server password was bad. Fail.
        !           121: #
        !           122: badsvrpw:
        !           123:        logerr  Invalid LAT server password
        !           124:        failed
        !           125: #
        !           126: # VMS system appears to be dead. Fail.
        !           127: #
        !           128: nologin:
        !           129:        logerr  No VMS Username: prompt
        !           130:        failed
        !           131: #
        !           132: # Failed to get "Password:" prompt. Fail.
        !           133: #
        !           134: nopasswd:
        !           135:        logerr  No VMS Password: prompt. Invalid password?
        !           136:        failed
        !           137: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.