Fix when ping is provided during the initialization.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2022-12-06 20:00:19 +01:00
parent 9e9cf9b768
commit f2874ae3ef
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -241,7 +241,13 @@ def initialize(card, args):
_ = input('[Press enter to confirm]') _ = input('[Press enter to confirm]')
send_apdu(card, 0xA4, 0x04, 0x00, [0xE8, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x81, 0xC3, 0x1F, 0x02, 0x01]) 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' pin = b'648219'
if (args.so_pin): if (args.so_pin):