Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fijiwebdesign/0a56ec28f1f23412fc16cca70f48d8e0 to your computer and use it in GitHub Desktop.
Save fijiwebdesign/0a56ec28f1f23412fc16cca70f48d8e0 to your computer and use it in GitHub Desktop.
Building John The Ripper on OSX.

http://blog.gmane.org/gmane.comp.security.openwall.john.user/month=20140601

error: No MPI compiler found john the ripper

phusion/passenger#1630 (comment)

brew install openssl
brew link openssl --force

http://apple.stackexchange.com/questions/208848/install-john-the-ripper-jumbo

git clone https://github.com/magnumripper/JohnTheRipper jumbo
cd jumbo/src
./configure 
make clean && make -s

or alternative ./configure

./configure CPPFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" --disable-pkg-config

http://stackoverflow.com/a/17213338/340688

pip install bsddb3

https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/doc/INSTALL

Optimal build on OS X

Using OS X, you can install Xcode (free) and then its "command line tools" and after that a normal build should work fine. However, using native gcc (which is really clang) results in suboptimal performance and some formats are disabled due to ancient OpenSSL.

Here's how to make the best possible of your hardware. There are alternatives that probably work fine but these instructions are for "Homebrew":

  1. Install Homebrew: http://mxcl.github.io/homebrew/
  2. Install Homebrew's gcc and openssl:
brew install gcc openssl
  1. Make sure /usr/local/bin precedes /usr/bin in your $PATH
  2. Provide the path to GCC and the OpenSSL libraries to the configure script:
./configure CC="gcc-6" CPPFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib"
  1. Clean old files and make:
make -s clean && make -sj4

After the above, you should be able to get an optimal build with AVX and/or whatever extra features your CPU has got.

If you get weird problems including things like "error: unknown type name 'dispatch_block_t'" on 10.10 Yosemite, you might need to apply a patch for the system headers (at your own risk, as always, but backups are created). From John's "src" directory:

sudo patch -b -N -p0 < unused/Yosemite.patch

The patch is not needed for 10.11 "El Capitan".

NOTE: The above command will create backup files. If you ever want to restore everything as it were originally:

cd /usr/include/dispatch
sudo mv -vi object.h.orig object.h
sudo mv -vi queue.h.orig queue.h
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment