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 code = fs.readFileSync(inputFilePath, 'utf8');
|
||||||
|
|
||||||
const obfuscatedCode = JavaScriptObfuscator.obfuscate(code, {
|
const obfuscatedCode = JavaScriptObfuscator.obfuscate(code, {
|
||||||
compact: true,
|
compact: true, // 压缩代码
|
||||||
controlFlowFlattening: true,
|
controlFlowFlattening: true, // 控制流混淆
|
||||||
deadCodeInjection: true,
|
deadCodeInjection: true, // 死代码注入
|
||||||
numbersToExpressions: true,
|
numbersToExpressions: true, // 将数字转换为表达式
|
||||||
renameGlobals: true,
|
renameGlobals: true, // 重命名全局变量
|
||||||
simplify: true,
|
simplify: true, // 简化代码
|
||||||
stringArray: true,
|
splitStrings: true, // 将字符串拆分为多个字符串
|
||||||
|
stringArray: true, // 将字符串转换为数组
|
||||||
}).getObfuscatedCode();
|
}).getObfuscatedCode();
|
||||||
|
|
||||||
fs.writeFileSync(outputFilePath, obfuscatedCode);
|
fs.writeFileSync(outputFilePath, obfuscatedCode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user