Skip to content

Instantly share code, notes, and snippets.

@marete
Created August 20, 2015 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marete/3b195d8934ba00652693 to your computer and use it in GitHub Desktop.
Save marete/3b195d8934ba00652693 to your computer and use it in GitHub Desktop.
#!/bin/bash
trap "echo '*** Last command failed'; exit 1" ERR INT TERM QUIT
COUNT=0
for Z in 0 6; do
for COMPRESSION_ALGO in Uncompressed ZIP ZLIB BZIP2; do
for CIPHER in IDEA 3DES CAST5 BLOWFISH AES AES192 AES256 TWOFISH CAMELLIA128 CAMELLIA192 CAMELLIA256; do
for HASH in MD5 SHA1 RIPEMD160 SHA256 SHA384 SHA512 SHA224; do
for S2K_MODE in 0 1 3; do
for S2K_COUNT in 1024; do
for MDC_MODE in "--force-mdc" "--disable-mdc"; do
echo "insecure" | gpg -v -z ${Z} \
--passphrase-fd 0 --batch --yes --no-tty \
--compression-algo ${COMPRESSION_ALGO} \
--cipher-algo ${CIPHER} \
--digest-algo ${HASH} \
--s2k-mode ${S2K_MODE} \
--s2k-count ${S2K_COUNT} \
${MDC_MODE} \
-o corpus/`printf "%05d" $COUNT`.gpg \
-c plain.txt
COUNT=$[$COUNT + 1]
done
done
done
done
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment