Three-digit mixed password compressed package decryption tool

Instructions for use: The text editor saves it as a file type bat, without check spaces, exclamation marks, double quotation marks, percent marks, and colons. Because of special characters, the three digits are not processed temporarily because of the length limit of the batch value. It is only for demonstration and communication.

@echo off
setlocal enabledelayedexpansion
echo WINRAR mixed password decryptor will generate multiple windows to run passwords, do not close
if "%1" equ "" (
set /p numDigit=Please enter the maximum number of digits in the password:
set /p rarRoot=Please enter the main directory of WINRAR, such as C:\Program Files\WinRAR:
set /p rarFile=Please enter the mixed password compressed file package path, such as C:\test.rar:
rem set numDigit=3
rem set rarRoot=C:\Program Files\WinRAR
rem set rarFile=C:\Users\goldenwater\Desktop\dpT.rar
set /a minDigit=!numDigit!*2
set /a maxDigit=!numDigit!*3
set bitNum=!minDigit!
rem 1 bit 1, other N+1 processes
set /a threadMaxNum=!maxDigit!-!minDigit!
if not "!threadMaxNum!"=="1" (
set /a threadMaxNum=1 + !threadMaxNum!
)
rem process number
rem Parameter 1 passes the number of digits, parameter 2 passes the maximum number of processes, parameter 3 passes the current serial number
for /l %%a in (1,1,!threadMaxNum!) do (
if !bitNum! lss 10 (
copy /b /y %0 %temp%\thd%%a.bat
start "rarNumPwdThread%%a" /min %temp%\thd%%a.bat !bitNum! !threadMaxNum! %%a
set /a bitNum=!bitNum! + 1
rem echo 32: >%temp%\alphat%%a.txt
rem echo 33:^^!>>%temp%\alphat%%a.txt
rem echo 34:^">>%temp%\alphat%%a.txt
echo 35:^#>%temp%\alphat%%a.txt
echo 36:^$>>%temp%\alphat%%a.txt
rem echo 37:^%>>%temp%\alphat%%a.txt
echo 38:^ & amp;>>%temp%\alphat%%a.txt
echo 39:^'>>%temp%\alphat%%a.txt
echo 40:^(>>%temp%\alphat%%a.txt
echo 41:^)>>%temp%\alphat%%a.txt
echo 42:^*>>%temp%\alphat%%a.txt
echo 43:^ + >>%temp%\alphat%%a.txt
echo 44:^,>>%temp%\alphat%%a.txt
echo 45:^->>%temp%\alphat%%a.txt
echo 46:^.>>%temp%\alphat%%a.txt
echo 47:^/>>%temp%\alphat%%a.txt
echo 48:0>>%temp%\alphat%%a.txt
echo 49:1>>%temp%\alphat%%a.txt
echo 50:2>>%temp%\alphat%%a.txt
echo 51:3>>%temp%\alphat%%a.txt
echo 52:4>>%temp%\alphat%%a.txt
echo 53:5>>%temp%\alphat%%a.txt
echo 54:6>>%temp%\alphat%%a.txt
echo 55:7>>%temp%\alphat%%a.txt
echo 56:8>>%temp%\alphat%%a.txt
echo 57:9>>%temp%\alphat%%a.txt
rem echo 58:^:>>%temp%\alphat%%a.txt
echo 59:^;>>%temp%\alphat%%a.txt
echo 60:^<>>%temp%\alphat%%a.txt
echo 61:^=>>%temp%\alphat%%a.txt
echo 62:^>>>%temp%\alphat%%a.txt
echo 63:^?>>%temp%\alphat%%a.txt
echo 64:^@>>%temp%\alphat%%a.txt
echo 65:A>>%temp%\alphat%%a.txt
echo 66:B>>%temp%\alphat%%a.txt
echo 67:C>>%temp%\alphat%%a.txt
echo 68:D>>%temp%\alphat%%a.txt
echo 69:E>>%temp%\alphat%%a.txt
echo 70:F>>%temp%\alphat%%a.txt
echo 71:G>>%temp%\alphat%%a.txt
echo 72:H>>%temp%\alphat%%a.txt
echo 73:I>>%temp%\alphat%%a.txt
echo 74:J>>%temp%\alphat%%a.txt
echo 75:K>>%temp%\alphat%%a.txt
echo 76:L>>%temp%\alphat%%a.txt
echo 77:M>>%temp%\alphat%%a.txt
echo 78:N>>%temp%\alphat%%a.txt
echo 79:O>>%temp%\alphat%%a.txt
echo 80:P>>%temp%\alphat%%a.txt
echo 81:Q>>%temp%\alphat%%a.txt
echo 82:R>>%temp%\alphat%%a.txt
echo 83:S>>%temp%\alphat%%a.txt
echo 84:T>>%temp%\alphat%%a.txt
echo 85:U>>%temp%\alphat%%a.txt
echo 86:V>>%temp%\alphat%%a.txt
echo 87:W>>%temp%\alphat%%a.txt
echo 88:X>>%temp%\alphat%%a.txt
echo 89:Y>>%temp%\alphat%%a.txt
echo 90:Z>>%temp%\alphat%%a.txt
echo 91:^[>>%temp%\alphat%%a.txt
echo 92:^\>>%temp%\alphat%%a.txt
echo 93:^]>>%temp%\alphat%%a.txt
echo 94:^^>>%temp%\alphat%%a.txt
echo 95:^_>>%temp%\alphat%%a.txt
echo 96:^`>>%temp%\alphat%%a.txt
echo 97:a>>%temp%\alphat%%a.txt
echo 98:b>>%temp%\alphat%%a.txt
echo 99:c>>%temp%\alphat%%a.txt
echo 100:d>>%temp%\alphat%%a.txt
echo 101:e>>%temp%\alphat%%a.txt
echo 102:f>>%temp%\alphat%%a.txt
echo 103:g>>%temp%\alphat%%a.txt
echo 104:h>>%temp%\alphat%%a.txt
echo 105:i>>%temp%\alphat%%a.txt
echo 106:j>>%temp%\alphat%%a.txt
echo 107:k>>%temp%\alphat%%a.txt
echo 108:l>>%temp%\alphat%%a.txt
echo 109: m>>%temp%\alphat%%a.txt
echo 110:n>>%temp%\alphat%%a.txt
echo 111:o>>%temp%\alphat%%a.txt
echo 112:p>>%temp%\alphat%%a.txt
echo 113:q>>%temp%\alphat%%a.txt
echo 114:r>>%temp%\alphat%%a.txt
echo 115:s>>%temp%\alphat%%a.txt
echo 116:t>>%temp%\alphat%%a.txt
echo 117:u>>%temp%\alphat%%a.txt
echo 118:v>>%temp%\alphat%%a.txt
echo 119:w>>%temp%\alphat%%a.txt
echo 120:x>>%temp%\alphat%%a.txt
echo 121:y>>%temp%\alphat%%a.txt
echo 122:z>>%temp%\alphat%%a.txt
echo 123:^{>>%temp%\alphat%%a.txt
echo 124:^|>>%temp%\alphat%%a.txt
echo 125:^}>>%temp%\alphat%%a.txt
echo 126:^~>>%temp%\alphat%%a.txt
)
)
) else (
set idx=%1
set maxThd=%2
set seq=%3
rem echo idx=!idx!
rem echo maxThd=!maxThd!
rem echo seq=!seq!
rem pause
call: threadMain
)

:threadMain
cls
echo !idx! bit ASCII code! numDigit! bit mixed password analysis
set beginTime=!time!
cd /d "!rarRoot!"
set loopBegin=35
set loopEnd=126
set emptyNum=1
rem set jmpOverNum=1
set skipNumArr=37,58
if "!maxThd!"=="1" (
for /l %%b in (3,1,!idx!) do (
set /a emptyNum=!emptyNum!*10
)
) else (
set loopBegin=100
set loopEnd=99
rem set jmpOverNum=1
for /l %%b in (3,1,!idx!) do (
set /a loopEnd=!loopEnd!*10
set /a emptyNum=!emptyNum!*10
if %%b gtr 3 (
set /a loopBegin=!loopBegin!*10
)
)
for /l %%m in (13,1,34) do (
set skipNumArr=!skipNumArr!,%%m
)
)
rem echo emptyNum=!emptyNum!
rem pause
rem echo loopBegin=!loopBegin!
rem echo loopEnd=!loopEnd!
rem pause
set stepNum=1
for /l %%c in (!loopBegin!,!stepNum!,!loopEnd!) do (
set curNum=%%c
set twoNum=%%c
set twoNum=!twoNum:~0,2!
rem echo twoNum=!twoNum!
call set "k=%%^skipNumArr:!twoNum!=%%"
rem echo k=!k!
if not "!k!"=="!skipNumArr!" (
rem echo skip
rem pause
set /a stepNum=0 + !emptyNum!
rem set /a jmpOverNum=0 + !emptyNum!
) else (
set stepNum=1
set curNum1=
set testNum=
rem set jmpOverNum=0
for /l %%d in (1,1,!idx!) do (
if not "!curNum!"=="" (
set firstNum=!curNum:~0,1!
rem echo firstNum=!firstNum!
if not "!firstNum!"=="" (
set curBeginIdx=
if "!firstNum!" equ "1" (
set curNum1=!curNum:~0,3!
rem echo curNum1=!curNum1!
if not "!curNum1!" equ "" (
rem set /a yu=!curNum1!/100
rem echo yu100=!yu!
rem if not "!yu!"=="0" (
if !curNum1! geq 100 (
if !curNum1! leq 126 (
set testNum=!testNum!!curNum1!
)
)
set curBeginIdx=3
)
rem)
) else (
set curNum1=!curNum:~0,2!
if not "!curNum1!" equ "" (
set firstCurNum=!curNum1:~0,1!
if "!firstCurNum!" equ "0" (
set curNum1=!curNum1:~-1!
)
rem set /a yu=!curNum1!/65
rem echo yu65=!yu!
rem if not "!yu!"=="0" (
if !curNum1! geq 35 (
if !curNum1! leq 99 (
call set "n=%%^skipNumArr:!curNum1!=%%"
if "!n!" equ "!skipNumArr!" (
set testNum=!testNum!!curNum1!
)
)
)
rem)
set curBeginIdx=2
)
)
call set "o=%%^curNum:~!curBeginIdx!%%"
set curNum=!o!
rem echo o=!o!
)
)
)
if "!testNum!" equ "%%c" (
rem echo testNum=!testNum!
rem pause
set curNum=%%c
set testNum1=
for /l %%e in (1,1,!idx!) do (
if not "!curNum!"=="" (
set firstNum1=!curNum:~0,1!
if not "!firstNum1!"=="" (
set curBeginIdx1=
if "!firstNum1!" equ "1" (
set curNum2=!curNum:~0,3!
if not "!curNum2!" equ "" (
for /f "usebackq skip=2 tokens=2 delims=:" %%f in (`find "!curNum2!" "%temp%\alphat!seq!.txt"`) do (
set testNum1=!testNum1!%%f
)
set curBeginIdx=3
)
) else (
set curNum2=!curNum:~0,2!
if not "!curNum2!" equ "" (
for /f "usebackq skip=2 tokens=2 delims=:" %%g in (`find "!curNum2!" "%temp%\alphat!seq!.txt"`) do (
set testNum1=!testNum1!%%g
)
set curBeginIdx=2
)
)
call set "h=%%^curNum:~!curBeginIdx!%%"
set curNum=!h!
)
)
)
rem echo testNum1=!testNum1!
rem pause
set /a testNum1Begin=!numDigit!-1
call set "l=%%^testNum1:~!testNum1Begin!%%"
rem echo "!l!"
rem pause
if not "!l!" equ "" (
rar x -mt50 -o + -r- -p"!testNum1!" -inul -ilog%temp%\rarlog!seq!.txt "!rarFile!"
set checkCharFlag=1
for /f "usebackq tokens=3 delims=:" %%i in (`find /c "error" %temp%\rarlog!seq!.txt`) do (
set checkChar=%%i
set checkChar=!checkChar: =!
if not "!checkChar!"=="0" (
set checkCharFlag=0
echo password! testNum1! is fail^^!
)
)
if "!checkCharFlag!" equ "1" (
cls
echo !beginTime!
echo rar password is !testNum1!^^!
echo !time!
for /l %%j in (1,1,!maxThd!) do (
if not "!seq!"=="%%j" (
taskkill /f /fi "windowtitle eq rarNumPwdThread%%j*" /fi "status eq running">nul
)
)
pause
exit
)
del /q %temp%\rarlog!seq!.txt
)
)
)
rem set /a num1=%%c-!loopBegin! + !jmpOverNum! + 1
rem set /a num1=!num1!*100
rem set /a num2=!loopEnd!-!loopBegin! + 1
rem set /a progressnum=num1/num2
rem echo num1=!num1!
rem echo num2=!num2!
rem echo progressnum=!progressnum!
rem pause
rem cls
rem echo progress!seq!password test complete!progressnum!%%
)
exit