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.




1.Apdu Tool
pyResMan - 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.
2. Load CAP File
pyResMan - GP tool - Content Manager
  • "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.
3. View card content
pyResMan - GP tool - Content Viewer
  • "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.
4. Key Manager
pyResMan - GP tool - Key Manager
  • "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.
5. APDU script
pyResMan - GP tool - APDU script
  • "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.
6. SmartCard Debugger
pyResMan - GP tool - SmartCard Debugger
7. Mifare Functions
pyResMan - GP tool - Mifare
  • "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..
IMPORTANT: To modify UID and clone card, Mifare clone 1K must be used in conjunction with R502 SPY  and pyResMan! Please don't use for illegal purposes! Otherwise all the consequences caused are borne by its own users.

8. DESFire Functions
pyResMan - GP tool - DESFire
Function of this module is targeted at DESFire card operations, including security related commands, PICC level commands, application level commands and data manipulation commands, please click DESFire specific operation for further details.


  • Use executable binary

    • Download release version for platform windows or linux

    • Unzip the zip file

      • Windows

        Use zip tool 7-zip or others.

      • Linux

        tar xvf pyResMan-xxx.tar.gz

    • Run

      • Windows

        Run the program "pyResMan".

      • Linux


  • 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

    • Building (build to binary, Windows and Linux platform are the same)

      pyinstaller -F -npyResMan --version-file version.txt -w pyResMan/

    • Run as python program

      python pyResMan/


  • APDU Script editable
  • GP compatible


Follow us