Local fork of Henryk Ploetz' smardcard shell
Go to file
Henryk Plötz 2f244a2083 Add tons of OIDs from the BSI eID specs 2010-02-24 02:48:41 +01:00
cards + Make it possible for cards/applications to set Le for SELECT operations, use this in the passport application 2010-02-24 02:45:26 +01:00
gui Move contents from __init__ to PassportGUI 2008-06-10 03:17:06 +00:00
COPYING Licensed under GPL-2 or above 2006-07-12 05:20:49 +00:00
README added lifecycle commands to CardOS 2008-03-10 22:54:53 +00:00
TLV_utils.py More useful OID display for the case when the exact OID is not known 2007-06-10 00:01:53 +00:00
brutefid.py + Make brutefid more gracefully accept card errors (common with my RFID reader) 2010-02-24 02:47:04 +01:00
crypto_utils.py added lifecycle commands to CardOS 2008-03-10 22:54:53 +00:00
cyberflex-shell.e3p start GUI code 2007-06-08 02:10:18 +00:00
cyberflex-shell.py Make it possible for a card/application class to specify the P1 used for SELECT in the file case 2008-06-10 03:34:21 +00:00
fingerpass.py fix for non-rfid 2007-06-16 07:25:51 +00:00
fingerprints.txt git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@260 f711b948-2313-0410-aaa9-d29f33439f0b 2008-06-10 03:31:30 +00:00
oids.txt Add tons of OIDs from the BSI eID specs 2010-02-24 02:48:41 +01:00
parse-usbsnoop.py Simple tool to parse usbsnoop-logs 2007-01-17 09:15:37 +00:00
pycsc-0.0.3_new-pcsc.patch Fixed transmit for 64bit systems 2007-02-10 02:08:31 +00:00
readpass.py Enhance GUI, can now enter MRZ information and read new passport from GUI 2007-11-14 14:04:32 +00:00
shell.py Get working under Windows with http://cheeseshop.python.org/pypi/PyCSC/0.3 (with Python 2.5 for Windows) 2007-05-08 09:23:25 +00:00
tlvdecoder.py TLV_utils.decode as external tool 2006-06-14 09:11:46 +00:00
utils.py Switch smartcard interface to pyscard from http://pyscard.sourceforge.net/ 2007-06-16 06:56:57 +00:00


This is a simple smartcard shell that has evolved from a more convenient way
to enter APDUs (compare: pcsc-tools scriptor) through a tool to open a secure
channel to a cyberflex card (hence the name) to a more generic tool to act
on smart-cards.

It is written in Python (you might need 2.4 or up) and needs pycsc 0.3 (or up)
to communicate with the smart card terminal (with PC/SC, e.g. pcsc-lite).
You can get pycsc from http://homepage.mac.com/jlgiraud/pycsc/Pycsc.html

NOTE: pycsc might not compile out of the box with current pcsc-lite (e.g. 
1.3.*). You should use the included pycsc-0.0.3_new-pcsc.patch in that

You will also need the Crypto module for cryptography support, see 

For Passive Authentication of MRTDs (Passports with BAC) M2Crypto is used, see
which in turn requires openssl
and swig

The shell has only been tested on a Linux system but should be platform
independent, if you have Python, PC/SC and pycsc for your target platform.
I am however unable to give support for any platform but Linux. 

Some of the shell functionality (history, tab-completion, etc.) is
provided by python's readline module which is not available for all 
platforms, IIRC.

Simply start cyberflex-shell.py. You may also call it with parameter -l
to list all detected readers or parameter -r to select one of the readers.
Within the shell you may enter APDUs (in hex, case ignored, white space 
ignored) and press enter to send them and see the response.

Use the commands connect, disconnect or reconnect to open, close or open-
and-close the connection to a smart-card. This is especially helpful when
you want to change the card without exiting from the shell.

For some card types there are card drivers provided in the cards/ directory,
and the shell will try to automatically load the right driver(s). (I made 
the story rather complicated, see cards/__init__.py.) 
You should be able to load and unload drivers using the driver_load and 
driver_unload commands at will, but that is a new and experimental feature.

Most card drivers provide additional commands to simplify working with
the card in question. Use the help command to see the set of currently
available commands.

Note that this is an educational tool and not for security purposes. All
commands are written to the shell history (${HOME}/.cyberflex-shell.history)
so be aware that your PINs and other sensitive data might end up on your 

Have fun
  -- Henryk Pl<50>tz <henryk@ploetzli.ch>, July 2006