From daf2b392f04e3b97ce52e52df08bd5a79ac35715 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 3 May 2021 23:17:29 +0200 Subject: shell: Add 'reset' command to reset the card At some points during an interactive session or a script one may want to reset the card. Change-Id: I992eb3e0ed52f7941a5fb44f28a42e22ebd49301 --- pySim-shell.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pySim-shell.py') diff --git a/pySim-shell.py b/pySim-shell.py index 5b5768a..bbfe7e9 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -313,6 +313,12 @@ class PySimCommands(CommandSet): elif context['DF_SKIP']: raise RuntimeError("unable to export %i dedicated files(s)" % context['ERR']) + def do_reset(self, opts): + """Reset the Card.""" + atr = self._cmd.rs.reset(self._cmd) + self._cmd.poutput('Card ATR: %s' % atr) + self._cmd.update_prompt() + @with_default_category('ISO7816 Commands') class Iso7816Commands(CommandSet): -- cgit v1.2.3