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 has three versions — 1.2 (Windows XP/Vista binary, and source code for Windows and Linux), 1.3 (Windows XP/Vista binary only), and 1.4 (Windows XP/Vista binary only).
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 kernel headers.
Here is how to get it to compile on OpenBSD.
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.
Download the file rainbowcrack-1.2-src.zip from project-rainbowcrack.com.
Extract the archive:
$ unzip rainbowcrack-1.2-src.zip
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
Download my changed Public.cpp file to that directory, overwriting the existing one.
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.
Build the software:
$ make -f makefile.openbsd
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