本文仅作技术分享,提醒各位注意网络应用安全性,请勿用于其他用途,否则后果自负。
前几天写过一篇这样的文章,但是耐不住WgpSecBot总是崩溃,于是打算自己写一个
【脚本】基于WgpSecBot的比赛推送
但是问题又来了,自从腾讯封了Web和UOS协议后,就再也弄不到机器人了。
但是苍天不负有心人,我找到了这个Github-wechat-bot
这个版本是基于对Windows下的微信进行内存注入实现的
继续阅读【WechatBot】基于内存注入下的微信机器人
标签: Windows
【WSL】WSL2-Ubuntu安装CUDA
某一天,在摸鱼的时候被人拍了一下,叫我用Kali跑一下hashcat,因为hashcat可以调用CUDA(显卡)模块,加速爆破 虽然实际上,我的CPU跑起来也很快 但是,既然来了就研究一下。但是我又不想装多系统,那么就该想想怎么在WSL里面调用CUDA了。
Update: 其实做到最后我又重新做了一遍。原因在于,我的linux核心其实不支持CUDA。 GPU_CUDA_IN_WSL 在安装前,你需要确认一下你的内核版本,只有5.10.43.3以上的版本才是默认支持的
PS C:\Users\hz2016> wsl cat /proc/version
Linux version 5.10.16.3-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Apr 2 22:23:49 UTC 2021
你需要打开下面的功能,并且把内核更新到最新版
- 安装Ubuntu的WSL版并换源
由于WSL版的Ubuntu不自带gcc,所以我们在安装CUDA前要自己装一个
apt-get install gcc -y
- 安装CUDA for WSL-Ubuntu
CUDA Toolkit官网下载 我安装的十CUDA Toolkit 11.6版本,选择的是Runfile(可执行文件)安装 别问为什么,只要知道我翻车很多次就是了。
wget https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run
sudo sh cuda_11.6.2_510.47.03_linux.run
千万别点进去Options的Drives,别问我为什么问就是我在来了一次 安装完成
===========
= Summary =
===========
Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-11.6/
Please make sure that
- PATH includes /usr/local/cuda-11.6/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-11.6/lib64, or, add /usr/local/cuda-11.6/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run cuda-uninstaller in /usr/local/cuda-11.6/bin
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 510.00 is required for CUDA 11.6 functionality to work.
To install the driver using this installer, run the following command, replacing with the name of this run file:
sudo .run --silent --driver
- 添加PATH路径
export PATH=/usr/local/cuda-11.6/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.6/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- 验证是否更新成功
root@hz2016-pc:~# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_Mar__8_18:18:20_PST_2022
Cuda compilation tools, release 11.6, V11.6.124
Build cuda_11.6.r11.6/compiler.31057947_0
- 更新你的显卡驱动
A driver of version at least 510.00 is required for CUDA 11.6 functionality to work.
打开GPU-Z查看一下 发现自己是497.29版本的显卡驱动,于是更新一下
然后你就可以在你的WSL里面跑CUDA了~
- 安装OpenCL相关(翻车)
apt-get install beignet clinfo
apt-get install beignet-dev
apt-cache search opencl
运行clinfo测试一下
root@hz2016-pc:~# clinfo
······
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
······
还是找不到GPU,翻了下文档,还是我想多了
OpenGL-CUDA Interop is not yet supported. Applications relying on OpenGL will not work.
要用GPU跑hashcat还是去win版跑吧 实测GPU跑比CPU跑快130倍
【脚本】Linux换源汇总
由于换源需求过多,又不想每一次都上网查,于是有此博客记录不同系统换源过程
PS:为什么不能有一键换源脚本呢
继续阅读【脚本】Linux换源汇总