diff options
author | Supreeth Herle <herlesupreeth@gmail.com> | 2020-04-01 08:43:08 +0200 |
---|---|---|
committer | Supreeth Herle <herlesupreeth@gmail.com> | 2020-04-01 09:14:54 +0200 |
commit | ad10d66baf141a52c9080a5f236ccc9b059ed630 (patch) | |
tree | d1cdcdef9560aa225697e2c385abc18d8fe5f99e /pySim | |
parent | d21349a61077a02529cd5109adcf54f4d326e6ff (diff) |
cards.py: Add generic function to read EF record in card class
This is a generic function applicable for reading EF records which doesnt require further processing
such EF.SMSP etc while decoding and also to avoid code duplication.
Change-Id: Ic0b4aa11e962b4bb328447b11533136a29ff72d3
Diffstat (limited to 'pySim')
-rw-r--r-- | pySim/cards.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pySim/cards.py b/pySim/cards.py index 7d3b7b4..c702608 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -149,6 +149,10 @@ class Card(object): ef_path = ef in EF and EF[ef] or ef return self._scc.read_binary(ef_path, length, offset) + def read_record(self, ef, rec_no): + ef_path = ef in EF and EF[ef] or ef + return self._scc.read_record(ef_path, rec_no) + def read_gid1(self): (res, sw) = self._scc.read_binary(EF['GID1']) if sw == '9000': |