Hi,
Is there a way to sort password-protected zip/rar/7z/etc. files into password protected and unprotected?
Also/instead, is there a way to test multiple passwords on one file and only extract it if a password is correct?
Thanks in advance!
Sort/Select Password Protected Archive Files Only
Re: Sort/Select Password Protected Archive Files Only
1. Use a custom column with a script like:
Ofc you need to install 7zip first and adapt the path to it in the script!
2. Use a script or an extraction utility that can use a password list on its own...
E.g.:
Code: Select all
$extract = "D:\Tools\7-Zip\7z.exe";
$result = runret("""$extract"" t -pNOPASSWORD ""<cc_item>""");
if (regexmatches($result, "wrong password")) { return 1; }
else { return 0; }
2. Use a script or an extraction utility that can use a password list on its own...
E.g.:
Code: Select all
$extract = "D:\Tools\7-Zip\7z.exe";
$extractable = false;
foreach($password, $passwords, <crlf>, "e") {
$result = runret("""$extract"" t -p""$password"" ""<curitem>""");
if (regexmatches($result, "everything is ok")) {
// Some command to extract the current file...
$extractable = true;
break;
}
}
if (!$extractable) { status "No password matched, aborted!", "8B4513", "stop"; }
One of my scripts helped you out? Please donate via Paypal