This commit is contained in:
cilame 2022-05-10 23:03:02 +08:00
parent 61e1c989fc
commit f2c3012140
2 changed files with 84 additions and 1 deletions

View File

@ -20,6 +20,7 @@
<button>高级 hook ,修改 response 返回值</button>
<button>AST混淆解密</button>
<button>代码模板(RPC...)</button>
<button>jsobfuscator混淆器</button>
</ul>
</nav>
<div id="container">
@ -179,6 +180,71 @@
<label>code</label>
<textarea id='code_model' style="width: 100%; height: 500px"></textarea>
</section>
<section class="tab">
<div>jsobfuscator混淆器</div>
<button id='jsobfuscator_btn'>混淆</button>
<hr>
<label>混淆配置</label>
<textarea id='jsobfuscator_config' style="width: 100%; height: 500px">
{
compact: false, // 输出是否为一行内容若selfDefending开关开启则这里强制为true
controlFlowFlattening: true, // 控制流平坦化开关
controlFlowFlatteningThreshold: 0.75, // 控制流使用率
deadCodeInjection: true, // 注入死代码
deadCodeInjectionThreshold: 0.4, // 死代码注入率
debugProtection: true, // debugger 反调试开关
debugProtectionInterval: 4000, // debugger 定时反调试开关时间间隔
disableConsoleOutput: true, // console 清空,反输出
domainLock: [], // 指定运行作用域
domainLockRedirectUrl: 'about:blank', // 在非作用域运行时自动重定向的url
forceTransformStrings: [],
identifierNamesCache: null,
identifierNamesGenerator: 'mangled', // 变量混淆风格 hexadecimal:(_0xabc123) mangled:(a,b,c)
identifiersDictionary: [],
identifiersPrefix: '',
ignoreImports: false,
inputFileName: '',
log: false,
numbersToExpressions: false,
optionsPreset: 'default',
renameGlobals: false,
renameProperties: false,
renamePropertiesMode: 'safe',
reservedNames: [],
reservedStrings: [],
seed: 0,
selfDefending: true, // 函数格式化保护
simplify: true,
sourceMap: false,
sourceMapBaseUrl: '',
sourceMapFileName: '',
sourceMapMode: 'separate',
sourceMapSourcesMode: 'sources-content',
splitStrings: false, // 字符串碎片化 "asdfasdf" => "asd" + "fas" + "df"
splitStringsChunkLength: 10, // 切片长度
stringArray: true, // 属性字符串列表化开关也就是ob头部一长串字符串
stringArrayCallsTransform: true, // 属性字符串函数化比例
stringArrayCallsTransformThreshold: 0.5, // 转化比例
stringArrayEncoding: ['base64'], // 解密属性字符串的方式 'none','base64','rc4'
stringArrayIndexesType: [
'hexadecimal-number'
],
stringArrayIndexShift: true,
stringArrayRotate: true,
stringArrayShuffle: true,
stringArrayWrappersCount: 1,
stringArrayWrappersChainedCalls: true,
stringArrayWrappersParametersMaxCount: 2,
stringArrayWrappersType: 'variable',
stringArrayThreshold: 0.75,
target: 'browser',
transformObjectKeys: false,
unicodeEscapeSequence: false
}
</textarea>
<label>输入输出混淆代码</label>
<textarea id='jsobfuscator_code' style="width: 100%; height: 500px" placeholder="输入输出均在此处"></textarea>
</section>
</div>
<script src="options.js"></script>
<script src="tools/model_funcs.js"></script>
@ -186,6 +252,6 @@
<script src="tools/uglify_es.js"></script>
<script src="tools/env_maker.js"></script>
<script src="tools/btn_utils.js"></script>
<script src="tools/js_obfuscator.js"></script>
</body>
</html>

17
tools/js_obfuscator.js Normal file

File diff suppressed because one or more lines are too long