Rybka 1.0 source code

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Rybka 1.0 source code

Post by Rebel »

With the help of the Hex-rays decompiler you can download the C-source code of Rybka 1.0 Beta and now with the Fruit source code left, the Rybka source code right decide yourself what was copied and what not.

The Hex-rays decompiler creates surprisingly well readable code extracted from the Rybka 1.0 executable or any other executable for that matter.

Without much doubt it also explains how the Rybka 3 hackers created Ippolit as the original Ippolit source code came in one long C-file created by the Hex-rays decompiler, like the source code of Rybka 1.0 Beta offered on this page comes as one long C-code file. It confirms what many already noticed, parts of the Ippolit source code are computer generated and indeed the Hex-rays decompiler does exactly that.

The bad news is that any program may become the target of hackers. I received decompiled versions of Hiarcs, Rybka 4 and others. Nobody is safe any longer.

Since publishing disassembled work of others is forbidden by EU law I asked Vas for permission to publish the Rybka 1.0 sources and he did not hesitate for one moment.

Download link at: http://www.top-5000.nl/sourcecode.htm

Ed
Terry McCracken
Posts: 16465
Joined: Wed Aug 01, 2007 4:16 am
Location: Canada

Re: Rybka 1.0 source code

Post by Terry McCracken »

Nope, no one is safe anymore. This problem could have been averted if the computer chess community hadn't been asleep and caught with their pawns down.
Terry McCracken
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Rybka 1.0 source code

Post by Daniel Shawul »

The Hex-rays decompiler creates surprisingly well readable code extracted from the Rybka 1.0 executable or any other executable for that matter.
Hex-rays is one badass decompiler. The source code it produces is very much readable once you get used to the style. I have successfully used it to find a _bug_ that made my engine a lot more weaker. I had only an exe of the good version at that time.

The Java decompilers produce such a readable code I don't feel the need to store source code of my java projects anymore (the jar file will do). Decompiling compiled c code is going the same route...
Lion
Posts: 531
Joined: Fri Mar 31, 2006 1:26 pm
Location: Switzerland

Re: Rybka 1.0 source code

Post by Lion »

Thanks!
I have no competence in programming do I will ask you what is your own opinion ?
User avatar
rvida
Posts: 481
Joined: Thu Apr 16, 2009 12:00 pm
Location: Slovakia, EU

Re: Rybka 1.0 source code

Post by rvida »

Rebel wrote: Without much doubt it also explains how the Rybka 3 hackers created Ippolit as the original Ippolit source code came in one long C-file created by the Hex-rays decompiler, like the source code of Rybka 1.0 Beta offered on this page comes as one long C-code file.
lol, really "scientific" reasoning :roll:

If program XX is single long C-file, and hexrays produces one long C-file => conclusion: program XX was for sure produced by hexrays... Sure there is no other way to have a long C-file...

copy *.c bigfile.c
regards
melajara
Posts: 213
Joined: Thu Dec 16, 2010 4:39 pm

Re: Rybka 1.0 source code

Post by melajara »

Daniel Shawul wrote:
...
The Java decompilers produce such a readable code I don't feel the need to store source code of my java projects anymore (the jar file will do).
I disagree. Java decompilers so far are (sometimes) unable to

1, decipher actual type from base type on method's arguments
2, correctly resolve local variables
3, correctly handle exceptions and finally clauses.

Even worse, sometimes they produce syntactically correct (i.e. compilable) code but semantically wrong code
(e.g. erroneous loops reconstruction when facing an irreducible control flow graph or even missing static initializations).

This is so for the venerable jad, jd, fernflower and the academic dava.

Furthermore, no one has been updated to Java7
Per ardua ad astra
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Rybka 1.0 source code

Post by bob »

Terry McCracken wrote:Nope, no one is safe anymore. This problem could have been averted if the computer chess community hadn't been asleep and caught with their pawns down.
I don't think it is a matter of "sleeping" or "getting caught". This has been inevitable for many years. And has been possible for a few years...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Rybka 1.0 source code

Post by bob »

Rebel wrote:With the help of the Hex-rays decompiler you can download the C-source code of Rybka 1.0 Beta and now with the Fruit source code left, the Rybka source code right decide yourself what was copied and what not.

The Hex-rays decompiler creates surprisingly well readable code extracted from the Rybka 1.0 executable or any other executable for that matter.

Without much doubt it also explains how the Rybka 3 hackers created Ippolit as the original Ippolit source code came in one long C-file created by the Hex-rays decompiler, like the source code of Rybka 1.0 Beta offered on this page comes as one long C-code file. It confirms what many already noticed, parts of the Ippolit source code are computer generated and indeed the Hex-rays decompiler does exactly that.

The bad news is that any program may become the target of hackers. I received decompiled versions of Hiarcs, Rybka 4 and others. Nobody is safe any longer.

Since publishing disassembled work of others is forbidden by EU law I asked Vas for permission to publish the Rybka 1.0 sources and he did not hesitate for one moment.

Download link at: http://www.top-5000.nl/sourcecode.htm

Ed
Before I look at such a mess in any depth, is this a 32 bit decompile? Sure looks like it, and it is actually (to me) harder to read than the asm code. Messy doesn't begin to describe this...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Rybka 1.0 source code

Post by bob »

Daniel Shawul wrote:
The Hex-rays decompiler creates surprisingly well readable code extracted from the Rybka 1.0 executable or any other executable for that matter.
Hex-rays is one badass decompiler. The source code it produces is very much readable once you get used to the style. I have successfully used it to find a _bug_ that made my engine a lot more weaker. I had only an exe of the good version at that time.

The Java decompilers produce such a readable code I don't feel the need to store source code of my java projects anymore (the jar file will do). Decompiling compiled c code is going the same route...
It is not so easy to read if it is a completely stripped executable. You get no variable names, no procedure names, just a LOT of difficult to read stuff...

Would be fun to take something known, compile it and then decompile it, to see how close it looks...
User avatar
towforce
Posts: 11568
Joined: Thu Mar 09, 2006 12:57 am
Location: Birmingham UK

Re: Rybka 1.0 source code

Post by towforce »

Rebel wrote:The bad news is that any program may become the target of hackers. I received decompiled versions of Hiarcs, Rybka 4 and others. Nobody is safe any longer.
Expect proprietary code with creative methods to increasingly be hosted on servers - where hackers cannot easily read it.

This is also a good thing for customers if rarely used code can be paid for on a usage basis. Also running hosted code is usually more convenient than installing a program on one's own computer.

It also eliminates pesky maintenance and compatibility issues.
Writing is the antidote to confusion.
It's not "how smart you are", it's "how are you smart".
Your brain doesn't work the way you want, so train it!