UNIX / Linux keyboard.

How to Compile RainbowCrack on OpenBSD


Project RainbowCrack was originally Zhu Shuanglei's implementation, it's not clear to me if the project is still just his or if it's even been maintained for a while. His page seems to have been last updated in August 2007.

The Project RainbowCrack web page now has just binaries for Windows XP and Linux, both 32-bit and 64-bit versions.

Earlier versions were available as source code. The version 1.2 source code does not compile on OpenBSD, and in my experience it doesn't compile on Linux, either. It seems to date from 2004 at the earliest, and I think it makes some version-2.4 assumptions about Linux kernel headers.

Here is how to get it to compile on OpenBSD.

Someone, it isn't clear just who, wrote in May 2004:

OpenBSD patch for RainbowCrack v1.2 (11 May 2004)

In 2004, RainbowCrack didn't work on OpenBSD,
so I wrote a patch. 

That may have worked in 2004, but it didn't quite work for me some 5.5 years later and beyond. I don't know why, but the patch file (the output of diff) included there could not be applied.

Do the following to compile and install RainbowCrack on OpenBSD:

Step 1:

Download the file rainbowcrack-1.2-src.zip from project-rainbowcrack.com.

Step 2:

Extract the archive:

$ unzip rainbowcrack-1.2-src.zip

Step 3:

Change into the directory with the source code, and just to be safe, save a backup copy of a file you're about to replace:

$ cd rainbowcrack-1.2-src/src
$ cp Public.cpp Public.cpp-ORIGINAL

Step 4:

Download my changed Public.cpp file to that directory, overwriting the existing one.

Step 5:

Download my new makefile.openbsd file to that directory. I have slightly modified the makefile to build the binaries as linked statically rather than dynamically.

Step 6:

Build the software:

$ make -f makefile.openbsd

Step 7:

If that worked, install the new programs and save the documentation!

$ su
# chown root.root rcrack rtdump rtgen rtsort
# cp rcrack rtdump rtgen rtsort /usr/local/bin
# mkdir /usr/local/share/doc/rainbowcrack
# cp -r ../*.txt ../doc/* /usr/local/share/doc/rainbowcrack