|
|
1.1 ! root 1: #!xchat ! 2: # @(#) Login.VMS V1.1 Tue Sep 1 13:24:54 1992 (Bob Denny) ! 3: # ! 4: # ! 5: # xchat script for logging into a VMS system. If no VMS password ! 6: # parameter supplied, skips password phase of VMS login. If syspass ! 7: # parameter given, will go through steps needed to log into a VMS ! 8: # system where a "system password" was set on the port. ! 9: # ! 10: # Cannot handle situation where system password is required but ! 11: # no password needed. ! 12: # ! 13: # ! 14: # Usage: ! 15: # xchat Login.VMS username [ password [ syspass ] ] ! 16: # ! 17: # Uncomment the lines starting with "###" to get debug logging. ! 18: # ! 19: start: ! 20: ### dbgfile Login.Log ! 21: ### dbgset 15 ! 22: sleep 2000 # Wait 2 seconds ! 23: zero ! 24: flush # Flush typeahead ! 25: ifnstr login 2 # Skip sys passwd if not given ! 26: # ! 27: # Need system password. Send <CR> to get bell. ! 28: # Try 5 times at 2 sec. intervals. Skip to do ! 29: # username if we see "Username:". ! 30: # ! 31: syspass: ! 32: count ! 33: ifgtr nobell 5 # Fail after 5 tries ! 34: send \r ! 35: timeout syspass 2000 # Wait 2 sec. and try again ! 36: expect gotbell \007 ! 37: expect gotlogin Username: ! 38: # ! 39: # Got the bell. Send the system password. Repeat 5 times ! 40: # at 2 sec. intervals. Fail if we don't get Username: ! 41: # ! 42: gotbell: ! 43: zero ! 44: sleep 2000 ! 45: l1: ! 46: count ! 47: ifgtr nologin 5 # Fail after 5 tries ! 48: sendstr 2 ! 49: send \r ! 50: timeout l1 2000 # Wait 2 sec. and try again ! 51: expect gotlogin Username: ! 52: # ! 53: # Start here if no system password supplied. ! 54: # Send <CR> until we get Username: Try 5 times at 2 sec. intervals. ! 55: # ! 56: login: ! 57: count ! 58: ifgtr nologin 5 # Fail after 5 tries ! 59: send \r ! 60: timeout login 2000 # Wait 2 sec. and try again ! 61: expect gotlogin Username: ! 62: # ! 63: # Got VMS "Username:" prompt. Send the username. If a password ! 64: # was given, wait for the "Password:" prompt. Die after 10 seconds. ! 65: # if no password was given, we're done! ! 66: # ! 67: gotlogin: ! 68: sendstr 0 ! 69: send \r ! 70: ifnstr done 1 ! 71: timeout nopasswd 10000 ! 72: expect gotpasswd Password: ! 73: # ! 74: # Got VMS "Password:" prompt. Send the password and we're done! ! 75: # ! 76: gotpasswd: ! 77: sendstr 1 ! 78: send \r ! 79: # ! 80: # Success! ! 81: # ! 82: done: ! 83: success ! 84: # ! 85: # ERROR HANDLERS ! 86: # ! 87: nobell: ! 88: logerr No VMS system password prompt (bell) ! 89: failed ! 90: nologin: ! 91: logerr No VMS Username: prompt ! 92: failed ! 93: nopasswd: ! 94: logerr No VMS Password: prompt. ! 95: failed ! 96:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.