The International Obfuscated C Code Contest

Few years ago I ended up in scanning amazing C code released at the

The International Obfuscated C Code Contest (http://www.ioccc.org/)

What’s IOCCC?

  • To write the most Obscure/Obfuscated C program within the rules.
  • To show the importance of programming style, in an ironic way.
  • To stress C compilers with unusual code.
  • To illustrate some of the subtleties of the C language.
  • To provide a safe forum for poor C code. :-)

One of my favorite categories is multi-language code. The following code is valid for 5 different languages: C, Fortran, Perl, /bin/sh, x86 Assembly. FromĀ http://www.kernelthread.com/projects/obfuscation/lang5/:

C=0;/* 2>/dev/null;echo " Hello, World!";exit;
COMMENT Z
*0:;*/main(){/*
print*,'Hello, World!'
end
#define # C
#! perl
C: print " Hello, World!\n";
C: __END__; Z
CD segment para 'code'
C1:assume CS:CD,DS:CD,SS:CD,ES:CD
C2:org 100H
C3:jmp C5
C4 DB ' Hello, World!','$'
C5 proc near
C6:mov DX,offset C4
C7:mov AH,9H
C8:int 21H
C9:mov AH,0H
CA:int 21H
C5 endp
CD ends
CC:end C3
CZ:; */puts(" Hello, World!");}

Enjoy :-)

 

Posted in News, Programming | Leave a comment

Leave a Reply