Skip to content

Instantly share code, notes, and snippets.

@mrtrkmn
Created February 15, 2022 23:26
Show Gist options
  • Save mrtrkmn/1fb5cc216e7081fcadc00291d6c12925 to your computer and use it in GitHub Desktop.
Save mrtrkmn/1fb5cc216e7081fcadc00291d6c12925 to your computer and use it in GitHub Desktop.
decrypt files- for netsec course exercises
#!/bin/bash
files=(*.gpg)
# declare -p files
i=0
while read p; do
printf 'Decrypting: %s with passphrase %s\n' "${files[$i]}" "$p"
gpg --pinentry-mode=loopback --passphrase "$p" "${files[$i]}" 2>/dev/null >test
((i=i+1))
done <passphrases.txt
# check here how it runs https://asciinema.org/a/rCh1u5IAmGRgMb8SlnNLBgpE4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment