Skip to content

Instantly share code, notes, and snippets.

@ereli
Last active December 20, 2015 18:18
Show Gist options
  • Save ereli/6174406 to your computer and use it in GitHub Desktop.
Save ereli/6174406 to your computer and use it in GitHub Desktop.
#!/bin/bash
password="xxxx"
for OUTPUT in $(find|grep "\.zip"|cut -c 3-)
do
length=$(expr length $OUTPUT)
addtive=`expr substr $OUTPUT $((length-4)) 1`
finalpass="$password$addtive"
unzip -P $finalpass $OUTPUT
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment