The previous version had some baaaad typos. (Satuday night.. :) ---- #! /bin/sh #CS: edit, Crypt and Steganography your message in a random jpg image. #http://madchat.org/crypto/steganography/unix/ <triton at madchat.org> #jpeg hide&seek chosen here, because it exists for both unix and win32 #>the final picture will be outputed in your home dir as "cs$date.jpg"
JPGDIR="/home/user/jpgimages/"; DATE=`date +%d%m%S`; # random credits to Audin okb-1.org and the debian-laptop ML :) find $JPGDIR -iname *.jpg > ~/cslist; lines=`cat ~/cslist | wc -l` wowie=$RANDOM lines=$[$lines - 1] echo Lines = $lines ra=$[($wowie % ($lines - 1)) + 1] echo Random = $ra jpgimage=`head -n $ra ~/cslist | tail -n 1` echo "Filename chosen: $jpgimage" if [ -r "$jpgimage" ]; then echo "I can read it."; else echo "No .jpg file found, check your path"; exit 0; fi rm ~/cslist #! you need to edit, if you're using different softs than jph&s and/or gnupg ! vi ~/csmsg; echo "\/ encryption * * * * * * * * * * * * * * * * * * * * * * *"; gpg -sea -o ~/cscrypted ~/csmsg; echo "\/ steganogaphy * * * * * * * * * * * * * * * * * * * * * *"; jphide $jpgimage ~/cs$DATE.jpg ~/cscrypted; echo "\/ cleaning * * * * * * * * * * * * * * * * * * * * * * * *"; if [ -r ~/cscrypted ]; then rm ~/csmsg; echo "clear text message deleted"; else echo "~/cscrypted did NOT exist, check cypher"; fi if [ -r ~/cs$DATE.jpg ]; then rm ~/cscrypted; echo "crypted text deleted"; else echo "~/cs$DATE.jpg dit NOT exist, check stegano."; fi echo "Go not to the elves for counsel, they will say both yes and no. -- Tolkien"; echo "out in the wild: ~/cs$DATE.jpg";