pyResMan

pyResMan is a free open source smartcard management tool for JavaCard and other smart cards. It can be used to send APDU(s), execute APDU script(s),debug ISO14443 protocol commands and Mifare commands with R502 SPY reader. It also can help you manage resource of GP card. pyResMan is based on pyScard and GlobalPlatform open source projects.
Download
v3.1
Usage
1.Apdu Tool
- "Basic APDU" frame:
-
- Input CLA, INS, P1, P2, LC, DATA and Le, click "Transmit" button to send APDU command.
- The command and response data display in the followed list ctrl.

- "GlobalPlatform" frame:
-
- Notice: Click "Mutual Authentication" button to establish secure channel first.
- The "Content Manager" sub frame.
- Click "Browse" button to select the CAP file.
- After the CAP file selected, CAP file information (Package and Applet information) will display in the followed tree ctrl.
- Press "Load" button to load the CAP file to card.
- Select one applet displayed in the tree ctrl, click "Install" to install applet.

- "GlobalPlatform" frame:
-
- The "Content Viewer" sub frame.
- Click "Refresh" button to list card content.
- Other operations.
-
- > Install applet: Select one applet and click "Install" button to install applet.
- > Select applet: Select one applet instance and click "Select" button to select applet.
- > Delete applet/package: Select one applet instance/package and click "Delete" button to delete applet/package.

- "GlobalPlatform" frame:
-
- The "Key Manager" sub frame.
- Click "Get Key Template Information" button to get key template informations.
- Add new key.
-
- > Input value bytes of S-ENC/S-MAC/DEK key.
- > Input Old KVN as "00" and input the New KVN.
- > Click "Put Key" button to add new key.
- Replace existed key
-
- > Input value bytes of S-ENC/S-MAC/DEK key.
- > Input Old KVN and New KVN.
- > Click "Put Key" button to replace the key.
- Delete key
-
- > Select the key you want to delete in the "Key Template Information" tree ctrl.
- > Click "Delete Key" button to delete the selected key.
- Set key bytes to default value
-
- > Click "Default" button.

- "Script" frame:
-
- Click "Browse" to select the APDU script file.
- After the APDU script file selected, APDU commands in the script file will be listed in the list ctrl.
- Click "Run Script" button to run the APDU script.
- APDU command and response data displayed in the list ctrl.


- "Mifare"frame:
-
- "Dump Card" :Read the card data.
- "Save Data To File…":Save the card data.
- "Load Data From File…":Load the card data.
- "Clone Card": Clone card data.
- "Change UID": Change card UID.
Note:UID value is 4 bytes.
- "UnblockCard":Unblock card. If the card cannot be recognized due to UID data error,please use unblock function to recover card.
- "Clear Data" : Clear the card data displayed in grid..
8. DESFire Functions

Installation
-
Use executable binary
-
Install from Pypi
-
Install with command:
pip install pyResMan
-
After the installation, run it use command:
python -m pyResMan
-
-
Install with source code
-
The official pyResMan source repository is located at https://github.com/JavaCardOS/pyResMan.
-
Building (build to binary, Windows and Linux platform are the same)
pyinstaller -F -npyResMan --version-file version.txt -w pyResMan/Main.py
-
Run as python program
python pyResMan/Main.py
-
TODO
- APDU Script editable
- GP compatible
Discussion
- Go to JavaCardOS Forum
- Debug ISO/IEC 14443 TypeA protocol and Mifare commands with R502 SPY Reader
- User manual: R502 SPY