Created
July 28, 2011 17:56
-
-
Save thinkerbot/1112108 to your computer and use it in GitHub Desktop.
Example usage of snow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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