Skip to content

Instantly share code, notes, and snippets.

@Densamisten
Last active May 7, 2024 22:58
Show Gist options
  • Save Densamisten/e252765ea2b74bea2bc608459fc07291 to your computer and use it in GitHub Desktop.
Save Densamisten/e252765ea2b74bea2bc608459fc07291 to your computer and use it in GitHub Desktop.
@echo off
setlocal enabledelayedexpansion
echo Archive Helper Script
set /p "archive=Enter the path to the archive: "
set /p "passwords=Enter the path to the wordlist: "
set /p "sevenZPath=Enter the path to 7-Zip (7z.exe): "
for /f %%a in (%passwords%) do (
echo Trying password: %%a
"%sevenZPath%" x -p"%%a" "!archive!" -o"output_directory" > nul 2>&1
if !errorlevel! equ 0 (
echo Password found: %%a
set "found=1"
goto :done
)
)
:done
if not defined found (
echo Unable to find the correct password.
)
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment