2 # Author: Gabriele Gristina <matrix@hashcat.net>
6 DEPS
="make gcc g++ gcc-multilib g++-multilib libc6-dev-i386 mingw-w64 build-essential unzip opencl-headers ocl-icd-libopencl1 dos2unix"
7 DEPS_AMD_DEV
="ocl-icd-opencl-dev"
8 ## Now suppressed: ADL_SDK9.zip gdk_linux_amd64_352_55_release.run
9 DOWNLOAD_DEPS
="R352-developer.zip"
11 ## enter the deps directory
12 cur_directory
=$
(dirname ${0})
13 script_directory
=$
(cd ${cur_directory} && pwd -P)
14 deps_dir
=${script_directory}/..
/deps
16 mkdir
-p ${deps_dir} # but it should already exist (is part of the repository)
19 ## cleanup the directories under the 'deps' folder
20 rm -rf {adl-sdk
*,nvidia-gdk
,R352-developer
} && \
21 #mkdir -p {tmp,adl-sdk,nvidia-gdk,R352-developer} && \
22 mkdir
-p {tmp
,R352-developer
} && \
26 echo "! Cannot create deps directories."
32 for d
in ${DOWNLOAD_DEPS}; do
33 if [ ! -f "${d}" ]; then
34 echo "! ${d} not found."
39 if [ ${i} -gt 0 ]; then
40 echo "! Please manually download all the above dependencies to the deps/tmp/ directory"
44 ## installing needed packages
45 for pkg
in ${DEPS}; do
47 # check if the package is already installed
48 dpkg
-s ${pkg} &>/dev
/null
50 sudo apt-get
-y install ${pkg}
52 echo "! failed to install ${pkg}"
59 #unzip ADL_SDK9.zip -d ${deps_dir}/adl-sdk-9
62 #if [[ ${ret} -ne 0 ]] && [[ ${ret} -ne 1 ]]; then
63 # echo "! failed to extract ADL SDK"
67 #rm -rf ${deps_dir}/adl-sdk && ln -s ${deps_dir}/adl-sdk-9 ${deps_dir}/adl-sdk
69 #if [ $? -ne 0 ]; then
70 # echo "! failed to setup ADL SDK link"
75 unzip R352-developer.
zip -d ${deps_dir}
78 if [[ ${ret} -ne 0 ]] && [[ ${ret} -ne 1 ]]; then
79 echo "! failed to extract NVAPI"
83 ## install NVIDIA GPU Deployment Kit
84 #chmod +x gdk_linux_amd64_352_55_release.run && \
85 #./gdk_linux_amd64_352_55_release.run --silent --installdir=${deps_dir}/nvidia-gdk
87 #if [ $? -ne 0 ]; then
88 # echo "! failed to install NVIDIA GPU Deployment Kit"
92 ## check if libOpenCL.so is available (and if not install DEPS_AMD_DEV)
94 ls /usr
/lib
/*/libOpenCL.so
&> /dev
/null
97 sudo apt-get
-y install ${DEPS_AMD_DEV}
99 echo "! failed to install ${DEPS_AMD_DEV}"
104 echo "> oclHashcat dependencies have been resolved."