2 # Author: Gabriele Gristina <matrix@hashcat.net>
6 DEPS
="make gcc g++ gcc-multilib g++-multilib libc6-dev-i386 mingw-w64 build-essential unzip"
7 DOWNLOAD_DEPS
="ADL_SDK8.zip R352-developer.zip gdk_linux_amd64_352_55_release.run AMD-APP-SDKInstaller-v3.0.130.135-GA-linux64.tar.bz2"
9 ## enter the deps directory
10 cur_directory
=$
(dirname ${0})
11 script_directory
=$
(cd ${cur_directory} && pwd -P)
12 deps_dir
=${script_directory}/..
/deps
14 mkdir
-p ${deps_dir} # but it should already exist (is part of the repository)
17 ## cleanup the directories under the 'deps' folder
18 rm -rf {adl-sdk
,nvidia-gdk
,amd-app-sdk
} && \
19 mkdir
-p {tmp
,adl-sdk
,nvidia-gdk
,amd-app-sdk
} && \
23 echo "! Cannot create deps directories."
29 for d
in ${DOWNLOAD_DEPS}; do
30 if [ ! -f "${d}" ]; then
31 echo "! ${d} not found."
36 if [ ${i} -gt 0 ]; then
37 echo "! Please manually download all the above dependencies to the deps/tmp/ directory"
41 ## installing needed packages
42 for pkg
in ${DEPS}; do
44 # check if the package is already installed
45 dpkg
-s ${pkg} &>/dev
/null
48 if [ $
(id
-u) -ne 0 ]; then
49 echo "! Must be root to install the required package '${pkg}' with apt-get"
53 apt-get
-y install ${pkg}
55 echo "! failed to install ${pkg}"
62 unzip ADL_SDK8.
zip -d ${deps_dir}/adl-sdk-8
65 if [[ ${ret} -ne 0 ]] && [[ ${ret} -ne 1 ]]; then
66 echo "! failed to extract ADL SDK"
70 rm -rf ${deps_dir}/adl-sdk && ln -s ${deps_dir}/adl-sdk-8 ${deps_dir}/adl-sdk
73 echo "! failed to setup ADL SDK link"
78 unzip R352-developer.
zip -d ${deps_dir}
81 if [[ ${ret} -ne 0 ]] && [[ ${ret} -ne 1 ]]; then
82 echo "! failed to extract NVAPI"
86 ## install NVIDIA GPU Deployment Kit
87 chmod +x gdk_linux_amd64_352_55_release.run
&& \
88 .
/gdk_linux_amd64_352_55_release.run
--silent --installdir=${deps_dir}/nvidia-gdk
91 echo "! failed to install NVIDIA GPU Deployment Kit"
95 ## extract AMD APP SDK
96 tar xjf AMD-APP-SDKInstaller-v3.0
.130.135-GA-linux64.
tar.bz2
&& \
97 .
/AMD-APP-SDK-v3.0
.130.135-GA-linux64.sh
--noexec --target ${deps_dir}/amd-app-sdk-v3.0
.130.135
100 echo "! failed to extract AMD APP SDK"
104 rm -rf ${deps_dir}/amd-app-sdk && ln -s ${deps_dir}/amd-app-sdk-v3.0.130.135 ${deps_dir}/amd-app-sdk
105 rm -rf ${deps_dir}/tmp
/AMD-APP-SDK-v3.0
.130.135-GA-linux64.sh
107 if [ $?
-ne 0 ]; then
108 echo "! failed to setup ADL SDK link"
112 echo "> oclHashcat dependencies have been resolved."