Skip to content

Instantly share code, notes, and snippets.

@ghoulmann
Created March 13, 2013 23:29
Show Gist options
  • Save ghoulmann/5157482 to your computer and use it in GitHub Desktop.
Save ghoulmann/5157482 to your computer and use it in GitHub Desktop.
Creating steganographied files en masse - still needs works (see comments)
#!/bin/bash
# until tomorrow ./stegged must exist &
# ./cover must exist & have images &
# ./hide must exist and have images
#TO DO: argument for verbose output
#TO DO: make hide/ and /cover variables that can be configured
#TO DO: license and README.md
#install argument to:
#apt-get update && apt-get install steghide
#move script to /usr/bin
#generate /etc/stegify.conf for variables
#and more
passphrase="this"
#pics=($(ls ./cover/)) #cover photos list - no longer used
hide=$(ls ./hide/) #content to hide list
hiding=0 #counter set
covers=0 #counter set
declare -a pics=($(ls ./cover)) #defines array for cover pics
#echo "Printing Array" #troubleshooting
#echo ${pics[*]} #troubleshooting
###Loop through to count pics and steg###
for pic in ${pics[*]}
do
covers=$(($covers+1)) #count cover files
#echo "cover file number $covers is $pic" #troubleshooting
done
#echo "Total cover picturs: $covers" #troubleshooting
i=1 #counter
for hideme in $hide #steg loop
do
hiding=$(($hiding+1)) #count pics to hide
#echo "file to hide $hiding is $hideme" #troubleshooting
#echo "embed content=$hideme" #troubleshooting
echo "covering $hideme with ./cover/${pics[$i]}"
steghide embed \
-cf "./cover/${pics[$i]}" \
-ef "./hide/$hideme" \
-sf "./stegged/${pics[$i]}-steg.jpg" \
-p "$passphrase"
#echo "${pic[$i]}-steg.jpg created" #troubleshooting
i=$(($i+1))
done
#echo "total pictures hidden: $hiding" #troubleshooting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment