当前位置:网站首页>使用 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,可以看到,变量这些已经变的他妈都不认得了…
边栏推荐
- Storage resource activation system to help new infrastructure
- 高效目标检测:动态候选较大程度提升检测精度(附论文下载)
- The book "The Essence of Alipay Experience Design", a record of knowledge related to testing
- 红外图像滤波
- T+Cloud:构建新型生意社交网络和营销关系的“智公司”
- How to add custom syntax to MySQL?
- June To -.-- -..- -
- 电脑一键重装系统后连不上远程了?教你设置的方法
- 【Attention演变史】翻译模型seq2seq (第二弹)
- 使用.NET简单实现一个Redis的高性能克隆版(二)
猜你喜欢
随机推荐
really time ntp service start command
zynq records
简易数据缓存层的建立
Client Side Cache 和 Server Side Cache 的区别
存储资源盘活系统助力新基建
前3名突然变了,揭秘 7 月编程语言最新排行榜
hash和history路由的区别
ELECTRA:Pre-training Text Encoders as Discriminators Rather Than Generators
zynq 记录
02 ts 变量定义,类型
c sqlite...
[Sql brush topic] Query information data--Day1
String中的hashcode缓存以及HashMap中String作key的好处
The Development and Current Situation of Object Detection
[Latest Information] 2 new regions will announce the registration time for the soft exam in the second half of 2022
Notepad++更改显示背景
Use "green computing" technology to promote sustainable development of computing power
《学会写作》粥佐罗著
really time ntp服务启动命令
Jmeter - Heap配置原因报错Invalid initial heap size: -Xms1024m -Xmx2048mError








