java:xjar
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
java:xjar [2023/11/19 02:51] – morgan0329 | java:xjar [2023/11/19 03:08] (current) – morgan0329 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <code java 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(" | ||
+ | System.out.println(" | ||
+ | System.out.println(" | ||
+ | System.out.println(" | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | <code java 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(" | ||
+ | |||
+ | // 加密的密码 | ||
+ | .use("< | ||
+ | // 要加密的资源 | ||
+ | .include("/ | ||
+ | // 加密后的jar,此时:通过jd-gui反编译失败 | ||
+ | |||
+ | .to(" | ||
+ | } | ||
+ | |||
+ | public static void decrypt() throws Exception { | ||
+ | |||
+ | XCryptos.decryption() | ||
+ | .from(" | ||
+ | .use("< | ||
+ | .include("/ | ||
+ | .to(" | ||
+ | |||
+ | } | ||
+ | } | ||
+ | </ | ||