Slashdot Mirror


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."

50 of 147 comments (clear)

  1. Here's an idea for a contest by Anonymous Coward · · Score: 2, Interesting

    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.

    1. Re:Here's an idea for a contest by mcc · · Score: 5, Informative
      You may be interested in a type of program called a "polyglot"-- a program which is simultaneously valid, and preferably does the same thing, in more than one language simultaneously. Several previous IOCCC winners have been polyglots. (You maybe should look in particular at the one entry-- i'm *pretty* sure this was last year-- for a program that #DEFINED a bunch of english words as chunks of C that did the same thing the english words did, and then wrote a short *compilable* program in totally readable pseudocode.. with the gimmick being that the program actually did something wholly other than what the pseudocode said it did! Even if you know this coming in, it still is near impossible even on several readings to figure out how exactly it works out. It was rather cute.)

      Anyway, a few polyglot-related links:

      With the crazy-ass language redefinition capabilities in perl 6, i think we can expect to see a resurgence in some very odd polyglots very soon..

      Grrr.. mean, mean slashdot editors.. telling us the IOCCC winners were announced just so we can wait in suspense for a full month to see the entries.. bleh. I love the IOCCC..

    2. Re:Here's an idea for a contest by ZaneMcAuley · · Score: 2, Funny

      Thats easy, just code C# and it looks like Java.

      --
      ----- Whats wrong with this picture? http://www.revoh.org:1234/whatswrong
    3. Re:Here's an idea for a contest by mcc · · Score: 2, Informative

      The polyglot quines were on the polyglot page i linked, not the quine page i linked (both of which were on nyx.net..). The quine page was linked in case a given reader didn't know what a quine was. The C/LISP hybrid quine was the 10th entry on the polyglot page. It was this one.

      Sorry if i was unclear.

    4. Re:Here's an idea for a contest by mosch · · Score: 2

      Unfortunately, I've yet to find a brainfuck interpreter for *nix that doesn't blow goats. The I/O sucks ass in the standard interpreter, making it very hard to write real software with it, but not for the intended reason. I dare you to try to gather entropy from /dev/random in a brainfuck program.

    5. Re:Here's an idea for a contest by sconeu · · Score: 2

      One of the 2000 winners did that. He wrote code that was simulatneously a sh shell script, a makefile, and C code.

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
  2. Notified via Email by tcd004 · · Score: 4, Funny

    I think you just notified them via Slashdot.

    The Shadow Government Knows
    tcd004

  3. Assembler by rif42 · · Score: 4, Funny

    > 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?

    1. Re:Assembler by Reality+Master+101 · · Score: 3, Insightful

      I know you meant this as a joke in the sense of assembly language being so much more difficult than obfuscated C, but it's only funny to people who are ignorant of programming in assembly.

      Back when I used to do a fair amount of assembly programming along with C, I would often run the debugger in assembly mode to see exactly what was happening. Very often I could uncover subtle bugs that way.

      I don't really do it as much anymore, primarily because I'm not familiar with the assembly of my modern machines anymore (alas).

      --
      Sometimes it's best to just let stupid people be stupid.
    2. Re:Assembler by sinserve · · Score: 2

      I could NEVER debug C in source level debugger.

      Actually, the only other tool I use when programming
      on windows (other than the compiler.) is a disassembler.

      --

    3. Re:Assembler by VAXman · · Score: 3, Interesting

      Assembler generated from IOCCC programs will definitely not be obfuscated. Most of the obfuscation comes from the preproccesor, and compilers generate regular, boring code.

      However, it definitely is possible to write highly obfuscated assembly, which would be far worse than anything done in C. Heck, with "db" you can do anything you want, and with an instruction set like IA32 you can do all sorts of insane things. Self-modifying code is also a lot easier in assembly. :-)

    4. Re:Assembler by bentini · · Score: 2

      Are I-caches smart enough to figure out when you modify the code? And wouldn't that make code that was slow as hell, because you have to flush the cache and pipeline?
      -Dan

    5. Re:Assembler by VAXman · · Score: 2

      I don't know about other processors, but Willamette (aka Pentium 4) fully supports self-modifying code, and you can modify an instruction at any point (such as the next instruction - even if has already been speculatively executed), and the processor will correctly restart and execute the modified instruction.

      Yes, this is terrible for performance (it invalidates the whole trace cache) but it is correct.

      Officially, Intel says you have to execute a serializing instruction in between the point of modifcation and the actual instruction, although the newer processors are smart enough to do it automatically.

      I wonder if any real software actually modifies in-flight instructions? It's conceivable that an OS loading/executing a really short program on a processor which is deeply speculative could hit that case.

    6. Re:Assembler by Ayende+Rahien · · Score: 2

      Writing self modifying code is hard, it's even harder to debug, and thrice as hard to follow.
      To the best of my knowledge, most common OS define text segments of processes as read & execute only.

      --

      --
      Two witches watched two watches.
      Which witch watched which watch?
    7. Re:Assembler by VAXman · · Score: 2

      Well, yeah, but since most OS'es have flat addressing, you ust use your read/write flat data segment to modify the code in your read/execute flat code segment. If the _page_ is marked read-only you can't modify it, but you can just copy it to your own data segment, and then modify and execute it to your heart's content.

  4. The list of who won by chongo · · Score: 5, Informative
    An updated list of who won the 16th IOCCC may be found at:

    http://www.ioccc.org/whowon.html

    We have already had one anonymous winner request to become non-anonymous.

    --
    chongo (was here) /\oo/\
  5. Re:Obfuscated code contests? by erasmus_ · · Score: 2

    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
  6. 10 minutes later and it's already /. by LuxuryYacht · · Score: 3, Funny

    Looks like this site is now the winner of todays International Obfuscated Website Contest due to the /. effect.

    .

    --
    Quidquid latine dictum sit altum viditur
    1. Re:10 minutes later and it's already /. by Fweeky · · Score: 3, Funny

      > International Obfuscated Website Contest

      Good idea. There are so many technologies that could be used in a way that obfuscates sites; Flash, JavaScript, DHTML, tables, tag soup, box model abuse etc; unfortunately I suspect some existing and popular sites may well prove too hard to beat.

      Still, could serve as a nice ironic way to point out why avoiding and abusing standards is Bad[tm].

  7. Re:Obfuscated code contests? by Jesse+Duke · · Score: 4, Informative
    You're missing the point. From the IOCCC website :

    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.

  8. Re:Obfuscated code contests? by brennan73 · · Score: 4, Funny

    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!

  9. GPL Abuser WINS the IOCCC CONTEST! by Anonymous Coward · · Score: 3, Funny
  10. Re:Obfuscated code contests? by CJ+Hooknose · · Score: 2
    it seems that enough people generate obfuscated code unintentionally that having a contest to encourage this sort of thing is silly and counterproductive to the advancement of programming techniques. I just hope the people who enter this contest are a bit cleaner coders when they have real work to do!



    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.
  11. Re:Did Microsoft enter this year? by chongo · · Score: 4, Interesting
    We (the judges) don't look at who submitted the entries that did not win, so we could not tell you.

    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) /\oo/\
  12. It has been done by EggplantMan · · Score: 2, Informative

    ... without just appearing to be in another language, but actually being so. Take a look here . Genius or travesty?

    --

    ?-|||-----x<*))))><
  13. To Fill In Those Who Are Slashdotted by Peridriga · · Score: 4, Funny



    The winner on this years contest is Microsoft for their submission of

    Microsoft Corporation End User Agreement

    Contributed by an anonymous user.

    1. Re:To Fill In Those Who Are Slashdotted by rant-mode-on · · Score: 2, Funny

      Hang on, isn't there a rule that says each entry has got to be workable?

  14. GPL? by gorehog · · Score: 2

    Since this code is obfuscated I guess the GPL does not apply to it?

    1. Re:GPL? by TheAwfulTruth · · Score: 2

      Heh, if there were an obfuscated liscence contest the GPL would be the all-time winner! :)

      --
      Contrary to popular belief, coding is not all free blow-jobs and beer. Those things cost MONEY!
  15. Silly by The+Sojourner · · Score: 2, Informative
    If you use gcc, you probably have benefited from fixes of bugs those programs have helped uncover.

    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...

  16. This is so cruel... by tunah · · Score: 2

    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
  17. An old anecdote by frozenray · · Score: 5, Funny

    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
  18. winning entry by Anonymous Coward · · Score: 2, Funny

    #include <stdio.h>
    #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 ,m ),A(n ,i))() {B (A(h,c ),A(r ,a ))*p=x ;B(A( n, i),t)t
    =0;B(A(n , i),t)s =0;B( f ,A(r, o )) (;*p;Q( p)++){C( B( A(c,t) ,h),B(A(
    w, s),i))( s){ Z( 0,t+=8 *8-00 ,s ++)Z( 1,t+= 8 ;,s++ )Z
    ( 2, t++ ,putchar(t-73);t=s=0)}}})

    1. Re:winning entry by n8twj · · Score: 2, Informative

      that is a teaser..it says not an offical entry

      Look out of your good eye next time

  19. Obfuscated Wok Contest by ZiZ · · Score: 3, Funny
    I believe that one of the entries:

    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.
  20. Heads up potential employers. by sinserve · · Score: 2, Funny

    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.

    --

  21. Re:Obfuscated code contests? by Mister_IQ · · Score: 2, Funny

    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."


  22. Anonymous 4 by Dr.+Awktagon · · Score: 2
    • Worst driver

    Anonymous 4 (USA) - A driver game

    Hey, 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.

    1. Re:Anonymous 4 by cheezehead · · Score: 3, Funny

      Let's see some obfuscated Ruby programs.

      Or obfuscated perl scripts. Oh, wait a minute...

      --

      MSN 8: Now Microsoft even has bugs in their ad campaigns.

    2. Re:Anonymous 4 by Fweeky · · Score: 2

      > Let's see some obfuscated Ruby programs.

      From Tomasz Wegrzanowski ([ruby-talk:30377]):

      $\=(?c??d:?e).chr+%Q%\n%;$,=%q=o, =;;%q{leHrow}=~/(...)(...)/;print [$1,$2].map{|l|l.reverse+%q|l|}

      Showing the more Perlish side of Ruby.

      I recall seeing one that calculated Pi with code of a similar quality too, along with a few quines, although I'm yet to seen an obfuscated one.

  23. Re:Secret Society by Aaaaaargh! · · Score: 2, Funny

    Is there a secret society of Grand Master programmers

    I sense much fear in this one. Train you, I cannot.

    --
    Give them an inch and they'll take a foot. Much more than that, you won't have a leg to stand on.
  24. Re:Obfuscated code contests? by Shiny+Metal+S. · · Score: 2, Funny
    I'll admit I don't know much about computer science, but I do know that it's important to keep your code clear, well-documented and easy to understand.

    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 $$$

  25. Re:Obfuscated code contests? by TheAwfulTruth · · Score: 2

    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!
  26. Re:I'm still waiting for the FORTRAN contest by TeknoHog · · Score: 2

    Your comment is weird and senf-contradictory in the light of your homepage. FORTRAN has a fairly clean syntax because it uses newlines and XX ... END XX statements instead of semicolons and braces. Not much unlike Python. Surely you jest.

    --
    Escher was the first MC and Giger invented the HR department.
  27. The bad news... by miracle69 · · Score: 3, Funny

    The winners will be notified by Obsfucated Email guised as spam.

    --
    Linux - Because Mommy taught me to Share.
  28. Re:Obfuscated code contests? by Coppit · · Score: 2, Funny
    If you use gcc, you probably have benefited from fixes of bugs those programs have helped uncover.
    If one of my programs triggers a bug that these programs do, it's time to toss it and try again. ;)
  29. Re:Obfuscated code contests? by Peridriga · · Score: 2

    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...

  30. interesting tidbit by cybercuzco · · Score: 2

    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"

    --

  31. updated list of who won by chongo · · Score: 3, Interesting
    We have had 3 winners convert to non-anonymous status. The list of recent winners is now:

    Best of Show

    Jason Orendorff (USA) - An Adventure-like game

    Most likely to amaze

    Anonymous (Great Britain) - x86/ELF dynamic binary translator

    Best abuse of the rules (Most complete program)

    Fabrice Bellard (France) - A C subset programming system for x86 that can compile and execute itself

    Best X11 Game

    John Williams (USA) - Missile Command

    Best Short Program

    Raymond Cheong (USA) - Arbitrary precision square root

    Best position-independent code

    Brian Westley (USA) - A punch card printer/sorter

    Best Abuse of CPP

    Immanuel Herrmann (Germany) - A Turing machine

    Best Abuse of User

    Edward Rosten (England) - Greasy mouse

    Best One-Liner

    Jens Schweikhardt (Germany) - A shell glob matcher

    Best curses Game

    Kevin Pulo (Australia) - A Pong-like game across network

    Most eye-crossing

    Immanuel Herrmann (Germany) - A SIRDS-shaped SIRDS generator

    Most obfuscated sound

    Pierre-Philippe Coupard (USA) - A talking clock

    Best primal ASCII graphics

    Nicolas Ollinger (France) - Prints primes with a sieve graph

    Best AI

    Doug Beardsley (USA) - A suicide chess program

    Worst driver

    Chris King (USA) - A driver game
    --
    chongo (was here) /\oo/\
  32. Re:My perl is not as grand as it once was... by Shiny+Metal+S. · · Score: 2
    ...but I do not think that perl is the "Write Once, Read Nowhere" langue you make it out to be ^_^
    My post was actually a joke (I'm surprised that someone has moderated it as Troll! If that moderator thought I don't like Perl, he/she obviously hasn't read my code...) and this was a parody for Java's "write once, run everywhere".
    Just for a little fun, I thought I'd try out my rusting perl tricks and unroll your silly script.
    You're a first person I know about, who was ever interested in understanding this code. This is my original, clean version:
    $c = 'plfeY04jaJnYI';
    $s = substr $c, 0, 2;
    for $l (1..8) {
    for ('a' x $l .. 'z' x $l){
    if($c eq crypt($_, $s)) {
    print "$_.$s\n";
    exit;
    }
    }
    }
    I'm amazed, that your code is almost identical, congratulations! I like this program, because looking at it (the clean version) it's impossible to know how long it would take to get the result. For example your domain voila.fr would be written if $c was frmHZ0u6Ne2HQ but it takes about an hour to crack on my machine, while my domain in plfeY04jaJnYI is cracked in only 4 seconds. It would take over 2 years and 7 months to crack this xxFHuIaD7CdpI, which is the worst case, zzzzzzzz, the last key guessed by my program. So, the average time for guessing random keys (containing 1 to 8 lowercase letters) is over one year!

    If you want to see a really good password cracking program, check out Alec Muffett's great and famous Crack. It's really great, especially when you have good dictionaries. If you want to check if your password is easily cracked by Crack, you can use Alec Muffett's CrackLib. Check out my online Password-Guessability-O-Meter, I wrote it some time ago to demonstrate to one of my clients how does the CrackLib work. You just enter your desired password, and it tells you if (and why) it is easy to guess, using English, Polish, Czech, French and Latin dictionaries.

    I use CrackLib for online registrations CGI scripts etc. so users can't have silly and easy to guess passwords. It can also be used with passwd program. Great library, and easy to use (there's Crypt::Cracklib Perl interface), but may be quite difficult to set up for the first time.

    Not very difficile, Mister shiny@rfl.pl, but I shall compliment you for at least trying to obfuscate with the silly "q//" perl operateur ^_^
    Thanks. :) I like it too. That's the most recent obfuscation, if I remember correctly. When I started to experiment with q// using q,x, and q.x. and q;x; etc. I was even trying to use something like this:
    $q=q,p,.q,l,.q,f,.q,e,.q,Y,.q,0,.q,4,.q,j,.q,a,.q, J,.q,n,.q,Y,.q,I,;
    (in one line and with no spaces) but it looks terrible, as you can see.
    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;
    Yes, this is exactly the original code, and this is exactly the way I was thinking. You're very good. :)
    And it makes itself apparent that $q is the crypt hash (henceforth called $crypt) and $x is the salt ($salt).
    The original variables were $c and $s, I changed them to $q and $x for easy mistakes with q// quoting and x repetition operator.
    for (++$_..$_<<3){...}

    Now you are just being silly :-) $_ is not used yet and thus is 0, and ++0 is of course 1. 1<<3 is 8.

    :) 1..8 looked just to clear and simple... And that way I have 3 independent values of $_ variable (i.e. the original global $::_ is two times localized) in 3 nested scopes (main program, outer loop and inner loop), which makes it more interesting.
    for($i = 1; $i <= 8; ++$i) {...}

    Which not only looks simpler, but runs faster too ^_^

    Actually in newer versions of Perl, the foreach loop is faster than the C-style for loop. See perlop manpage: Range Operators and perlsyn manpage: Foreach Loops.

    I just run this benchmark:

    #!/usr/bin/perl -w

    use Benchmark;

    sub s1{ for ($i = 1; $i <= 1_000_000; ++$i) { } }
    sub s2{ for (1 .. 1_000_000) { } }

    $t1 = timestr timeit 100, \
    $t2 = timestr timeit 100, \

    print "1. $t1\n2. $t2\n";
    and with Perl 5.6.1 I got this results:
    1. 103 wallclock secs (87.77 usr + 0.15 sys = 87.92 CPU) @ 1.14/s (n=100)
    2. 60 wallclock secs (51.93 usr + 0.04 sys = 51.97 CPU) @ 1.92/s (n=100)

    But in my code this loop has only eight iterations, where the 8th one takes two years, so the loop control overhead itself doesn't really matter here. The inner loop is more important but crack() function takes most of the time, anyway.

    Older versions of Perl (I don't know which exactly) created a temporary array for the range operator in foreach loop, so the code like:

    for (1 .. 1_000_000_000) { ... }
    could easily take all of the memory, but now it's fixed. Fortunately, it doesn't create a temporary array any more, and it's highly optimized, so it's safe to use it now for large ranges.
    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.
    Yes, there were print and exit in the original version. You have exactly reconstructed my way of thinking. Well done. :)

    I think you're very good, really. Most of people have no idea how to analyze such obfuscated code. Actually I'm quite disappointed that decrypting my code was so easy for you... :)

    I'll tell you why and how I wrote this program. I was inspired by this code:

    #!/usr/bin/perl
    @a=(Lbzjoftt,Inqbujfodf,
    Hvcsjt); $b="Lbssz Wbmm"
    ;$b =~ y/b-z/a-z/ ; $c =
    " Tif ". @a ." hsfbu wj"
    ."suvft pg b qsphsbnnfs"
    . ":\n";$c =~y/b-y/a-z/;
    print"\n\n$c ";for($i=0;
    $i<@a; $i++) { $a[$i] =~
    y/b-y/a-z/;if($a[$i]eq$a
    [-1]){print"and $a[$i]."
    ;}else{ print"$a[$i], ";
    }}print"\n\t\t--$b\n\n";
    and few JAPH signatures. I wanted to write a small program, that it would be impossible to tell what it writes, until you run it. Most of such programs are very obfuscated but after enough work you can usually find the printed message, without running them. So I thought that the message could be ciphered using some one-way alghoritm, like crypt(3) or MD5, and the code would just brute-force crack it. That way it's really impossible to tell what the message is, until you run the code. The code itself only cracks, but doesn't know what is being cracked and when it finishes. Using crypt(3) had this advantage, that it has 2-character salt, which can act as country code in domain name.

    So I wrote the first working version and started to make it as small as possible. Originally it didn't have to be obfuscated, just small. This is the smallest version I've written so far:

    $c='plfeY04jaJnYI';$s=substr$c,0,
    2;for(1..8){for('a'x$_..'z'x$_){
    die"$_.$s\n"if crypt($_,$s)eq$c}}
    with 98 characters. But today I shrinked it some more, to 93 characters:
    $c='plfeY04jaJnYI';$s=substr$c,
    0,2;for(1..8){$c eq crypt$_,$s
    and die"$_.$s"for'a'x$_..'z'x$_}
    and few minutes ago (while I write this comment!) I found a better idea and wrote this:
    $c='plfeY04jaJnYI';$s=substr$c,0,2;$k=
    'a';$k++while$c ne crypt$k,$s;die"$k.$s";
    which having only 79 characters is my record so far (thanks to Perl's magical auto-increment operator) and finally fits in one line!
    Hopefully that wasn't too difficile to follow, my english is not perfect.
    Your english is OK, don't worry. Actually, I like the way you use French spelling for some words, like difficile. It's like a French accent in written text, very nice in my opinion.
    Just remember, Mr. shiny@rfl.pl, no langue is completely impenetrable (except perhaps Intercal, but that's a small bit pathological :-)
    Good point. :) I wonder if these guys tried Intercal when proving the impossibility of obfuscating programs... I personally like Unlambda and Brainf***.

    This Unlambda program "calculates and prints the Fibonacci numbers (as lines of asterisks)":

    ```s``s``sii`ki
    `k.*``s``s`ks
    ``s`k`s`ks``s``s`ks``s`k`s`kr``s`k`sikk
    `k``s`ksk

    I wanted to show a Hello world example of Brainf***, but I got this error:

    Lameness filter encountered. Post aborted!
    Reason: Please use fewer 'junk' characters.
    Visit Esoteric Topics in Computer Programming, great stuff if you want to go mad.

    You like Perl, so if you know Inline::C and Inline::CPR (if you don't, read Pathologically Polluting Perl by Brian Ingerson) you may enjoy understanding this code:

    #!/usr/bin/cpr
    int main(void) {
    CPR_eval("use Inline (C => q{
    char* greet() {
    return \"Hello world\";
    }
    })");
    printf("%s, I'm running under Perl version %s\n",
    CPR_eval("&greet"),
    CPR_eval("use Config; $Config{version}"));
    return 0;
    }
    It's great, once you really understand it.

    Are you up to date with Perl 6 development? It's going to be great and extremely powerful language. Read Larry Wall's Apocalypses and Damian Conway's Exegeses if you're interested:

    It's my favorite language already, and it's not even fully designed yet.
    --

    ~shiny
    WILL HACK FOR $$$