Updates to support MacOS/OSX

This commit is contained in:
Brannon Dorsey 2017-07-30 21:17:43 -05:00
parent e6ac6cfd32
commit 30da7f42ce
3 changed files with 29 additions and 4 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
dicts/rockyou.txt
hashcat-src
hashcat.pot

12
build-hashcat-osx.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
# clone the hashcat source
git clone https://github.com/hashcat/hashcat.git hashcat-src
# clone the OpenCL headers
mkdir -p hashcat-src/deps
git clone https://github.com/KhronosGroup/OpenCL-Headers.git hashcat-src/deps/OpenCL
# build
cd hashcat-src
make

View File

@ -5,10 +5,21 @@ POT_FILE="${POT_FILE:-hashcat.pot}"
HASH_TYPE="${HASH_TYPE:-0}"
# WEIGHT="${WEIGHT:-"medium"}" # light, medium, heavy
if [ $(uname -m) == 'x86_64' ]; then
HASHCAT="./hashcat-3.6.0/hashcat64.bin"
else
HASHCAT="./hashcat-3.6.0/hashcat32.bin"
# check OSX
if [ "$(uname)" == 'Darwin' ] ; then
if [ -f hashcat-src/hashcat ] ; then
HASHCAT="./hashcat-src/hashcat"
else
echo "You are running naive-hashcat on a MacOS/OSX machine but have not yet built the hashcat binary."
echo "Please run ./build-hashcat-osx.sh and try again."
exit 1
fi
elif [ "$(uname)" == 'Linux' ] ; then
if [ $(uname -m) == 'x86_64' ]; then
HASHCAT="./hashcat-3.6.0/hashcat64.bin"
else
HASHCAT="./hashcat-3.6.0/hashcat32.bin"
fi
fi
# LIGHT