-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.yml
65 lines (59 loc) · 2.2 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
config:
# 是否保留上一次的配置。除第一次外,只有出现该配置且为FALSE时,才更新config部分配置
keepConfig: FALSE
# 是否不显示LOGO,默认FALSE
noLogo: FALSE
# 日志级别,支持DEBUG/INFO/WARNING/ERROR/NONE,默认INFO
logLevel: INFO
classDumpDefine: # 固定值
# 导出时类名过滤的方式
# none 不导出类(关闭该功能)
# prefix 根据前缀导出
# regex 根据正则表达式导出
filterType: prefix
# 过滤表达式
filter: com.example
# 导出类保存的目录
savePath: /tmp
# 跳过JDK中的类(强烈建议为TRUE)
skipJDK: TRUE
classPatchDefine: # 固定值
# 需要修改的类名
com.example.ezjava.controller.EvilController:
# 需要修改的第1个方法名
# 该类下所有需要修改的方法组成一个List
- method: cmd
# 该方法的参数列表(可选),List结构
# 如果为空,应为paramType: []
# 若无该参数,默认取同名函数中的某一个
paramType:
- java.lang.String
# 可选,目前支持:
# overwrite 覆盖(默认)
# insertBefore 在原方法前插入代码
# insertAfter 在原方法返回前插入代码
# insertAt 在指定行数插入代码
mode: overwrite
# 你的代码
code: '{ return "ok";}'
# 需要修改的第2个方法名
- method: cmd
paramType: []
mode: insertAt
# 在该行数前插入代码
# 当mode为insertAt时,此参数为必选
insertAt: 23
code: '{System.out.println("helloworld");return "yes!";}'
# 需要修改的第2个类,这是一个最简单的配置的示例
com.example.ezjava.beans.TargetClass:
- method: getFlag
code: 'return "ok";'
com.example.ezjava.controller.DownloadController:
- method: readFileCode
paramType:
- java.lang.String
mode: insertBefore
code: '{filePath="/tmp/nothing.txt";}'
# 直接替换整个类,值是.class文件的base64编码
# 注意,你不能改变类的签名或者增减方法、变更方法名(可以使用javap -p A.class查看类中的方法)
com.example.ezjava.controller.TestController: yv66vgAAADQDYwoA4...