From 23b09a791a23638134078673509c2c8166365166 Mon Sep 17 00:00:00 2001 From: Eggman20339 Date: Sun, 5 May 2024 19:34:39 -0400 Subject: [PATCH] messign with leds --- .idea/CNSA-276-FP.iml | 2 +- .idea/misc.xml | 2 +- main.py | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.idea/CNSA-276-FP.iml b/.idea/CNSA-276-FP.iml index b4c5f04..673a12b 100644 --- a/.idea/CNSA-276-FP.iml +++ b/.idea/CNSA-276-FP.iml @@ -5,7 +5,7 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 0cddb8e..92298c3 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/main.py b/main.py index 5519220..d167ed6 100644 --- a/main.py +++ b/main.py @@ -32,7 +32,7 @@ This works with both FIDO 2.0 devices as well as with U2F devices. On Windows, the native WebAuthn API will be used. """ import time - +import RPI.GPIO as GPIO import pickle import psycopg2 import fido2.webauthn @@ -45,6 +45,8 @@ import ctypes from fido2.ctap2 import Ctap2 gotAaguid = None +GPIO.setmode(GPIO.BCM) +GPIO.setup(14, GPIO.OUT) class CliInteraction(UserInteraction): def prompt_up(self): @@ -181,6 +183,12 @@ while True: print("Credential authenticated!") + for i in range(10): + GPIO.output(14, GPIO.HIGH) + time.sleep(0.2) + GPIO.output(14, GPIO.LOW) + time.sleep(0.2) + print("CLIENT DATA:", result.client_data) print() print("AUTH DATA:", result.authenticator_data)