mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-29 09:47:47 +03:00
Move parsing of GID1 to generic Card class
Change-Id: Ie96408b1eecd6fc2595d619f6f0e3af851dacecb
This commit is contained in:
@@ -114,7 +114,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# EF.GID1
|
# EF.GID1
|
||||||
try:
|
try:
|
||||||
(res, sw) = scc.read_binary(EF['GID1'])
|
(res, sw) = card.read_gid1()
|
||||||
if sw == '9000':
|
if sw == '9000':
|
||||||
print("GID1: %s" % (res,))
|
print("GID1: %s" % (res,))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -145,6 +145,13 @@ class Card(object):
|
|||||||
data, sw = self._scc.update_binary(EF['SPN'], rpad(content, 32))
|
data, sw = self._scc.update_binary(EF['SPN'], rpad(content, 32))
|
||||||
return sw
|
return sw
|
||||||
|
|
||||||
|
def read_gid1(self):
|
||||||
|
(res, sw) = self._scc.read_binary(EF['GID1'])
|
||||||
|
if sw == '9000':
|
||||||
|
return (res, sw)
|
||||||
|
else:
|
||||||
|
return (None, sw)
|
||||||
|
|
||||||
# Read the (full) AID for either ISIM or USIM application
|
# Read the (full) AID for either ISIM or USIM application
|
||||||
def read_aid(self, isim = False):
|
def read_aid(self, isim = False):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user