Compare commits
27 Commits
Author | SHA1 | Date |
---|---|---|
Philipp Maier | e82fed7520 | |
Philipp Maier | 6702e0e5e8 | |
Philipp Maier | de8db1c189 | |
Philipp Maier | b8c465a72d | |
Philipp Maier | fb9d5f7591 | |
Philipp Maier | a97d2a2858 | |
Philipp Maier | 12ce2512be | |
Philipp Maier | 0a2aa28f4e | |
Philipp Maier | e3d250b805 | |
Philipp Maier | 93facf5eda | |
Philipp Maier | 359d8ef645 | |
Philipp Maier | 86a6bb6ea5 | |
Philipp Maier | 4e196ceaf4 | |
Philipp Maier | 7209731730 | |
Philipp Maier | 513de41913 | |
Harald Welte | ba5a5ce6e7 | |
Harald Welte | 5af5ace55d | |
Harald Welte | 9c73667324 | |
Harald Welte | caa06046be | |
Harald Welte | 379a0fe771 | |
Harald Welte | 82a785d27f | |
Philipp Maier | 7c6777d127 | |
Philipp Maier | 1b44d0e651 | |
Philipp Maier | 6d205d3a1a | |
Philipp Maier | 2c57f2a476 | |
Philipp Maier | da4af9d9fa | |
canghaiwuhen | 0e73184c17 |
|
@ -351,7 +351,7 @@ def write_dict(dict, fd):
|
|||
rec = dict[k]
|
||||
if isinstance(rec, list) and \
|
||||
len(rec) == [isinstance(i, int) for i in rec].count(True):
|
||||
rec = ''.join(['[', ', '.join(map(hex, rec)), ']'])
|
||||
rec = ''.join(['[', ', '.join(list(map(hex, rec))), ']'])
|
||||
fd.write('%s: %s\n' % (k, rec))
|
||||
|
||||
def make_graph(FS, master_name='(0x3F, 0x00)\nMF'):
|
||||
|
|
56
common.py
56
common.py
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
|
@ -27,9 +27,9 @@ from utils import *
|
|||
import sys, getopt
|
||||
|
||||
COMMON_GETOPTS = "hfa:J:nN:lL:kK:tT:oO:C:sSip"
|
||||
COMMON_GETOPTS_LONG = ["help", "force", "adm1=", "set-imsi", "mnclen",
|
||||
"set-mnclen", "milenage", "set-milenage", "ki",
|
||||
"set-ki=", "auth", "set-auth=", "opc", "set-op=",
|
||||
COMMON_GETOPTS_LONG = ["help", "force", "adm1=", "set-imsi=", "mnclen",
|
||||
"set-mnclen=", "milenage", "set-milenage=", "key",
|
||||
"set-key=", "auth", "set-auth=", "opc", "set-op=",
|
||||
"set-opc=", "seq-parameters", "reset-seq-parameters"
|
||||
"iccid", "aid"]
|
||||
|
||||
|
@ -46,8 +46,8 @@ class Common():
|
|||
show_mnclen = None
|
||||
show_milenage = False
|
||||
write_milenage = None
|
||||
show_ki = None
|
||||
write_ki = None
|
||||
show_key = None
|
||||
write_key = None
|
||||
show_auth = False
|
||||
write_auth = None
|
||||
show_opc = False
|
||||
|
@ -58,9 +58,15 @@ class Common():
|
|||
show_iccid = False
|
||||
show_aid = False
|
||||
|
||||
def __init__(self, argv, getopts, getopts_long):
|
||||
# This flag specifies whether the commandline options should offer writing auth parameters (algorithm to use
|
||||
# for authentication). The commandline options are not implemented separately for each card since the method
|
||||
# calls are nearly the same for all card generations.
|
||||
write_auth_4g5g = False
|
||||
|
||||
def __init__(self, argv, getopts, getopts_long, write_auth_4g5g = False):
|
||||
|
||||
self._banner()
|
||||
self.write_auth_4g5g = write_auth_4g5g
|
||||
|
||||
# Analyze commandline options
|
||||
try:
|
||||
|
@ -84,19 +90,21 @@ class Common():
|
|||
elif opt in ("-n", "--mnclen"):
|
||||
self.show_mnclen = True
|
||||
elif opt in ("-N", "--set-mnclen"):
|
||||
if len(arg) == 1:
|
||||
arg = "0" + arg
|
||||
self.write_mnclen = asciihex_to_list(arg)
|
||||
elif opt in ("-l", "--milenage"):
|
||||
self.show_milenage = True
|
||||
elif opt in ("-L", "--set-milenage"):
|
||||
self.write_milenage = asciihex_to_list(arg)
|
||||
elif opt in ("-k", "--ki"):
|
||||
self.show_ki = True
|
||||
elif opt in ("-K", "--set-ki"):
|
||||
self.write_ki = asciihex_to_list(arg)
|
||||
elif opt in ("-k", "--key"):
|
||||
self.show_key = True
|
||||
elif opt in ("-K", "--set-key"):
|
||||
self.write_key = asciihex_to_list(arg)
|
||||
elif opt in ("-t", "--auth"):
|
||||
self.show_auth = True
|
||||
elif opt in ("-T", "--set-auth"):
|
||||
self.write_auth = arg.split(':',1)
|
||||
self.write_auth = arg.split(':', 2)
|
||||
elif opt in ("-o", "--opc"):
|
||||
self.show_opc = True
|
||||
elif opt in ("-O", "--set-op"):
|
||||
|
@ -139,10 +147,13 @@ class Common():
|
|||
print(" -N, --set-mnclen ............... Set MNC length value")
|
||||
print(" -l, --milenage ................. Show milenage parameters")
|
||||
print(" -L, --set-milenage HEXSTRING ... Set milenage parameters")
|
||||
print(" -k, --ki ....................... Show KI value")
|
||||
print(" -K, --set-ki ................... Set KI value")
|
||||
print(" -t, --auth ..................... Show Authentication algorithms")
|
||||
print(" -T, --set-auth 2G:3G ........... Set 2G/3G Auth algo (e.g. COMP128v1:COMP128v1)")
|
||||
print(" -k, --key ...................... Show auth key value")
|
||||
print(" -K, --set-key .................. Set auth key value")
|
||||
print(" -t, --auth ..................... Show authentication algorithms")
|
||||
if self.write_auth_4g5g:
|
||||
print(" -T, --set-auth 2g:3g[:4g5g] .... Set 2G/3G auth algo (e.g. COMP128v1:COMP128v1)")
|
||||
else:
|
||||
print(" -T, --set-auth 2g:3g ........... Set 2G/3G auth algo (e.g. COMP128v1:COMP128v1)")
|
||||
print(" -o, --opc ...................... Show OP/c configuration")
|
||||
print(" -O, --set-op HEXSTRING ......... Set OP value")
|
||||
print(" -C, --set-opc HEXSTRING ........ Set OPc value")
|
||||
|
@ -180,17 +191,20 @@ class Common():
|
|||
if self.show_milenage:
|
||||
self.sim.show_milenage_params()
|
||||
|
||||
if self.write_ki:
|
||||
self.sim.write_ki_params(self.write_ki)
|
||||
if self.write_key:
|
||||
self.sim.write_key_params(self.write_key)
|
||||
|
||||
if self.show_ki:
|
||||
self.sim.show_ki_params()
|
||||
if self.show_key:
|
||||
self.sim.show_key_params()
|
||||
|
||||
if self.show_auth:
|
||||
self.sim.show_auth_params()
|
||||
|
||||
if self.write_auth:
|
||||
self.sim.write_auth_params(self.write_auth[0], self.write_auth[1])
|
||||
if self.write_auth_4g5g and len(self.write_auth) > 2:
|
||||
self.sim.write_auth_params(self.write_auth[0], self.write_auth[1], self.write_auth[2])
|
||||
else:
|
||||
self.sim.write_auth_params(self.write_auth[0], self.write_auth[1])
|
||||
|
||||
if self.show_opc:
|
||||
self.sim.show_opc_params()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Commandline interface for sysmoUSIM-SJS1
|
||||
Commandline interface for sysmoISIM-SJA2
|
||||
|
||||
(C) 2017 by Sysmocom s.f.m.c. GmbH
|
||||
(C) 2019-2022 by sysmocom - s.f.m.c. GmbH
|
||||
All Rights Reserved
|
||||
|
||||
Author: Philipp Maier
|
||||
|
@ -37,7 +37,7 @@ class Application(Common):
|
|||
# Automatically executed by superclass
|
||||
def _banner(self):
|
||||
print("sysmoISIM-SJA2 parameterization tool")
|
||||
print("Copyright (c)2019 Sysmocom s.f.m.c. GmbH")
|
||||
print("Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH")
|
||||
print("")
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ class Application(Common):
|
|||
|
||||
def main(argv):
|
||||
|
||||
Application(argv, "d", ["dump"])
|
||||
Application(argv, "d", ["dump"], True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Commandline interface for sysmoISIM-SJA5
|
||||
|
||||
(C) 2023 by sysmocom - s.f.m.c. GmbH
|
||||
All Rights Reserved
|
||||
|
||||
Author: Philipp Maier
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
import sys, getopt
|
||||
from utils import *
|
||||
from simcard import *
|
||||
from sysmo_isim_sja2 import *
|
||||
from common import *
|
||||
|
||||
class Application(Common):
|
||||
|
||||
getopt_dump = False
|
||||
getopt_show_tuak_cfg = False
|
||||
getopt_write_tuak_cfg = None
|
||||
|
||||
# Automatically executed by superclass
|
||||
def _banner(self):
|
||||
print("sysmoISIM-SJA5 parameterization tool")
|
||||
print("Copyright (c) 2023 sysmocom - s.f.m.c. GmbH")
|
||||
print("")
|
||||
|
||||
|
||||
# Automatically executed by superclass
|
||||
def _options(self, opts):
|
||||
for opt, arg in opts:
|
||||
if opt in ("-d", "--dump"):
|
||||
self.getopt_dump = True
|
||||
elif opt in ("-w", "--tuak-cfg"):
|
||||
self.getopt_show_tuak_cfg = True
|
||||
elif opt in ("-W", "--set-tuak-cfg"):
|
||||
self.getopt_write_tuak_cfg = arg.split(':', 3)
|
||||
|
||||
# Automatically executed by superclass when -h or --help is supplied as option
|
||||
def _helptext(self):
|
||||
print(" -d, --dump ..................... Dump propritary file contents")
|
||||
print(" -w, --tuak-cfg ................. Show TUAK configuration")
|
||||
print(" -W, --set-tuak-cfg R:M:C:K ..... Set TUAK configuration")
|
||||
print("")
|
||||
print(" For Option -T, the following algorithms are valid:")
|
||||
print('\n'.join([' %d %s' % entry for entry in sysmo_isimsja5_algorithms]))
|
||||
print("")
|
||||
print(" For Option -W, the following values are applicable:")
|
||||
print(" R = RES-Size in bits: 32, 64, 128 or 256")
|
||||
print(" M = MAC-A and MAC-S size in bits: 64, 128 or 256")
|
||||
print(" C = CK and IK size in bits: 128 or 256")
|
||||
print(" K = Number of Keccak iterations: 1-255")
|
||||
print("")
|
||||
|
||||
# Automatically executed by superclass before _execute() is called
|
||||
def _init(self):
|
||||
self.sim = Sysmo_isim_sja5()
|
||||
|
||||
|
||||
# Automatically executed by superclass
|
||||
def _execute(self):
|
||||
|
||||
if self.getopt_dump:
|
||||
self.sim.dump()
|
||||
elif self.getopt_show_tuak_cfg:
|
||||
self.sim.show_tuak_cfg()
|
||||
elif self.getopt_write_tuak_cfg:
|
||||
self.sim.write_tuak_cfg(self.getopt_write_tuak_cfg[0], self.getopt_write_tuak_cfg[1], \
|
||||
self.getopt_write_tuak_cfg[2], self.getopt_write_tuak_cfg[3])
|
||||
|
||||
def main(argv):
|
||||
|
||||
Application(argv, "dwW:", ["dump"], True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1:])
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
|
|
1024
sysmo_isim_sja2.py
1024
sysmo_isim_sja2.py
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
|
@ -187,14 +187,26 @@ class Sysmo_usim:
|
|||
print(" * Error: mnclen value must consist of a single byte!")
|
||||
return
|
||||
|
||||
print(" * Programming...")
|
||||
|
||||
# EF.AD in DF.GSM
|
||||
self.sim.select(GSM_SIM_DF_GSM)
|
||||
self.sim.select(GSM_SIM_EF_AD)
|
||||
|
||||
res = self.sim.read_binary(4)
|
||||
new_ad = res.apdu[0:3] + mnclen
|
||||
|
||||
print(" * Programming...")
|
||||
self.sim.update_binary(new_ad)
|
||||
|
||||
# EF.AD in ADF.USIM
|
||||
self.sim.card.SELECT_ADF_USIM()
|
||||
self.sim.select(GSM_SIM_EF_AD)
|
||||
|
||||
res = self.sim.read_binary(4)
|
||||
new_ad = res.apdu[0:3] + mnclen
|
||||
|
||||
self.sim.update_binary(new_ad)
|
||||
|
||||
print("")
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
|
@ -471,7 +471,7 @@ class Sysmo_usim_sjs1(Sysmo_usim):
|
|||
|
||||
|
||||
# Show current KI value
|
||||
def show_ki_params(self):
|
||||
def show_key_params(self):
|
||||
print("Reading KI value...")
|
||||
print(" * Reading...")
|
||||
self.sim.select(GSM_SIM_DF_GSM)
|
||||
|
@ -484,7 +484,7 @@ class Sysmo_usim_sjs1(Sysmo_usim):
|
|||
|
||||
|
||||
# Program new KI value
|
||||
def write_ki_params(self, ki):
|
||||
def write_key_params(self, ki):
|
||||
print("Writing KI value...")
|
||||
self._init()
|
||||
|
||||
|
|
|
@ -32,3 +32,23 @@ echo ""
|
|||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
# The sysmo-isim-sja5 related tests will be activated as soon as a physical
|
||||
# card becomes available in the test fixture.
|
||||
#
|
||||
#echo "=========================================================="
|
||||
#echo " EXECUTING TESTS FOR SYSMO-USIM-SJA5"
|
||||
#echo "=========================================================="
|
||||
#echo ""
|
||||
#cd ./sja5
|
||||
#echo "Location $PWD"
|
||||
#echo ""
|
||||
#sh ./run-tests
|
||||
#if [ ! $? -eq 0 ]; then
|
||||
# exit 1
|
||||
#fi
|
||||
#cd ..
|
||||
#echo ""
|
||||
#echo ""
|
||||
#echo ""
|
||||
#echo ""
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -16,13 +16,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 1=COMP128v1
|
||||
3G: 1=COMP128v1
|
||||
2g: 1=COMP128v1
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -40,12 +41,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 1=COMP128v1
|
||||
3G: 1=COMP128v1
|
||||
2g: 1=COMP128v1
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -62,13 +64,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 3=XOR-2G
|
||||
3G: 1=COMP128v1
|
||||
2g: 3=COMP128v3
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -86,12 +89,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 3=XOR-2G
|
||||
3G: 1=COMP128v1
|
||||
2g: 3=COMP128v3
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -108,13 +112,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 4=MILENAGE
|
||||
3G: 1=COMP128v1
|
||||
2g: 4=MILENAGE
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -132,12 +137,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 4=MILENAGE
|
||||
3G: 1=COMP128v1
|
||||
2g: 4=MILENAGE
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -154,13 +160,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 5=SHA1-AKA
|
||||
3G: 1=COMP128v1
|
||||
2g: 5=SHA1-AKA
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -178,12 +185,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 5=SHA1-AKA
|
||||
3G: 1=COMP128v1
|
||||
2g: 5=SHA1-AKA
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -200,13 +208,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 15=XOR
|
||||
3G: 1=COMP128v1
|
||||
2g: 15=XOR
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -224,12 +233,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 15=XOR
|
||||
3G: 1=COMP128v1
|
||||
2g: 15=XOR
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -246,13 +256,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 1=COMP128v1
|
||||
3G: 4=MILENAGE
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -270,12 +281,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 1=COMP128v1
|
||||
3G: 4=MILENAGE
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -292,13 +304,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 3=XOR-2G
|
||||
3G: 15=XOR
|
||||
2g: 3=COMP128v3
|
||||
3g: 15=XOR
|
||||
4g5g: 15=XOR
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -316,12 +329,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 3=XOR-2G
|
||||
3G: 15=XOR
|
||||
2g: 3=COMP128v3
|
||||
3g: 15=XOR
|
||||
4g5g: 15=XOR
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -338,13 +352,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 2=COMP128v2
|
||||
3G: 2=COMP128v2
|
||||
2g: 2=COMP128v2
|
||||
3g: 2=COMP128v2
|
||||
4g5g: 2=COMP128v2
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -362,12 +377,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 2=COMP128v2
|
||||
3G: 2=COMP128v2
|
||||
2g: 2=COMP128v2
|
||||
3g: 2=COMP128v2
|
||||
4g5g: 2=COMP128v2
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -384,13 +400,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 1=COMP128v1
|
||||
3G: 3=XOR-2G
|
||||
2g: 1=COMP128v1
|
||||
3g: 3=COMP128v3
|
||||
4g5g: 3=COMP128v3
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -408,12 +425,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 1=COMP128v1
|
||||
3G: 3=XOR-2G
|
||||
2g: 1=COMP128v1
|
||||
3g: 3=COMP128v3
|
||||
4g5g: 3=COMP128v3
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -430,13 +448,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 4=MILENAGE
|
||||
3G: 4=MILENAGE
|
||||
2g: 1=COMP128v1
|
||||
3g: 2=COMP128v2
|
||||
4g5g: 3=COMP128v3
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -454,12 +473,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 4=MILENAGE
|
||||
3G: 4=MILENAGE
|
||||
2g: 1=COMP128v1
|
||||
3g: 2=COMP128v2
|
||||
4g5g: 2=COMP128v3
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -476,13 +496,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 1=COMP128v1
|
||||
3G: 4=MILENAGE
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 5=SHA1-AKA
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -500,12 +521,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 1=COMP128v1
|
||||
3G: 4=MILENAGE
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=SHA1-AKA
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -522,13 +544,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 3=XOR-2G
|
||||
3G: 4=MILENAGE
|
||||
2g: 5=SHA1-AKA
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 15=XOR
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -546,12 +569,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 3=XOR-2G
|
||||
3G: 4=MILENAGE
|
||||
2g: 5=SHA1-AKA
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=XOR
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -568,13 +592,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 2=COMP128v2
|
||||
3G: 4=MILENAGE
|
||||
2g: 4=MILENAGE
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -592,12 +617,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 2=COMP128v2
|
||||
3G: 4=MILENAGE
|
||||
2g: 4=MILENAGE
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -614,13 +640,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 5=SHA1-AKA
|
||||
3G: 15=XOR
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -638,12 +665,13 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 5=SHA1-AKA
|
||||
3G: 15=XOR
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -660,13 +688,14 @@ Authenticating...
|
|||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2G: 1=COMP128v1
|
||||
3G: 4=MILENAGE
|
||||
2g: 3=COMP128v3
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -684,7 +713,248 @@ Reading Authentication parameters...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2G: 1=COMP128v1
|
||||
3G: 4=MILENAGE
|
||||
2g: 3=COMP128v3
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2g: 2=COMP128v2
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Authentication parameters...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2g: 2=COMP128v2
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2g: 5=SHA1-AKA
|
||||
3g: 15=XOR
|
||||
4g5g: 15=XOR
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Authentication parameters...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2g: 5=SHA1-AKA
|
||||
3g: 15=XOR
|
||||
4g5g: 15=XOR
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Authentication parameters...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 5=SHA1-AKA
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Authentication parameters...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=SHA1-AKA
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2g: 2=COMP128v2
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 3=COMP128v3
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Authentication parameters...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current algorithm setting:
|
||||
2g: 2=COMP128v2
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v3
|
||||
|
||||
Done!
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
. ./test-data
|
||||
|
||||
ALGOS="1:1 3:1 4:1 5:1 15:1 1:4 3:15 2:2 1:3 "
|
||||
ALGOS=$ALGOS"MILENAGE:MILENAGE COMP128v1:MILENAGE XOR-2G:MILENAGE COMP128v2:MILENAGE SHA1-AKA:XOR COMP128v1:MILENAGE"
|
||||
ALGOS="1:1 3:1 4:1 5:1 15:1 1:4 3:15 2:2 1:3 1:2:3 1:4:5 5:4:15 "
|
||||
ALGOS=$ALGOS"MILENAGE:MILENAGE COMP128v1:MILENAGE COMP128v3:MILENAGE COMP128v2:MILENAGE SHA1-AKA:XOR COMP128v1:MILENAGE COMP128v1:MILENAGE:SHA1-AKA COMP128v2:COMP128v1:COMP128v3"
|
||||
for algo in $ALGOS; do
|
||||
$TOOL -a $ADMPIN -T $algo
|
||||
$TOOL -a $ADMPIN -t
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -30,7 +30,7 @@ Programming Milenage parameters...
|
|||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -61,7 +61,7 @@ Reading Milenage parameters...
|
|||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -92,7 +92,7 @@ Programming Milenage parameters...
|
|||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
|
|
@ -1,5 +1,29 @@
|
|||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2g: 4=MILENAGE
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -18,10 +42,13 @@ Writing OPc value...
|
|||
* New OPc setting:
|
||||
OPc: 000102030405060708090a0b0c0d0e0f
|
||||
* Programming...
|
||||
2g OPc programmed.
|
||||
3g OPc programmed.
|
||||
4g5g OPc programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -39,11 +66,13 @@ Reading OP/c value...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current OP/OPc setting:
|
||||
OPc: 000102030405060708090a0b0c0d0e0f
|
||||
2g: OPc: 000102030405060708090a0b0c0d0e0f
|
||||
3g: OPc: 000102030405060708090a0b0c0d0e0f
|
||||
4g5g: OPc: 000102030405060708090a0b0c0d0e0f
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -62,10 +91,13 @@ Writing OP value...
|
|||
* New OPc setting:
|
||||
OP: 840337c3d45397ce8ea8609ffdc47224
|
||||
* Programming...
|
||||
2g OP programmed.
|
||||
3g OP programmed.
|
||||
4g5g OP programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -83,6 +115,8 @@ Reading OP/c value...
|
|||
* Initalizing...
|
||||
* Reading...
|
||||
* Current OP/OPc setting:
|
||||
OP: 840337c3d45397ce8ea8609ffdc47224
|
||||
2g: OP: 840337c3d45397ce8ea8609ffdc47224
|
||||
3g: OP: 840337c3d45397ce8ea8609ffdc47224
|
||||
4g5g: OP: 840337c3d45397ce8ea8609ffdc47224
|
||||
|
||||
Done!
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#!/bin/sh
|
||||
. ./test-data
|
||||
|
||||
# OP/OPc is milenage specific, make sure we have milenage configured before
|
||||
# testing.
|
||||
$TOOL -a $ADMPIN -T "MILENAGE:MILENAGE"
|
||||
|
||||
$TOOL -a $ADMPIN -C 000102030405060708090a0b0c0d0e0f
|
||||
$TOOL -a $ADMPIN -o
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -13,15 +13,18 @@ Authenticating...
|
|||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing KI value...
|
||||
Writing Key value...
|
||||
* Initalizing...
|
||||
* New KI setting:
|
||||
KI: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
* New Key setting:
|
||||
Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
* Programming...
|
||||
* 2g: Key programmed.
|
||||
* 3g: Key programmed.
|
||||
* 4g5g: Key programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -35,15 +38,17 @@ Authenticating...
|
|||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading KI value...
|
||||
Reading Key value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current KI setting:
|
||||
KI: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
* Current Key setting:
|
||||
2g: Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
3g: Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
4g5g: Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -57,15 +62,18 @@ Authenticating...
|
|||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing KI value...
|
||||
Writing Key value...
|
||||
* Initalizing...
|
||||
* New KI setting:
|
||||
KI: d7882eae7cd14f06108c55f8e5cffe93
|
||||
* New Key setting:
|
||||
Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
* Programming...
|
||||
* 2g: Key programmed.
|
||||
* 3g: Key programmed.
|
||||
* 4g5g: Key programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -79,10 +87,12 @@ Authenticating...
|
|||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading KI value...
|
||||
Reading Key value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current KI setting:
|
||||
KI: d7882eae7cd14f06108c55f8e5cffe93
|
||||
* Current Key setting:
|
||||
2g: Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
3g: Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
4g5g: Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
|
||||
Done!
|
|
@ -1,5 +1,5 @@
|
|||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -54,7 +54,7 @@ Reading Milenage Sequence parameters...
|
|||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -21,7 +21,7 @@ Writing MNCLEN value...
|
|||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -43,7 +43,7 @@ Reading MNCLEN value...
|
|||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -65,7 +65,7 @@ Writing MNCLEN value...
|
|||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -87,7 +87,7 @@ Reading MNCLEN value...
|
|||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
@ -109,7 +109,7 @@ Writing MNCLEN value...
|
|||
|
||||
Done!
|
||||
sysmoISIM-SJA2 parameterization tool
|
||||
Copyright (c)2019 Sysmocom s.f.m.c. GmbH
|
||||
Copyright (c) 2019-2022 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
|
||||
Initializing smartcard terminal...
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# default: execute all tests
|
||||
TESTS="01_auth.sh 02_algo.sh 03_milenage_par.sh 04_op_opc.sh 05_ki.sh 06_seq.sh 07_mnclen.sh"
|
||||
TESTS="01_auth.sh 02_algo.sh 03_milenage_par.sh 04_op_opc.sh 05_key.sh 06_seq.sh 07_mnclen.sh"
|
||||
|
||||
# if command line specifies some specific tests, execute only those
|
||||
if [ $# -ge 1 ]; then
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Done!
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. ./test-data
|
||||
|
||||
$TOOL -a $ADMPIN
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
. ./test-data
|
||||
|
||||
ALGOS="1:1 3:1 4:1 5:1 15:1 1:4 3:15 2:2 1:3 1:6 6:6 6:1 1:2:3 1:4:5 5:4:15 5:4:6 "
|
||||
ALGOS=$ALGOS"MILENAGE:MILENAGE COMP128v1:MILENAGE COMP128v3:MILENAGE COMP128v2:MILENAGE SHA1-AKA:XOR SHA1-AKA:TUAK TUAK:MILENAGE TUAK:TUAK COMP128v1:MILENAGE COMP128v1:MILENAGE:SHA1-AKA COMP128v2:COMP128v1:COMP128v3 COMP128v2:COMP128v1:TUAK COMP128v2:TUAK:COMP128v1 TUAK:COMP128v1:COMP128v3"
|
||||
for algo in $ALGOS; do
|
||||
$TOOL -a $ADMPIN -T $algo
|
||||
$TOOL -a $ADMPIN -t
|
||||
done
|
|
@ -0,0 +1,124 @@
|
|||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Milenage parameters...
|
||||
* Initalizing...
|
||||
* New Milenage Parameters for (EF.MILENAGE_CFG):
|
||||
R1: 0xaa
|
||||
R2: 0xbb
|
||||
R3: 0xcc
|
||||
R4: 0xdd
|
||||
R5: 0xee
|
||||
C1: 1234567890abcdef1234567890abcdef
|
||||
C2: f1234567890abcdef1234567890abcde
|
||||
C3: ef1234567890abcdef1234567890abcd
|
||||
C4: def1234567890abcdef1234567890abc
|
||||
C5: cdef1234567890abcdef1234567890ab
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Milenage parameters...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current Milenage Parameters:
|
||||
R1: 0xaa
|
||||
R2: 0xbb
|
||||
R3: 0xcc
|
||||
R4: 0xdd
|
||||
R5: 0xee
|
||||
C1: 1234567890abcdef1234567890abcdef
|
||||
C2: f1234567890abcdef1234567890abcde
|
||||
C3: ef1234567890abcdef1234567890abcd
|
||||
C4: def1234567890abcdef1234567890abc
|
||||
C5: cdef1234567890abcdef1234567890ab
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Milenage parameters...
|
||||
* Initalizing...
|
||||
* New Milenage Parameters for (EF.MILENAGE_CFG):
|
||||
R1: 0x40
|
||||
R2: 0x0
|
||||
R3: 0x20
|
||||
R4: 0x40
|
||||
R5: 0x60
|
||||
C1: 00000000000000000000000000000000
|
||||
C2: 00000000000000000000000000000001
|
||||
C3: 00000000000000000000000000000002
|
||||
C4: 00000000000000000000000000000004
|
||||
C5: 00000000000000000000000000000008
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Milenage parameters...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current Milenage Parameters:
|
||||
R1: 0x40
|
||||
R2: 0x0
|
||||
R3: 0x20
|
||||
R4: 0x40
|
||||
R5: 0x60
|
||||
C1: 00000000000000000000000000000000
|
||||
C2: 00000000000000000000000000000001
|
||||
C3: 00000000000000000000000000000002
|
||||
C4: 00000000000000000000000000000004
|
||||
C5: 00000000000000000000000000000008
|
||||
|
||||
Done!
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
. ./test-data
|
||||
|
||||
# Write and reread with test data
|
||||
C1="1234567890ABCDEF1234567890ABCDEF"
|
||||
C2="F1234567890ABCDEF1234567890ABCDE"
|
||||
C3="EF1234567890ABCDEF1234567890ABCD"
|
||||
C4="DEF1234567890ABCDEF1234567890ABC"
|
||||
C5="CDEF1234567890ABCDEF1234567890AB"
|
||||
R12345="AA:BB:CC:DD:EE"
|
||||
PARAMS=$C1$C2$C3$C4$C5$R12345
|
||||
$TOOL -a $ADMPIN -L $PARAMS
|
||||
$TOOL -a $ADMPIN -l
|
||||
|
||||
# Write and reread with factory defaults
|
||||
C1="00000000000000000000000000000000"
|
||||
C2="00000000000000000000000000000001"
|
||||
C3="00000000000000000000000000000002"
|
||||
C4="00000000000000000000000000000004"
|
||||
C5="00000000000000000000000000000008"
|
||||
R12345="40:00:20:40:60"
|
||||
PARAMS=$C1$C2$C3$C4$C5$R12345
|
||||
$TOOL -a $ADMPIN -L $PARAMS
|
||||
$TOOL -a $ADMPIN -l
|
|
@ -0,0 +1,122 @@
|
|||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2g: 4=MILENAGE
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 4=MILENAGE
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing OPc value...
|
||||
* Initalizing...
|
||||
* New OPc setting:
|
||||
OPc: 000102030405060708090a0b0c0d0e0f
|
||||
* Programming...
|
||||
2g OPc programmed.
|
||||
3g OPc programmed.
|
||||
4g5g OPc programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading OP/c value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current OP/OPc setting:
|
||||
2g: OPc: 000102030405060708090a0b0c0d0e0f
|
||||
3g: OPc: 000102030405060708090a0b0c0d0e0f
|
||||
4g5g: OPc: 000102030405060708090a0b0c0d0e0f
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing OP value...
|
||||
* Initalizing...
|
||||
* New OPc setting:
|
||||
OP: 840337c3d45397ce8ea8609ffdc47224
|
||||
* Programming...
|
||||
2g OP programmed.
|
||||
3g OP programmed.
|
||||
4g5g OP programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading OP/c value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current OP/OPc setting:
|
||||
2g: OP: 840337c3d45397ce8ea8609ffdc47224
|
||||
3g: OP: 840337c3d45397ce8ea8609ffdc47224
|
||||
4g5g: OP: 840337c3d45397ce8ea8609ffdc47224
|
||||
|
||||
Done!
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
. ./test-data
|
||||
|
||||
# OP/OPc is milenage specific, make sure we have milenage configured before
|
||||
# testing.
|
||||
$TOOL -a $ADMPIN -T "MILENAGE:MILENAGE"
|
||||
|
||||
$TOOL -a $ADMPIN -C 000102030405060708090a0b0c0d0e0f
|
||||
$TOOL -a $ADMPIN -o
|
||||
|
||||
$TOOL -a $ADMPIN -O 840337c3d45397ce8ea8609ffdc47224
|
||||
$TOOL -a $ADMPIN -o
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing Key value...
|
||||
* Initalizing...
|
||||
* New Key setting:
|
||||
Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
* Programming...
|
||||
* 2g: Key programmed.
|
||||
* 3g: Key programmed.
|
||||
* 4g5g: Key programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Key value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current Key setting:
|
||||
2g: Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
3g: Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
4g5g: Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing Key value...
|
||||
* Initalizing...
|
||||
* New Key setting:
|
||||
Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
* Programming...
|
||||
* 2g: Key programmed.
|
||||
* 3g: Key programmed.
|
||||
* 4g5g: Key programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Key value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current Key setting:
|
||||
2g: Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
3g: Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
4g5g: Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
|
||||
Done!
|
|
@ -0,0 +1,75 @@
|
|||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Milenage Sequence parameters...
|
||||
* Initalizing...
|
||||
* Current SQN Configuration for ADF_USIM:
|
||||
IND (bits): 5
|
||||
SQN Check enabled
|
||||
SQN Age Limit disabled
|
||||
SQN Max Delta enabled
|
||||
SQN Skip first enabled
|
||||
SQN Conceal AUTN enabled
|
||||
SQN Conceal AUTS enabled
|
||||
SQN No AMF clear disabled
|
||||
Max Delta: 8589934592
|
||||
Age Limit: 8589934592
|
||||
Freshness Data:
|
||||
000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000
|
||||
* Current SQN Configuration for ADF_ISIM:
|
||||
IND (bits): 5
|
||||
SQN Check enabled
|
||||
SQN Age Limit disabled
|
||||
SQN Max Delta enabled
|
||||
SQN Skip first enabled
|
||||
SQN Conceal AUTN enabled
|
||||
SQN Conceal AUTS enabled
|
||||
SQN No AMF clear disabled
|
||||
Max Delta: 8589934592
|
||||
Age Limit: 8589934592
|
||||
Freshness Data:
|
||||
000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
* Resetting SQN Configuration to defaults...
|
||||
* Initalizing...
|
||||
* Resetting...
|
||||
|
||||
Done!
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
. ./test-data
|
||||
|
||||
# we can only read them for now, which will of course change once we perform auth against it
|
||||
$TOOL -a $ADMPIN -s
|
||||
|
||||
# test if resetting SQN parameters works
|
||||
$TOOL -a $ADMPIN -S
|
|
@ -0,0 +1,132 @@
|
|||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing MNCLEN value...
|
||||
* Initalizing...
|
||||
* New MNCLEN setting:
|
||||
MNCLEN: 0x02
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading MNCLEN value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current MNCLEN setting:
|
||||
MNCLEN: 0x02
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing MNCLEN value...
|
||||
* Initalizing...
|
||||
* New MNCLEN setting:
|
||||
MNCLEN: 0x03
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading MNCLEN value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current MNCLEN setting:
|
||||
MNCLEN: 0x03
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing MNCLEN value...
|
||||
* Initalizing...
|
||||
* New MNCLEN setting:
|
||||
MNCLEN: 0x02
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading MNCLEN value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current MNCLEN setting:
|
||||
MNCLEN: 0x02
|
||||
|
||||
Done!
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
. ./test-data
|
||||
|
||||
# set to 2 (default) + read back
|
||||
$TOOL -a $ADMPIN -N 02
|
||||
$TOOL -a $ADMPIN -n
|
||||
|
||||
# set to 3 + read back
|
||||
$TOOL -a $ADMPIN -N 03
|
||||
$TOOL -a $ADMPIN -n
|
||||
|
||||
# set to 2 (default) + read back
|
||||
$TOOL -a $ADMPIN -N 02
|
||||
$TOOL -a $ADMPIN -n
|
||||
|
|
@ -0,0 +1,349 @@
|
|||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2g: 1=COMP128v1
|
||||
3g: 4=MILENAGE
|
||||
4g5g: 6=TUAK
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing TUAK configuration...
|
||||
* Initalizing...
|
||||
* New TUAK configuration:
|
||||
RES size: 32 bit
|
||||
MAC-A/MAC-S size: 64 bit
|
||||
CK/IK size: 128 bit
|
||||
Keccak iterations: 123
|
||||
* Programming...
|
||||
2g TUAK configuration not applicable for selected algorithm, skipping...
|
||||
3g TUAK configuration not applicable for selected algorithm, skipping...
|
||||
4g5g TUAK configuration programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading TUAK configuration...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current TUAK configuration:
|
||||
* 2g: TUAK configuration not applicable for selected algorithm.
|
||||
* 3g: TUAK configuration not applicable for selected algorithm.
|
||||
4g5g: TUAK configuration:
|
||||
RES size: 32 bit
|
||||
MAC-A/MAC-S size: 64 bit
|
||||
CK/IK size: 128 bit
|
||||
Keccak iterations: 123
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing Key value...
|
||||
* Initalizing...
|
||||
* New Key setting:
|
||||
Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
* Programming...
|
||||
* 2g: Key programmed.
|
||||
* 3g: Key programmed.
|
||||
* 4g5g: Key programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Key value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current Key setting:
|
||||
2g: Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
3g: Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
4g5g: Key: a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing Key value...
|
||||
* Initalizing...
|
||||
* New Key setting:
|
||||
Key: a0b1ca0b1c2d3e4fe8394a55061722d3b6c7d8e9f8394a5506172e9fb6c7d84f
|
||||
* Programming...
|
||||
* 2g: Key programmed.
|
||||
* 3g: Key programmed.
|
||||
* 4g5g: Key programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Key value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current Key setting:
|
||||
2g: Key: a0b1ca0b1c2d3e4fe8394a55061722d3
|
||||
3g: Key: a0b1ca0b1c2d3e4fe8394a55061722d3
|
||||
4g5g: Key: a0b1ca0b1c2d3e4fe8394a55061722d3b6c7d8e9f8394a5506172e9fb6c7d84f
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing OP value...
|
||||
* Initalizing...
|
||||
* New OPc setting:
|
||||
OP: e8394a55061a0b1ca3e4f722d3b6c7d8e172e9fb680b1cc7d84f9f2d394a5506
|
||||
* Programming...
|
||||
2g OP/OPc not applicable for selected algorithm, skipping...
|
||||
3g OP programmed.
|
||||
4g5g TOP programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading OP/c value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current OP/OPc setting:
|
||||
* 2g: OP/OPc not applicable for selected algorithm.
|
||||
3g: OP: e8394a55061a0b1ca3e4f722d3b6c7d8
|
||||
4g5g: TOP: e8394a55061a0b1ca3e4f722d3b6c7d8e172e9fb680b1cc7d84f9f2d394a5506
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing OPc value...
|
||||
* Initalizing...
|
||||
* New OPc setting:
|
||||
OPc: 03b694a5506c7d8e172e9fb680b1cc7d61a0b1ca3e4f722d84e8394a55f9f2d3
|
||||
* Programming...
|
||||
2g OP/OPc not applicable for selected algorithm, skipping...
|
||||
3g OPc programmed.
|
||||
4g5g TOPc programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading OP/c value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current OP/OPc setting:
|
||||
* 2g: OP/OPc not applicable for selected algorithm.
|
||||
3g: OPc: 03b694a5506c7d8e172e9fb680b1cc7d
|
||||
4g5g: TOPc: 03b694a5506c7d8e172e9fb680b1cc7d61a0b1ca3e4f722d84e8394a55f9f2d3
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Programming Authentication parameters...
|
||||
* Initalizing...
|
||||
* New algorithm setting:
|
||||
2g: 1=COMP128v1
|
||||
3g: 1=COMP128v1
|
||||
4g5g: 1=COMP128v1
|
||||
* Programming...
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Writing Key value...
|
||||
* Initalizing...
|
||||
* New Key setting:
|
||||
Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
* Programming...
|
||||
* 2g: Key programmed.
|
||||
* 3g: Key programmed.
|
||||
* 4g5g: Key programmed.
|
||||
|
||||
Done!
|
||||
sysmoISIM-SJA5 parameterization tool
|
||||
Copyright (c) 2023 sysmocom - s.f.m.c. GmbH
|
||||
|
||||
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 35 75 30 35 02 59 C4
|
||||
Initializing smartcard terminal...
|
||||
* Detected Card IMSI: 901700000046734
|
||||
ISIM Application installed
|
||||
USIM Application installed
|
||||
|
||||
Authenticating...
|
||||
* Remaining attempts: 3
|
||||
* Authenticating...
|
||||
* Authentication successful
|
||||
* Remaining attempts: 3
|
||||
|
||||
Reading Key value...
|
||||
* Initalizing...
|
||||
* Reading...
|
||||
* Current Key setting:
|
||||
2g: Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
3g: Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
4g5g: Key: d7882eae7cd14f06108c55f8e5cffe93
|
||||
|
||||
Done!
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
. ./test-data
|
||||
|
||||
# First we select a configuration that includes TUAK
|
||||
$TOOL -a $ADMPIN -T "COMP128v1:MILENAGE:TUAK"
|
||||
|
||||
# Program/read-back valid TUAK configuration
|
||||
$TOOL -a $ADMPIN -W 32:64:128:123
|
||||
$TOOL -a $ADMPIN -w
|
||||
|
||||
# Program/read-back a 128 bit key
|
||||
$TOOL -a $ADMPIN -K a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
$TOOL -a $ADMPIN -k
|
||||
|
||||
# Program/read-back a 256 bit key
|
||||
$TOOL -a $ADMPIN -K a0b1ca0b1c2d3e4fe8394a55061722d3b6c7d8e9f8394a5506172e9fb6c7d84f
|
||||
$TOOL -a $ADMPIN -k
|
||||
|
||||
# Program/read-back a TOP value
|
||||
$TOOL -a $ADMPIN -O e8394a55061a0b1ca3e4f722d3b6c7d8e172e9fb680b1cc7d84f9f2d394a5506
|
||||
$TOOL -a $ADMPIN -o
|
||||
|
||||
# Program/read-back a TOPc value
|
||||
$TOOL -a $ADMPIN -C 03b694a5506c7d8e172e9fb680b1cc7d61a0b1ca3e4f722d84e8394a55f9f2d3
|
||||
$TOOL -a $ADMPIN -o
|
||||
|
||||
# restore original Ki value + read back
|
||||
$TOOL -a $ADMPIN -T "COMP128v1:COMP128v1:COMP128v1"
|
||||
$TOOL -a $ADMPIN -K $KI
|
||||
$TOOL -a $ADMPIN -k
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ./test-data
|
||||
|
||||
echo "================ PREPARING TEST CARD ================"
|
||||
$TOOL -a $ADMPIN -J $IMSI
|
||||
$TOOL -a $ADMPIN -S
|
||||
echo "================ TEST CARD PREPARED ================="
|
||||
echo ""
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Regenerating test output..."
|
||||
./prepare
|
||||
./01_auth.sh > ./01_auth.out
|
||||
./02_algo.sh > ./02_algo.out
|
||||
./03_milenage_par.sh > ./03_milenage_par.out
|
||||
./04_op_opc.sh > ./04_op_opc.out
|
||||
./05_ki.sh > ./05_ki.out
|
||||
./06_seq.sh > ./06_seq.out
|
||||
./07_mnclen.sh > ./07_mnclen.out
|
||||
|
||||
echo "Reference output regenerated!"
|
||||
echo ""
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
|
||||
# default: execute all tests
|
||||
TESTS="01_auth.sh 02_algo.sh 03_milenage_par.sh 04_op_opc.sh 05_key.sh 06_seq.sh 07_mnclen.sh 08_tuak.sh"
|
||||
|
||||
# if command line specifies some specific tests, execute only those
|
||||
if [ $# -ge 1 ]; then
|
||||
TESTS=$*
|
||||
fi
|
||||
|
||||
TMP=`tempfile`
|
||||
NUM_FAIL=0
|
||||
|
||||
# prepare test card
|
||||
./prepare
|
||||
|
||||
for T in $TESTS; do
|
||||
echo "==> Executing Testcase $T"
|
||||
EXPOUT=${T%%.sh}.out
|
||||
rm $TMP
|
||||
./$T > $TMP
|
||||
diff -u $EXPOUT $TMP
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Test $T passed"
|
||||
else
|
||||
echo "Test $T FAILED!"
|
||||
NUM_FAIL=$((NUM_FAIL+1))
|
||||
fi
|
||||
done
|
||||
|
||||
echo
|
||||
echo
|
||||
echo "Summary: $NUM_FAIL Tests failed"
|
||||
|
||||
if [ $NUM_FAIL -gt 0 ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
|
@ -0,0 +1,5 @@
|
|||
TOOL=../../sysmo-isim-tool.sja5.py
|
||||
# data for the test scripts. The values have to match the SIM card inserted while executing the test
|
||||
IMSI=901700000046734
|
||||
ADMPIN=11111111 # <==== CHANGE THIS TO THE ADM1 KEY OF YOUR TEST CARD!
|
||||
KI=D7882EAE7CD14F06108C55F8E5CFFE93
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
. ./test-data
|
||||
|
||||
# set to arbitrary value + read back
|
||||
$TOOL -a $ADMPIN -K a0b1c2d3e4f5061728394a5b6c7d8e9f
|
||||
$TOOL -a $ADMPIN -k
|
||||
|
||||
# set to original value + read back
|
||||
$TOOL -a $ADMPIN -K $KI
|
||||
$TOOL -a $ADMPIN -k
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# default: execute all tests
|
||||
TESTS="01_auth.sh 02_mode_read.sh 03_mode_write.sh 04_algo.sh 05_milenage_par.sh 06_op_opc.sh 07_ki.sh 08_seq.sh 09_mnclen.sh"
|
||||
TESTS="01_auth.sh 02_mode_read.sh 03_mode_write.sh 04_algo.sh 05_milenage_par.sh 06_op_opc.sh 07_key.sh 08_seq.sh 09_mnclen.sh"
|
||||
|
||||
# if command line specifies some specific tests, execute only those
|
||||
if [ $# -ge 1 ]; then
|
||||
|
|
16
utils.py
16
utils.py
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
|
@ -52,9 +52,9 @@ def ascii_to_list(string):
|
|||
# Convert an ascii hex string to numeric list
|
||||
def asciihex_to_list(string):
|
||||
|
||||
string = string.translate(None, ':')
|
||||
string = string.translate(str.maketrans('','',':'))
|
||||
try:
|
||||
return map(ord, string.decode("hex"))
|
||||
return list(map(ord,''.join(['%c' % b for b in bytearray.fromhex(string)])))
|
||||
except:
|
||||
print("Warning: Invalid hex string -- ignored!")
|
||||
return []
|
||||
|
@ -99,11 +99,15 @@ def id_to_str(table, nr):
|
|||
return dict_by_nr.get(nr) or '(invalid)'
|
||||
|
||||
|
||||
# Convert a string back to its ID by looking it up in a given table
|
||||
def str_to_id(table, string):
|
||||
# Convert a string back to its ID by looking it up in a given table. In
|
||||
# case the string is not found in the table, use a safe default (optional).
|
||||
def str_to_id(table, string, safe_default = None):
|
||||
dict_by_name = dict([(name.upper(), nr) for nr, name in table])
|
||||
id = dict_by_name.get(string.upper())
|
||||
|
||||
if id is None:
|
||||
raise ValueError('identifier (\"%s\") not in table %s' % (string, str(table)))
|
||||
if safe_default != None:
|
||||
return safe_default
|
||||
else:
|
||||
raise ValueError('identifier (\"%s\") not in table %s' % (string, str(table)))
|
||||
return id
|
||||
|
|
Loading…
Reference in New Issue