pySim-read.py: support for reading GID1 from SIM

Change-Id: I15d061daed20f770b9041977a0b1fc4fe44a8f95
This commit is contained in:
Supreeth Herle 2020-03-05 15:30:22 +01:00 committed by herlesupreeth
parent d950786525
commit ab46d625fc
7 changed files with 16 additions and 0 deletions

View File

@ -108,6 +108,16 @@ if __name__ == '__main__':
else:
print("IMSI: Can't read, response code = %s" % (sw,))
# EF.GID1
try:
(res, sw) = scc.read_binary(EF['GID1'])
if sw == '9000':
print("GID1: %s" % (res,))
else:
print("GID1: Can't read, response code = %s" % (sw,))
except Exception as e:
print("GID1: Can't read file -- %s" % (str(e),))
# EF.SMSP
(res, sw) = scc.read_record(['3f00', '7f10', '6f42'], 1)
if sw == '9000':

View File

@ -2,6 +2,7 @@ Using PC/SC reader (dev=0) interface
Reading ...
ICCID: 8988219000000117833
IMSI: 001010000000111
GID1: ffffffffffffffff
SMSP: e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000ffffffffffffffffffffffffffff
SPN: Fairwaves
Display HPLMN: False

View File

@ -2,6 +2,7 @@ Using PC/SC reader (dev=4) interface
Reading ...
ICCID: 89445310150011013678
IMSI: 001010000000102
GID1: Can't read file -- SW match failed! Expected 9000 and got 9404.
SMSP: e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000ffffffffffffffffffffffffffff
SPN: wavemobile
Display HPLMN: False

View File

@ -2,6 +2,7 @@ Using PC/SC reader (dev=2) interface
Reading ...
ICCID: 1122334455667788990
IMSI: 001010000000102
GID1: Can't read file -- SW match failed! Expected 9000 and got 9404.
SMSP: ffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
SPN: Magic
Display HPLMN: True

View File

@ -2,6 +2,7 @@ Using PC/SC reader (dev=0) interface
Reading ...
ICCID: 8988211900000000004
IMSI: 001010000000102
GID1: ffffffffffffffffffff
SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
SPN: Not available
Display HPLMN: False

View File

@ -2,6 +2,7 @@ Using PC/SC reader (dev=1) interface
Reading ...
ICCID: 1122334455667788990
IMSI: 001010000000102
GID1: ffffffffffffffffffff
SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
SPN: Magic
Display HPLMN: True

View File

@ -2,6 +2,7 @@ Using PC/SC reader (dev=3) interface
Reading ...
ICCID: 1122334455667788990
IMSI: 001010000000102
GID1: Can't read file -- SW match failed! Expected 9000 and got 9404.
SMSP: ffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
SPN: Not available
Display HPLMN: False