2 # Author: Gabriele Gristina <matrix@hashcat.net>
6 DEPS
="make gcc-4.9 g++-4.9 gcc-4.9-multilib g++-4.9-multilib libc6-dev-i386 mingw-w64 build-essential unzip"
7 DOWNLOAD_DEPS
="ADL_SDK8.zip R352-developer.zip cuda_7.5.18_linux.run NVIDIA-Linux-x86_64-352.21.run gdk_linux_amd64_352_55_release.run AMDAPPSDK-3.0-linux64.tar.bz2"
10 if [ $
(id
-u) -ne 0 ]; then
15 ## cleanup 'hashcat-deps' directories
16 rm -rf /opt
/hashcat-deps
/{adl-sdk
,cuda-7.5
,NVIDIA-Linux-x86_64-352.21
,nvidia-gdk
,amd-app-sdk
} && \
17 mkdir
-p /opt
/hashcat-deps
/{tmp
,adl-sdk
,cuda-7.5
,NVIDIA-Linux-x86_64-352.21
,nvidia-gdk
,amd-app-sdk
} && \
18 cd /opt
/hashcat-deps
/tmp
21 echo "! Cannot create hashcat-deps directories."
27 for d
in ${DOWNLOAD_DEPS}; do
28 if [ ! -f "${d}" ]; then
29 echo "! ${d} not found."
34 if [ ${i} -gt 0 ]; then
35 echo "! Please download manually into the directory /opt/hashcat-deps/tmp"
39 ## installing needed packages
40 for pkg
in ${DEPS}; do
41 apt-get
-y install ${pkg}
43 echo "! failed to install ${pkg}"
49 unzip ADL_SDK8.
zip -d /opt
/hashcat-deps
/adl-sdk-8
52 if [[ ${ret} -ne 0 ]] && [[ ${ret} -ne 1 ]]; then
53 echo "! failed to extract ADL SDK"
57 rm -rf /opt
/hashcat-deps
/adl-sdk
&& ln -s /opt
/hashcat-deps
/adl-sdk-8
/opt
/hashcat-deps
/adl-sdk
60 echo "! failed to setup ADL SDK link"
65 unzip R352-developer.
zip -d /opt
/hashcat-deps
/
68 if [[ ${ret} -ne 0 ]] && [[ ${ret} -ne 1 ]]; then
69 echo "! failed to extract NVAPI"
74 chmod +x cuda_7.5
.18_linux.run
&& \
75 .
/cuda_7.5
.18_linux.run
-toolkit -silent -override --toolkitpath=/opt
/hashcat-deps
/cuda-7.5
78 echo "! failed to install CUDA SDK"
82 ## install NVIDIA Driver
83 chmod +x NVIDIA-Linux-x86_64-352.21.run
&& \
84 .
/NVIDIA-Linux-x86_64-352.21.run
-x && \
85 mv NVIDIA-Linux-x86_64-352.21
/opt
/hashcat-deps
/ && \
86 cd /opt
/hashcat-deps
/NVIDIA-Linux-x86_64-352.21
&& \
87 ln -s libnvidia-ml.so
.352.21 libnvidia-ml.so
&& \
88 ln -s libcuda.so
.352.21 libcuda.so
&& \
90 ln -s libnvidia-ml.so
.352.21 libnvidia-ml.so
&& \
91 ln -s libcuda.so
.352.21 libcuda.so
&& \
92 cd /opt
/hashcat-deps
/tmp
95 echo "! failed to install NVIDIA Driver"
99 ## install NVIDIA GPU Deployment Kit
100 chmod +x gdk_linux_amd64_352_55_release.run
&& \
101 .
/gdk_linux_amd64_352_55_release.run
--silent --installdir=/opt
/hashcat-deps
/nvidia-gdk
103 if [ $?
-ne 0 ]; then
104 echo "! failed to install NVIDIA GPU Deployment Kit"
108 ## extract AMD APP SDK
109 tar xjf AMDAPPSDK-3.0
-linux64.
tar.bz2
&& \
110 .
/AMD-APP-SDK-v3.0
.130.135-GA-linux64.sh
--noexec --target /opt
/hashcat-deps
/amd-app-sdk-v3.0
.130.135
112 if [ $?
-ne 0 ]; then
113 echo "! failed to extract AMD APP SDK"
117 rm -rf /opt
/hashcat-deps
/amd-app-sdk
&& ln -s /opt
/hashcat-deps
/amd-app-sdk-v3.0
.130.135 /opt
/hashcat-deps
/amd-app-sdk
119 if [ $?
-ne 0 ]; then
120 echo "! failed to setup ADL SDK link"
124 echo "> oclHashcat dependencies have been resolved."