linux中ubuntu安装hashcat方法以及使用GPU破解

一、linux安装hashcat

# sudo apt install -y build-essential git  # 安装git
git clone https://github.com/hashcat/hashcat.git
# git clone https://kgithub.com/hashcat/hashcat.git # 国内镜像克隆
cd hashcat
make
make install
newgrp  # 刷新

二、安装驱动

驱动版本安装大全:https://developer.nvidia.com/cuda-toolkit-archive
驱动版本显卡对照表:https://blog.csdn.net/liferecords/article/details/127528193
查看自己显卡选择对应的版本,根据下面命令无脑安装就行了

cat /etc/issue # 查看Linux系统发行版本,如ubuntu、kail等

在这里插入图片描述

sudo apt update & sudo apt upgrade  # 更新一下环境
wget https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_535.54.03_linux.run
sudo sh cuda_12.2.0_535.54.03_linux.run  
nvidia-smi   # 查看显卡驱动信息

三、测试

hashcat -I  # 查看硬件信息
hashcat -b -m 22000  # 测试是否正常运行以及破解速度

四、其他报错解决

错误1:clGetPlatformIDs(): CL_PLATFORM_NOT_FOUND_KHR (好像不解决也正常能跑),执行下面命令解决

sudo apt-get install gcc make p7zip-full git lsb-core
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/9019/opencl_runtime_16.1.1_x64_ubuntu_6.4.0.25.tgz
tar -xvf opencl_runtime_16.1.1_x64_ubuntu_6.4.0.25.tgz
cd opencl_runtime_16.1.1_x64_ubuntu_6.4.0.25
sudo ./install.sh
# 会提示6个步骤,根据提示操作就好

错误2:nvrtcCompileProgram(): NVRTC_ERROR_INVALID_OPTION,驱动或CUDA版本不对,多尝试几个试试,或者对现有CUDA进行更新。

nvidia-smi   # 查看现有显卡驱动信息

在这里插入图片描述

然后对现有CUDA进行更新

在这里插入图片描述
在这里插入图片描述

按空格取消安装驱动,直接安装CUDA,然后选更新

在这里插入图片描述

在这里插入图片描述

等待更新之后要重启电脑

reboot

猜你喜欢

转载自blog.csdn.net/weixin_51111267/article/details/132359636