记录下 javascript | 您所在的位置:网站首页 › JS加密混淆后能运行吗 › 记录下 javascript |
javascript-obfuscator是一个免费的JavaScript代码混淆工具,它功能强大,可以把你的源代码变得“面目全非”,完全没有可读性。还具有部分防调试功能,给JavaScript代码多一层保护。 1,安装 npm install javascript-obfuscator -g2,查看版本 javascript-obfuscator -v3,具体使用 javascript-obfuscator a.js --config config.json --output b.jsa.json 原文件 b.json 输出文件 config.json obfuscator配置文件 配置大概内容: { "compact": true, "controlFlowFlattening": true, "controlFlowFlatteningThreshold": 0.75, "deadCodeInjection": true, "deadCodeInjectionThreshold": 0.4, "debugProtection": false, "debugProtectionInterval": false, "disableConsoleOutput": true, "identifierNamesGenerator": "hexadecimal", "log": false, "renameGlobals": false, "rotateStringArray": true, "selfDefending": true, "stringArray": true, "stringArrayEncoding": "base64", "stringArrayThreshold": 0.75, "unicodeEscapeSequence": false }最后附上官网地址:https://github.com/javascript-obfuscator/javascript-obfuscator查看具体使用方式 |
CopyRight 2018-2019 实验室设备网 版权所有 |