aboutsummaryrefslogtreecommitdiffstats
path: root/pySim
diff options
context:
space:
mode:
authorSupreeth Herle <herlesupreeth@gmail.com>2020-03-19 12:49:16 +0100
committerSupreeth Herle <herlesupreeth@gmail.com>2020-04-01 11:05:26 +0200
commit6d66af653fc355697c7a53f420ffaecdcc2ade9f (patch)
treed8902cf4445beec198bd643d6b231e559616a28d /pySim
parentd1fb6fc3595acdabd1620ebcafb96439061bebfd (diff)
Move parsing of MSISDN to generic Card class
Diffstat (limited to 'pySim')
-rw-r--r--pySim/cards.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pySim/cards.py b/pySim/cards.py
index 8081f87..d27092d 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -181,6 +181,13 @@ class Card(object):
else:
return (None, sw)
+ def read_msisdn(self):
+ (res, sw) = self._scc.read_record(EF['MSISDN'], 1)
+ if sw == '9000':
+ return (dec_msisdn(res), sw)
+ else:
+ return (None, sw)
+
# Read the (full) AID for either ISIM or USIM application
def read_aid(self, isim = False):