mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
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:
@@ -406,14 +406,15 @@ def gen_parameters(opts):
|
|||||||
def print_parameters(params):
|
def print_parameters(params):
|
||||||
|
|
||||||
print """Generated card parameters :
|
print """Generated card parameters :
|
||||||
> Name : %(name)s
|
> Name : %(name)s
|
||||||
> SMSP : %(smsp)s
|
> SMSP : %(smsp)s
|
||||||
> ICCID : %(iccid)s
|
> ICCID : %(iccid)s
|
||||||
> MCC/MNC : %(mcc)d/%(mnc)d
|
> MCC/MNC : %(mcc)d/%(mnc)d
|
||||||
> IMSI : %(imsi)s
|
> IMSI : %(imsi)s
|
||||||
> Ki : %(ki)s
|
> Ki : %(ki)s
|
||||||
> OPC : %(opc)s
|
> OPC : %(opc)s
|
||||||
> ACC : %(acc)s
|
> ACC : %(acc)s
|
||||||
|
> ADM1(hex): %(pin_adm)s
|
||||||
""" % params
|
""" % params
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -496,7 +496,7 @@ class SysmoSIMgr2(Card):
|
|||||||
# P2: CHV number, as in VERIFY CHV for PIN, and as in UNBLOCK CHV for PUK
|
# 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)
|
# P3: 08, CHV length (curiously the PUK is also 08 length, instead of 10)
|
||||||
if p['pin_adm']:
|
if p['pin_adm']:
|
||||||
pin = p['pin_adm']
|
pin = h2b(p['pin_adm'])
|
||||||
else:
|
else:
|
||||||
pin = h2b("4444444444444444")
|
pin = h2b("4444444444444444")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user