Skip to content

Commit 6e20430

Browse files
committed
Add files
1 parent 0da4994 commit 6e20430

File tree

8 files changed

+4176
-1
lines changed

8 files changed

+4176
-1
lines changed

.eslintrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"node": true
5+
},
6+
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
7+
"parserOptions": {
8+
"ecmaVersion": 2020,
9+
"sourceType": "module"
10+
}
11+
}

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"tabWidth": 2,
3+
"semi": false,
4+
"singleQuote": true
5+
}

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,36 @@
1-
# ASTBabel
1+
# decode-js
2+
3+
使用AST方式(依赖Babel插件)实现的JS代码净化工具,包括常见的几种类型:
4+
5+
* 字面量还原(全局、代码块)
6+
* 死代码清理、扁平化还原
7+
* 条件、循环语句规范化
8+
* 特殊函数清理
9+
10+
处理全局加密内容时使用VM2提供的环境。
11+
12+
## 使用
13+
14+
需要`node.js`环境,并安装依赖:`npm i`
15+
16+
调用方法:
17+
18+
```shell
19+
npm run xxx [input.js] [output.js]
20+
```
21+
22+
`xxx`为预定义的插件,见[package.json](package.json)中的`scripts`字段。
23+
24+
默认输入文件为`input.js`,默认输出文件为`output.js`
25+
26+
程序入口文件为:[src/main.js](src/main.js),插件目录为[src/plugin](src/plugin)
27+
28+
## 启发
29+
30+
参考了下面的项目:
31+
32+
* [cilame/v_jstools](https://github.com/cilame/v_jstools)
33+
* [Cqxstevexw/decodeObfuscator](https://github.com/Cqxstevexw/decodeObfuscator)
34+
* [NXY666/Jsjiemi](https://github.com/NXY666/Jsjiemi)
35+
36+

0 commit comments

Comments
 (0)