Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Source 

[Batch] Zip password cracker

hello, this is simple way to bruteforce a zip file from a wordlist contained in a zip file.
this uses 7zip and batch to do the dirty

Code
@echo off
rem ******************************************************************
rem ****************CREATED BY ROUGE SOFTWARE*************************
rem ******************************************************************
rem Obfuscated with: https://hackforums.net/showthread.php?tid=6294928
set Rouge=echo && set Software=msg && set flamingW0rm=pause


setlocal enabledelayedexpansion

rem Set the path to the 7-Zip executable
set "zipPath=C:\Program Files\7-Zip\7z.exe"

rem Prompt for the ZIP file and password list
set /p zipFile=Enter the path to your ZIP file:
set /p passwordList=Enter the path to your password list:

rem Check if the ZIP file exists
if not exist "%zipFile%" (
    %Rouge% ZIP file not found!
    exit /b
)

rem Check if the password list exists
if not exist "%passwordList%" (
    %Rouge% Password list not found!
    exit /b
)

rem Loop through each password in the password list
for /f "delims=" %%p in (%passwordList%) do (
    %Rouge% Trying password: %%p
    "%zipPath%" x "%zipFile%" -p"%%p" -y >nul 2>&1
    if !errorlevel! equ 0 (
        set "pass=%%p"
        %Rouge% Password found: !pass!
        %flamingW0rm%
        exit /b
    )
)

%Rouge% Password not found in the list.
%flamingW0rm%
(Mar 28, 2025 09:46 AM)m0hx Wrote:  lol why not just get the hash and do it in hashcat or john. is much faster than dis.

you correct, you could use ripper for better results
but learning batch for .net calls and practice loops.

no loops:
Code
@echo off
setlocal enabledelayedexpansion

set "JOHN_PATH=C:\Path\To\JohnTheRipper"

set /p zipFile=Enter the path to your ZIP file:
set /p passwordList=Enter the path to your password list:

if not exist "%zipFile%" (
    echo ZIP file not found!
    exit /b
)

if not exist "%JOHN_PATH%\zip2john.exe" (
    echo John the Ripper not found!
    exit /b
)

"%JOHN_PATH%\zip2john.exe" "%zipFile%" > zip_hash.txt

if not exist "zip_hash.txt" (
    echo Failed to extract hash!
    exit /b
)

"%JOHN_PATH%\john.exe" --wordlist="%passwordList%" zip_hash.txt

echo Cracking process completed.
pause
This is a nice script for learning, if you indeed did write it yourself. It could help someone as long as the requirements and placeholder are clearly documented. None of this is .NET, btw.

Also, John sucks.
(Mar 28, 2025 11:26 AM)DramaKing Wrote:  This is a nice script for learning, if you indeed did write it yourself. It could help someone as long as the requirements and placeholder are clearly documented. None of this is .NET, btw.

Also, John sucks.

this is batch not .net
(Mar 28, 2025 11:56 AM)Robert Rouge Wrote:  this is batch not .net

Then what are you talking about?
thanks for sharing this
Lol. I can’t believe this could work anyways. There are pretty much easier ways
Not too sure this would actually work tbh but thanks for the share.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Robert RougeSep 24, 2026 10:02 AM 4 220 Sep 24, 2026 10:02 AM
Last Post: Anonynuk
[Shell] by fisica638Oct 30, 2019 11:05 AM 1 536 Oct 30, 2019 11:05 AM
Last Post: Hackoo
[.NET] by Johan CruyffSep 27, 2017 09:07 AM 0 165 Sep 27, 2017 09:07 AM
Last Post: Johan Cruyff