16th IOCCC Winners Announced
chongo writes: "The winners of the 16th International Obfuscated C Code Contest (IOCCC) have been selected.
The judges are in the process of notifying the winners by EMail. We expect to release the source code around mid April 2002 after the winners have had a chance to review our writeup of their entries."
Write a program in one language, but make it appear to be in a different programming language. For example make a perl program look like a java program.
I think you just notified them via Slashdot.
The Shadow Government Knows
tcd004
> We expect to release the source code
> around mid April 2002
Will we also get a translation in assembler to help clarify the soure code?
These may be very good test cases for the site.
Karma? Karma? I don't need no stinkin' karma.
We have already had one anonymous winner request to become non-anonymous.
chongo (was here)
The winning descriptions sound pretty ho hum again this year. Although the X program and the interactive games are usually somewhat interesting since they waste a lot of your allotted bytes to get them started. Still haven't seen a really slick X program since the julia/mandelbrot viewer from the early 90's. And I'm definitely going to still be waiting for someone to top theorem from 1990.
Of course it is silly, but why should it be counterproductive? It acknowledges that complex and obfuscated code does get created, so we might as well have fun with it. You don't say crossword puzzles are bad for encouraging word mangling, or that belly flop contents encourage overeating, do you? Lighten up :)
Please subscribe to see the more insightful version of th
Try again when there's something to *see*.
i guess my obfuscated version of Hello World didnt win again!
Looks like this site is now the winner of todays International Obfuscated Website Contest due to the /. effect.
.
Quidquid latine dictum sit altum viditur
To write the most Obscure/Obfuscated C program under the rules below.
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. :-)
If you use gcc, you probably have benefited from fixes of bugs those programs have helped uncover.
Actually, its easy to write bad code which is hard to read, but much much hard to write code that is intentionally convoluted (and still functions). This contest gets some of the most knowledgable programers both submitting and reveiwing the code, so it ends up with code that is logically and syntactically far more twisted than an average bador lazy programmer could come up with.
Yeah! I said the same thing when they started giving out awards for the worst academic prose. But no one listened, and now there are hordes of people going into philosophy and English just to win prestigious awards for terrible prose. And don't get me started on the Razzies, which have clearly encouraged intentionally poor filmmaking. I mean, why would you purposely award bad things? Oh, the humanity!
GPL ABUSER has WON the IOCCC CODE CONTEST!
In that one the goal is to unobfuscate any code, I mean any at all that has ever been made in the last 40 years.
Is there a secret society of Grand Master programmers that use the results of this contest to test new initiates? Using only a ball of twine, a gumdrop, and a used stamp, with ten minutes on the clock, they are asked what the source code would do. Correct answers gain entry, will failed responses fate the initiate to forever program in JavaScript (or maybe VB).
Because everyone knows, grand master programmers don't need comments.
I just wish I didn't work with grand master wannabes.
Creating the immense amount of obfuscation seen in these code snippets requires a great deal of skill, and the people who enter this contest definitely don't code like that in the course of their normal work. (Creating code like that takes too much time, and 2 of the main programmer virtues are "laziness" and "impatience".)
Part of the Linux kernel's oddness is caused by the fact that it's a kernel. Parts are in assembly (stuff under arch/ , and possibly some device drivers) and there are more "goto"s than one might like. These are there for efficiency. Speed is much more critical in the kernel than it is in userspace, since functions may be called while another part of the kernel is holding a spinlock, etcetera.
Also, many of the IOCCC entries become much more legible if you run "gcc -E ioccc.c > preprocessed-ioccc.c && indent preprocessed-ioccc.c" . A fair number of them rely on Fancy Preprocessor Tricks to achieve maximum obfuscation. HTH,
Give a monkey a brain and he'll swear he's the center of the universe.
There was the Bill Gates award that was given out back in 1993.
On a slightly related topic, one can use the Best Utility from 1998 to pootify Microsoft's web site for better reading. :-)
chongo (was here)
Is it good to have eating contests where people send themselves to the hospital? Is it good to have contests like the World's Strongest Man? Or how about Mr. Puni-verse? Is it good to have contests like the Olympics?
I'm just poking fun here, but my point is: Competition is part of human nature. No matter how worthwhile, odd, unhealthy, or just plain crazy. I can't think of anything we don't compete for or about, somewhere in some culture.
I see your point, that when bad behavior is glorified, more people will behave badly, but intellect will never fully triumph over human nature (i.e., we'll never become Vulcans. But that's a good thing).
I am the very model of a modern major general!
... without just appearing to be in another language, but actually being so. Take a look here . Genius or travesty?
?-|||-----x<*))))><
The winner on this years contest is Microsoft for their submission of
Microsoft Corporation End User Agreement
Contributed by an anonymous user.
Since this code is obfuscated I guess the GPL does not apply to it?
I just wanted to clarify that obfuscated code is very different from bad code. Your vanilla variety bad code is not interesting, nor really clever, and generally not actually obfuscated. The point is to hide the intentions of the program; it's more about smoke and mirrors than confusion. For example, using ACII codes to represent text might be confusing, but you haven't really hidden anything. Now, writing a program that looks like it's calculating PI (or something) while actually the number that kinda looks like PI is the concatenation of ASCII codes for a program that actually calculates PI (or whatever) might be obfuscated. The apparent purpose of the code cleverly hides the real purpose. Really, the contest winners are more obfuscated algorithms than obfuscated code, which makes it a whole bunch more interesting. Take a look at some of the contest winners sometime, it can be a lot of fun. And therein lies the point of having the contest!
When I say I'm not much of a programmer, I mean that I'm not a programmer at all :-) I don't use gcc, but if this contest has helped to improve it, then maybe I was wrong about it. Thanks for pointing that out to me!
--
I'm wasted and I can't find my way home...
We expect to release the source code around mid April 2002
To quote Homer: 40 seconds? But I want it NOW!
Any of the winners care to link to their source? (Obviously nothing would get past the lameness filter ;-)
Free Java games for your phone: Tontie, Sokoban
Every time I hear about the IOCCC I'm reminded of this old anecdote:
The highlight of the annual Computer Bowl occurred when Bill Gates, who was a judge, posed the following question to the contestants:
"What contest, held via Usenet, is dedicated to examples of weird, obscure, bizarre, and really bad programming?"
After a moment of silence, Jean-Louis Gassee (ex-honcho at Apple) hit his buzzer and answered "Windows."
Mr. Bill's expression was, in the words of one who was there, "classic."
(source)
"There are already a million monkeys on a million typewriters, and Usenet is NOTHING like Shakespeare." - Blair Houghton
Kind of like Web Pages That Suck: Where you learn good Web design by looking at bad Web design.
Fight for your right to read books!
#include <stdio.h> ,m ),A(n ,i))() {B (A(h,c ),A(r ,a ))*p=x ;B(A( n, i),t)t ,A(r, o )) (;*p;Q( p)++){C( B( A(c,t) ,h),B(A( ,s ++)Z( 1,t+= 8 ;,s++ )Z ,putchar(t-73);t=s=0)}}})
#define S(s)char x[]=#s;s
#define Q(x)x
#define A(x,y)y##x
#define B(x,y)A(y,x)
#define C(x,y)B(y,x)
#define Z(s,t,u)case s:if(*p!=32){t;}else{u;}break;
S(B( A( a
=0;B(A(n , i),t)s =0;B( f
w, s),i))( s){ Z( 0,t+=8 *8-00
( 2, t++
Best Abuse of User: Edward Rosten (England) - Greasy mouse
also qualifies for the Iron Chef competition. Or am I alone in thinking that Greasy Mouse sounds like some sort of England variant on Chinese/Indian cookery? *grin* (I can't wait to see this entry. I love the Abuse of User programs...)
This flies in the face of science.
The contributors, winners, judges and just about
anyone who has anything to do with IOCCC, should
be in your "not to hire" black-list.
Unless you want your project to be implemented as
a self-printing pelindromic asciiz, that has a built in tetris.
--
You can make python have curly brackets for sections of code, just comment them out:
if x==z: # {
print y
x+=z
# }
(I can't get it to indent properly, everytime I hit tab IE goes to another part of the form)
And of course, let's not forget The Bulwer-Lytton Contest.
The 1996 Winner, my favorite sentence of all time:
"Ace, watch your head!" hissed Wanda urgently, yet somehow provocatively, through red, full, sensuous lips, but he couldn't you know, since nobody can actually watch more than part of his nose or a little cheek or lips if he really tries, but he appreciated her warning."
When I was learning C, years ago, I came across these contest entries (this was probably around 1989). I learned a LOT (!!) from these pieces of code. Many of them are staggering in their cleverness and produced many "Aha!" moments when I thought about them. If I were teaching a C course, I would definitely use these as examples (later in the course).
"It's overkill, of course. But you can never have too much overkill." - Anonymous Slashdot Coward
- Worst driver
Anonymous 4 (USA) - A driver gameHey, I didn't know Anonymous 4 did programming too?
Har har. Anyway, compared to today's high-level languages, C is boring. Let's see some obfuscated Ruby programs.
Well, unfortunately it's not always that simple. Let's take the Shiny Metal Brute Force Crypt Cracker v3.1.9 as an example. It can crack every single password encrypted with crypt(3) containing 1 to 8 lowercase latin letters. It uses a sophisticated cryptoanalysis method, which scientists call the "Brute Force". Its main purpose is to hide domain of my electronic-mail address from spammers (see my bio). Here's the source code:
#!/usr/bin/perl
#
# Shiny Metal Brute Force Crypt Cracker v3.1.9
#
# Copyright (C) 2001,2002 shiny@key.salt (shiny@output)
# http://slashdot.org/~Shiny+Metal+S./
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General
# Public License along with this program;
# if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
$x=substr$q,q,0,,q,2,if$q=q,plfeY04jaJnYI,;for
(++$_..$_<<3){qq,$q,eq crypt$_,$x and die
qq,$_.$x,for q,a,x$_..q,z,x$_}
As you can clearly see, the main algorithm used in this program (in the main loop) is able to always find every password (from the 1-8 lowercase latin characters set) but what does it mean? I had to use strong cryptography, because otherwise my electronic-mail address could be harvested by spambots (and therefore be used to perform unsolicited commercial mass mailing), but it also means, that this algorithm could be used to crack passwords from your /etc/passwd (or even from /etc/shadow),
which usually contain passwords
encrypted with crypt(3)
and this could compromise
the whole system security
(imagine hackers having
unlimited
access to your PC).
It's a very dangerous problem.
Most of password cracking tools use the,
so called,
"Dictionary Method"
to guess passwords,
which mean that you're safe as long as you have
a password like "wmctsbvg" or
"obwhdrle" or even
"awxolfrk", but this program will guess such passwords.
My point is, that it can be to dangerous
to publish a clear and well documented
source code to such a dangerous tool.
It could be used by one of many
underground
hacker groups,
like the famous
Script Kiddies,
who don't even care that reverse engineering
of this code is illegal under the DMCA.
Fortunately, this program was written in
Perl, which
was found
to be the only language,
with mathematically proved
possibility of secure one-way obfuscating
(also known as WOL - "write only language",
or WORN paradigm - "write once - read never"),
so it is impossible to reverse engineer.
The situation will be even improved when
Perl 6
is released
(read Apocalypse I,
Apocalypse II,
Exegesis II,
Apocalypse III,
Exegesis III and
Apocalypse IV
for a good introduction to this subject).
That way, people can still use crypt(3) to
encrypt their passwords, with no fear that
hackers know how to crack them,
the crypt(3) encryption method is as secure as
before.
When this program will be rewriten in Perl 6,
the crypt(3) method
will be actually even
more secure than before,
thanks to the strong source code
obfuscation method.
I hope I explained where the
obfuscated code can be useful,
but this is only one example,
I'm sure there are many places where
the good old obfuscation will
be priceless for many decades.
If you have any additional questions,
feel free to contact me.
~shiny
WILL HACK FOR $$$
Actually, using gcc's built in C language extensions for dubius kernel hacks you should REALLY be able to show off some obfuscated C. Runtime dynamic "static" stack arrays anyone?
Contrary to popular belief, coding is not all free blow-jobs and beer. Those things cost MONEY!
I bet the guy is afraid to get fired for not working on the job ;-)
It takes real skill to build good intentionally obfuscated C, and the folks who can do so effectively can generally write very clean C as well. The people who unintentionally create code that looks like a potential entry... now, they're to be watched for.
The winners will be notified by Obsfucated Email guised as spam.
Linux - Because Mommy taught me to Share.
Incidentally, one of the IOCCC winners (Brian Westley) had a (dishonorable) mention in the Bulwer-Lytton contest in 1999; namely, for the following:
"So far this year, Cary Yamanaka's skill in karate had netted him three trophies--two bowling, one golf."
...but I do not think that perl is the "Write Once, Read Nowhere" langue you make it out to be ^_^ Just for a little fun, I thought I'd try out my rusting perl tricks and unroll your silly script.
.. ('z' x $i)) {
:-) $_ is not used yet and thus is 0, and ++0 is of course 1. 1<<3
.. ('z' x $i)) {
:-)
$crypt = "plfeY04jaJnYI";
$salt = substr $crypt, 0, 2;
for($i = 1; $i <= 8; ++$i) {
foreach(('a' x $i)
if($crypt eq crypt($_, $salt)) {
print "key $_, salt $salt\n"; exit 0;
}
}
}
Not very difficile, Mister shiny@rfl.pl, but I shall compliment you for at least trying to obfuscate with the silly "q//" perl operateur ^_^ For those who are onlooking, here is a short explanation of how his original code works:
$x=substr$q,q,0,,q,2,if$q=q,plfeY04jaJnYI,;
Firstly, one must recall that the q// operateur works with any delimiteurs, including the virgule (,). One need only replace q,<x>, with 'x' to see that the code becomes:
$x = substr $q, '0', '2', if $q = 'plfeY04jaJnYI';
Since perl automatically changes the strings into numbres, it is really substr $q, 0, 2 which extracts the salt from the crypt hash. The last virgule between the 2 and the if is just a ruse, since substr only uses three arguments ^_^
The "if" statement is another ruse; suffixed "if" is in fact called before the condition of the "if" statement, and he uses this to initialise $q apparently after it's been first used. The above code is in fact equal to this:
$q = 'plfeY04jaJnYI';
$x = substr $q, 0, 2;
And it makes itself apparent that $q is the crypt hash (henceforth called $crypt) and $x is the salt ($salt).
for (++$_..$_<<3){...}
Now you are just being silly
is 8. So the above is just a simple for loop:
for($i = 1; $i <= 8; ++$i) {...}
Which not only looks simpler, but runs faster too ^_^
qq,$q,eq crypt$_,$x and die
qq,$_.$x,for q,a,x$_..q,z,x$_
This one's a bit tricker, but still not very difficile. One must simple look at the end where there is another "for" loop, once again overusing the q// operateur. This causes the $_ within the loop to be local and of a different value than the $_ outside of the loop (which we have renamed to $i for clairitie). Hence the loop morphoses itself to (with parentheses added for easier reading):
foreach(('a' x $i)
$crypt eq crypt($_, $salt) and die "$_.$salt";
}
The "and die" bit just is taking advantage of the short-circuit boolean operateur système. The "die" only is executing when $crypt (the origin hash) and the encrypted form of the current guess are equal, in which case the key has been found and we quit ^_^ I changed it to a nicer looking "print" statement for further clairitie.
Hopefully that wasn't too difficile to follow, my english is not perfect. Just remember, Mr. shiny@rfl.pl, no langue is completely impenetrable (except perhaps Intercal, but that's a small bit pathological
Sincerely yours,
Chloë
to not post this until source was released?
bleh... you're sick.
teach people that "goto" can be very useful and a part of beautiful code, and i'd be happy.
... hi bingo
A friend of mine was bored at work one day and did something similar.
He wrote (in raw machine code) a program to uudecode a text file. If that wasn't impressive enough, he limited his op-code usage to only bytes that had a text representation (32-127), so you could simply paste some text at the begging of the uuencoded data, rename it to foo.com and run it!
He's one of the few truly amazing programmers I have met.
I'm sorry... If I were mod'ing I woulda got ya up... I got + 4 right know for a shitty "Funny" post... and you post in a very informed and intellectual manner and you've been modded down to 0....
My personal sorry.... For whats it's worth... I woulda modded you up... Just let your Karma Suffer for now...
I live with the winner of the small program category. He does programming contests "for fun" In his own words "I dont remember how it works anymore"
I can't find the post on /. that already explained this, but since I'm not a programmer...
What, again, is the point of a program that can compile itself? (see Best Abuse of the Rules winner)
Best of Show
Most likely to amaze
Best abuse of the rules (Most complete program)
Best X11 Game
Best Short Program
Best position-independent code
Best Abuse of CPP
Best Abuse of User
Best One-Liner
Best curses Game
Most eye-crossing
Most obfuscated sound
Best primal ASCII graphics
Best AI
Worst driver
chongo (was here)