User Tools

Site Tools


java:xjar
  <repositories>
    <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
    </repository>
  </repositories>
BreakXjar.java
import java.util.Scanner;
 
/**
 * @author Morgan.L
 * @version 3.0
 * @date 2023/6/26 22:31
 */
public class BreakXjar {
 
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String algorithm = scanner.nextLine();
    int keySize = Integer.parseInt(scanner.nextLine());
    int ivSize = Integer.parseInt(scanner.nextLine());
    String password = scanner.nextLine();
 
    System.out.println("Algorithm: " + algorithm);
    System.out.println("KeySize: " + keySize);
    System.out.println("IvSize: " + ivSize);
    System.out.println("Password: " + password);
  }
 
}
DecryptionXjar.java
import io.xjar.XCryptos;
 
/**
 * @author Morgan.L
 * @version 3.0
 * @date 2023/6/26 22:58
 */
 
public class DecryptionXjar {
 
  public static void main(String[] args) throws Exception {
 
    encrypt();
 
  }
 
  public static void encrypt() throws Exception {
        XCryptos.encryption()
 
      // 项目生成的jar
 
      .from("D:\\mmm\\nova_v1_update.jar")
 
      // 加密的密码
      .use("<password>")
      // 要加密的资源
      .include("/**/*.class")
      // 加密后的jar,此时:通过jd-gui反编译失败
 
      .to("D:\\mmm\\nova.jar");
  }
 
  public static void decrypt() throws Exception {
 
    XCryptos.decryption()
      .from("D:\\mmm\\nova.jar")
      .use("<password>")
      .include("/**/*.class")
      .to("D:\\mmm\\nova_new.jar");
 
  }
}
java/xjar.txt · Last modified: 2023/11/19 03:08 by morgan0329

Except where otherwise noted, content on this wiki is licensed under the following license: 沪ICP备12046235号-2
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki