[Chicago-talk] Last night's Chicago.PM meeting

Kent Cowgill kent at c2group.net
Wed Jun 7 11:52:38 PDT 2006


That was relatively easy, actually.  I found a great post by a user called
liverpole on http://perlmonks.org/ called "Latent Image
Obfuscation Generator", which was actually designed to hide a message inside
an ASCII representation of an image.  ASCII steganography so to speak.
Feed it a .jpg and a specially formatted text file, and you get an executable
perl script that displays the message.

As a side effect, it creates a text file of the ASCIIfication without the
hidden message.  I wrote a tiny little script that read both that text
file and my golfed script, and for every character occupied by a "pixel"
in the text picture, would spit out the next character of my script.  Plus
or minus a few hand tweaks when my code broke, or if there wasn't enough
of an image (I had no "`" characters in my script, so decided to leave
that as a lighter 'shade', and had to add a few manually for the left side
of the face, and the hairline).

All that was left was to craft a few regex's that pulled the code out of
$_ and transformed it enough to get it to eval properly (remove
superfluous "`", remove extraneous spaces and newlines, etc) and then eval it:

s-\s           \s+--gmx;
s&`&&gm;
eval;

At that point, I was short a few lines in the picture, and added some
gobbledygook (as comments) by hand to complete the last 5 lines.

-Kent

On Wed, 7 Jun 2006, Andy Lester wrote:
> > I'm also glad you guys indulged me with my talk regarding one
> > aspect of
> > the lighter side of Perl.
>
> Actually, I forgot to mention: Why don't you show HOW you got the
> picture of Charles Babbage in that shape?   Acme::EyeDrops, I assume?


More information about the Chicago-talk mailing list