Obfuscated C...

The Loony Bin ( loonies@bloodaxe.demon.co.uk )
Sun, 28 Apr 1996 03:04:17 +0100


Hiya People...

Sorry non-comp folks...this one is only the first of a whole stack of
computing chaos...some may be comprehensible to some of you, but I'm not
going to guarantee it...

C programmers...read this and weep...

Wishes & Dreams...

- ANDREA
        xx
-- 
************<andrea@bloodaxe.demon.co.uk>************
******************<ajc6@ukc.ac.uk>*******************
***                                               ***
***                THE LOONY BIN                  ***
***          loonies@bloodaxe.demon.co.uk         ***
***                                               ***
******************Internet Goddess*******************
*********************ANDROMEDA***********************

  ------- Forwarded message follows -------

/* Best Layout winner of  
        "The Seventh International Obfuscated C Code Contest"
   by Merlyn LeRoy <...uunet!rosevax!jhereg!quest!digibd!merlyn> */

/*------------------------ westley.c ------------------------------*/

char*lie;

        double time, me= !0XFACE,

        not; int rested,   get, out;

        main(ly, die) char ly, **die ;{

            signed char lotte,


dear; (char)lotte--;

        for(get= !me;; not){

        1 -  out & out ;lie;{

        char lotte, my= dear,

        **let= !!me *!not+ ++die;

            (char*)(lie=


"The gloves are OFF this time, I detest you, snot\n\0sed GEEK!");

        do {not= *lie++ & 0xF00L* !me;

        #define love (char*)lie -

        love 1s *!(not= atoi(let

        [get -me?

            (char)lotte-


(char)lotte: my- *love -
        
        'I'  -  *love -  'U' -

        'I'  -  (long)  - 4 - 'U' ])- !!
        
        (time  =out=  'a'));} while( my - dear

        && 'I'-1l  -get-  'a'); break;}}

            (char)*lie++;


(char)*lie++, (char)*lie++; hell:0, (char)*lie;

        get *out* (short)ly   -0-'R'-  get- 'a'^rested;

        do {auto*eroticism,

        that; puts(*( out

            - 'c'
        
-('P'-'S') +die+ -2 ));}while(!"you're at it");


for (*((char*)&lotte)^=

        (char)lotte; (love ly) [(char)++lotte+

        !!0xBABE];){ if ('I' -lie[ 2 +(char)lotte]){ 'I'-1l ***die; }

        else{ if ('I' * get *out* ('I'-1l **die[ 2 ])) *((char*)&lotte) -=

        '4' - ('I'-1l); not; for(get=!


get; !out; (char)*lie  &  0xD0- !not) return!!

        (char)lotte;}


(char)lotte;

        do{ not* putchar(lie [out

        *!not* !!me +(char)lotte]);

        not; for(;!'a';);}while(

            love (char*)lie);{


register this; switch( (char)lie

        [(char)lotte] -1s *!out) {

        char*les, get= 0xFF, my; case' ':

        *((char*)&lotte) += 15; !not +(char)*lie*'s';

        this +1s+ not; default: 0xF +(char*)lie;}}}

        get - !out;

        if (not--)

        goto hell;

            exit( (char)lotte);}



/*------------------------- westley.hint ------------------------*/

/*
Best Layout: <...uunet!rosevax!jhereg!quest!digibd!merlyn> Merlyn LeRoy

        Brian Westley (Merlyn LeRoy on usenet)
        DigiBoard, Inc.
        1026 Blair Ave.
        St. Paul, MN  55104  
        USA

Judges' comments:

    usage: westley <number>

    If you would rather "Daisy" someone other than Westley, rename 
    the program as needed.  :-)

    Read each block of code as if it were a piece of correspondence.
    For example, the first block of code would read:

        charlie,
                doubletime me, OXFACE!
                not interested, get out
                mainly die, charly, *die*
                        signed charlotte

    The original source had control-L's after each code block.  To 
    make it easier on news readers, we converted each control-L to 
    a blank line.

    Some ANSI compilers will not accept '1s' as a short integer - for
    these compilers replace the '1s' with '1'.


Selected notes from the author:

    This is a "Picking the Daisy" simulation.  Now, instead of mangling a 
    daisy, simply run this program with the number of petals desired as 
    the argument.
    
    This is a good counter-example to peoples' complaints that C doesn't
    have an "English-like" syntax.
    
    Lint complains about everything - null effect, xxx may be used before
    set, statement not reached, return(e) and return.  Lint dumps core
    on some systems.  My personal favorite lint complaint is
    
        "warning: eroticism unused in function main".
    
    Also obviously, (char)lotte and (char*)lie are incompatible types...
*/