aboutsummaryrefslogtreecommitdiffstats
path: root/pySim-read.py
diff options
context:
space:
mode:
authorSupreeth Herle <herlesupreeth@gmail.com>2020-03-19 12:11:25 +0100
committerSupreeth Herle <herlesupreeth@gmail.com>2020-04-01 09:33:29 +0200
commit846cefb0cd0238c70f3e4137aa41f92834ba774f (patch)
treee7cb2afb4d919f730f1f3b4b654c66ec6ebaf4b8 /pySim-read.py
parentebe6dbaef51c1be3683046d4337596e7a958123f (diff)
pySim-read.py: Use the method declared in cards.py to read SPN
Diffstat (limited to 'pySim-read.py')
-rwxr-xr-xpySim-read.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/pySim-read.py b/pySim-read.py
index 6d7cbbe..1a4c1e7 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -141,12 +141,11 @@ if __name__ == '__main__':
# EF.SPN
try:
- (res, sw) = scc.read_binary(EF['SPN'])
+ (res, sw) = card.read_spn()
if sw == '9000':
- spn_res = dec_spn(res)
- print("SPN: %s" % (spn_res[0] or "Not available"))
- print("Display HPLMN: %s" % (spn_res[1],))
- print("Display OPLMN: %s" % (spn_res[2],))
+ print("SPN: %s" % (res[0] or "Not available"))
+ print("Display HPLMN: %s" % (res[1],))
+ print("Display OPLMN: %s" % (res[2],))
else:
print("SPN: Can't read, response code = %s" % (sw,))
except Exception as e: