From 260db0dff7a7f805ca7857cc85b483bd92ea6b1a Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 2 Apr 2026 18:37:39 +0200 Subject: [PATCH] unzip_bruteforce process prallelized --- usr/bin/unzip_bruteforce | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/usr/bin/unzip_bruteforce b/usr/bin/unzip_bruteforce index 23f96fe..050c09c 100755 --- a/usr/bin/unzip_bruteforce +++ b/usr/bin/unzip_bruteforce @@ -7,16 +7,21 @@ fi LIST=$1 FILE=$2 -LIST=$1 -FILE=$2 +COUNT=$(mktemp) +echo 0 > "$COUNT" +export FILE COUNT + +xargs -a "$LIST" -P4 -I{} bash -c ' + line="$1" + + # atomic-ish counter + n=$(($(<"$COUNT")+1)) + echo "$n" > "$COUNT" + + ((n % 1000 == 0)) && echo "$n tries..." -while IFS= read -r line; do - #echo "try: $line" if unzip -P "$line" -t "$FILE" >/dev/null 2>&1; then echo "FOUND: $line" - break + killall xargs 2>/dev/null fi -done < "$LIST" - -exit 0 - +' _ {}