天啊、、、、
你是神啊
诶诶、把你的代码全部复制到我的密码输入内
直接爆源码啦
set /p pass=请输入密码: " neq "bathome" (call type "%~f0" & pause) else call type "%~f0" & pause
==============================================- 请输入密码:set /p pass=请输入密码: " neq "bathome" (call type "%~f0" & pause) e
- lse call type "%~f0" & pause
- @echo off&set acc123=0
- :[kelly]
- set /a acc123+=1
- set pass=
- if not "%acc123%"=="1" set b=密码错误,&set c=重新
- set /p pass=%b%请%c%输入密码:
- if "\\%pass%\\"=="\\12345\\" goto ilove~
- cls&goto [kelly]
- )
- :ilove~
- echo 密码正确!&ping 127.0.0.1>nul请按任意键继续. . .
复制代码 ==============================================================
解决方法:
限制密码长度,密码多长,用set截取多长
==============================================================
综上所述,完整代码如下:
- @echo off&set acc123=0
- :[kelly]
- set /a acc123+=1
- set pass=
- if not "%acc123%"=="1" set b=密码错误,&set c=重新
- set /p pass=%b%请%c%输入密码:
- set pass=%pass:~0,5%
- if "\\%pass%\\"=="\\12345\\" goto ilove~
- cls&goto [kelly]
- )
- :ilove~
- echo 密码正确!&ping 127.0.0.1>nul
复制代码
[ 本帖最后由 canyuexiaolang 于 2010-7-6 15:24 编辑 ] |