summaryrefslogtreecommitdiffstats
path: root/.bin/yubikey-reset
diff options
context:
space:
mode:
Diffstat (limited to '.bin/yubikey-reset')
-rwxr-xr-x.bin/yubikey-reset20
1 files changed, 20 insertions, 0 deletions
diff --git a/.bin/yubikey-reset b/.bin/yubikey-reset
new file mode 100755
index 0000000..4824bc8
--- /dev/null
+++ b/.bin/yubikey-reset
@@ -0,0 +1,20 @@
+echo "DESTRUCTIVE !!!"
+
+sleep 60
+
+gpg-connect-agent <<EOF
+/hex
+scd serialno
+scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
+scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
+scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
+scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
+scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
+scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
+scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
+scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
+scd apdu 00 e6 00 00
+scd apdu 00 44 00 00
+/echo Yubikey has been successfully reset.
+/echo The factory default PINs are 123456 (user) and 12345678 (admin).
+EOF
remember that computers suck.