Skip to content

Instantly share code, notes, and snippets.

@thinkerbot
Created July 28, 2011 17:56
Show Gist options
  • Save thinkerbot/1112108 to your computer and use it in GitHub Desktop.
Save thinkerbot/1112108 to your computer and use it in GitHub Desktop.
Example usage of snow
#!/bin/sh
######################################################################
# Example usage of SNOW (Steganographic Nature Of Whitespace)
# http://www.darkside.com.au/snow/
#
# See also: http://www.cabinetmagazine.org/issues/40/sherman.php
######################################################################
if ! [ -d snow_example ]
then
mkdir snow_example
fi
cd snow_example
if ! which snow
then
if ! [ -d snow-20091217 ]
then
curl -O http://www.darkside.com.au/snow/snow-20091217.tar.gz
tar xvf snow-20091217.tar.gz
cd snow-20091217
make
mkdir bin
mv snow bin/snow
cd ..
fi
PATH="$(pwd)/snow-20091217/bin:$PATH"
fi
cat >infile <<DOC
The Project Gutenberg EBook of A Modest Proposal, by Jonathan Swift
Title: A Modest Proposal
For preventing the children of poor people in Ireland,
from being a burden on their parents or country, and for
making them beneficial to the publick - 1729
Author: Jonathan Swift
Posting Date: July 27, 2008 [EBook #1080]
Release Date: October 1997
Language: English
A MODEST PROPOSAL
For preventing the children of poor people in Ireland...
DOC
echo '# Encode'
echo '$ snow -C -m "a man a plan a canal" -p "panama" infile outfile'
snow -C -m "a man a plan a canal" -p "panama" infile outfile
echo '# Decode'
echo '$ snow -C -p "panama" outfile'
snow -C -p "panama" outfile
echo
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment