smaller f00f.c

Bryce bryce at digicash.com
Fri Nov 14 13:31:07 PST 1997




> > > main(i){int(*f)()=&i;i=0xc8c70ff0;f();}
> > > main(i){i=0xc8c70ff0;((int(*)())&i)();}
> > > (*f)();main(i){f=&i;i=0xc8c70ff0;f();}
> > > (*f)()="\360\017\307\310";main(){f();}       /* 38 chars */
> 
> > How about:
> > 
> > long main[]={0xc8c70ff0};
> > 
> > or even
> > 
> > main[]={0xc8c70ff0}; /* 21 chars */
> > 
> > Compiles with gcc, but I haven't tested it.
> 
> No need for an array, so my entry is:
> 
> int main=0xc8c70ff0; /* 20 chars */


On a DOS box, no need to compile.  Cut-n-paste the magic words
into a file.  Name the file "foof.com".  Run it.


4 bytes.  I win.  :-)


Bryce

P.S.  Not original with me.  Attribution lost in the mists of 
comp.sys.intel.







More information about the cypherpunks-legacy mailing list