#! /bin/sh #Crypt and Steganography your FILE in a random jpg image. #enter FILE as a parameter. #jphs can be found in http://madchat.org/crypto/steganography/ #jpeg hide&seek chosen here, because it exists for both *nix and win32 #>the final picture will be outputed in your home dir as "cs$date.jpg" JPGDIR="/home/silk/0cd/images/"; 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 echo "\/ encryption * * * * * * * * * * * * * * * * * * * * * *"; gpg -e --throw-keyid -o ~/cscrypted $1; echo "\/ steganogaphy * * * * * * * * * * * * * * * * * * * * *"; ./jphide $jpgimage ~/cs$DATE.jpg ~/cscrypted; if [ -r ~/cs$DATE.jpg ]; then rm ~/cscrypted; echo "stega file produced, crypted file 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 and original-uncrypted: $1"; exit 0;