对应关系是这样的:
set str1=defghijklmnopqrstuvwxyzabc
:: str1 is to be decoded
set str2=abcdefghijklmnopqrstuvwxyz
受小写转大写.cmd的启发,我想能不能也一个吧这封email还原的批处理。。。
于是:
@echo off
set str1=defghijklmnopqrstuvwxyzabc
:: str1 is to be decoded
set str2=abcdefghijklmnopqrstuvwxyz
:main
cls
set str=
set /p str= Please enter string (Press ENTER if you want to exit directly):
if not defined str exit
cls
echo.
echo Before decoded: "%str%"
echo.
for /l %%i in (0,1,25) do (
call set char1=%%str1:~%%i,1%%
call set char2=%%str2:~%%i,1%%
call :change
)
echo ____________________________________________
echo.
echo Decoded: "%str%"
echo.
echo Press any buttom to decode again......
pause>nul
goto main
:change
call call set str=%%%%str:%%char1%%=%%char2%%%%%%
goto :eof
@echo off
[ Last edited by henryxrl on 2010-9-17 at 12:59 ]作者: slore 时间: 2010-9-17 22:46 set str1=abcdefghijklmnopqrstuvwxyz`#@
:: str1 is to be decoded
set str2=`#@abcdefghijklmnopqrstuvwxyz
for /l %%i in (0,1,28) do (
[ Last edited by slore on 2010-9-17 at 23:16 ]作者: henryxrl 时间: 2010-9-18 02:45 WOW!!! 成功了!!太感谢了!!! 但是。。。为什么这样能行呢?能否告知原理?还有,`#@是什么东东?作者: slore 时间: 2010-9-18 17:21 你原来d换成a