害虫
hi,bug....
@echo off
set "psCommand=powershell -Command "$pword = read-host '请输入密码' -AsSecureString ; ^
      $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^
          [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)""
for /f "usebackq delims=" %%p in (`%psCommand%`) do set password=%%p
set "psCommand=powershell -Command "$pword1 = read-host '请再次确认' -AsSecureString ; ^
$BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword1); ^
          [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)""
for /f "usebackq delims=" %%p in (`%psCommand%`) do set password1=%%p
if "%password%" == "%password1%" ( echo 输入一致!正在加密...
java -cp druid-1.1.12.jar com.alibaba.druid.filter.config.ConfigTools %password1% >encrypted-password.txt  
echo 加密成功!请查看文件:encrypted-password.txt & pause) else echo 两次输入不一致!& pause
posted on 2021-05-17 20:15  Hi,虫  阅读(152)  评论(0编辑  收藏  举报