aboutsummaryrefslogtreecommitdiffstats
path: root/pySim-shell.py
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2023-07-09 17:58:38 +0200
committerHarald Welte <laforge@osmocom.org>2023-07-12 22:03:59 +0200
commitf8d2e2ba089221d39c52593908aa15df4b6e73d5 (patch)
tree4ef29c977b2d41072bf82a29367445557d34ecee /pySim-shell.py
parent263fb0871c0c8b6b3cb58eaa1ca1779ce1adf6c4 (diff)
split pySim/legacy/{cards,utils} from pySim/{cards,utils}
There are some functions / classes which are only needed by the legacy tools pySim-{read,prog}, bypassing our modern per-file transcoder classes. Let's move this code to the pySim/legacy sub-directory, rendering pySim.legacy.* module names. The long-term goal is to get rid of those and have all code use the modern pySim/filesystem classes for reading/decoding/encoding/writing any kind of data on cards. Change-Id: Ia8cf831929730c48f90679a83d69049475cc5077
Diffstat (limited to 'pySim-shell.py')
-rwxr-xr-xpySim-shell.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pySim-shell.py b/pySim-shell.py
index a65e42a..4d4f2e2 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -49,7 +49,7 @@ from pprint import pprint as pp
from pySim.exceptions import *
from pySim.commands import SimCardCommands
from pySim.transport import init_reader, ApduTracer, argparse_add_reader_args, ProactiveHandler
-from pySim.cards import card_detect, SimCard, UsimCard
+from pySim.cards import card_detect, SimCardBase, UiccCardBase
from pySim.utils import h2b, b2h, i2h, swap_nibbles, rpad, JsonEncoder, bertlv_parse_one, sw_match
from pySim.utils import sanitize_pin_adm, tabulate_str_list, boxed_heading_str, Hexstr
from pySim.card_handler import CardHandler, CardHandlerAuto
@@ -95,10 +95,10 @@ def init_card(sl):
return None, None
generic_card = False
- card = card_detect("auto", scc)
+ card = card_detect(scc)
if card is None:
print("Warning: Could not detect card type - assuming a generic card type...")
- card = SimCard(scc)
+ card = SimCardBase(scc)
generic_card = True
profile = CardProfile.pick(scc)
@@ -132,7 +132,7 @@ def init_card(sl):
# IF we don't do this, we will have a SimCard but try USIM specific commands like
# the update_ust method (see https://osmocom.org/issues/6055)
if generic_card:
- card = UsimCard(scc)
+ card = UiccCardBase(scc)
# Create runtime state with card profile
rs = RuntimeState(card, profile)