aboutsummaryrefslogtreecommitdiff
path: root/hasyubi
diff options
context:
space:
mode:
authorMarvin Borner2023-03-17 18:20:44 +0100
committerMarvin Borner2023-03-17 18:20:44 +0100
commit1562aad7d4e1b24d8191de892f2d216ee0f6de7b (patch)
treea86a827deded319c46d952994b9c237213d0b6da /hasyubi
parent3e8f62c35fce80343b5359b45924f7bc3fc22d4f (diff)
Yubikey
Diffstat (limited to 'hasyubi')
-rwxr-xr-xhasyubi13
1 files changed, 13 insertions, 0 deletions
diff --git a/hasyubi b/hasyubi
new file mode 100755
index 0000000..95fe37b
--- /dev/null
+++ b/hasyubi
@@ -0,0 +1,13 @@
+#!/bin/env sh
+
+# WARNING: This (obiously) isn't a replacement for normal challenge-response verification.
+# This only serves as an additional security measure IF YOU ALREADY TRUST YOUR ENVIRONMENT
+
+SERIAL="YOURSERIAL"
+connected=$(ykman list --serials 2>/dev/null)
+
+if [ "$connected" = "$SERIAL" ]; then
+ exit 0
+else
+ exit 1
+fi