pySim-prog: Print out hex-escaped pin_adm in card parameters

Use h2b to convert pin_adm back to binary form for sysmoSIMgr2

Change-Id: Ia178c9938f3e6a4fbac24d767437894297d1e708
This commit is contained in:
Daniel Willmann 2018-06-15 07:31:50 +02:00
parent 9f9c60937e
commit 7d38d74716
2 changed files with 10 additions and 9 deletions

View File

@ -414,6 +414,7 @@ def print_parameters(params):
> Ki : %(ki)s
> OPC : %(opc)s
> ACC : %(acc)s
> ADM1(hex): %(pin_adm)s
""" % params

View File

@ -496,7 +496,7 @@ class SysmoSIMgr2(Card):
# P2: CHV number, as in VERIFY CHV for PIN, and as in UNBLOCK CHV for PUK
# P3: 08, CHV length (curiously the PUK is also 08 length, instead of 10)
if p['pin_adm']:
pin = p['pin_adm']
pin = h2b(p['pin_adm'])
else:
pin = h2b("4444444444444444")