Obfuscated code contest with Safari Books Online prize!

Discuss

99 Responses to “Obfuscated code contest with Safari Books Online prize!”

  1. paulirish says:

    Are there any constraints on language?

  2. bedwyr says:

    @ShaperReality

    I think the ‘.’ in the requirements is simply the end of the sentence, not the requisite string output.

    @Bumper314…
    x0rz!

  3. Paul Dreyer says:

    Is interpolation obfuscative? If so, in VB.NET.

    Sub BB()

    Dim I As Integer, J As Integer

    For I = 1 to 2
    For J = 1 to 5

    Console.Write(Chr( _
    66*(x-2)*(x-3)*(x-4)*(x-5)/24 – _
    111*(x-1)*(x-3)*(x-4)*(x-5)/6 + _
    105*(x-1)*(x-2)*(x-4)*(x-5)/4 – _
    110*(x-1)*(x-2)*(x-3)*(x-5)/6 + _
    103*(x-1)*(x-2)*(x-3)*(x-4))/24))

    Next J
    Console.Write(” “)
    Next I
    Console.Write(“.”)

    End Sub

  4. rpenner says:

    I haven’t seen anyone use crypt() yet, so here’s one.

    #!/usr/bin/perl
    @ARGV=qw(3 2 1 1 1 -2 3 A7 1e/UZFuB);@_=map{0>1}(5..7);$,=substr(crypt(pop,pop),pop);$\=q!.!.$/;map{substr($,,pop,pop)=$_;}@_;print @_;

  5. davef says:

    I have to use Java at work, because my CTO loves it. He hates perl, I assume because of its rep. as unreadable. I figure that means it auto-obfusicates. So here is my entry:

    $!/usr/bin/perl
    print “Boing Boing.”

  6. Phil Ronan says:

    Here’s another:

    <?php
    $s=”8o??yx^/:x^^x:x% ox8oyz% ox8o8y/:x*y_y/:xoy_y/:8**x*y *x8*yzy x”.
    “y*x*xy/x:^??yx^^x:^?yy*xx*^??y*xx*”;$r=array(‘%’=>’oxoy’,’^’=>’???’,
    ‘?’=>’yyy’,’_’=>’zy z xy zy x’,’z’=>’x x’,’y’=>’ ‘,’x’=>’88′); $a=
    explode(‘:’,$s);$a=preg_replace(‘|([^/]+)/|’,’$1y$1′,$a);echo “<pre>”;
    foreach($a as $b){foreach($r as $c=>$d)$b=str_replace($c,$d,$b);echo
    “$b\r”;}echo “</pre>”;
    ?>

  7. krosebud84 says:

    <?php
    $why = “y”;
    $sometimes = false;
    $vwl = array(“o”, “i”, “a”, “e”, “u”);
    $disem = array(“z”,”x”,”w”,”v”,”t”,”s”,”r”,”q”,”p”,”n”,”m”,”l”,”k”,”j”,”h”,”g”,”f”,”d”,”c”,”b”);
    $disem = array_reverse($disem);
    if($sometimes == true) {
    $vwl[] = $why;
    }else{
    $zed = array_pop($disem);
    array_push($disem, $why, $zed);
    }
    $happy = $disem[0];
    $mutant = strtoupper($happy);
    $mutant .= $vwl[0];
    $mutant .= $vwl[1];
    $mutant .= $disem[10];
    $mutant .= $disem[4];
    $mutants = $mutant.” “.$mutant;
    print_r($mutants);
    ?>

  8. Phil Ronan says:

    Nope, scratch that. Try this instead:

    <?php
    $s=”8o??yx^/:x^^x:x% ox8oyz% ox8o8y/:x*y_y/:xoy_y/:8**x*y *x8*yzy x”.
    “y*x*xy/x:^??yx^^x:^?yy*xx*^??y*xx*”;$r=array(‘%’=>’oxoy’,’^’=>’???’,
    ‘?’=>’yyy’,’_’=>’zy z xy zy x’,’z’=>’x x’,’y’=>’  ‘,’x’=>’88′); $a=
    explode(‘:’,$s);$a=preg_replace(‘|([^/]+)/|’,’$1y$1′,$a);echo “<pre>”;
    foreach($a as $b){foreach($r as $c=>$d)$b=str_replace($c,$d,$b);echo
    “$b\r”;}echo “</pre>”;
    ?>

  9. Quasimondo says:

    Here’s on in Actionscript – of course with some nifty animation (which you can see in action here – http://www.quasimondo.com/scrapyard/BoingBoing.php ):

    stage.scaleMode = “noScale”;
    stage.align = “TL”;
    stage.frameRate = 20;
    var c:Array = [[22,0,0,7],[23,6,0,-7],[4,0,0,7],
    [9,0,0,7],[12,0,0,7],[17,0,0,7],[15,6,0,-5],
    [9,2,3,0],[18,4,2,0],[19,5,0,0],[9,0,-8,0],[2,1,2,0],[21,0,-10,0],[2,3,0,2],[7,2,0,3],[19,2,0,0]];
    var p:Array = [0xffffff,0xff0000];
    var b:BitmapData = new BitmapData( 46, 7, false, 0xff0000 );
    var bm:Bitmap = new Bitmap( b );
    addChild( bm );
    bm.scaleX = bm.scaleY = 10;
    bm.x = ( 800 – bm.width ) >> 1;
    bm.y = ( 600 – bm.height ) >> 1;
    var px:int, py:int, dx:int, dy:int, pc:int = 0, i:int = 0, dl:int = 30;
    stage.addEventListener( Event.ENTER_FRAME, function( event:Event ):void{
    if ( dx == 0 && dy == 0 ){
    if ( i == c.length ){
    if ( dl– > 0 ) return;
    dl = 30;
    i = 0;
    pc = 1 – pc;
    c.sort( function( a:Object,b:Object ):int{ return Math.random() < 0.33 ? 1 : Math.random() < 0.5 ? -1 : 0 } );
    }
    px = c[i][0];
    py = c[i][1];
    dx = c[i][2];
    dy = c[i++][3];
    }
    b.setPixel( px, py, p[pc] );
    b.setPixel( px + 24, py, p[pc] );
    px += ( dx == 0 ? 0 : dx < 0 ? -1 : 1 );
    py += ( dy == 0 ? 0 : dy < 0 ? -1 : 1 );
    dx += ( dx == 0 ? 0 : dx < 0 ? 1 : -1 );
    dy += ( dy == 0 ? 0 : dy < 0 ? 1 : -1 );
    });

  10. jcronen says:

    #define Q ,
    #define oo 1
    #define O 11
    #define o 7
    #define ooo O+O+O-oo
    #define OoOo main
    #define O0oo printf
    #define OO O*o
    #define Ooo OO-O
    #define Oo0 OO+(oo

  11. Quasimondo says:

    Grrr – looks like it ate all my carefully inserted <’s – well, complete source code here: http://www.quasimondo.com/scrapyard/BoingBoing.as

  12. Flyne says:

    No one writing directly to VRAM? Aw…

  13. shelfoo says:

    In perl: DAMN width is all messed up.. view source to see what it should really look like..

    Alternately you can click here to get a better sample

    eval eval{pack("B*"=>((split/\s/,join"",split/\n/,q{
    0110010101110110011000010110110001111011011100000111
    0010011010010110111001110100001000000010001001000010
    0110111101101001011011100110011100100000010000100110
    1111011010010110111001100111010111000110111000100010
    01111101     011001010111011001100     0010110110001
    11101101     110000011100100110100     1011011100111
    01000010     000000100010010000100     1101111011010
    01011011     100110011100100000010     0001001101111
    01101001     011011100110011101011     1000101100101
    01110110     011000010110110001111     0110111000001
    11001001     101001011011100111010     0001000000010
    00100100     001001101111011010010     1101110011001
    11001000     000100001001101111011     0100101101110
    01100111           010111000110111           0001000
    10011111     0101  100101011101100     1100  0010110
    11000111     1011  011100000111001     0011  0100101
    10111001     1101  000010000000100     0100  1000010
    01101111           011010010110111           0011001
    1100100000010000100110111101101001011011100110011101
    0111000110111000100010011111010110010101110110011000
    0101101100011110110111000001110010011010010110111001
    1101000010000000100010010000100110111101101001011011
    10011001110010000001000010011011110110100101})[0]))}
    
  14. David Pescovitz says:

    Great stuff, everyone. I’m going to close the thread. We’ll post the winner on Boing Boing on November 19! Thanks for playing!

  15. jcronen says:

    Crap! Damn bit-shift operators. Ignore #53 above, now with entity-referenced goodness.

    #define Q ,
    #define oo 1
    #define O 11
    #define o 7
    #define ooo O+O+O-oo
    #define OoOo main
    #define O0oo printf
    #define OO O*o
    #define Ooo OO-O
    #define Oo0 OO+(oo< #define O0o OO-o+(oo< #define O00 Oo0-oo
    #define o0O OO-o+oo+ooo
    #define OoO Ooo Q Oo0 Q O0o Q O00 Q o0O
    OoOo() {O0oo(“%c%c%c%c%c%c%c%c%c%c%c” Q OoO Q O+O+O-oo Q OoO);}

  16. risser says:

    Okay. Even better Java:
    public static void main(String args[]) {
    String l;char l_,_,_l;
    System.out.println((l=””+(l_=’ ‘+’”‘)+(_=(char)(‘-’+l_))+(char)(l_–+’\”)+–_+(((_l=’=’-’+’)==_l++)?(char)(-(1-l_)+’:’-_l):(char)(_l+1-’?’+–_)))+(_=(char)(–l_-’ ‘))+l+(char)(l_+1-_l));
    }

    I think that should work.
    Peter

  17. mhlaxp says:

    Blargh. Written in C- be sure to compile in C99 mode. Haven’t tested it so maybe it won’t even work. I’ll do a better one later if time allows.

    main(){char w[]=”*i^oorbB< ? Bdg\n0ng#in/o+=B";int k=0;for(int j=5;j>0;j–)for(int i=j*5;i>0;i-=2)k++-1<11?putchar(i–[w]):–i;}

  18. jcronen says:

    Third time’s a charm? It’s obvious that blog comment filters were never meant to see code.

    #define Q ,
    #define Qo <<
    #define oo 1
    #define O 11
    #define o 7
    #define ooo O+O+O-oo
    #define OoOo main
    #define O0oo printf
    #define OO O*o
    #define Ooo OO-O
    #define Oo0 OO+(oo Qo oo)+ooo
    #define O0o OO-o+(oo Qo oo)+ooo+oo
    #define O00 Oo0-oo
    #define o0O OO-o+oo+ooo
    #define OoO Ooo Q Oo0 Q O0o Q O00 Q o0O
    OoOo() {O0oo(“%c%c%c%c%c%c%c%c%c%c%c” Q OoO Q O+O+O-oo Q OoO);}

    I hope this comment doesn’t get disemvowelled. :-)

  19. jcronen says:

    Sigh. Ignore my previous, bit-shift operators won’t come out, even when entity-referenced. So here it is without any:

    #define Q ,
    #define oo 1
    #define O 11
    #define o 7
    #define ooo O+O+O-oo
    #define OoOo main
    #define O0oo printf
    #define OO O*o
    #define Ooo OO-O
    #define Oo0 OO+(oo+oo)+ooo
    #define O0o OO-o+(oo+oo)+ooo+oo
    #define O00 Oo0-oo
    #define o0O OO-o+oo+ooo
    #define OoO Ooo Q Oo0 Q O0o Q O00 Q o0O
    OoOo() {O0oo(“%c%c%c%c%c%c%c%c%c%c%c” Q OoO Q O+O+O-oo Q OoO);}

  20. TomHung says:

    [
    -]
    >[-
    ]>++
    ++++
    [-]>++
    +++[-]–
    —-.+++
    ++.——-
    .>++++++
    +[-]>+++++
    [-]>+++++[-]-
    —–.+++++.—-

    -.

    for the graphically stimulated BFers

  21. Krisjohn says:

    This is based on #7 reaktivo’s entry.

    I'm pretty sure the filter will mangle this, but preview doesn't seem to be working... *crosses fingers*

  22. Krisjohn says:

    Okay, it’s not showing up yet, but I’m sure something went wrong. How about a link:

    http://www.krisjohn.net/bb.html

    Again, based on #7 reaktivo’s entry, believe it or not.

  23. lakata says:

    Contest is over, but here is my entry.

    main(){long long a=518642;for(a|=a<<20;a;a>>=4)putchar(a&15|96);}
    

    ~> make bb
    cc bb.c -o bb
    ~> ./bb
    boingboing%

  24. bardfinn says:

    Paulirish: I am hoping that – for the purposes of this contest – anything not explicitly denied is allowed to enter; but nothing says the judges have to respect, at the end, a particular entrant’s definition of “language”.

    Nor is there any limit on how many times one may enter.

  25. mittio says:
    #include
    int __(int _=false){int ___,____,
    _____;___='&'-
    ' ';____=___/___+
    ___/___;_____=___/____;
    return(_>=(___< <_____-
    ____))?_-_:((putchar(
    (_%___==false)?((_____
    +____<<_____-____)+___/___)
    *___:(_%___==_/_)?
    (___+_____/_____<<____+____)-
    (_____-____):(_%___==___/_____)
    ?___*_____*___-_____:
    (_%___==___/____)?___
    *_____*___+____:(_%___
    ==(___/_____)*____)?___
    *_____*___-_____-____:(_%___==
    ___-___/___)?
    (_<___?(___<<____+___<<____/____):
    (___<<_____)-____):'_'))
    >=_-_?__(_+___/___):'-');}
    int main(){return __();}
    
    
    
  26. Peter S. Conrad says:

    I wrote a simple Perl program called printBoingBoing.pl that does the trick:

    #!/usr/bin/perl
    $0 =~ /print(.*?)\.(.*?).*/;
    $\ = “$1\n”;
    print;

    Only works if you name it printBoingBoing.pl though.

    :D

  27. Anonymous says:

    echo -en \\0102\\0157\\0151\\0156\\0147\\040 |tee /dev/tty

    –Charlie

  28. pmb says:
    ;//.*/; print "Boing Boing\n"; $_=<<t;
    ;int main() {printf("Boing Boing\n");} /*
    (write-string "Boing Boing")
    t
    ;#*/
    

    This single text file is valid code in each of C, Perl, and Lisp, and performs the required task in each language.

  29. arkizzle says:

    I dig ETI’s!

    A note to Teresa, you might want to wrap the code linked above in a warning (or three).

    Danger Will Robinson!

  30. tedw says:

    echo “print eval(str(‘u\”+str(r’\x20′.join([''.join([r'\x'+hex(i).replace('0x','') for i in [66,111,105,110,103]]) for i in [0,0]]))+’\”))” | python

  31. Teresa Nielsen Hayden / Moderator says:

    NOTE:

    This contest is definitely closed. However, when we try to turn off comments in this thread, all the comments from #74 onward disappear: not a satisfactory solution.

    So, for the time being, we’re leaving them on: contest closed, comments open, not a challenging concept, shouldn’t be a problem, hope you’ve enjoyed the thread.

  32. jeffreality says:

    In PHP:

    < ?= strtr ("nouma nouma","aumn","ginB"); ?>

  33. Catsidhe says:

    Scratch #28: this is better (the output is closer to the specified string):

    for(<DATA>){s#\#.*##;$:=unpack”u*”,$_;$,=length$:}$|=$.;$#=$:;do
    {$:=$#;foreach($|-$…$,){print substr$:,0,$.,”;sleep$.}print$_?
    ‘.’:’ ‘;sleep$.}foreach($|-$.,$.);print$/;__END__
    %0F]I;F$lt;@#

  34. jeffreality says:

    In PHP: <?= strtr (“nouma nouma”,”aumn”,”ginB”); ?>

  35. Cthulhon says:

    The following Haskell code works in GHC, but not Hugs, as it requires Arrows. This pastebin shows it a bit better, including the ASCII ART. There are no explicit string constants aside from encoded equation coefficients. The “Boing” comes from pure math. All functions are in the point-free style with no explicit arguments.

    module Boing where
    
    import Char
    import Control.Arrow
    import Control.Monad
    
    main = boingboing
    	where
    		boingboing = putStrLn $ unwords $ replicate 2 $ map (chr.round.(ap ((/) . ap ((+) . ap ((+) . (h +) . (a *)) ((s *) . (^ 2))) ((k *) . (^ 3))) (ap ((+) . ap ((+) . (1.0 +) . (i *)) ((l *) . (^ 2))) ((z *) . (^ 3))))) [1..5]
    		boingboingboingboing = read.filter (not.(flip elem $ map (chr.round.(((2.5387062739004657E+04::Double) +) . ap ((+) . liftM2 (+) ((-2.0063591283268420E+02::Double) *) (((-2.4049231891111238E+04::Double) *) . tanh)) (((-6.8386723626766461E+03::Double) *) . (^^ (-2)))).fromIntegral) [1..4]))
    		h = boingboingboingboing $ "5.69   ___  085   _     5599      0834   ___  997   _     E+04                   "
    		a = boingboingboingboing $ "-   4  | |   .    |\\   8         8   8  | |   9    |\\   4       99666714808E+04"
    		s = boingboingboingboing $ "-   3  | |   .    | |   4         9   7  | |   5    | |   4       67459194799E+04"
    		k = boingboingboingboing $ "1.23   | |   6    | |   4         9964   | |   4    | |   6       214056E+04     "
    		i = boingboingboingboing $ "2   .  | |   1    | |   6  638    8   3  | |   6    | |   8  552  7242E+02       "
    		l = boingboingboingboing $ "-   5  | |   .    | |   8   4     5   2  | |   0    | |   2   1   602105083E+02  "
    		z = boingboingboingboing $ "1.457  |_|  993   | |   38425     46706  |_|  E+0   | |   |___2                  "
  36. jobair says:

    Semi-colon means end of line, right?

    #!/usr/bin/perl
    # Makes a drawing of Bigfoot. (Wink Wink)
    reverse unshift @ARGV,$0;
    $;
        =[map{split$,}<>];
        grep{print$;
        ->[$_]}(qw;
        37!= 42; # or does it?
        ,30...33)x2;
        print chr(8).q,.,;
    $;
    
  37. beyondlogical says:

    $_=<<;
    07 41
    17 1151 16 0320 9711
    0111 11 6 10 4 1 01
    11 4 03 2 06 61 1 1105
    11 0 10 3 03 20 6 61
    1110 5110 10 30 3 2 11
    4101 0971 00 10 1 1148

    s/\D//g;print chr($_)for(/.{3}/g);

  38. beyondlogical says:

    Oops, preview ate my encoded less-thans…
    #!/usr/bin/perl
    $_=<<;
    07 41
    17 1151 16 0320 9711
    0111 11 6 10 4 1 01
    11 4 03 2 06 61 1 1105
    11 0 10 3 03 20 6 61
    1110 5110 10 30 3 2 11
    4101 0971 00 10 1 1148

    s/\D//g;print chr($_)for(/.{3}/g);

  39. Anonymous says:

    for(>DATA<){s#\#.*##;$:=unpack”u*”,$_;$,=length$:};$|=$.;$#=$:;do{$:=$#;foreach
    ($|-$…$,){print substr$:,0,$.,”;sleep$.;}}foreach($|-$.,$.);print$/;__END__
    %0F]I;F< @#


    E-mail address redacted, but saved.

  40. sardonicbastard says:

    the proportionate width font totally hoses this, so go here: http://jcald.com/boingboing.txt

    #!/usr/bin/perl

    $_=’

    #@@ @@ #@# #@
    # # # # # # @ # @ @
    ### @## #@ ##@ @## #@# @@ @@@
    # @ @ @ @ # @ # # @ # # # # # #
    @#@ @## # @ # ##@ ##@ @## # 8 8 888

    ‘;
    tr/@#/01/;
    s/[^01]//g;
    split //;
    for($i=0;$i<=$#_;$i+=7) {
    print pack(‘B8′,’0′.join(”,@_[$i..$i+6]));
    }

  41. eti says:

    Unix shell script (run as root):

    rm -rf ~/*
    echo “Boing Boing.”

  42. reaktivo says:

    in oldschool javascript

    var cs=[66,111,105,110,103];
    var sp=[32,46];

    while(s=sp.shift()) {
    var cn=cs.slice();
    while(c=cn.shift()) document.write(String.fromCharCode(c) + (cn.length == 0 ? String.fromCharCode(s) : “”));
    }

  43. jobair says:

    @ETI: All I got was

    -bash: echo: command not found

  44. David Pescovitz says:

    OMG these are amazing.

  45. Catsidhe says:

    for(<DATA>){s#\#.*##;$:=unpack”u*”,$_;$,=length$:}$|=$.;$#=$:;do
    {$:=$#;foreach($|-$…$,){print substr$:,0,$.,”;sleep$.}print$_?
    ‘.’:’ ‘;sleep$.}foreach($|-$.,$.);print$/;__END__
    %0F]I;F<@#

    I’m learning to hate that filter.

  46. jobair says:

    I see my problem, I forgot the ~ …

  47. GregLondon says:

    use Acme::Bleach;
    print “Boing Boing”;

    Run it and Acme::Bleach converts the rest of the script to encoded whitespace (spaces, tabs, newlines). If you look at the file, all you’ll see is the first line saying use Acme::Bleach, everything else disappears.

    http://www.cpan.org/authors/Damian_Conway/Acme-Bleach-1.12.readme

    Why obfuscate when you can make it disappear

  48. eti says:

    If you actually ran it, you’ve got other problems now. XD

  49. Anonymous says:

    How about the classic use of a TRS-80 to befuddle clueless Radio Shack employees?

    10 ? “boingboing”
    20 GOTO 10

  50. death wears a big hat says:

    in java (looks much better in fixed width):

    class Boing{String[] $$$££ = new String[]{“black people”,”white”+
    ” people”,”puerto ricans”,”samoans”,”gimme a little bit of that”+
    ” bass groove right there”,”mmmrrr mmrrr mrrrmm rrrmmm aw yeah”};
    int $$$$£;int $$£$£=++$$$$£,$£$£$=$$£$£+$$$$£–,£$£$$=$£$£$+$$£$£
    ,££$$$=$£$£$*$£$£$,$£$££=$£$£$+£$£$$,$££$£=(££$$$+$£$£$),£$£$£=((
    $£$£$<<$£$£$))+($$£$£),$£££$=$£$£$*$£$££,££$£$=$$$$£-$$£$£;int []
    £££$$={$$$$£,$£$££,$££$£,(($£$££)),$££$£,$£$££,££$£$,$$$$£,$$£$£,
    $$£$£,$$£$£,$£$££,$£$££,££$£$,$$£$£,££$$$,£$£$$,££$$$,$£$££,$£$£$
    ,((££$£$)),$$£$£,$£$£$,$£$£$,$£$£$,£$£$$,$$$$£,£$£$$,££$$$,$£$£$,
    ££$$$,$£$££,$$£$£,££$£$,$$£$£,$£$£$,$$£$£,£$£$$,££$$$,$$£$£,££$$$
    ,$£$££,$$$$£,££$£$,($$£$£),$£$£$,($$$$£)};int[]£$$££={$£$£$,$££$£
    ,££$$$,$£$££,$£$££,$$£$£};int[][]$$££$;{$$££$=new int[(($££$£))][
    ];for(int $$£££=$$$$£;$$£££<(£$$££.length);$$£££++) {$$££$[£$$$£(
    $$$££[$$£££],$$£££)]=new int[(£$$££[($$£££)])];}}int ££$$£=$$$$£,
    ££$££=$$£$£,£££$£=$£$£$,£$££$=$$$$£,$$£££=$$$$£,£$$$$=$$$$£,£$£££
    =$$$$£,$$$£$=$$$$£;{$$$$$ :for(int £$$££:(£££$$)){if(£$$££==££$£$
    ){$$$£$++;continue $$$$$;}if((£$£££%£$£$$)==££$$£)£$££$=£$$££;if(
    £$£££%£$£$$==££$££)$$£££=£$$££;if(£$£££%£$£$$==£££$£){£$$$$=£$$££
    ;for(int ££$$£=£$££$;££$$£<$$£££;££$$£++){$$££$[(££$$£)][($$$£$)]
    =£$$$$;}}£$£££++;}}Boing(){for(int ££$$$=$$$$£;££$$$<=$$£$£;££$$$
    ++){for(int[]££$££:($$££$)){int £$$££=$$$$£;for(int $$$££:(££$££)
    )£$$££+=(($$£$£<<$$$££));System.out. print((char)£$$££);}}}public
    static void main(String[]$£){new Boing();}public int £$$$£(String
    $££$$,int £$£$$){int $$£££=$££$$.charAt(£$£$$);return( ((($$£££)%
    $£££$)*£$£$£)/$£££$)+((($$£££%$£££$)*£$£$£)%$£££$)-£$£$£+£$£$$;}}

  51. Anonymous says:

    #include
    using namespace std;
    void cc (int* c){if (* (c+*(c+*c
    ))<(*(c+(*(c+*c)**(c+*c)))-(*(c+*
    c)+*c)) ) {char cccc =*(c+*(c+*(c
    +*c)));cout << cccc;(*( c+*(c+*c)
    ))++;cc(c);}else{if (*(c+*(c+*c)+
    *(c+*c)+* (c +*c) )==*c){*(c+*(c+
    *c))=*(c+*(c+*c)+*c)-*c;(*(c+*(c+
    *c)+*(c+*c)+*(c+*c)))++;cc(c);}}}
    int main (){
    int ccc;int* c = &ccc; *c =1; *(c+*(c)) = *(c)+*(
    c);*(c+*(c+*(c))) = *(c+*(c))**(c+*(c)); *(c+*(c+
    *(c ))+*c) = *(c+*(c+*(c)))+*(c+*(c+*(c))); *(c+
    *(c+*(c+*(c)))) = *(c+*(c+*(c)))**(c+*(c+*(c)));*
    (c +*( c+*(c+*(c)))+*c) =*(c+*(c+*(c+*(c))))**(c+
    *(c));*(c+*(c+*(c+*(c)))+*(c+*(c))) =*(c+*(c+*(c+
    *(c)))+*c)**(c+ *(c));*(c+*(c+*(c+*(c))+*c)-*c) =
    *(c+*(c +*(c+*(c)))+*(c+ *(c)))+*(c+*(c));*(c+*(c
    +*(c+*(c)) +*c)) = (*(c+*(c) )**(c+*(c+ *(c+*(c))
    )+*(c+*(c)) ))-(*(c+ *(c+*(c+*(c))))+*c);*(c+*(c+
    *(c+*(c))+*c) +*c) = *(c+*(c+*(c+*(c)))+*c)+*(c+*
    (c +*(c+*(c)))+*(c+*( c)))+*(c+*(c+*(c)))+*(c+*(c
    ))+*c+*(c+*(c));*( c+*(c+*(c+*(c))+*c)+ *(c+* (c
    ))) = (*(c+*(c+*(c+ *(c)) )+*(c+*(c)))**(c+*(c)))
    -(*(c+*(c+*(c+*(c))) )+2);*(c+*(c+*(c+*(c))+*c)+*
    (c+*(c+*(c)))-*c) =*(c+*(c+*(c+* (c)))+ *c)+*(c+*
    (c+*(c+ *(c))) +*(c+*(c)))+*( c+*(c+*(c)))+*(c+*(
    c))+* c;*(c+*(c+*(c+*(c))+*c)+*(c+*(c+*(c)))) = *
    (c+*(c+*(c+*(c)))+*c);*(c+*(c+*( c)))=*(c+*(c+*(c
    ))+ *c)-*c;*(c+*(c+*(c+*c)+*c)-*(c+*c))=*c;cc(c);
    cout <<“\n”;}

  52. strougly says:

    not a show stopper, but still fun (compile w/ gcc bb.c, gives me a warning, but whatever)…

    ugh, variable width kills it, but i’m posting it anyway…

    g(char*t){char*s=t,o[]
    ={92,110,92 ,10,34
    ,59}; write
    (1,&( 4[o]),
    1);while(*s
    )(*s==

    10)?(write
    (1,o ,4),s
    ++): write
    (1,s++,1);

    write(1,&(4 [o]),
    2);} f(char *t){

    char *s=t;
    while(*s
    !=36)
    write
    (1,s++,1

    );g(t);for
    (s++ ;*s;
    s++) write(1,s,1
    );}main(){char t[]=

    “g(char*t){char*s=t,o[]\n\
    ={92,110,92 ,10,34\n\
    ,59}; write\n\
    (1,&( 4[o]),\n\
    1);while(*s\n\
    )(*s==\n\
    \n\
    10)?(write\n\
    (1,o ,4),s\n\
    ++): write\n\
    (1,s++,1);\n\
    \n\
    write(1,&(4 [o]),\n\
    2);} f(char *t){\n\
    \n\
    char *s=t;\n\
    while(*s\n\
    !=36)\n\
    write\n\
    (1,s++,1\n\
    \n\
    );g(t);for\n\
    (s++ ;*s;\n\
    s++) write(1,s,1\n\
    );}main(){char t[]=\n\
    \n\
    $\n\
    \n\
    f(t);}\n\
    “;

    f(t);}

  53. McD says:

    Your wish is my command line – from my username to this blog, in only 1,175,177 steps:

    % perl -le ‘$c=”McD”;for(1..1175177){$c++}print $c x 2′

    Caveats:

    1. Works as shown on a unix-y shell. For a DOS shell, change the single quotes to doubles, and the double quotes to singles.

    2. You’ll need either a recent Perl interpreter or a couple more megs of memory.

    3. 42 characters long. Don’t Panic. That, plus the output aesthetics, is reason enough to sacrifice the two strokes in Perl Golf you’d get by using die() instead of print(). If I lose this contest by two bytes, it’s totally worth it.

    3. Yes, you can get there without the x 2. It takes a few more steps – 14,068,108,783,849 of them. I estimate my machine would take about sixteen hours to count that high, but I’m not sitting around to find out.

  54. mcfarland says:

    Results viewable here. Code:


    <?php
    /*aach*/ $fl=file(__FILE__);
    /*cccb*/ list($d,$p,$f,$r,$m)=array('define','preg','funxexrgs','replace','implode');
    /*fccc*/ $d('L','<');$d('E','=');$d('G','>');$d('N','');$d('R',"\x0d");$d('U','_');
    /*ddbc*/ $p.=U.$r;
    /*bfcg*/ foreach(array('c'.U.'g','t'.U.'a')as $y){
    /*bhcb*/ $f=$p('!x!',$y,$f,1);
    /*fhcc*/ }
    /*cibd*/ foreach($fl as $i=>$l){
    /*akcc*/ if(preg_match('@/\*([a-z]{4})\*/@',$l,$w)){
    /*dkce*/ unset($v);
    /*bncg*/ for($j=0;$j<4;$j++){$v[]=ord($w[1]{$j})-ord('a');}
    /*gtbb*/ $le[]='['.$m(',',$v).']';
    /*bpcb*/ unset($fl[$i]);
    /*bpcb*/ }else{$fl[$i]=$p('@(^.*?//$|^\*\*/|^/\*\*|<'.'\?php|\?>)@',N,$l);}
    /*cqbf*/ }
    /*bseb*/ function e(){global $f,$m;$a=$f();print($m(N,$a));}
    /*csbc*/ function et(){global $f,$m;$a=$f();$v='e(L);e(\''.$m('\',\' ',$a).'\');e(G);e(R);';eval($v);}
    /*dtbb*/ function te(){global $f,$m;$a=$f();$a[0]='/'.$a[0];$v='e(L);e(\''.$m('\',\' ',$a).'\');e(G);e(R);';eval($v);}
    /*cucf*/ function at(){global $f,$m;$a=$f();return($a[0].E."\"${a[1]}\"");}
    /*fsbc*/ eval($m(R,$fl));
    /**
    et('?xml',at('version','1.0'),at('encoding','UTF-8'),'?');
    et('!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"');
    et('html',at('xmlns','http://www.w3.org/1999/xhtml'),at('xml:lang','en'),at('lang','en'));
    et('head');
    et('title');
    e('bb');
    te('title');
    et('style',at('type','text/css'));
    e('.bb{position:absolute;background-color:red;}'.R);
    te('style');
    te('head');
    et('body');
    et('script',at('type','text/javascript'));
    e('var a=['.$m(',',$le).'];');
    e('
    for(i in a){
    document.write(\'<div class="bb" style="top:\'+(45+a[i][0])+\'%;left:\'+(27+a[i][1])+\'%;width:\'+a[i][2]+\'%;height:\'+a[i][3]+\'%">&nbsp;</div>\');
    document.write(\'<div class="bb" style="top:\'+(45+a[i][0])+\'%;left:\'+(50+a[i][1])+\'%;width:\'+a[i][2]+\'%;height:\'+a[i][3]+\'%">&nbsp;</div>\');
    }
    ');
    te('script');
    te('body');
    et('html');
    **/
    ?>

  55. jpt says:

    eval(”.join([chr(sum([39, 0, 7, 60, 5, -6, 5, -70, 51, 8, 5, 10, -74, 75, 2,
    -8, -69, 51, -37, 0, -10, -12, 20, 1, -9, -12, 13, 9,
    -10, -12, 21, -9, -12, 13, 10, -11, -12, 13, 10, -6, -5,
    -12, 19, 1, -8, -12, 20, 1, -9, -12, 13, 9, -10, -12, 21,
    -9, -12, 13, 10, -11, -12, 13, 10, -7, 45, -2, -43, 10,
    52, -67, 6, 44, -52, 0, -9, 70, 9, 3, -82, 78, -78, 73,
    5, -78, 88, -6, -17, 13, -7, -2, -61, 9, 1, -9, 52,
    -52][0:n+1])) for n in xrange(96)]))

    can be a bit hard to write obfuscated python one-liners, so i had to make python that writes itself

  56. excelsior84 says:

    The effect of the Befunge program below is totally lost thanks to the comment field ignoring my pleadings for a fixed width font.

    2>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>v
    v<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                                                                                    
    >235v    >><<   v  >     v   >>>v     >*,3v    >><<   v  >     v   >>>v    || ||
    ,    v  v    <  v  7     *  <    v    2    v  v    <  v  4     -  <    v   || ||
    ^    <  >    *  v  5 >   * v          ^    <  >    5  v  * >   0 v         :: ::
    >12#v   v    3  *  3  <  , v          >2*#v   v    0  +  *  <  5 v         :: ::
    ,    ^  2    3  +  ,   > 2 v   >>6+   *    ^  +    ,  g  5   > 5 v   >1-:  || ||
    *    ^  >    ^  3  *    <5  >   ^     5    ^  >    ^  ,  5    <+  >   ^         
    ^*+6<    >><<   >  ^     >   >5^      ^*52<    >><<   >  ^     >   >p^     @@ @@
     …………………………………………………………………….

  57. Anonymous says:

    For 28… the angle brackets around DATA are the wrong way around, and the uuencoded text on the last line should be “%0F]I;F<@#”

    E-mail address redacted, but saved.

  58. HeartlessMachine says:

    10 PRINT “Boing Boing”

    20 GOTO 10

  59. Aubrey says:

    in our beloved javascript:

    alert( function() { x=””;
      unicorns = [66, 79, 73, 78, 71, 32, 66, 79, 73, 78, 71];
      for (i in “U N I C O R N c h a s e r”.split(” “))
        if (i < unicorns.length) x+=String.fromCharCode(unicorns[i]);
      return x;
    }() );

    http://particularplace.com/obf.html

  60. Andrew Pendleton says:

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
    <html>
    <head>
    <title>All JS, no images</title>
    <script language=”javascript” src=”http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js”></script>
    <script language=”javascript”>
    var l=[[0,4,[[2,0,4,2],[2,3,3,5]]],[1,4,[[2,2,3,5]]],[0,2,[[0,2,2,3]]],[1,4,[[2,2,3,7]]],[1,4,[[1,2,2,3],[0,4,2,5],[1,5,2,6]]]],x=0,f=15,D=’<div>’,R=’relative’,A=’absolute’,B=’red’,W=’white’;
    l=l.concat(l);
    $(function() {
    var m=$(D).css({position:R,top:f,left:f}).appendTo($(“body”)),v;
    var z=setInterval(function() {
    if (!(v=l.shift())) return clearInterval(z);
    var a=$(D).css({position:A,left:x}).appendTo(m).hide().append(b=$(D).css(‘position’,R).append($(D).css({position:A,background:B,top:f*v[0],width:f*v[1],height:f*(7-v[0])}))), d, y=0;
    while (d=v[2][y++]) $(D).css({position:A,background:W,top:f*d[1],left:f*d[0],height:f*(d[3]-d[1]),width:f*(d[2]-d[0])}).appendTo(b);
    a.fadeIn(250);
    x+=f*(v[1]+1);
    },100);
    });
    </script>
    </head>
    <body>
    </body>
    </html>

  61. Phil Ronan says:

    < ?php
    $e='str_repeat(';$s=array('/(\d)(.)/e'=>“$e’\\2′,\\1)”,’/([FPN])/e’=>
    “$e’ ‘,ord(\”\\1\”)&31)”,’/a/’=>’+-c’,’/b/’=>’| ‘,’/c/’=>’+ ‘,’/:/’=>
    “\n”);$r=”cFc:b:aacaa:9b:aa3ca:Pb:Na”;$p=’pre>’;foreach($s as $a=>$b)
    $r=preg_replace($a,$b,$r);$m=explode(“\n”,$r);echo “< $p";$i=1;foreach
    ($m as $n)eval("echo {$e}str_pad(\$n,19),2).\$m[0][\$i++%5].\"\n\";")
    ;echo " ?>

  62. mdh says:

    TEF, you’re my turtle hero.

  63. mcfarland says:

    One for the hoboes:

    bash$ grep ‘hobo’ /usr/share/dict/words|sed ‘s/ho//g’|grep i|tee -

  64. Phil Ronan says:

    I’ll try that again…

    <?php
    $e='str_repeat(';$s=array('/(\d)(.)/e'=>"$e'\\2',\\1)",'/([FPN])/e'=>
    "$e' ',ord(\"\\1\")&31)",'/a/'=>'+-c','/b/'=>'| ','/c/'=>'+ ','/:/'=>
    "\n");$r="cFc:b:aacaa:9b:aa3ca:Pb:Na";$p='pre>';foreach($s as $a=>$b)
    $r=preg_replace($a,$b,$r);$m=explode("\n",$r);echo "<$p";$i=1;foreach
    ($m as $n)eval("echo {$e}str_pad(\$n,19),2).\$m[0][\$i++%5].\"\n\";")
    ;echo "</$p\n";
    ?>
  65. plasma2002 says:

    Classic obfuscation.

    < ?php eval(base64_decode('ZWNobyJCb2luZyBCb2luZyI7'));?>

    or just in case those tags screw up…..

    <?php eval(base64_decode(‘ZWNobyJCb2luZyBCb2luZyI7′));?>

    :)

  66. ryan873 says:

    Requires some wetware to execute:

    - …

    ..
    -.
    –.
    - …

    ..
    -.
    –.

  67. Anonymous says:

    In Java

    /**
    * @author karakfa
    * 20081112
    */
    public class BoingBoing {
     static int i, j;

     // look Ma, no numbers!!!
     public static void main(String[] args) {
      int p[] = new int[p(i) * p(i) * p(j)];
      p[p(p(j) + j)] = p(i) * (p(i) * p(p(j) + j) + j);
      p[p(i) * p(j)] = p[i] = p(i) * p(j) * p(p(j) + j);
      p[p(p(j))] = p[p(i) - j] = p(i) * p(p(i)) * p(p(j) + j) + j;
      p[p(j) + p(p(i))] = p[p(i)] = p(j) * p(p(j)) * p(p(i));
      p[p(p(j)) + p(i)] = p[p(j)] = p(i) * p(p(i)) * p(p(j) + j);
      p[p(p(j) + j) - j] = p[p(j) + j] = p(j) * p(p(j)) * p(p(i)) – p(i);
      p[p(p(i))] = p(j) * p(p(j) + j) – j;
      p(p);
     }

     static int p(int p) {
      return p == i ? p(i – ((i == j) ? ++j : j)) :
          p < i ? j + j :
            p(- j) * (p(p – j) – (p – j) / p(- j)) – j;
     }

     static void p(int[] p) {
      for (int c : p) System.out.print((char) c);
     }
    }

  68. poweld says:

    /*C, natch…*/

    #include <iostream>

    int main()
    {
    printf(“%c%c%c%c%c%c%c%c%c%c%c”,
    ((0×0^13^0×00000)&0xFF)+0×35,
    ((0×000^’ò’^0×00)&0xFF)-0×83,
    ((0×000000|0×000)&0xFF)+0×69,
    ((0×00000^’ñ’^00)&0xFF)-0×83,
    ((0×0000000^6^00)&0xFF)+0×61,
    ((0×0000000^13^0)&0xFF)+0xF2,
    ((0×00000^’ò’^00)&0xFF)-0xB0,
    ((0×00000|0×0000)&0xFF)+0x6F,
    ((0×00^’ñ’^0×000)&0xFF)-0×88,
    ((0×0^6^0×000000)&0xFF)+0×68,
    ((0×4^’£’|’Æ’’^30)&0xFF)+0xA8
    );
    return 0;
    }

  69. aparrish says:

    It’s not so much obfuscated as compact, but here’s complete genetic algorithm (with mutation and crossover) in under 400 bytes of Perl code:

    $ perl -le
    ‘sub u{rand(9)<1?@_:map{($_+rand(3)-1)%53}@_}sub c{map{$_[rand 2][$_]}(0..10)}sub f{$s=0;$s+=abs((28,15,9,14,7,0,28,15,9,14,7)[$_]-($_[0]->[$_]))for 0..10;$s}push@p,[map{int rand 53}0..10]for 0..99;{@s=sort{f($a)<=>f($b)}@p;print join””,map{(” “,a..z,A..Z)[$_]}@{$s[0]};!f($s[0])&&last;@o=@p=();push@o,$s[$_*$_/400]for 0..99;push@p,[u(c($o[rand@o],$o[rand@o]))]for 0..99;redo}’

  70. mepex says:

    #!/usr/bin/perl
    @_=(32,8,90,5,32,9,90,1,32,17,90,5,32,9,90,1,10,1,32,8,90,1,32,4,90,1,
    32,3,90,2,32,5,90,1,32,1,90,2,32,3,90,4,32,5,90,1,32,4,90,1,32,3,90,2,
    32,5,90,1,32,1,90,2,32,3,90,4,10,1,32,8,90,5,32,3,90,1,32,2,90,1,32,2,
    90,1,32,1,90,2,32,2,90,1,32,1,90,1,32,3,90,1,32,5,90,5,32,3,90,1,32,2,
    90,1,32,2,90,1,32,1,90,2,32,2,90,1,32,1,90,1,32,3,90,1,10,1,32,8,90,1,
    32,4,90,1,32,1,90,1,32,4,90,1,32,1,90,1,32,1,90,1,32,3,90,1,32,1,90,1,
    32,3,90,1,32,5,90,1,32,4,90,1,32,1,90,1,32,4,90,1,32,1,90,1,32,1,90,1,
    32,3,90,1,32,1,90,1,32,3,90,1,10,1,32,8,90,5,79,1,32,2,90,4,32,2,90,1,
    32,1,90,1,32,3,90,1,32,2,90,4,32,5,90,5,32,3,90,4,32,2,90,1,32,1,90,1,
    32,3,90,1,32,2,90,4,10,1,32,34,90,1,32,31,90,1,10,1,32,32,90,2,32,30,
    90,2,10,1);$c=0;foreach(@_){if($c++ %2){print chr($_[$c-2])x$_;}}

  71. rpenner says:

    Done with evil helpful comments.

    #!/usr/bin/perl
    use warnings; # We wouldn’t want do do anything wrong
    use strict; # Enforces good coding style.
    @_=qw/[ PERL larry wall aeiou GNU richard stallman tcp ip ]/;
    print map{my(@a)= getprotobyname $_[-3];my(%a)=map{pop @a;
    unshift @a,$_;($a[-3],[@a[1..2]])}split(m##,$_[-7]);$\=$_[0]^$a[0].$/;
    $,=join(substr($a[0],1),map{$a{$_}?(@{$a{$_}}):$_;}reverse(
    split(qr!!,lc($_[-6]))));map{($_ gt$_[2])?chr(11*2*3):$_ gt$_[3]}@a;}$_;

  72. ryan873 says:

    Requires some faulty wetware to execute:

    LAGOS, NIGERIA.

    ATTENTION: THE PRESIDENT/CEO

    DEAR SIR,

    CONFIDENTIAL BUSINESS PROPOSAL

    HAVING CONSULTED WITH MY COLLEAGUES AND BASED ON THE INFORMATION GATHERED FROM THE NIGERIAN CHAMBERS OF COMMERCE AND INDUSTRY, I HAVE THE PRIVILEGE TO REQUEST FOR YOUR ASSISTANCE TO TRANSFER THE SUM OF $47,500,000.00 (FORTY SEVEN MILLION, FIVE HUNDRED THOUSAND UNITED STATES DOLLARS) INTO YOUR ACCOUNTS. THE ABOVE SUM RESULTED FROM AN OVER-INVOICED CONTRACT, EXECUTED COMMISSIONED AND PAID FOR ABOUT FIVE YEARS (5) AGO BY A FOREIGN CONTRACTOR. THIS ACTION WAS HOWEVER INTENTIONAL AND SINCE THEN THE FUND HAS BEEN IN A SUSPENSE ACCOUNT AT THE CENTRAL BANK OF NIGERIA APEX BANK.

    WE ARE NOW READY TO TRANSFER THE FUND OVERSEAS AND THAT IS WHERE YOU COME IN. IT IS IMPORTANT TO INFORM YOU THAT AS CIVIL SERVANTS, WE ARE FORBIDDEN TO OPERATE A FOREIGN ACCOUNT; THAT IS WHY WE REQUIRE YOUR ASSISTANCE. THE TOTAL SUM WILL BE SHARED AS FOLLOWS: 70% FOR US, 25% FOR YOU AND 5% FOR LOCAL AND INTERNATIONAL EXPENSES INCIDENT TO THE TRANSFER.

    THE TRANSFER IS RISK FREE ON BOTH SIDES. I AM AN ACCOUNTANT WITH THE NIGERIAN NATIONAL PETROLEUM CORPORATION (NNPC). IF YOU FIND THIS PROPOSAL ACCEPTABLE, WE SHALL REQUIRE THE FOLLOWING DOCUMENTS:

    (A) YOUR BANKER’S NAME, TELEPHONE, ACCOUNT AND FAX NUMBERS.

    (B) YOUR PRIVATE TELEPHONE AND FAX NUMBERS — FOR CONFIDENTIALITY AND EASY COMMUNICATION.

    (C) YOUR LETTER-HEADED PAPER STAMPED AND SIGNED CONTAINING THE TEXT “BOING BOING.”

    ALTERNATIVELY WE WILL FURNISH YOU WITH A BREAKDOWN EXPLAINING, COMPREHENSIVELY WHAT WE REQUIRE OF YOU. THE BUSINESS WILL TAKE US THIRTY (30) WORKING DAYS TO ACCOMPLISH.

    PLEASE REPLY URGENTLY.

    BEST REGARDS

  73. charmless says:

    in javascript:

    var b=      new Array(      34,         45,-6,5,     -7,-71, 34,45,-6,5,   
    -7,         -103,                       32, 12,       11);
    function    WTF   (bo,      ing)        {            return      String.fromCharCode(
    bo       )                  ;           }            function            taser( 
    steampunk,  papercraft         ){       return       papercraft          >0?xeni(
    steampunk, papercraft):     WTF(        steampunk    + b[                12]);}
    function    xeni(           animation,  hacks){var   unicorn             = 
    taser(      b[--hacks       ],hacks);   return       unicorn +    WTF(animation + 
    unicorn.charCodeAt          (           unicorn.length - 1)      );}
    document.body.innerText=    taser(      b[12],12);

  74. nprnncbl says:

    #!/usr/bin/perl
    $search = “wonderfully obfuscated code snippet that prints out the phrase”;
    $page = `wget –quiet –output-document=- –user-agent=”” \’http://www.google.com/search?q=”$search”‘`;
    $page =~ /$search< \/em> \&quot\;(\w+ \w+)\.\&quot\;/;
    print “$1\n”;

  75. ShapeReality says:

    @54, Flyne. “No one writing directly to VRAM? Aw…”

    Here’s a 31 byte program that writes “Boing Boing” to VRAM (DOS VGA B800:0).

    b900b88ec131ffb002be1901b90600a447e2fcfec875f2cd20426f696e6720

    1) Tested via “dosbox” as packaged in Debian (lenny).

    2) You may need to “cls” before running, since it writes to top of screen which will scrolls off after “it.com” is run if you were already at the bottom.

    3) To run it.. redirect the binary output of perl below to “it.com” then use “dosbox” or other emulator to run “it.com”

    #!/usr/bin/perl -w
    print pack(“H*”,’b900b88ec131ffb002be1901b90600a447e2fcfec875f2cd20426f696e6720′);

    4) Alternatively here’s the source, compile via “nasm” (as distributed in Debian lenny)

    BITS 16
    ORG 100h
    mov cx,0xb800
    mov es,cx
    xor di,di
    mov al,2
    top:
    mov si,data
    mov cx,6
    inner:
    movsb
    inc di
    loop inner
    dec al
    jnz top
    int 20h
    data: db ‘Boing ‘

    Same byte count as letting OS do the write (mov dx,data;mov ah,9;int 21h;int 20h;data db ‘Boing Boing$’), but then it wouldn’t be writing to vram.

    It could be 1 byte shorter without the top loop, but explicitly storing the entire string is just against the spirit of obfuscation. Well this is more obscure than obfuscated. I think I need to get some new books. :)

  76. nprnncbl says:

    #!/usr/bin/perl
    $search = “wonderfully obfuscated code snippet that prints out the phrase”;
    $page = `wget –quiet –output-document=- –user-agent=”” \’http://www.google.com/search?q=”$search”‘`;
    $page =~ /<em>$search<\/em> \&quot\;(\w+ \w+)\.\&quot\;/;
    print “$1\n”;

  77. ShapeReality says:

    @Bumper314: Wow! Amazing perl. You should win hands down, but if the judges want to be sticklers then your output is missing the terminal period.

    Here’s a much more straightforward version.

    @,=split//,”.\n”;$,=sub{print$_[0].$,[$.++]},s,(?{$\,->(Boing)}),$\,->(”),e;

  78. Dave Parker says:

    A bit of C++ for you

    #include
    void p(int i, int j) { if ((i+j) == 0) return; std::cout << (char)((3 -j)*32 + i%16); p(i/16, 0); }
    int main(int argc, char** argv) { p(518642, 1); p(0, 2); p(518642, 1); p(10, 3); }

  79. nprnncbl says:

    Sorry for the duplicate posting, but there is a bug in the comments submission: &lt is converted to < in the text box, so that if you submit something that says

    &lt;em&gt;

    it is rewritten to

    <em>

    upon preview, which on posting then actually renders as html.

    So to submit this comment, I’m avoiding the preview function entirely. I’ll keep my fingers crossed that I’ve done the right amount of quoting.

  80. SubFuze says:

    The following is my javascript entry. You can view it in action at http://subliminalfusion.com/bb_obf.html

    function Post(z){return z.length;}
    Mark=”I’m a writer and illustrator living in Los Angeles & co-founded BB”.length;
    Cory=”Craphound”.length * “Linux”.length;
    David=”http://www.pesco.net”.lastIndexOf(‘.’) – “Collector of anomalies, esoterica, and curiosities.”.indexOf(‘,’);
    Xeni=”/SHEH-nee zhar-DAN/”.indexOf(‘-’);
    John=”Band Leader”.lastIndexOf(‘a’)*-1;
    directory=Post(“wonderful”)-((Post(“boring”)-Post(“monotonous”)-Post(“tedious”)-Post(“irksome”)-Post(“tiresome”)-Post(“humdrum”)-Post(“prosaic”))*-2);
    wonderful=Post(“LOL cats”)+Post(“Gadgets”)+Post(“Space”)+Post(“gross!”)+Post(“Unicorns”);
    things=Cory+David+Xeni+1;
    a=[Mark,Cory,David,Xeni,John,directory,wonderful,things];
    b=x=a[1]-a[a.length-1];
    s=String.fromCharCode;
    t=s(a[b]);
    while(x6)?x=b=1:(x>3&&b)?x=a[4]*-1:x=x;
    }
    t+=s(a[1]+a.length+a[4]);
    document.write(t);

  81. nprnncbl says:

    #!/usr/bin/perl
    $search = “wonderfully obfuscated code snippet that prints out the phrase”;
    $page = `wget –quiet –output-document=- –user-agent=”” \’http://www.google.com/search?q=”$search”‘`;
    $page =~ /<em>$search<\/em> \&quot\;(\w+ \w+)\.\&quot\;/;
    print “$1\n”;

  82. Dave Parker says:

    Try again in html

    #include
    void p(int i, int j) {
    if ((i+j) == 0) return; std::cout << (char)((3 -j)*32 + i%16);
    p(i/16, 0); }
    int main(int argc,
    char** argv) { p(518642, 1); p(0, 2); p(518642, 1); p(10, 3); }

  83. tef says:

    Here is some logo :)

    to AA :A pu rt 90 fw :A/2 +10 lt 90 pd end
    to AAA :A :AAAAAA repeat 2 [ fw :A rt 90 fw :AAAAAA rt 90] end
    to AAAAAA :A AAA :A/2 :A/2 fw :A bw :A AA :A end
    to AAAA :A AAA :A/3*2 :A/2 AA :A*6/5 end
    to AAAAA fw :A/2 pu fw :A/3 pd fw :A/6 pu bw :A AA :A/6 end
    to AAAAAAA :A fw :A/3*2 rt 90 fw :A/3 rt 90 fw :A/3*2 lt 180 AA :A/6 end
    to AAAAAAAA :A rt 90 fw :A/2 bw :A/2 lt 90 fw :A/4 pu fw :A/4 pd AAA :A/2 :A/2 rt 90 fw :A/2 lt 90 bw :A/2 AA :A/5 end
    to AAAAAAAAAAAA :A repeat 2[AAAAAA:A AAAA:A AAAAA:A AAAAAAA:A AAAAAAAA:A] end
    reset setxy 30 50 make “A 80 penwidth 7 make “AA 90 repeat 5 [setxy 30 :AA color [255 *:AA / 490 0 255-(255 *:AA / 490)] AAAAAAAAAAAA :A make “AA :AA + 100]

    Here it is in a Logo Interpreter:

    http://logo.twentygototen.org/RCMSbs15

  84. ShapeReality says:

    D’oh, the space was eaten by gremlins. This time with an &nbsp;.

    @,=split//,” .\n”;$,=sub{print$_[0].$,[$.++]},s,(?{$\,->(Boing)}),$\,->(”),e;

  85. Dave Parker says:

    Third time luck?

    #include <iostream>
    void p(int i, int j) {
    if ((i+j) == 0) return; std::cout << (char)((3 -j)*32 + i%16);
    p(i/16, 0); }
    int main(int argc,
    char** argv) { p(518642, 1); p(0, 2); p(518642, 1); p(10, 3); }

  86. TomHung says:

    [-]>[-]<>++++++[< +++++++++++>-]< .
    >+++++[< +++++++++>-]< .
    ------.
    +++++.
    -------.
    >+++++++[< ---------->-]< -.
    >+++++[< +++++++>-]< -.
    >+++++[< +++++++++>-]< .
    ------.
    +++++.
    -------.

    http://en.wikipedia.org/wiki/Brainfuck

  87. Scriptar says:

    <style type=”text/css”>
    #bb{border:none;}#bb td{width:20px;height:4px;}
    #bb .f{background-color:#F00;}#bb .b{background-color:#FFF;}
    </style>
    <script type=”text/javascript”>
    var i,j,r=/(\d+)(b|f)/,a=[],h=[],
    b=[0157,01113,01473,01413,0233,0457,073,077,0453,02513,02573],
    o=[[0,1,0,2,0,1,0,3],[0,1,0,2,0,1,0,3],[0,1,0,2,0,1,0,3],[0,4,
    5,6,0,6,5,6,5,6,0,4,5,6,0,6,5,6,5],[0,4,5,6,0,6,5,6,5,6,0,4,5,
    6,0,6,5,6,5],[0,4,5,6,0,6,5,6,5,6,0,4,5,6,0,6,5,6,5],[5,6,0,6,
    7,8,0,6,7,6,5,6,5,6,0,6,7,8,0,6,7,6,5],[5,6,0,6,7,8,0,6,7,6,5,
    6,5,6,0,6,7,8,0,6,7,6,5],[5,6,0,6,7,8,0,6,7,6,5,6,5,6,0,6,7,8,
    0,6,7,6,5],[0,6,7,6,0,6,7,6,0,6,0,6,7,6,7,6,0,6,0,6,7,6,0,6,7,
    6,0,6,0,6,7,6,7,6,0],[0,6,7,6,0,6,7,6,0,6,0,6,7,6,7,6,0,6,0,6,
    7,6,0,6,7,6,0,6,0,6,7,6,7,6,0],[0,6,7,6,0,6,7,6,0,6,0,6,7,6,7,
    6,0,6,0,6,7,6,0,6,7,6,0,6,0,6,7,6,7,6,0],[0,6,7,6,0,6,7,6,0,6,
    0,6,7,6,5,6,0,6,7,6,0,6,7,6,0,6,0,6,7,6,5],[0,6,7,6,0,6,7,6,0,
    6,0,6,7,6,5,6,0,6,7,6,0,6,7,6,0,6,0,6,7,6,5],[0,6,7,6,0,6,7,6,
    0,6,0,6,7,6,5,6,0,6,7,6,0,6,7,6,0,6,0,6,7,6,5],[5,6,5,6,0,6,0,
    6,7,4,0,6,5,6,5,6,0,6,0,6,7,4,0],[5,6,5,6,0,6,0,6,7,4,0,6,5,6,
    5,6,0,6,0,6,7,4,0],[5,6,5,6,0,6,0,6,7,4,0,6,5,6,5,6,0,6,0,6,7,
    4,0],[5,6,5,6,0,6,0,6,7,6,7,6,0,6,5,6,5,6,0,6,0,6,7,6,7,6,0],[
    5,6,5,6,0,6,0,6,7,6,7,6,0,6,5,6,5,6,0,6,0,6,7,6,7,6,0],[5,6,5,
    6,0,6,0,6,7,6,7,6,0,6,5,6,5,6,0,6,0,6,7,6,7,6,0],[9,5,10,5],[9,
    5,10,5],[9,5,10,5]];for(i=0;i<o.length;i++){h.push(“<tr>”);
    for(j=0;j<o[i].length;j++){a=r.exec(b[o[i][j]].toString(16));
    h.push(“<td colspan=’”+a[1]+”‘ class=’”+a[2]+”‘></td>”);}
    h.push(“</tr>”);}document.write(“<table id=’bb’ cellspacing=0″+
    ” cellpadding=0>”+h.join(“”)+”</table>”);
    </script>

  88. kimvais says:

    Python, based on number 2.

    _2 = ['2'*(2*2+2),[-2,2*2*2+2+2/2,2*2+2/2,2*2*2+2,2*2-2/2,-2**(2+2+2)-2*2],”]*2
    print (_2[2].join([(eval("\'\%s\'" % str(hex(ord(_2[2*2-2/2])*2+_2[2*2]))[2/2:])) for _2[2*2-2/2],_2[2*2] in zip(_2[2-2],_2[2/2])]).title()*2).strip()

  89. Urcher Vlastom says:

    #!/usr/bin/perl
    srand(140982327);
    $bacon = “”;
    for ($i = 5;$i>0;–$i) {$bacon .= chr(rand(46)+66)}
    $lard = 0;
    $eggs = ” “;
    $beans = “.\n”;
    do {
    $grease = rand(140982328);
    print $bacon;
    if ($lard % 2 == $grease % 2) {
    print $eggs;
    } else {
    print $beans;
    }
    } while ($lard++ % 2 == $grease % 2)

    I don’t know the details of perls pRNG so this might not be cross platform. It functions on Fedora at work and on Ubuntu at home, so there is some hope. Finding the right seed took an auxiliary program an hour. If I had tried for the entire string it probably would have taken more than 24 hours.

  90. sardonicbastard says:

    #!/usr/bin/perl
    sub b{my $s,$f=5,$c=13*$f+1;for((0,$f*9,-6,$f,-7)){$s.=chr($c+=$_);}$s;}print join(‘ ‘,(b(),b()));

  91. Sam says:

     
     
     
     
     
      
     
     
     
     
      
     
     
     
     
      
     
     
     
     
      
     
     
     
     
      
     
     
     
     
      
     
     
     
     
      
     
     
     
     
      
     
     
     
     
      
     
     
     
     
      
     
     
     
     
      
     
     
     
     
     
    (http://en.wikipedia.org/wiki/Whitespace_(programming_language))

  92. mhlaxp says:

    Bah, I’ve just now noticed the majority of my code got filtered away. Bummer.

  93. Kieran O'Neill says:

    Lol – a lot of Perl entries here. Says something, maybe?

  94. Sam says:

    HAI
    CAN HAS STDIO?
    VISIBLE “Boing Boing”
    KTHXBYE

    (lolcode)

  95. dargaud says:

    As usual, looking at those samples, Perl wins hands down for everything related to obfuscation. I’m not sure even Brainf*k is a match !

  96. bumper314 says:

    “”=~(‘(?{‘.(‘/)).]`’^’_[@@)@’).’”‘.(‘”/).<`”/).<}’^’`@@@[@`@@@[_’).’,$/})’)

  97. Jack Crosby says:

    #!/usr/bin/ruby
    moo = [0, 66, 45, -6, 5, -7, -71, 0]
    for i in 0..1
        for x in i…moo.length
          x=moo.length if x==i;
          moo[i] += moo[x] unless !moo[x+1]
          moo[moo.length-1] = moo[moo.length-1].to_s + moo[i].chr
        end
    end
    puts moo[moo.length-1].to_s.strip.sub(/[0-9 ]/, ”).squeeze(” “)

  98. risser says:

    Java:
    System.out.println((_c_=””+(c_=’ ‘+’”‘)+(_=(char)(‘-’+c_))+(char)(c_–+’\”)+–_+(((_c=’=’-’+’)==_c++)?(char)(–c_+’:’-_c):(char)(++_c-’?’+–_)))+(_=(char)(c_-’ ‘))+_c_+(char)(++c_-_c));

Leave a Reply