pySim-shell: use -a / -A commandline option to authenticate

pySim-shell defines, just like the other pySim programs commandline
arguments that take an ADM pin to authenticate at the card as admin. The
arguments are defined, but not used. Add the missing authentication
part.

Change-Id: I6bed14eb8f4124e28d593cf0816dbe58e7271322
Related: OS#4963
diff --git a/pySim-shell.py b/pySim-shell.py
index e596d11..41febd6 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -339,4 +339,14 @@
 
 	app = PysimApp(card, rs, opts.script)
 	rs.select('MF', app)
+
+	# If the user supplies an ADM PIN at via commandline args authenticate
+	# immediatley so that the user does not have to use the shell commands
+	pin_adm = sanitize_pin_adm(opts.pin_adm, opts.pin_adm_hex)
+	if pin_adm:
+		try:
+			card.verify_adm(h2b(pin_adm))
+		except Exception as e:
+			print(e)
+
 	app.cmdloop()