Skip to content

Instantly share code, notes, and snippets.

@vincent-zurczak
Created May 16, 2016 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vincent-zurczak/73be3033bb7acfee3866967ac6fb71c1 to your computer and use it in GitHub Desktop.
Save vincent-zurczak/73be3033bb7acfee3866967ac6fb71c1 to your computer and use it in GitHub Desktop.
A MS-DOS script to try various passwords for RAR archives
:: The password candidates.
:: FIXME: read them from a file.
set list="pwd1" "pwd2" "pwd3" "pwd4"
:: Assumption: there is only one RAR file in the directory.
:: FIXME: iterate over a list of files?
:: The script stops as soon as an extraction succeeds.
FOR %%A IN (%list%) DO (
echo "Testing %%A..."
"C:\Program Files\WinRAR\UnRAR" x -p%%A ./\*.rar && goto :eof
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment