aboutsummaryrefslogtreecommitdiffstats
path: root/pySim-read.py
diff options
context:
space:
mode:
Diffstat (limited to 'pySim-read.py')
-rwxr-xr-xpySim-read.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pySim-read.py b/pySim-read.py
index 55b43d7..bad2047 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -31,6 +31,7 @@ import sys
from pySim.ts_51_011 import EF, DF
from pySim.commands import SimCardCommands
+from pySim.cards import card_detect, Card
from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn, format_xplmn_w_act, dec_spn
@@ -94,6 +95,9 @@ if __name__ == '__main__':
# Program the card
print("Reading ...")
+ # Initialize Card object by auto detecting the card
+ card = card_detect("auto", scc) or Card(scc)
+
# EF.ICCID
(res, sw) = scc.read_binary(EF['ICCID'])
if sw == '9000':