This commit is contained in:
蒋小陌 2024-10-15 18:57:56 +08:00
parent 9f3b135454
commit 2ac39eb74b
2 changed files with 9 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -7,13 +7,14 @@ const outputFilePath = './index.js';
const code = fs.readFileSync(inputFilePath, 'utf8');
const obfuscatedCode = JavaScriptObfuscator.obfuscate(code, {
compact: true,
controlFlowFlattening: true,
deadCodeInjection: true,
numbersToExpressions: true,
renameGlobals: true,
simplify: true,
stringArray: true,
compact: true, // 压缩代码
controlFlowFlattening: true, // 控制流混淆
deadCodeInjection: true, // 死代码注入
numbersToExpressions: true, // 将数字转换为表达式
renameGlobals: true, // 重命名全局变量
simplify: true, // 简化代码
splitStrings: true, // 将字符串拆分为多个字符串
stringArray: true, // 将字符串转换为数组
}).getObfuscatedCode();
fs.writeFileSync(outputFilePath, obfuscatedCode);