Created
February 15, 2022 23:26
-
-
Save mrtrkmn/1fb5cc216e7081fcadc00291d6c12925 to your computer and use it in GitHub Desktop.
decrypt files- for netsec course exercises
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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