Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
smartlock/yubikey.py

12 lines
315 B
Python

from yubico_client import Yubico
import lock, shelve
with shelve.open("Settings.conf") as settings:
client = Yubico(settings["id"], settings["secret"], api_urls=('http://localhost/wsapi/2.0/verify',))
while True:
try:
client.verify(input())
except:
pass
else:
lock.switch()