![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-07 23:31 |
48,041 topics / 350,128 posts / today 3 new / 48,252 members |
| DOS批处理 & 脚本技术(批处理室) » Variable issue with a batch password |
| Printable Version 582 / 1 |
| Floor1 bowen666 | Posted 2008-03-26 18:37 |
| 初级用户 Posts 9 Credits 22 | |
|
@echo off
@title Let batch files handle everything~ by:bowen color 0a MODE con: COLS=50 LINES=27 set ci=3 echo. echo Note: three wrong entries will exit. If you don't know the password, then don't come in~~ echo. :1 set /p ad=Please enter password: if "%ad%" == "?????" goto o set /a ci-=1 if \"%ci%\"==\"0\" cls&echo.&echo ====Trying to come in without the password!!!====No way!!!====&echo.&pause&echo.&exit cls&echo.&echo You still have %ci% chances&echo.&goto 1 :o cls&echo. echo ============ The password seems correct~~, access granted ============ What I want to ask is, the red part is the password, and it gets displayed directly like this, which isn't good. Is there some way to use variables for it? For example, something like 5*5*5* or an expression like 5+5+5, of course it can be a bit more complex, like exponentiation. How would that be written?? I mainly just want to add a little bit of obfuscation, nothing too complicated, just enough to make other people unable to figure it out [ Last edited by bowen666 on 2008-3-25 at 10:38 PM ] |
|
| Floor2 knoppix7 | Posted 2008-03-26 19:10 |
| 银牌会员 Posts 634 Credits 1,287 From cmd.exe | |
|
See set /a
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |