Here are a couple of programs I wrote to help me with the UK National Cipher Challenge

Automatic Caeser/Affine cracker
Bash script to tie in with the affine cracker
Substitution cracker