Coder Social home page Coder Social logo

osmocom / cyberflex-shell Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 1.0 266 KB

mirror of https://gitea.osmocom.org/laforge/cyberflex-shell

Home Page: https://gitea.osmocom.org/laforge/cyberflex-shell

License: GNU General Public License v2.0

Python 100.00%

cyberflex-shell's Introduction

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ötz <[email protected]>, July 2006

cyberflex-shell's People

Contributors

henryk avatar laf0rge avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

msgpo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.