{"id":4381,"date":"2024-04-12T08:50:20","date_gmt":"2024-04-12T00:50:20","guid":{"rendered":"https:\/\/benson80.eu.org\/?p=4381"},"modified":"2024-04-12T08:51:57","modified_gmt":"2024-04-12T00:51:57","slug":"finalshell-%e7%a6%bb%e7%ba%bf%e6%bf%80%e6%b4%bb","status":"publish","type":"post","link":"https:\/\/benson80.eu.org\/?p=4381","title":{"rendered":"FinalShell \u79bb\u7ebf\u6fc0\u6d3b"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">\u79bb\u7ebf\u6fc0\u6d3b\u6bcf\u6b21\u91cd\u542f\u5931\u6548\uff0c\u9002\u5408\u4e34\u65f6\u4f7f\u7528\u9ad8\u7ea7\u529f\u80fd\uff0c\u6bd4\u5982\u6253\u5305\u4e0b\u8f7d\u7b49\u3002<br>\u65b9\u6cd5\uff1a<br><br>1. \u7528\u6237\u5bc6\u7801\u968f\u4fbf\u8f93\uff0c \u70b9\u51fb\u79bb\u7ebf\u6fc0\u6d3b\uff0c\u83b7\u53d6\u5230\u673a\u5668\u7801<br><br>2. \u6267\u884c\u4e0b\u9762java\u4ee3\u7801\uff0c\u5728\u7ebf\u8fd0\u884cjava\uff08 <a href=\"https:\/\/c.runoob.com\/compile\/10\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/c.runoob.com\/compile\/10\/<\/a> \uff09<br><br>3. \u5c06\u521a\u521a\u7684\u673a\u5668\u7801\u590d\u5236\u5230java\u4ee3\u7801\u4e2d\uff0c\u70b9\u51fb\u8fd0\u884c\uff1b\u751f\u6210\u7684\u6fc0\u6d3b\u7801\uff0c\u590d\u5236\u5230\u8f6f\u4ef6\u5f53\u4e2d\uff0c\u70b9\u51fb\u6fc0\u6d3b<br><br>4. \u6210\u529f<br><strong>java\u4ee3\u7801<\/strong><br>import java.io.IOException;<br>import java.security.MessageDigest;<br>import java.security.NoSuchAlgorithmException;<br>import java.util.Scanner;<br><br>\/\/ public class FinalShell {<br>class FinalShell {\t\/\/ \u5728\u7ebf\u8fd0\u884c<br>\tpublic static void main(String[] args) throws NoSuchAlgorithmException, IOException {<br>\t\t\/\/ System.out.print(\"\u8bf7\u8f93\u5165FinalShell\u7684\u79bb\u7ebf\u673a\u5668\u7801\uff1a\");<br>\t\t\/\/ Scanner reader = new Scanner(System.in);<br>\t\t\/\/ String machineCode = reader.nextLine();<br>\t\t<br>\t\tString machineCode = \"FinalShell\u7684\u79bb\u7ebf\u673a\u5668\u7801 \u590d\u5236\u5230\u8fd9!!!\";<br>\t\t<br>\t\tgenerateKey(machineCode);<br>\t}<br><br>\tpublic static void generateKey(String hardwareId) throws NoSuchAlgorithmException {<br>\t\tString proKey = transform(61305 + hardwareId + 8552);<br>\t\tString pfKey = transform(2356 + hardwareId + 13593);<br>\t\tSystem.out.println(\"\u8bf7\u5c06\u6b64\u884c\u590d\u5236\u5230\u79bb\u7ebf\u6fc0\u6d3b\u4e2d\uff1a\"+proKey);<br>\t\t\/\/ System.out.println(pfKey);<br>\t}<br><br>\tpublic static String transform(String str) throws NoSuchAlgorithmException {<br><br>\t\tString md5 = hashMD5(str);<br><br>\t\treturn hashMD5(str).substring(8, 24);<br>\t}<br><br>\tpublic static String hashMD5(String str) throws NoSuchAlgorithmException {<br>\t\tMessageDigest digest = MessageDigest.getInstance(\"MD5\");<br>\t\tbyte[] hashed = digest.digest(str.getBytes());<br>\t\tStringBuilder sb = new StringBuilder();<br>\t\tfor (byte b : hashed) {<br>\t\t\tint len = b &amp; 0xFF;<br>\t\t\tif (len &lt; 16) {<br>\t\t\t\tsb.append(\"0\");<br>\t\t\t}<br>\t\t\tsb.append(Integer.toHexString(len));<br>\t\t}<br>\t\treturn sb.toString();<br>\t}<br>}<br>\u53c2\u8003 <a href=\"https:\/\/www.cnblogs.com\/conglingkaishi\/p\/15598687.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.cnblogs.com\/conglingkaishi\/p\/15598687.html<\/a><br><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u79bb\u7ebf\u6fc0\u6d3b\u6bcf\u6b21\u91cd\u542f\u5931\u6548\uff0c\u9002\u5408\u4e34\u65f6\u4f7f\u7528\u9ad8\u7ea7\u529f\u80fd\uff0c\u6bd4\u5982\u6253 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4381","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/4381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4381"}],"version-history":[{"count":3,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/4381\/revisions"}],"predecessor-version":[{"id":4384,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/4381\/revisions\/4384"}],"wp:attachment":[{"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/benson80.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}