- @echo off&setlocal enabledelayedexpansion
- set "str=0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
- for %%a in (%str%) do set /a n+=1&set ".!n!=%%a"
- :lp
- cls&set /p=请输入八位由数字和字母组成的密码,请注意大小写:<nul
- if defined pwds set /p=%pwds%<nul
- if "%m%" equ "8" echo.&echo.&goto next
- choice /n /cs /c %str: =%
- set "pwds=%pwds%*"&set "pwd=%pwd%!.%errorlevel%!"
- set /a m+=1&goto lp
- :next
- if "%pwd%" equ "add12345" (echo 密码正确) else (echo 密码错误)
- pause>nul
复制代码 上面的这句choice /n /cs /c %str: =% 用SET命令怎么写代替?高手能详细点吗? |