1
1
# decode-js
2
2
3
- 使用AST方式(依赖Babel插件)实现的JS代码净化工具,包括常见的几种类型 :
3
+ 基于 Babel 的 AST 分析器和处理器,可以处理以下情况 :
4
4
5
- * 字面量还原(全局、代码块)
6
- * 死代码清理、扁平化还原
7
- * 条件、循环语句规范化
8
- * 特殊函数清理
5
+ * stringArray(包括添加了旋转操作,以及嵌套调用的情况)
6
+ * 死代码
7
+ * 控制流扁平化(switch)
8
+ * 局部代码变换(Object表达式、字符串分割等)
9
+ * 自定义代码(自保护,禁止控制台调试,禁止控制台输出)
9
10
10
- 处理全局加密内容时使用VM2提供的环境。
11
+ An AST analyzer and processor based on Babel that can handle the following situations:
11
12
12
- ## 使用
13
+ * stringArray (including Rotate, Wrappers, and ChainedCalls)
14
+ * deadCode
15
+ * controlFlowFlattening (switch)
16
+ * transformer (ObjectExpression, SplitString, and etc.)
17
+ * customCode (self-defending, debug-protection, console-output)
13
18
14
- 需要 ` node.js ` 环境,并安装依赖: ` npm i ` 。
19
+ ## 使用 Usage
15
20
16
- 调用方法:
21
+ 1 . 准备一个nodejs环境
22
+
23
+ Prepare a nodejs environment
24
+
25
+ 2 . 通过` npm i ` 安装依赖
26
+
27
+ Install the dependencies via ` npm i `
28
+
29
+ 3 . 按如下方式运行插件:
30
+
31
+ Run the plugins as follows:
17
32
18
33
``` shell
19
34
# pre-defined command
@@ -24,25 +39,27 @@ npm run decode -- -t type [-i input.js] [-o output.js]
24
39
25
40
` xxx ` 为预定义的指令,见[ package.json] ( package.json ) 中的` scripts ` 字段。
26
41
27
- ` type ` 列表:
42
+ ` xxx ` are predefined commands, see the ` scripts ` field in [ package.json] ( package.json ) .
43
+
44
+ ` type ` :
28
45
* common (高频局部混淆)
29
46
* jjencode (sojson.com 版本)
30
47
* sojson
31
48
* sojsonv7
32
49
* obfuscator
33
50
34
- 默认输入文件为` input.js ` ,文件中不能包含除混淆代码以外的内容(例如非混淆代码,注释除外),且只能包含一段混淆代码(一次处理只能识别一个主加密函数 )。
51
+ 默认输入文件为` input.js ` ,文件中不能包含除混淆代码以外的内容(例如非混淆代码)。
35
52
36
- 默认输出文件为 ` output .js` 。
53
+ The default input file is ` input .js` . The file cannot contain additional codes other than obfuscated code (such as non-obfuscated code).
37
54
38
- 程序入口文件为: [ src/main .js] ( src/main.js ) ,插件目录为 [ src/plugin ] ( src/plugin ) 。
55
+ 默认输出文件为 ` output .js` 。
39
56
40
- ## 启发
57
+ The default output file is ` output.js ` .
41
58
42
- 参考了下面的项目:
59
+ ## Related Projects
43
60
44
61
* [ cilame/v_jstools] ( https://github.com/cilame/v_jstools )
45
- * [ Cqxstevexw/decodeObfuscator ] ( https://github.com/Cqxstevexw/decodeObfuscator )
62
+ * [ j4k0xb/webcrack ] ( https://github.com/j4k0xb/webcrack )
46
63
* [ NXY666/Jsjiemi] ( https://github.com/NXY666/Jsjiemi )
47
64
48
65
0 commit comments