diff options
author | Supreeth Herle <herlesupreeth@gmail.com> | 2020-04-20 14:33:39 +0200 |
---|---|---|
committer | Supreeth Herle <herlesupreeth@gmail.com> | 2020-04-27 12:29:00 +0200 |
commit | 69e5d27e3c8f595e003344e25cea957e6affb898 (patch) | |
tree | f7f78279ef413b71af33ede5c554bffba68f7f1c /pySim | |
parent | d3b13d0c854ed29b74b0bd9da75710cb4c53d200 (diff) |
Remove redundant functions
Change-Id: I2dfb5b662b8a4f351e4a629040b405c182e58e8d
Diffstat (limited to 'pySim')
-rw-r--r-- | pySim/cards.py | 8 | ||||
-rw-r--r-- | pySim/utils.py | 22 |
2 files changed, 0 insertions, 30 deletions
diff --git a/pySim/cards.py b/pySim/cards.py index c0462fb..d2f1057 100644 --- a/pySim/cards.py +++ b/pySim/cards.py @@ -188,14 +188,6 @@ class Card(object): else: return (None, sw) - # Read SIM Service table - def read_sst(self): - (res, sw) = self._scc.read_binary(EF['SST']) - if sw == '9000': - return ((res, parse_st(res)), sw) - else: - return (None, sw) - # Read the (full) AID for either ISIM or USIM or ISIM application def read_aid(self, isim = False): diff --git a/pySim/utils.py b/pySim/utils.py index be670e9..56f9706 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -326,28 +326,6 @@ def enc_msisdn(msisdn, npi=0x01, ton=0x03): return ('%02x' % bcd_len) + ('%02x' % npi_ton) + bcd -def parse_st(st): - """ - Parses the EF S/U/IST and returns available/supported services - """ - st_bytes = [st[i:i+2] for i in range(0, len(st), 2) ] - avail_srvc = [] - # Get each byte and check for available services - for i in range(0, len(st_bytes)): - # Byte i contains info about Services num (8i+1) to num (8i+8) - byte = int(st_bytes[i], 16) - # Services in each byte are in order MSB to LSB - # MSB - Service (8i+8) - # LSB - Service (8i+1) - for j in range(1, 9): - if byte&0x01 == 0x01: - # Byte X contains info about Services num (8X-7) to num (8X) - # bit = 1: service available - # bit = 0: service not available - avail_srvc.append((8*i) + j) - byte = byte >> 1 - return avail_srvc - def dec_st(st, table="sim"): """ Parses the EF S/U/IST and prints the list of available services in EF S/U/IST |