[ /lulz ]

This 'tutorial' assumes that you are at least mildy familiar with entering commands in a terminal. You should have installed a bunch of things at the command line and be familiar with some of the steps and syntax. See how far you can get through my guide to BASH before proceeding.


A jpg is encoded in such a way that everything up until a certain pattern is considered part of the image, and everything thereafter is junk. A zip file is decoded the opposite way: all data before a certain pattern is ignored.

You can take advantage of this by using cat (which concatenates files) and > to write the resulting data into a new file.

# make sure you have the tools
sudo apt-get install zip unzip

# make a text file to work with, or use your own
echo 'this is a test' > test.txt

# find a jpg you want to use.  
wget http://upload.wikimedia.org/wikipedia/commons/b/b2/Hausziege_04.jpg

# zip the secret file into an archive
zip test test.txt

# stick it all together
cat Hausziege_04.jpg test.zip > cryptoGoat.jpg

# and there you have it. Nobody suspects the goat.  
`xdg-open cryptoGoat.jpg`

a message hidden inside a jpg

By all appearances it looks like a simple jpg, but just try unzipping it.

unzip cryptoGoat.jpg

You should see test.txt with your original message. You can do this with other file formats too!

cat picture.gif sound.mp3 > picture2.gif

Have fun with your steganography!

Some command line apps you ought to know about

cal 1 1992

ddate # sudo apt-get install if you don't have it

time cat # hint, use ctrl-c to kill

yes pew # don't forget about ctrl-c

rev # reverse a string. rev; rev ./foo.bar;

factor 15 # prime decomposition

for i in {1..9}; do for j in $(seq 1 $i); do echo -ne $i×$j=$((i*j))\\t;done; echo;done # a funny oneliner

seq -f '4/%g' 1 2 99999 | paste -sd-+ | bc -l # calculate an approximation of pi`  

pi # sudo apt-get install pi # a better approximation of pi

cmatrix # sudo apt-get install cmatrix

figlet [-f path to the font] [string] # sudo apt-get install figlet

cowsay [-f path of another character] [string for the cow] # sudo apt-get install cowsay

cowsay -f sheep “BaaAAAAAA” # -l

fortune -s # sudo apt-get install fortune

fortune -s | cowsay # combinations

yes "$(figlet Linux)" # hilarious waste of time

cowsay "$(seq -f '4/%g' 1 2 99999 | paste -sd-+ | bc -l)" # moo pi

yes | /path/to/script # To handle (y/n) inputs

yes [text]  | /path/to/script # To handle custom inputs

jp2a cryptoGoat.jpg # convert a jpeg into ascii art

toilet hello world # sudo apt-get install toilet

toilet -f mono12 -F metal pewpew

oneko # sudo apt-get install oneko