⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unixlogin

📁 minicom的源码,linux下常用的串口程序.
💻
字号:
# Generic UNIX login script.# Can be used to automatically login to almost every UNIX box.#	# Some variables.	set a 0	set b a	print Trying to Login..	# Skip initial 'send ""', it seems to matter sometimes..	goto skiploop1:	# Send loginname not more than three times.	send ""	inc askip:	if a > 3 goto failed1	expect {		"ogin:"		"assword:"	send ""		"NO CARRIER"	exit		timeout 60	goto loop1	}loop2:	send "$(LOGIN)"	# Send password not more than three times.	inc b	if b > 3 goto failed1	expect {		"assword:"		"ogin:"		goto loop2		timeout 60	goto loop2	}	send "$(PASS)"	# If we don't get "incorrect" within 3 seconds, it's probably OK.	# If they ask for a terminal, we are logged in. Tell them we're	# using vt100.	# If we get the bash prompt, send them the screen geometry.	expect {		"TERM="		goto wantterm		"incorrect"	goto loop1		"bash$"		goto screengeom				timeout 3 	break		"asswd"		break	}	exitwantterm:	send "vt100"	exitscreengeom:	send "stty rows $(TERMLIN) columns 80"	# If you use a display mode with some other width than 80 columns,	# you may want to use the following format. 	#send "stty rows $(TERMLIN) columns $(COLUMNS)"	exitfailed1:	print \nLogin Failed (wrong password?)	exit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -