当前位置:网站首页>使用 Allatori 进行 Jar 包混淆
使用 Allatori 进行 Jar 包混淆
2022-08-04 19:43:00 【梦想blog】
场景
对外提供 SDK,核心代码等,需要进行代码混淆的场景。但注意,混淆只是让代码变的晦涩难懂,真正需要保护的代码,仅仅这样是没办法保证安全的
下载
官方网站:https://allatori.com/
这里下载的版本:Allatori-8.2-Demo
使用
解压后可见
- 在此文件夹新建文件夹:auto-oa-demo,
随便找一个示例,将文件复制进去:
allatori.jar
Clean.bat
config.xml
RunAllatori.bat - 将你需要混淆的 jar 丢进去:auto-oa-demo.jar
- 修改 config.xml
这里主要配置需要过滤的第三方 jar 包或者代码,加过期等
<config>
<input>
<jar in="auto-oa-demo.jar" out="auto-oa-demo-mix.jar"/>
</input>
<property name="log-file" value="log.xml"/>
<keep-names>
<class access="protected+">
<field access="protected+"/>
<method access="protected+"/>
</class>
</keep-names>
<ignore-classes>
<!--不混淆 引入的第三方jar包-->
<class template="class *org*" />
<class template="class *cn*" />
<class template="class *ch*" />
<class template="class *beust*" />
<class template="class *google*" />
<class template="class *sun*" />
<class template="class *typesafe*" />
<class template="class *zwit*" />
<class template="class *dev*" />
<class template="class *io*" />
<class template="class *javax*" />
<class template="class *kotlin*" />
<class template="class *lombok*" />
<class template="class *net*" />
<class template="class *okhttp*" />
<class template="class *okio*" />
<class template="class *okio*" />
<!--不混淆的类-->
<!--<class template="class com.*" />-->
</ignore-classes>
<!-- 到期时间(到期后无法启动jar) 格式:yyyy/mm/dd-->
<!--<expiry date="2021/04/03" string="SERVICE EXPIRED!"/>-->
<!-- 随机命名混淆字符-->
<!--<property name="random-seed" value="abcdef ghnljk svi"/>-->
</config>
- 修改 RunAllatori.bat
这里主要修改编译所需的内存,按实际大小设置
java -Xms512m -Xmx1024m -jar allatori.jar config.xml
- 修改 Clean.bat
del log.xml
del auto-oa-demo-mix.jar
运行
点击 RunAllatori.bat
混淆后 jar
反编译
反编译混淆过的 class,可以看到,变量这些已经变的他妈都不认得了…
边栏推荐
- 面试官:JVM运行时数据区包含哪几部分?作用是啥?
- How to monitor code cyclomatic complexity by refactoring indicators
- 污损指纹恢复与识别
- Finger Vein Recognition-matlab
- 如何让远在的老板看到你!----------来自财富中国网
- 【着色器实现Glitch单项故障闪烁效果(与Television效果不同)_Shader效果第十四篇】
- 正畸MIA微种植体支抗技术中国10周年交流会在沈举办
- Embrace the Cmake child is simple and practical, but inflexible
- 二叉树的遍历
- 性能测试流程
猜你喜欢
"WAIC 2022 · hackers marathon" two ants wealth competition invited you to fight!
华为交换机:STP测试实验
元国度链游系统开发
NLP技术为何在工业界这么卷?前沿案例解析来了
Seata source code analysis: various message processing processes of seata server
「 WAIC 2022 · 黑客马拉松」蚂蚁财富两大赛题邀你来战!
SQL Server 遇到报错解决办法--更新中
How to monitor code cyclomatic complexity by refactoring indicators
Orthodontic MIA micro-implant anchorage technology China 10th anniversary exchange meeting was held in Shenyang
基于YOLOV5行人跌倒检测实验
随机推荐
Embrace the Cmake child is simple and practical, but inflexible
[Sql brush topic] Query information data--Day1
getBoundingClientRect
Seata source code analysis: various message processing processes of seata server
存储资源盘活系统助力新基建
Openharmony first experience (1)
Industrial CCD and CMOS camera
If it is test axi dma catch a few words here
运维就业现状怎么样?技能要求高吗?
June To -.-- -..- -
SIGIR 2022 | 邻域建模Graph-Masked Transformer,显著提高CTR预测性能
Spark提交参数说明和常见优化
Yuanguo chain game system development
高效目标检测:动态候选较大程度提升检测精度(附论文下载)
Query the published version records of the APP Store
目标检测的发展与现状
正则表达式未完
手把手教你CSP系列之script-src
正畸MIA微种植体支抗技术中国10周年交流会在沈举办
03 ts类型缩小,函数