Local fork of Henryk Ploetz' smardcard shell
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Henryk Plötz bc07262d80 API CHANGE: Move CommandLineArgumentHelper to readers module to allow proper import order. 13 years ago
cards + Add parse_response_4B 13 years ago
gui API CHANGE: Move CommandLineArgumentHelper to readers module to allow proper import order. 13 years ago
COPYING Licensed under GPL-2 or above 17 years ago
README added lifecycle commands to CardOS 15 years ago
TLV_utils.py More useful OID display for the case when the exact OID is not known 16 years ago
brutefid.py API CHANGE: Move CommandLineArgumentHelper to readers module to allow proper import order. 13 years ago
crypto_utils.py There doesn't seem to be RC5/IDEA (any more? only in my copy?) 13 years ago
cyberflex-shell.e3p + Update E3 project file 13 years ago
cyberflex-shell.py API CHANGE: Move CommandLineArgumentHelper to readers module to allow proper import order. 13 years ago
fingerpass.py API CHANGE: Move CommandLineArgumentHelper to readers module to allow proper import order. 13 years ago
fingerprints.txt git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@260 f711b948-2313-0410-aaa9-d29f33439f0b 15 years ago
oids.txt Add tons of OIDs from the BSI eID specs 13 years ago
parse-usbsnoop.py Simple tool to parse usbsnoop-logs 16 years ago
pycsc-0.0.3_new-pcsc.patch Fixed transmit for 64bit systems 16 years ago
readers.py API CHANGE: Move CommandLineArgumentHelper to readers module to allow proper import order. 13 years ago
readpass.py API CHANGE: Move CommandLineArgumentHelper to readers module to allow proper import order. 13 years ago
shell.py Get working under Windows with http://cheeseshop.python.org/pypi/PyCSC/0.3 (with Python 2.5 for Windows) 16 years ago
tlvdecoder.py TLV_utils.decode as external tool 17 years ago
utils.py API CHANGE: Move CommandLineArgumentHelper to readers module to allow proper import order. 13 years ago

README

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
case.

You will also need the Crypto module for cryptography support, see
http://www.amk.ca/python/code/crypto.html

For Passive Authentication of MRTDs (Passports with BAC) M2Crypto is used, see
http://wiki.osafoundation.org/bin/view/Projects/MeTooCrypto
which in turn requires openssl
http://www.openssl.org
and swig
http://www.swig.org

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.


INSTRUCTIONS:
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
hard-disk.

Have fun
-- Henryk Pl<span class="broken-code-point">&lt;F6&gt;</span>tz <henryk@ploetzli.ch>, July 2006