From e029073b4897eec1dcb7784ee2b7c2fc52fb7dbb Mon Sep 17 00:00:00 2001 From: Yeshuang Zhu Date: Mon, 21 May 2018 17:59:35 +0800 Subject: [PATCH] =?UTF-8?q?windows=E7=B3=BB=E7=BB=9F=E4=B8=8A=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=99=BB=E5=BD=95=E7=9A=84=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 首次运行时询问用户名密码并保存在`config.txt`文件中,每隔5分钟尝试自动登录 --- auto_login-windows.bat | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 auto_login-windows.bat diff --git a/auto_login-windows.bat b/auto_login-windows.bat new file mode 100644 index 0000000..8deb09c --- /dev/null +++ b/auto_login-windows.bat @@ -0,0 +1,27 @@ +@echo off + +if exist config.txt ( + echo Load saved user info + < config.txt ( + set /p id= + set /p pwd= + ) +) else ( + set /p id="Login name: " + set /p pwd="Password: " +) +( + echo %id% + echo %pwd% +) > config.txt + +@color 0a + +:loop +echo | set /p ="%pwd%" > tmp +type tmp | python cli.py auth4 login -u %id% -n +del tmp +timeout 300 +goto loop + +echo stopped