MYWNcWR9Rgc31zkhTOsA [they/them, she/her]@hexbear.nettoAsklemmy@lemmy.ml•Forgot the password for my old RAR files, Want to try the passwords/keywords which I frequently use. How can I try them at once rather than typing them every single time for every .rar file?English
5·
1 year agoSomething like this should work on linux or mac. On windows you’ll probably need to use wsl or convert it to powershell if you can’t install the dependencies natively. The script requires bash, unrar, and find.
#!/usr/bin/env bash
while read -r rarfile; do
while read -r password; do
if unrar t -p"$password" "$rarfile" >/dev/null 2>&1; then
echo "$rarfile $password"
break
fi
echo "$rarfile password not found"
done < /path/to/passwords.list
done < <(find /path/to/rars -type f -iname '*.rar')
If you’re asking for an android file manager app with a gui that will connect to sshfs, solid explorer does what you need but it isn’t foss.