Chủ đề
Tìm câu trả lời trong các chủ đềTin tức
Các tin tức & thông báo
Hướng dẫn cài đặt
Yubikey: Tự động nhập mã Pin bằng AutoHotKey
Việc sử dụng Yubikey để ký mã sẽ có bất tiện trong việc Yubikey yêu cầu nhập mã Pin mỗi lần ký
Sử dụng AutoHotkey để tự động hóa quá trình này với mã bên dưới (Tương thích AutoHotkey 1.1)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #SingleInstance Force ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #persistent ;this section runs automatically at startup ; set up timer to keep checking for our pin window settimer, checkForNewWindow, 50 ;every 100ms, run the label. I find 50ms works better on Windows 11. return checkForNewWindow: ;the label WinGet, id, list,,, Program Manager ;list of windows (exclude the desktop) if (id > lastid) { WinGetActiveTitle, Title If InStr(Title, "Windows Security") { Send, YOUR_PIN_HERE{Enter} lastid := 0 ; reset so next popup is always checked } } lastid := id ;always keep up to date Return
Thay thế mục YOUR_PIN_HERE thành mã PIN của bạn, mặc định: 123456
Lưu thành tập tin your_script.ahk của bạn
Sau đó khởi chạy lệnh:
Start "" /b "c:program filesautohotkeyautohotkey.exe" "your_script.ahk"
Thoát lệnh:
taskkill /IM autohotkey.exe /F
Các tham số chỉnh sửa đúng với thực tế trên máy của bạn
Nguồn: https://deciphertools.com/blog/ssl-com-yubikey-pin...