diff --git a/tools/pico-hsm-tool.py b/tools/pico-hsm-tool.py index bbad3b8..4ddbbe6 100644 --- a/tools/pico-hsm-tool.py +++ b/tools/pico-hsm-tool.py @@ -241,7 +241,13 @@ def initialize(card, args): _ = input('[Press enter to confirm]') send_apdu(card, 0xA4, 0x04, 0x00, [0xE8, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x81, 0xC3, 0x1F, 0x02, 0x01]) - if (not args.pin): + if (args.pin): + pin = args.pin.encode() + try: + response = send_apdu(card, 0x20, 0x00, 0x81, list(pin)) + except APDUResponse: + pass + else: pin = b'648219' if (args.so_pin):