Skip to main content

Encrypt a Script File on Device

  • Description

    POST /encript_file HTTP/1.1

    {
    "no_strip": true|false, // keep debug info; default false
    "in_file": "lua/scripts/xxx.lua", // input file; can be absolute path
    "out_file": "lua/scripts/xxx.xxt" // output file; can be absolute path
    "info": {}, // metadata to embed in script
    "entitlements": {
    "allow-external-require": true|false
    }
    }
  • Parameters

    • no_strip: boolean
      When true, keep debug info so stack traces retain line numbers. Default false
    • in_file: string
      Path to the script file to encrypt; accepts absolute paths or ones relative to /var/mobile/Media/1ferver/
    • out_file: string
      Target path for the encrypted script; accepts absolute paths or ones relative to /var/mobile/Media/1ferver/
    • info: table
      Additional metadata to embed in the script (e.g., Name, Version, Description)
    • entitlements: table
      Script permission configuration
      • allow-external-require
        If missing or false, only scripts encrypted with the same certificate may require this script; if a list, allow scripts signed by the listed certificate authors; if true, allow any script to require
  • Possible Responses

    {"code":0,"message":"Success"}
    {"code":2,"message":"Syntax error in script","detail":"specific error details"}
    {"code":4,"message":"File or directory does not exist"} // input file cannot be read
    {"code":4,"message":"Unable to write file"}
    {"code":8,"message":"Invalid parameters"}
    {"code":13,"message":"Another encryption is in progress..."}
  • Notes

    • Root directory for file operations: /var/mobile/Media/1ferver/