-3

Is it possible to make a batch that either Brute forces or tries an password list on a password secured .rar or .zip, and how?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Schmix
  • 57
  • 1
  • 2
  • 6
  • 1
    Can you include a code snippet along with what you've already tried? – ShaneC Jul 28 '15 at 12:14
  • 1
    ... are you sure what you're trying to do is legal? – MichaelChirico Jul 28 '15 at 12:16
  • 1
    Check [John the Ripper](http://www.openwall.com/john/) and internet. Your question is not related to programming as-it. – bufh Jul 28 '15 at 12:17
  • 1
    Can a batch file do it? Sure. Would it do it before you died of old age? Probably not. – Bacon Bits Jul 28 '15 at 12:54
  • For one, brute force attacks are very inefficient, even more so when you're trying to use a batch file to do it.. I recommend using a REAL language such as [tag:Python]/[tag:Java]. But even then, as @BaconBits stated, there's really no point to doing this unless the password is 123 – UnknownOctopus Jul 28 '15 at 15:50
  • Well then, is it even possible to get batch to type into any text fields at all? – Schmix Jul 29 '15 at 20:41
  • "Type into a text fields": no (with pure batch). I'd rather skip the GUI and work with the command line version, where you give the password as a parameter. (should also be considerably faster than the GUI version) – Stephan Apr 26 '18 at 06:33

3 Answers3

2

Yes, it's possible, but it only cracks rar files encrypted with numeric password only. And It's slowwwww.....

@echo off
title Rar Password Cracker (Numeric)
mode con: cols=60 lines=30
SET PSWD=0
SET DEST=%TEMP%\%RANDOM%
MD %DEST%

:RAR
cls
echo ----------------------------------------------
echo                   GET DETAIL
echo ----------------------------------------------
echo.
SET/P "UNRAR_PATH=Enter Full Path of Unrar.exe (not including itself) :"
SET/P "PATH=Enter Full Path of the file (not including the file name) : "
IF "%PATH%"=="" goto PERROR
cd %PATH%
SET/P "NAME=Enter File Name  : "
IF "%NAME%"=="" goto NERROR
goto NEXT

:NERROR
echo ----------------------------------------------
echo                      ERROR
echo ----------------------------------------------
echo Sorry you can't leave it blank.
pause
goto RAR

:PERROR
echo ----------------------------------------------
echo                      ERROR
echo ----------------------------------------------
echo Sorry you can't leave it blank.
pause
goto RAR

:NEXT
IF EXIST "%PATH%\%NAME%" GOTO START
goto PATH

:PATH
cls
echo ----------------------------------------------
echo                     ERROR
echo ----------------------------------------------
echo Opppss File does not Exist..
pause
goto RAR

:START
cls
echo.
echo  Cracking... This might takes hours...
SET /A PSWD+=1
cd %UNRAR_PATH%
unrar E -INUL -P%PSWD% "%PATH%\%NAME%" "%DEST%"
IF /I %ERRORLEVEL% EQU 0 GOTO FINISH
GOTO START

:FINISH
RD %DEST% /Q /S
cls
echo ----------------------------------------------
echo                     CRACKED
echo ----------------------------------------------
echo.
echo PASSWORD FOUND!
echo FILE  = %NAME%
echo CRACKED PASSWORD = %PSWD%
pause >NUL
exit
Happy Face
  • 1,061
  • 7
  • 18
0
@echo off
title Rar Password Cracker
mode con: cols=47 lines=20
SET PSWD=0
SET DEST=%TEMP%\%RANDOM%
MD %DEST%
:RAR
cls
echo ----------------------------------------------
echo GET DETAIL
echo ----------------------------------------------
echo.
SET/P NAME=Enter File Name :
IF %NAME%== goto NERROR
goto GPATH
:NERROR
echo ----------------------------------------------
echo ERROR
echo ----------------------------------------------
echo Sorry you can't leave it blank.
pause
goto RAR
:GPATH
SET/P PATH=Enter Full Path :
IF %PATH%== goto PERROR
goto NEXT
:PERROR
echo ----------------------------------------------
echo ERROR
echo ----------------------------------------------
echo Sorry you can't leave it blank.
pause
goto RAR
:NEXT
set startTime=%time%
IF EXIST %PATH%\%NAME% GOTO START
goto PATH
:PATH
cls
echo ----------------------------------------------
echo ERROR
echo ----------------------------------------------
echo Opppss File does not Exist..
pause
goto RAR
:START
SET /A PSWD=%PSWD%+1
echo 0 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 0 1
echo 1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 1 1 1 0 0 0
echo 1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1
echo 0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 0 0 0 0 0
echo 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 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AME% %DEST%
UNRAR E -INUL -P%PSWD% %PATH%\%NAME% %DEST%
IF /I %ERRORLEVEL% EQU 0 GOTO FINISH
GOTO START
:FINISH
RD %DEST% /Q /S
cls
echo ----------------------------------------------
echo CRACKED
echo ----------------------------------------------
echo.
echo PASSWORD FOUND!
echo FILE = %NAME%
echo CRACKED PASSWORD = %PSWD%
echo Start Time: %startTime%
echo Finish Time: %time%
pause>NUL
exit
Ruli
  • 2,592
  • 12
  • 30
  • 40
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 17 '22 at 09:24
  • Please add some explanation to your answer such that others can learn from it – Nico Haase Jan 23 '22 at 10:00
-1

Of cause, you can use some software to recover rar password.

But what I recommend is online rar password recovery service.

It's built-in with dictionary.

coder4
  • 319
  • 2
  • 4