java模拟器gba模拟器,CAPRunner-JavaCard字节码仿真器-Benoît Allard
作者:Benoît Allard
### 作者邮箱:benoit.allard@gmx.de
### 首页:https://bitbucket.org/benallard/caprunner
### 文档:None
### 下载链接 UNKNOWN
#########
CAPRunner
#
%%%%%%%%%%%%%%%%%%%%%%%%%% JavaCard ByteCode Emulator %%%%%%%%%%%%%%%%%%%%%%%%%%
Overview
CAPRunner is a javacard bytecode emulator that is able to execute CAP files. It also comes with an handy runcap.py that bind them together and allow you to send some APDUs to a CAP file (without the need for a smartcard).
Example
The following script can be ran by runcap.py. It loads a CAP file, install and instanciate an applet from the file, send two APDu and check their Status Word::
load: /path/to/helloworld.cap
install: 0a a0 00 00 00 62 03 01 0c 01 01 00 00 00 : 00
Select HelloWorld //aid/A000000062/03010C0101
==> 00 a4 04 00 0a a0 00 00 00 62 03 01 0c 01 01 7F <== 00 A4 04 00 0A A0 00 00 00 62 03 01 0C 01 01 90 00
==> 80 B8 00 00 0C 0A <== 80 B8 00 00 0C 90 00
The example is taken from the JavaCard kit wich can be found under samples/classic_applets/HelloWorld.
Dependencies
In order to compile CAP files, you will need a working Java Development Kit together with a JavaCard Development Kit.
This project also relies on the following other ones:
pythoncard_ which provide the JavaCard OS functionnalities in Python.
and (optionnaly) pythonplatform_ which provides a minimal set of functionnalities from the globalplatform_ World.
.. note:: You will only need pythonplatform if your applet relies on some globalplatform functionnalities like secure messaging.
Installation
Your best chance for the moment is to clone the repository using Mercurial_ to a local directory::
$ hg clone https://bitbucket.org/benallard/caprunner/
This will create a copy of the repository in a caprunner directory.
In order to get the dependencies right, I suggest you also clone their repositories (the second one is optionnal)::
$ hg clone https://bitbucket.org/benallard/pythoncard/
$ hg clone https://bitbucket.org/benallard/pythonplatform/
Finally, the easiest way to get the dependencies resolved is to copy (or link on UNIX) the following directories at the root of the caprunner directory:
python, pythoncard and pythoncardx from the pythoncard directory
and (optionnaly) org from the pythonplatform directory.
Getting started
As a final step, you will need to compile the export files used during compilation of your applet into a JSON file. This step is needed in order to not read every single export file at each startup.
This is done with the following command line::
$ genref.py --dump dump.json /path/to/export_files
This will generate a file called dump.json containing the necessary information from the export files. The path given as second parameter is the directory containing the export files from your JavaCard Development Kit (e.g. the api21_export_files directory for a JavaCard 2.1.2).
CAPRunner will expect the generated json file to be called .json
Finally, you should be able to launch runcap.py. By default, it will emulate a JavaCard Classic 3.0.1, if you need another version, just give it as parameter. For instance::
$ ./runcap.py 2.1.2
Starting from here, runcap will wait for your orders. Please refer to the documentation_ for the format of the order to send to runcap.
Contribution
If an issue is bugging you, the issue tracker_ is your best friend to begin with.
If you want to help me improve this project, write some more docs or add functionnalities, the best for you is to make yourself an account on BitBucket, fork the repository and make a Pull request. Chances are big that I also accept patches per mail.
RTFM !
The documentation_ is autogenerated and gently published by ReadTheDocs_ after every commit.
.. _documentation: http://caprunner.readthedocs.org .. _ReadTheDocs: http://readthedocs.org/ .. _pythoncard: https://bitbucket.org/benallard/pythoncard/ .. _pythonplatform: https://bitbucket.org/benallard/pythonplatform/ .. _Mercurial: http://mercurial.selenic.com/ .. _globalplatform: http://www.globalplatform.org/ .. _issue tracker: https://bitbucket.org/benallard/caprunner/issues .. _BitBucket: https://bitbucket.org/ .. _repository: https://bitbucket.org/benallard/caprunner/
Copy from pypi.org
java模拟器gba模拟器,CAPRunner-JavaCard字节码仿真器-Benoît Allard相关推荐
- 第 1 章 一 JVM 和 Java 体系架构 (虚拟机介绍、字节码、Java跨平台性)
第 1 章 JVM 和 Java 体系架构 1.JVM 前言 作为Java工程师, 你是否也遇到过这些问题? 运行着的线上系统突然卡死,系统无法访问,甚至直接OOM! 想解决线上JVM GC问题,但却 ...
- java编译后生成字节码_请问java源文件编译后怎么生成字节码文件?
比如,有的java源程序生成一个字节码文件,带有内部类的生成两个.可是有一种情况怎么回事呢?importjava.awt.*;importjavax.swing.*;importjava.awt.ev ...
- 大多数程序员都懂的java虚拟机:C1编译器从字节码到HIR
从字节码到HIR 正如之前看到的,C1的HIR是一个基于静态单赋值的图IR,由基本块构成控制流图,由静态单赋值指令构成基本块,如图8-1所示. 所有的指令都派生自Instruction类,其中,Blo ...
- Java指令全集_Java的JVM字节码指令集详解
本文详细介绍了如何使用javap查看java方法中的字节码.以及各种字节码的含义,并且配以完善的案例,一步步,从头到尾带领大家翻译javap的输出.在文末还附有JVM字节码指令集表. 本文不适合没有J ...
- Java 基础巩固:内部类的字节码学习和实战使用场景
文章出自:安卓进阶学习指南 主要贡献者: Cloud9527 Alex_赵 Struggle shixinzhang 读完本文你将了解: 背景介绍 四种内部类介绍 成员内部类 静态内部类 局部内部类 ...
- java如何手撕加载字节码的代码?编写一个加载class文件的方法
1 自定义ClassLoader类:MemoryClassLoader public class MemoryClassLoader extends URLClassLoader {// class ...
- Java字节码浅析(—)
英文原文链接,译文链接,原文作者:James Bloom,译者:有孚 明白Java代码是如何编译成字节码并在JVM上运行的非常重要,这有助于理解程序运行的时候究竟发生了些什么.理解这点不仅能搞清语言特 ...
- 《深入理解Java虚拟机》笔记5——类加载机制与字节码执行引擎
第七章 虚拟机类加载机制 7.1 概述 虚拟机把描述类的数据从Class文件加载到内存,并对数据进行校验.转换解析和初始化,最终形成可以被虚拟机直接使用的Java类型,这就是虚拟机的类加载机制. 在J ...
- java探针之修改类字节码文件
java探针利用了javaAgent + ASM字节码注入工具实现了动态修改类文件的功能.像skywalking和arthas都使用到了这个技术. 具体原理为: jdk1.5以后引入了javaAgen ...
- Java字节码(.class文件)格式详解(一)
原文链接:http://www.blogjava.net/DLevin/archive/2011/09/05/358033.html 小介:去年在读<深入解析JVM>的时候写的,记得当时还 ...
最新文章
- [二分][前缀和]洛谷 P1083 借教室
- 马斯克:我是Rust粉丝,但我选择C
- MongoDB 基本命令
- python获取小程序手机号并绑定
- 模式对话框与非模式对话框的创建方法
- DEDECMS v5.7 实现导航条下拉二级菜单
- DotNetBar SuperGridControl控件
- spark入门demo
- FPS综述:植物次生代谢物与微生物组互作研究进展
- 历经30年,仍未解决通讯难题,水下机器人是虚假繁荣吗?
- OpenCV 文字检测与识别模块
- Unity3D 实现本地排行榜功能
- MySQL入门教程系列-1.5 如何学习MySQL
- C++代码中R“(xxxxxxxxxxx)“
- 服务器右下角的tomcat图标不显示了——解决方法
- nc测试UDP是否正常
- MM快讯:移动MM折桂中国移动2009年度业务服务创新奖
- Vector NTI 11.5.3| Win版 | 生物专业软件 | 安装教程
- “小会话,大学问”:如何让聊天机器人读懂对话历史?
- picgo-plugin-imageX火山引擎ImageX插件for picGo