This is another along a similar vein to my last obfuscation, Brute force JAPH. Here again, crypt is used to generate the output, so deciphering all this is not straight-forward. This also means this may be a bit platform dependent (i.e., it depends on what your crypt() does).

$_=+q,8TZtX]8#GC8fahGMXWT_8TG#XtZ8ZuTGatWZZ!G_Z!8!8TZuXhTHahHMXhQ]Z1G_ aZXWaZ8T8TWHZ+WMXZZ8XhHMGMdQahGMZlZGahHMZ!dDZ18!HMH_Z!WMdJTHatGMahQHZu TMZ1aWZ+XWahGMQ~Z!XZdHXZ8TQATGZ1TMZ!XWahQGZ!QDZuXWatTGZ!8!8WTGZ+ZGQJTH Zl8WZ+aWZ+8u8TdHZ!aW8WTHZ+ZGQJTGZ1aWXtTHQJZ1ZldHXhGMZuddatQGZlTMaZ8T8W WHaZdJZlQAXtGMZlZHZ+XT8WdGatGMZ+QQZ+8+Q~dGZ!8u8TWHXhHMZ1QDZu8+ahGMXhHM Z+G#atHMatQGd~Z!ahW_Z!WMZldHahHMZudQZ1XTaZZlZ!ZGQAWGZuXWatWGatGMZ!H8Zu G_ahQJZ1XWatWGaZQ~d]WGZ!8uXhWGZuXTd]THZ!aW8WdHZ+8!d~dGZ+8uXtWHZ!XT8WTG ZuZHZ!8!XtHMZ1dDZ+aWXhWHZuaTQAWGXtHMZ1dDZ+ZHXh8Td]Z!XWT#Z!aWXhWHZ+G_8W TGZuXTZ1QHaZ8WaZd~atHMXZZGZ!8+ahTGQ~Z+XtW_Zu8!ZuWMXtHMZ!G#Z!8!XhWHXtHM ZlG_Z+aWZuTMahGMXZZH8WZ1aZQGZ!8uQ]dGZ+8!QAdHZu8!QAWHXhHMZ+G8Z+aTXtGMXZ dAZlQ]XtGMXZG_XhGMZ+dQZu8!Z+ZHZ181Z!ZGatGMZlG_XhQGZlZHZ!G_d~THZ!81atTH Z!8+8TTGXtGMZuQQZ+8uZl81Z!aTat8WZ!8+8TdGZuaWXt8TZ+ZHZlQGZ!8ud~dGZ+8+8W dG8TZ1XWT#Zl8WZ!aTXZ8WaZ8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Z1ahTGZ1WMHMQdahQGXhQGXhdHahWHXZ8WZ1G_Z1ZHGMG#ZlQ]XtGMXZ8T Z+QHXtdG8TdQXhdHXZQHZl8WZ!8+XtGMaZaZXtdG8TZuXZ8WahdHahQG8TWHXhQGdJH#Z+ ZGZ18uZuTMahHMatQ8ahd8XtGMahQ]QAG#atZ1GMaCaZXZahZ1XtQ8Z!dAZ+TZaWd8aT8T ZuWZZ!8TZ1XWXZahZ!8TZ+HMZ!XhatW#aZ8TZuXhZ!WMZ+W#Z+HMatX|ahGMatZlXhWZah GMXhdJatTMXtQ8ZlWZaZXTXZdGZlZuZ+HMZla|ahHMahQAXtTZZlWZZlaWZldHZlZ1Z!GM aZaCXhGMXtZlZ+WZZlZ+XZ8uXhQ8ahHMatd]QJH#atZuXtZu8TZ#Z!d~XhQ8ahQHXhQHXt d8Zl8TaZXCZ!XhXhW#XZX|ZlaWZuX|ahHMXhXZatWZZlZuXZaTXtQ8atHMXt8TXtdG8WdQ XhHMaWT_atW#ZlaZaZW_Z1atXhT#Z!Q~Z!T#aZd8ZlTMZ1HM8WZ8aZ81Z1aZZlTGZlTZXt GMatQ]8f8f8W8aX~8HXMGM8H8fGXGfZfZXGfGaGZQ8HXGWH88MQXG8H!GMHT8_8W8Q8f8W 8a818fQfdZdDdGGWd_8T8a8fQfQZQDQHGWQ_8W8dGfQHdZ8f8W8aaJ8H8HX#HX8f8D8D8f daQ_G88MQ_QZH_8T8Q8fdHQZ8f8W8X8DXJ8TZh8MdQdhH88MHXGMdfQ+GWX#dZHdQ|df8T 8X,,$#='rD',s|\S|substr crypt($&,$#),length$#,length$&|ge,$#=''; s,..,chr hex$&,ge,$#.=$_ for split;eval$#

The format of the text comes from the Unix banner program.

I'll explain the workings of this in the spoiler.

The wall might be more legibly written this way:

$_ = q{ ... wall text ...}; my $salt = 'rD'; # Replace every character in the wall with # the third character from crypting that character. s/(\S)/substr crypt( $1, $salt ), 2, 1/ge; # Ignore the white space, # and replace hex digit pairs with # the ASCII characters they encode. my $prog = ''; for ( split ) { s/(..)/chr hex $1/ge; $prog .= $_; } # Eval the resulting program. eval $prog;

The original code is obfuscated in a few minor ways.

One thing to notice about the encoding is that the encoded text is twice the size of the original text. We take a character, get the hex value of it, and then encode those two hex digits with crypt.

Because of the clumsy decoding, the characters encoding hex have to be kept together. As such, the spaces can only go between even numbers of wall text characters. The use of + in the initial $_=+q... was only to make the spacing come out right.

If you decode the wall of text as posted, you'll get another wall of text. This one has no formatting, though. It's just one long line. It then decodes itself to another wall and so on until it reaches the original program:

print "Just another Perl hacker,\n"

Replies are listed 'Best First'.
Re: Wall of Text (making of)
by kyle (Abbot) on Apr 10, 2008 at 16:53 UTC

    This is the program I used to make the wall of text.

    The format file was made with this command line:

    banner -w 35 Wall of text crits you ... you die | perl -pe 's/(.)/$1$1 +/g' > obfu-banner

    Then I ran the above this way:

    perl obfu-make.pl obfu-banner > wot.pl

    The resulting wot.pl doesn't run as-is. It has to be edited because obfu-make isn't too smart about where it puts the line breaks.

    Each wall it generates has a different character set because it chooses salts randomly. I ran it a few times to get blocky characters rather than tiny characters.

    I would not be surprised to find there are some bugs here that make this unsuitable for more general purposes. I would not recommend this as a ready-made way of doing anything other than what it does. Still, as a proof of concept, it might be instructive and/or interesting to others.