FinalShell 离线激活

离线激活每次重启失效,适合临时使用高级功能,比如打包下载等。

适用于<=3.9.5版本,再新的没试过

方法:

  1. 用户密码随便输, 点击离线激活,获取到机器码

  2. 执行下面java代码,在线运行java( https://c.runoob.com/compile/10/

  3. 将刚刚的机器码复制到java代码中,点击运行;生成的激活码,复制到软件当中,点击激活

  4. 成功

java代码

import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Scanner;

// public class FinalShell {
class FinalShell {	// 在线运行
	public static void main(String[] args) throws NoSuchAlgorithmException, IOException {
		// System.out.print("请输入FinalShell的离线机器码:");
		// Scanner reader = new Scanner(System.in);
		// String machineCode = reader.nextLine();
		
		String machineCode = "FinalShell的离线机器码 复制到这!!!";
		
		generateKey(machineCode);
	}

	public static void generateKey(String hardwareId) throws NoSuchAlgorithmException {
		String proKey = transform(61305 + hardwareId + 8552);
		String pfKey = transform(2356 + hardwareId + 13593);
		System.out.println("请将此行复制到离线激活中:"+proKey);
		// System.out.println(pfKey);
	}

	public static String transform(String str) throws NoSuchAlgorithmException {

		String md5 = hashMD5(str);

		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 & 0xFF;
			if (len < 16) {
				sb.append("0");
			}
			sb.append(Integer.toHexString(len));
		}
		return sb.toString();
	}
}

参考 https://www.cnblogs.com/conglingkaishi/p/15598687.html