{ "info": { "author": "Beno\u00eet Allard", "author_email": "benoit.allard@gmx.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Programming Language :: Python :: 2", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Embedded Systems", "Topic :: Software Development :: Interpreters", "Topic :: Software Development :: Testing" ], "description": "#########\r\nCAPRunner\r\n#########\r\n\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%\r\nJavaCard ByteCode Emulator\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n\r\nOverview\r\n========\r\n\r\nCAPRunner is a javacard bytecode emulator that is able to execute CAP\r\nfiles. It also comes with an handy ``runcap.py`` that bind them\r\ntogether and allow you to send some APDUs to a CAP file (without the\r\nneed for a smartcard).\r\n\r\nExample\r\n=======\r\n\r\nThe following script can be ran by ``runcap.py``. It loads a CAP file,\r\ninstall and instanciate an applet from the file, send two APDu and\r\ncheck their Status Word::\r\n\r\n load: /path/to/helloworld.cap\r\n\r\n install: 0a a0 00 00 00 62 03 01 0c 01 01 00 00 00 : 00\r\n\r\n Select HelloWorld //aid/A000000062/03010C0101\r\n\r\n ==> 00 a4 04 00 0a a0 00 00 00 62 03 01 0c 01 01 7F\r\n <== 00 A4 04 00 0A A0 00 00 00 62 03 01 0C 01 01 90 00\r\n\r\n ==> 80 B8 00 00 0C 0A\r\n <== 80 B8 00 00 0C 90 00\r\n\r\nThe example is taken from the JavaCard kit wich can be found under ``samples/classic_applets/HelloWorld``.\r\n\r\nDependencies\r\n============\r\n\r\nIn order to compile CAP files, you will need a working Java\r\nDevelopment Kit together with a JavaCard Development Kit.\r\n\r\nThis project also relies on the following other ones:\r\n\r\n* pythoncard_ which provide the JavaCard OS functionnalities in\r\n Python.\r\n* and (optionnaly) pythonplatform_ which provides a minimal set of\r\n functionnalities from the `globalplatform`_ World.\r\n\r\n.. note:: You will only need ``pythonplatform`` if your applet relies\r\n\t on some globalplatform functionnalities like secure messaging.\r\n\r\nInstallation\r\n============\r\n\r\nYour best chance for the moment is to clone the repository using\r\n`Mercurial`_ to a local directory::\r\n\r\n $ hg clone https://bitbucket.org/benallard/caprunner/\r\n\r\nThis will create a copy of the repository in a ``caprunner``\r\ndirectory.\r\n\r\nIn order to get the dependencies right, I suggest you also clone their\r\nrepositories (the second one is optionnal)::\r\n\r\n $ hg clone https://bitbucket.org/benallard/pythoncard/\r\n $ hg clone https://bitbucket.org/benallard/pythonplatform/\r\n\r\nFinally, the easiest way to get the dependencies resolved is to *copy*\r\n(or *link* on UNIX) the following directories at the root of the\r\n``caprunner`` directory:\r\n\r\n* ``python``, ``pythoncard`` and ``pythoncardx`` from the pythoncard\r\n directory\r\n* and (optionnaly) ``org`` from the pythonplatform directory.\r\n\r\nGetting started\r\n===============\r\n\r\nAs a final step, you will need to *compile* the export files used\r\nduring compilation of your applet into a JSON file. This step is\r\nneeded in order to not read every single export file at each startup.\r\n\r\nThis is done with the following command line::\r\n\r\n $ genref.py --dump dump.json /path/to/export_files\r\n\r\nThis will generate a file called ``dump.json`` containing the\r\nnecessary information from the export files. The path given as second\r\nparameter is the directory containing the export files from your\r\nJavaCard Development Kit (e.g. the ``api21_export_files`` directory\r\nfor a JavaCard 2.1.2).\r\n\r\nCAPRunner will expect the generated json file to be called \r\n``.json``\r\n\r\nFinally, you should be able to launch ``runcap.py``. By default, it\r\nwill emulate a JavaCard Classic 3.0.1, if you need another version,\r\njust give it as parameter. For instance::\r\n\r\n $ ./runcap.py 2.1.2\r\n\r\nStarting from here, ``runcap`` will wait for your orders. Please refer\r\nto the `documentation`_ for the format of the order to send to\r\n``runcap``.\r\n\r\nContribution\r\n============\r\n\r\n* If an issue is bugging you, the `issue tracker`_ is your best friend\r\n to begin with.\r\n* If you want to help me improve this project, write some more docs or\r\n add functionnalities, the best for you is to make yourself an\r\n account on `BitBucket`_, fork the `repository`_ and make a Pull\r\n request. Chances are big that I also accept patches per mail.\r\n\r\nRTFM !\r\n======\r\n\r\nThe `documentation`_ is autogenerated and gently published by\r\n`ReadTheDocs`_ after every commit.\r\n\r\n.. _`documentation`: http://caprunner.readthedocs.org\r\n.. _`ReadTheDocs`: http://readthedocs.org/\r\n.. _pythoncard: https://bitbucket.org/benallard/pythoncard/\r\n.. _pythonplatform: https://bitbucket.org/benallard/pythonplatform/\r\n.. _`Mercurial`: http://mercurial.selenic.com/\r\n.. _`globalplatform`: http://www.globalplatform.org/\r\n.. _`issue tracker`: https://bitbucket.org/benallard/caprunner/issues\r\n.. _`BitBucket`: https://bitbucket.org/\r\n.. _`repository`: https://bitbucket.org/benallard/caprunner/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/benallard/caprunner", "keywords": "javacard bytecode emulator CAP EXP applet", "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "CAPRunner", "package_url": "https://pypi.org/project/CAPRunner/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/CAPRunner/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/benallard/caprunner" }, "release_url": "https://pypi.org/project/CAPRunner/1.0/", "requires_dist": null, "requires_python": null, "summary": "A JavaCard bytecode emulator", "version": "1.0" }, "last_serial": 553138, "releases": { "1.0": [] }, "urls": [] }