当前位置:   article > 正文

classfinal-fatjar加密_对jar包进行classfinal加密,jar包还可以被引用

对jar包进行classfinal加密,jar包还可以被引用
1.下载classfinal-fatjar.jar加密工具包
wget https://repo1.maven.org/maven2/net/roseboy/classfinal-fatjar/1.2.1/classfinal-fatjar-1.2.1.jar
2.生成待部署机器的字节码
java -jar classfinal-fatjar-1.2.1.jar -C
响应:Server code is: 8105BAB1312E34B2B50BE74FDC93FA89D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E
3.启动加密工具包
java -jar classfinal-fatjar-1.2.1.jar
输入对应的响应参数:
请输入需要加密的jar/war路径:C:\Users\17326\Desktop\jiami\api-sec.jar
请输入jar/war包lib下要加密jar文件名(多个用","分割):
请输入需要加密的包名(可为空,多个用","分割):com.laosan
请输入需要排除的类名(可为空,多个用","分割):com.laosan.system.SystemApplication.java
请输入依赖jar包目录(可为空,多个用","分割):
请输入要加密的配置文件名(可为空,多个用","分割):application.yaml
请输入机器码(可为空):8105BAB1312E34B2B50BE74FDC93FA89D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E
请输入加密密码:123456

加密信息如下:
-------------------------
1. jar/war路径:      C:\Users\17326\Desktop\jiami\api-sec.jar
2. lib下的jar:
3. 包名前缀:          com.laosan
4. 排除的类名:        com.laosan.system.SystemApplication.java
5. 加密配置文件:      application.yaml
6. ClassPath:
7. 密码:             123456
8. 机器码:           8105BAB1312E34B2B50BE74FDC93FA89D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E
-------------------------

确定执行吗?(Y/n)
Y
处理中...
加密完成,请牢记密码!
==>C:\Users\17326\Desktop\jiami\api-sec-encrypted.jar
4.使用如下命令启动java -javaagent:api-sec-encrypted.jar  -jar api-sec-encrypted.jar
响应中输入密码:123456,即可运行
=========================================================
=                                                       =
=      Java Class Encryption Tool v1.2.1   by Mr.K      =
=                                                       =
=========================================================

Password:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::               (v2.7.13)

2023-10-22 12:03:43.759  INFO 22872 --- [           main] com.laosan.system.SystemApplication      : Starting SystemApplication using Java 1.8.0_192 on zxh-dev with PID 22872 (C:\Users\17326\Desktop\jiami\api-sec-encrypted.jar started by 17326 in C:\Users\17326\Desktop\jiami)
2023-10-22 12:03:43.763  INFO 22872 --- [           main] com.laosan.system.SystemApplication      : No active profile set, falling back to 1 default profile: "default"
2023-10-22 12:03:45.027  INFO 22872 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 14444 (http)
2023-10-22 12:03:45.041  INFO 22872 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2023-10-22 12:03:45.042  INFO 22872 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.76]
2023-10-22 12:03:45.423  INFO 22872 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2023-10-22 12:03:45.423  INFO 22872 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1602 ms
2023-10-22 12:03:46.216  INFO 22872 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 14444 (http) with context path ''
2023-10-22 12:03:46.236  INFO 22872 --- [           main] com.laosan.system.SystemApplication      : Started SystemApplication in 3.024 seconds (JVM running for 6.309)
  • 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
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/614201
推荐阅读
相关标签
  

闽ICP备14008679号