Skip to content

bartlomiejduda/JSC-PyDecrypt-Tool

Repository files navigation

Info

JSC-PyDecrypt-Tool is a Python program for decrypting Cocos2d JSC files.

You need valid key to decrypt files. You can use Frida with my XXTEA Script to get the key from any Cocos2d android app.

Example frida command:

frida -U -l cocos2d_xxtea_script.js -f <game_package_name>

Usage

usage: jsc_pydecrypt_tool_v1.0.exe [-h]
                                   [-d <jsc_file_path> <encryption_key> <output_file_path>]

JSC PyDecrypt Tool v1.0

options:
  -h, --help            show this help message and exit
  -d <jsc_file_path> <encryption_key> <output_file_path>, --decrypt <jsc_file_path> <encryption_key> <output_file_path>
                        Decrypt data

Building on Windows

  1. Download and install Python 3.11.6. Remember to add Python to PATH during installation
  2. Download project's source code and save it in "JSC-PyDecrypt-Tool-main" directory
  3. Go to the directory containing source code
    • cd JSC-PyDecrypt-Tool-main
  4. Create virtualenv and activate it
    • python -m venv my_env
    • .\my_env\Scripts\activate.bat
  5. Install all libraries from requirements.txt file
    • pip install -r requirements.txt
  6. Add project's directory to PYTHONPATH environment variable
    • set PYTHONPATH=C:\Users\user\Desktop\JSC-PyDecrypt-Tool-main
  7. Run the jsc_pydecrypt_tool.py file with proper command line arguments
    • python jsc_pydecrypt_tool.py -d project.jsc "secret" project.js