Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
foolcold authored May 23, 2022
1 parent 80a6111 commit a75dca6
Showing 1 changed file with 1 addition and 42 deletions.
43 changes: 1 addition & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,3 @@
# FinalShell_Active

```
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Scanner;
public class FinalShell {
public static void main(String[] args) throws NoSuchAlgorithmException, IOException {
Scanner reader = new Scanner(System.in);
String machineCode = reader.nextLine();
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();
}
}
```
## 仅为个人学习测验使用,请在下载/激活后24小时内删除,不得用于商业用途,否则后果自负

0 comments on commit a75dca6

Please sign in to comment.