From ac49bddbb4df1cf4cea98daa4362bc6b120f5c8b Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 2 Apr 2026 17:40:11 +0200 Subject: [PATCH] unzip_bruteforce --- usr/bin/aaa | 25 +++++++++++++++++++++++++ usr/bin/unzip_bruteforce | 20 ++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100755 usr/bin/aaa create mode 100755 usr/bin/unzip_bruteforce diff --git a/usr/bin/aaa b/usr/bin/aaa new file mode 100755 index 0000000..c5db6d6 --- /dev/null +++ b/usr/bin/aaa @@ -0,0 +1,25 @@ +#!/usr/bin/bash + +if [ "$#" -lt 1 ] || [ "$#" -gt 3 ]; then + echo "Usage: $0 arg1 [arg2] [arg3]" + exit 1 +fi + +# interactive session check +if [ -t 0 ]; then + echo -n "Delete existing output files? [y/N]: " + read ans + case "$ans" in + y|Y) rm -f *.school ;; + *) echo "Aborted"; exit 0 ;; + esac +fi + +# process input file +while IFS= read -r line; do + new_f="${line%.*}.school" + f > "$new_f" +done < "$FILE" + +exit 0 + diff --git a/usr/bin/unzip_bruteforce b/usr/bin/unzip_bruteforce new file mode 100755 index 0000000..0bf551a --- /dev/null +++ b/usr/bin/unzip_bruteforce @@ -0,0 +1,20 @@ +#!/usr/bin/bash + +if [ "$#" -lt 1 ] || [ "$#" -gt 3 ]; then + echo "Usage: $0 list file.zip" + exit 1 +fi + +LIST=$1 +FILE=$2 + +# process input file +while IFS= read -r line; do + echo try: $line + if unzip -p $line $FILE ; then + echo FOUND : $line + fi +done < "$LIST" + +exit 0 +