Encrypt a Script File on the 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 falsein_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 configurationallow-external-require
If missing or false, only scripts encrypted with the same author certificate mayrequirethis script. If a list, scripts signed by the listed certificate authors are allowed. If true, any script mayrequireit.
-
Possible Responses
{"code":0,"message":"操作成功"}{"code":2,"message":"脚本有语法错误","detail":"specific error details"}{"code":4,"message":"文件或目录不存在"} // input file cannot be read{"code":4,"message":"无法写入文件"}{"code":8,"message":"参数错误"}{"code":13,"message":"另外一项加密正在进行..."} -
Notes
- Root directory for file operations:
/var/mobile/Media/1ferver/
- Root directory for file operations: