summaryrefslogtreecommitdiffstats
path: root/.bin/yubikey-reset
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-23 18:28:03 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-23 18:28:03 +0000
commit0f08d04698c814955116b6bae50752e64b774d8f (patch)
tree8cf9a33557093eebfd25aab2872e97639c7e2f62 /.bin/yubikey-reset
downloaddots-0f08d04698c814955116b6bae50752e64b774d8f.tar.gz
Thu Dec 23 06:28:03 PM UTC 2021
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.