111
This commit is contained in:
parent
9f3b135454
commit
2ac39eb74b
15
obfuscate.js
15
obfuscate.js
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user