惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
MyScale Blog
MyScale Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学
Vercel News
Vercel News
D
Docker
博客园 - 聂微东
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
D
DataBreaches.Net
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
美团技术团队
F
Fortinet All Blogs
MongoDB | Blog
MongoDB | Blog
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
N
Netflix TechBlog - Medium
G
Google Developers Blog
腾讯CDC

轶哥博客

blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog blog
blog
2019-11-12 · via 轶哥博客

在新版的 Win10 中,微软添加了 Windows Hello 人脸Windows Hello 指纹安全密钥 等登陆方式。对于不搭载专属配件的设备来说,实现任意一种免密登录的成本都比较高。而 DigiSpark 成本非常低,不到7元包邮,可以实现模拟键鼠。受USB免密登录的启发,通过 DigiSpark 实现 Windows 免密登录,可以做到 移动密钥 的效果 —— 插入即可免密登录,拔出则自动锁定设备。

DigiSpark正面

DigiSpark背面

烧录到DigiSpark的代码:

#include "DigiKeyboard.h" //library declaration

void setup() {
  pinMode(1, OUTPUT); //LED on Model USB type A
  DigiKeyboard.update(); //Get the Keboard input ready
  DigiKeyboard.delay(500);
  DigiKeyboard.sendKeyStroke(KEY_SPACE);
  DigiKeyboard.delay(2000);
  DigiKeyboard.println("你的开机密码或Pin密码");
  DigiKeyboard.delay(500);
  DigiKeyboard.sendKeyStroke(KEY_ENTER);
  digitalWrite(1, HIGH); //Turn on the LED when program finishes
}

void loop() {
}

C# 实现 拔出设备则自动锁定 的 Windows服务源代码: https://github.com/yi-ge/USBAuth

运行方法: 进入bin\Release,右键以管理员权限运行USBAuth.exe

拔出设备则自动锁定

注意:添加设备期间,请勿激活命令行窗口(点击其他应用即可),否则设备执行回车将导致程序异常退出。