本帖最后由 Libws 于 2022-6-11 03:13 编辑
Code:
[Java] 纯文本查看 复制代码 package me.ultrapanda;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Scanner;
/* loaded from: FinalShell-Keygen-1.0-SNAPSHOT.jar:me/ultrapanda/Main.class */
public class Main {
public static void main(String[] args) throws NoSuchAlgorithmException {
Scanner scanner = new Scanner(System.in);
System.out.println("FinalShell-Keygen v1.0 - Developed by UltraPanda\n* Only for educational purpose *\n请输入离线激活所提供的机器码: ");
String hardwareId = scanner.nextLine();
System.out.printf("高级版激活码: %s\n专业版激活码: %s%n", transform(61305 + hardwareId + 8552), transform(2356 + hardwareId + 13593));
}
public static String transform(String str) throws NoSuchAlgorithmException {
return hashMD5(str).substring(8, 24);
}
public static String hashMD5(String str) throws NoSuchAlgorithmException {
MessageDigest digest = MessageDigest.getInstance("MD5");
byte[] hashed = digest.digest(str.getBytes());
StringBuilder sb = new StringBuilder();
for (byte b : hashed) {
int len = b & 255;
if (len < 16) {
sb.append("0");
}
sb.append(Integer.toHexString(len));
}
return sb.toString();
}
}
|