Skip to content

Instantly share code, notes, and snippets.

@Goerik
Last active December 22, 2015 04:59
Show Gist options
  • Save Goerik/6421208 to your computer and use it in GitHub Desktop.
Save Goerik/6421208 to your computer and use it in GitHub Desktop.
decrypt-C3C33F33.sh /path/to/ecnrypted/files
#!/bin/bash
# Params check
if [[ -z "$@" ]]; then
echo >&2 "You must supply an argument!"
exit 1
elif [[ ! -d "$@" ]]; then
echo >&2 "$@ is not a valid directory!"
exit 1
fi
# Decryption
for f in $(find $1 -name '*.gpg'); do cat ${f} | gpg --yes --recipient C3C33F33 --decrypt > ${f%.gpg}; done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment