在用批处理写的:数据库备份还原工具(第三版)以及用批处理写的:数据库备份还原工具(修正加强版)中都用到了密码隐藏输入的功能,现在将这个功能单独分离出来,这样大家可以看的更清楚一些。代码如下:
@echo off echo hP1X500P[PZBBBfh#b##fXf-V@`$fPf]f3/f1/5++u5x>in.com set &n
t用的来执行指令:sudo 自动输入密码echo "password" | sudo -S netstat -tlnp -S The -S (stdin) option causes sudo to read the password from the standard input instead of the terminaldevice.完