I use winrar.

59 points
*

This can be easily done using PowerShell, and rar.exe which is part of WinRAR. Just edit the first three variables below according to your needs and run the script. You don’t even need to save it as a script, just copy-paste the code into a PowerShell window, you can use the arrow keys to edit the variables (or edit it using notepad if you like) and then press enter when you’re ready to run the script.

$winrar = "C:\Program Files\WinRAR\Rar.exe"
$passlist = @("pass1", "pass2", "pass3", "pass4")
$folder = "C:\Path\To\Folder"

cd "$folder"
foreach($file in (dir *.rar).Name) { "Checking $file..."; foreach($pass in $passlist) { .$winrar t -p"$pass" "$file" *>$null ; if($LASTEXITCODE -eq 0){ " → Password for $file is $pass"; break }}""}

This would give you an output which looks like:

Checking file1.rar...
 → Password for file1.rar is pass1

Checking file2.rar...
 → Password for file2.rar is pass2

Checking file3.rar...
 → Password for file3.rar is pass3

If there’s something you don’t understand in the code above, lemme know - happy to explain further. :)

permalink
report
reply
17 points
*

Is there a way to call the unrar command via command line and pass the password as a parameter? There should be.

If there is not with winrar, try the 7zip commandlet for powershell, that should definitely be able to do what you want.

Write a quick skript that reads your passwords from a text file into a variable, use a foreach-object loop to iterate over the variable and each time call the unrar command and use the current password.

Not sure if this is elegant, but that’s the first thing that comes to my mind.

7zip module documentation

permalink
report
reply
16 points
*
Deleted by creator
permalink
report
reply
9 points

john the ripper?

permalink
report
parent
reply
4 points

It does! Almost everyone is using hashcat, but JTR is still a thing.

permalink
report
parent
reply
14 points

This is a great time to learn about hashcat.

permalink
report
reply
13 points

Isn’t that the tool that let’s you brute force weak encrypted containers? I remember saving my sister that got a pin secured container and the pin was coming over mail/on a different channel (she needed it as fast as possible)…

Well it was a 4 digit pin and my very old notebook took a few hours. Even less if my sister would have told me that it was a 4 digit nummeric pin and not alphanumeric.

So yea. Hashcat will be your friend. Afaik can also take guesses.

permalink
report
parent
reply
4 points

How fast it is depends entirely on the application.

But yes, it can do all sorts of fancy things like rule expansions, word combinations and custom character brute force.

permalink
report
parent
reply
0 points
Deleted by creator
permalink
report
parent
reply
6 points

It sits in that conceptual corner.

Hashcat is the standard password recovery tool. It supports a whole bunch of applications. It’s fast and optimized. It’s by definition the right tool for the job.

Kali is a Linux distribution that incorporates a bunch of security related tools, including hashcat. But you can just download the hashcat program and run it on windows or Mac.

permalink
report
parent
reply

Asklemmy

!asklemmy@lemmy.ml

Create post

A loosely moderated place to ask open-ended questions

Search asklemmy 🔍

If your post meets the following criteria, it’s welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

Icon by @Double_A@discuss.tchncs.de

Community stats

  • 9.6K

    Monthly active users

  • 5.5K

    Posts

  • 302K

    Comments