当前位置:网站首页>使用 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,可以看到,变量这些已经变的他妈都不认得了…
边栏推荐
猜你喜欢

Finger Vein Recognition-matlab

ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators

基于YOLOV5行人跌倒检测实验

SQL Server 遇到报错解决办法--更新中

运维就业现状怎么样?技能要求高吗?

Use "green computing" technology to promote sustainable development of computing power

哈佛架构 VS 冯·诺依曼架构

Kubernetes之list-watch机制
力扣题(5)—— 最长回文子串

污损指纹恢复与识别
随机推荐
June To -.-- -..- -
How to monitor code cyclomatic complexity by refactoring indicators
元国度链游系统开发
正畸MIA微种植体支抗技术中国10周年交流会在沈举办
如何推动乡村振兴的落地
华为交换机:STP测试实验
正畸MIA微种植体支抗技术中国10周年交流会在沈举办
Defaced Fingerprint Recovery and Identification
VQ Realization of Wavelet Extraction Features
[Latest Information] 2 new regions will announce the registration time for the soft exam in the second half of 2022
AWS SES 的监控和告警
Zip4j使用
03 ts类型缩小,函数
数据库治理的探索与实践
红外图像滤波
5 g NR notes
visual studio 与 visual studio code
If it is test axi dma catch a few words here
如果是测试 axi dma抓数的话 看这里
nr部分计算