{"id":3460,"date":"2018-02-10T21:55:29","date_gmt":"2018-02-10T13:55:29","guid":{"rendered":"https:\/\/dmesg.app\/?p=3460"},"modified":"2018-02-10T21:55:29","modified_gmt":"2018-02-10T13:55:29","slug":"yyets","status":"publish","type":"post","link":"https:\/\/dmesg.app\/yyets.html","title":{"rendered":"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7"},"content":{"rendered":"<div class=\"alert alert-warning\" role=\"alert\"><del><span style=\"font-size: 12pt;\"><a href=\"https:\/\/dmesg.app\/jbls.html\" target=\"_blank\" rel=\"noopener\">\u6211\u53ef\u80fd\u8d70\u4e0a\u4e86\u79fb\u690d\u7684\u4e0d\u5f52\u8def<\/a><\/span><\/del><\/div>\n<p><span style=\"font-size: 12pt;\">\u5728\u51e0\u4e2a\u6708\u5f00\u59cb\u7ed9ExpressBot\u52a0\u5165\u4eba\u4eba\u5f71\u89c6\u7684API\u7684\u65f6\u5019\uff0c\u53d1\u73b0\u6709\u4e00\u4e2a\u5f88\u795e\u5947\u7684API\uff0c\u5bf9\u67d0\u4e2aURL\u8fdb\u884c<code>curl url -C - -Lv -o xxx.mp4<\/code>\uff0c\u4f1a\u4e0b\u8f7d\u56de\u6765\u4e00\u4e2a\u548c\u539f\u59cb\u89c6\u9891\u6587\u4ef6\u4e00\u6837\u5927\u5c0f\u3001\u5185\u5bb9\u5374\u7ecf\u8fc7\u67d0\u79cd\u52a0\u5bc6\u5904\u7406\u7684\u6587\u4ef6\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u524d\u51e0\u5929\u7ecf\u8fc7<a href=\"https:\/\/github.com\/BennyThink\/ExpressBot\/issues\/3\">JasonKhew96<\/a>\u7684\u5206\u6790\uff0c\u53d1\u73b0\u662f\u4eba\u4eba\u5f71\u89c6\u5bf9\u89c6\u9891\u6587\u4ef6\u8fdb\u884c\u4e86\u52a0\u5bc6\u3002<\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">\u52a0\u5bc6\u539f\u7406<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">\u4e00\u53e5\u8bdd\u7b80\u5355\u6982\u62ec\u5c31\u662f\uff0c\u6bcf4096\u5b57\u8282\u5c31\u52a0\u5bc616\u4e2a\u5b57\u8282\uff0c\u52a0\u5bc6\u5bc6\u94a5\u662ffile_id+\u5b57\u7b26\u4e32zm+file_id\u8fdb\u884c\u4e00\u6b21md5<\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">\u8fdb\u4e00\u6b65\u7684\u5206\u6790\u63a2\u8ba8<\/span><\/h2>\n<h3><span style=\"font-size: 12pt;\">\u5206\u6790\u76f8\u5e94JSON<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\">\u9996\u5148\uff0c\u6211\u4eec\u5148\u770b\u4e00\u4e0b\u76f8\u5e94\u5427\uff0c\u5927\u6982\u5982\u4e0b\u6240\u793a\uff1a<\/span><\/p>\n<pre class=\"prettyprint linenums\">[\n{\n&quot;file_name&quot;: &quot;\u5929\u8d4b\u5f02\u7980.\u5f69\u86cb\u5408\u96c6.the.gifted.s01.extras.\u4e2d\u82f1\u5b57\u5e55.webrip.aac.720p.x264-\u4eba\u4eba\u5f71\u89c6.mp4&quot;,\n&quot;file_size&quot;: 61001062,\n&quot;fileid&quot;: &quot;fb755fd1b51c769bfed987e2a8c8b03ee7a8e7cc&quot;,\n&quot;url&quot;: &quot;https:\/\/www.zmzfile.com:9043\/rt\/route?fileid=fb755fd1b51c769bfed987e2a8c8b03ee7a8e7cc&quot;\n},\n{\n&quot;file_name&quot;: &quot;\u5929\u8d4b\u5f02\u7980.the.gifted.s01e12-13.\u4e2d\u82f1\u5b57\u5e55.webrip.aac.720p.x264-\u4eba\u4eba\u5f71\u89c6.mp4&quot;,\n&quot;file_size&quot;: 995104165,\n&quot;fileid&quot;: &quot;a01975eda089190c7e43fcba5eb91371e54205a6&quot;,\n&quot;url&quot;: &quot;https:\/\/www.zmzfile.com:9043\/rt\/route?fileid=a01975eda089190c7e43fcba5eb91371e54205a6&quot;\n},\n\u7701\u7565\u2026\u2026\u2026\u2026\n]\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u9996\u5148\u89c2\u5bdf\u4e0b\u8fd9\u4e2afileid\uff0c40\u4e2a\u5b57\u7b26\uff0c\u770b\u6837\u5b50\u5e94\u8be5\u662f\u67d0\u4e2a\u6563\u5217\u51fd\u6570\u7684\u6458\u8981\uff0c\u90a3\u4e48\u5e94\u8be5\u662fSHA1\u5427\u3002SHA1\u6458\u8981\u957f\u5ea6\u662f160\u4f4d\uff0c\u4e5f\u5c31\u662f20\u4e2a\u5b57\u8282\uff0c\u7528\u5341\u516d\u8fdb\u5236\u8868\u793a\u6cd5\u5c31\u662f40\u4e2a\u5b57\u7b26\u4e86\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u7136\u800c\u4e8b\u5b9e\u8bc1\u660e\uff0c\u53ef\u80fd\u5e76\u4e0d\u662f\u8fd9\u6837\u3002\u6211\u6bd4\u5bf9\u4e86\u6240\u6709\u5df2\u77e5\u7684\u6563\u5217\u51fd\u6570\uff0c\u90fd\u6ca1\u6709\u4e00\u6837\u7684\u6563\u5217\u503c\uff0c\u731c\u6d4b\u53ef\u80fd\u662f\u52a0\u4e86\u70b9\u201c\u4f5c\u6599\u201d\u7136\u540e\u518d\u8fd0\u884c\u7684SHA1\u5427\u3002\u4e0d\u8fc7\u8fd9\u4e0d\u91cd\u8981\u3002<\/span><\/p>\n<h3><span style=\"font-size: 12pt;\">\u5341\u516d\u8fdb\u5236\u5206\u6790<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\">\u4e3a\u4e86\u9a8c\u8bc1\u6587\u4ef6\u7a76\u7adf\u88ab\u505a\u4e86\u600e\u6837\u7684\u4fee\u6539\uff0c\u6211\u4eec\u5fc5\u987b\u8981\u51c6\u5907\u4e24\u4e2a\u7248\u672c\u7684\u6587\u4ef6\uff1a\u539f\u7248\u7684\u4e0e\u88ab\u52a0\u5bc6\u7684\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u6253\u5f00Hex Comparison\u6bd4\u8f83\u4e24\u4e2a\u6587\u4ef6\u7684\u5f02\u540c\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u7b2c\u4e00\u5904\u4e0d\u540c\uff1a<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/2018021013220744.png\" alt=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" title=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u6587\u4ef6\u4e00\u5f00\u59cb\u5c31\u53d1\u73b0\u4e0d\u540c\u4e86\u3002\u8fd9\u4e2a\u90e8\u5206\u76f8\u5f53\u91cd\u8981\u5566\uff0cfile\u547d\u4ee4\u5c31\u662f\u770b\u8fd9\u91cc\u533a\u5206\u6587\u4ef6\u7c7b\u578b\u7684\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u7b2c\u4e8c\u5904\u4e0d\u540c\uff1a<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/2018021013221095.png\" alt=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" title=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u6ce8\u610f\u5de6\u4fa7\u7684\u5341\u516d\u8fdb\u5236\u504f\u79fb\uff0c\u6211\u4eec\u7528\u8ba1\u7b97\u5668\u628a\u5b83\u6362\u7b97\u6210\u5341\u8fdb\u5236\uff0c\u53d1\u73b0\u521a\u597d\u662f4096.\u90a3\u4e48\u5927\u80c6\u7684\u731c\u6d4b\u4e00\u4e0b\uff0c\u4e0b\u4e00\u4e2a\u4e0d\u540c\u7684\u5730\u65b9\u7684\u5341\u8fdb\u5236\u5c31\u5e94\u8be5\u662f8192\uff0c\u5bf9\u5e94\u5341\u516d\u8fdb\u5236\u5c31\u5e94\u8be5\u662f2000\uff0c\u5bf9\u5427\uff1f<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/2018021013221251.png\" alt=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" title=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u6ca1\u9519\u54e6\uff0c\u771f\u7684\u662f\u8fd9\u6837\u3002\u90a3\u4e48\u52a0\u5bc6\u6d41\u7a0b\u5c31\u53ef\u4ee5\u8fd9\u6837\u8be6\u7ec6\u63cf\u8ff0\u4e86\uff1a<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u5c06\u6587\u4ef6\u4ee54096\u5b57\u8282\u8fdb\u884c\u5206\u5757\uff0c\u52a0\u5bc6\u6bcf\u4e00\u5757\u4e2d\u7684\u524d16\u4e2a\u5b57\u8282\uff08\u4e5f\u5c31\u662f\u56fe\u4e0a\u7684\u4e00\u884c\uff09\u3002\u5982\u679c\u9047\u5230\u6587\u4ef6\u5c3e\u6070\u5de7\u662f\u8be5\u52a0\u5bc6\u7684\u5757\u4f46\u662f\u53c8\u4e0d\u8db316\u5b57\u8282\uff08\u8fd9\u79cd\u6982\u7387\u771f\u7684\u5f88\u4f4e\uff09\uff0c\u90a3\u4e48\u5982\u4f55\u5904\u7406\u8fd8\u6682\u65f6\u672a\u77e5\uff0c\u4e0d\u8fc7\u6309\u7167\u5e38\u89c4\u7684\u601d\u8def\u5e94\u8be5\u662f\u5148padding\u7136\u540e\u518d\u8d70\u52a0\u5bc6\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u6709\u4eba\u53ef\u80fd\u8981\u95ee\uff0c\u4e0a\u9762\u90a3\u4e00\u884c\u4e0d\u540c\u660e\u660e\u662f32\u4e2a\u5b57\u7b26\uff0c\u90a3\u4e48\u5c31\u662f32\u4e2a\u5b57\u8282\uff0c\u4f60\u600e\u4e48\u7741\u773c\u8bf4\u778e\u8bdd\u5462\uff1f\u5509\u03b5=(\u00b4\u03bf\uff40*)))\u5341\u516d\u8fdb\u5236\u8868\u793a\u6cd5\u561b\uff0c\u4e0b\u9762\u4f1a\u7ec6\u8bf4\u7684\u3002<\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">C++\u6e90\u4ee3\u7801\u7684\u7ed3\u6784\u6d41\u7a0b\u5206\u6790<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">JasonKhew96\u63d0\u4f9b\u4e86\u4e00\u4e2aC++\u7248\u672c\u7684\u53ef\u4ee5\u6210\u529f\u89e3\u5bc6\u6587\u4ef6\u7684\u6e90\u4ee3\u7801\uff0c\u4e0b\u8f7d\u53ef\u4ee5\u6233\u8fd9\u91cc<a href=\"https:\/\/github.com\/BennyThink\/ExpressBot\/files\/1710533\/YYeTs.zip\">https:\/\/github.com\/BennyThink\/ExpressBot\/files\/1710533\/YYeTs.zip<\/a><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u4f7f\u7528CLion\u6253\u5f00\u8fdb\u884c\u5206\u6790\uff0c\u53d1\u73b0\u6d41\u7a0b\u5927\u6982\u662f\u8fd9\u6837\u7684\uff08\u6211\u7684C\/C++\u6c34\u5e73\u63a5\u8fd1\u4e8e0\u4e86\uff0c\u5df2\u7ecf\u5b8c\u5168\u5b8c\u86cb\u4e86(\u0e51\u2032\u1d17\u2035\u0e51)\uff09\uff1a<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u4e3b\u51fd\u6570\u7684\u91cc\u53ea\u6709\u8fd9\u4e24\u53e5\u5173\u952e\u4ee3\u7801\uff0c\u7b2c\u4e00\u53e5\u731c\u6d4b\u662f\u62ff\u5230\u52a0\u5bc6\u7684Key\uff0c\u7b2c\u4e8c\u6b65\u662f\u7528Key\u89e3\u5bc6\u6587\u4ef6\u3002<\/span><\/p>\n<pre class=\"prettyprint linenums\">uint8_t *md5Test = getMd5(argv[2]);\ndecrypt_file(md5Test, argv[1]);\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u6211\u4eec\u8df3\u8f6c\u5230getMd5\u8fd9\u4e2a\u51fd\u6570<\/span><\/p>\n<pre class=\"prettyprint linenums\">char zmzSecret[] = &quot;zm&quot;;\nchar bfMd5[82] = {};\nstrcat(bfMd5, file_id);\nstrcat(bfMd5, zmzSecret);\nstrcat(bfMd5, file_id);\nchar zmzKey[32];\nstrcpy(zmzKey, md5(bfMd5).c_str());\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u6211\u4eec\u53d1\u73b0\u601d\u8def\u5f88\u7b80\u5355\uff0c\u5c31\u662f<\/span><\/p>\n<p>fileid = \"d21a081cc6a32daa85310ca6aad81e378f0b736e\"<br \/>\nsecret = \"zm\"<br \/>\nkey = fileid + secret + fileid<\/p>\n<p><span style=\"font-size: 12pt;\">\u4e5f\u5c31\u662fd21a081cc6a32daa85310ca6aad81e378f0b736ezmd21a081cc6a32daa85310ca6aad81e378f0b736e\uff0c\u7136\u540e\u5bf9\u8fd9\u4e2a\u8fdb\u884c\u4e00\u6b21md5\uff0c\u901a\u8fc7\u8df3\u8f6c\u5230<code>md5.cpp<\/code>\u4e2d\uff0c\u67e5\u770b\u5bf9\u5e94\u4ee3\u7801\uff0c<code>return md5.hexdigest()<\/code>\u6211\u4eec\u53ef\u4ee5\u731c\u6d4b\u5230\uff0c\u8fd9\u91cc\u8fd4\u56de\u7684\u503c\u662f\u5341\u516d\u8fdb\u5236\u8868\u793a\u7684md5\u503c\uff0c\u4e5f\u5c31\u662f\u6211\u4eec\u7ecf\u5e38\u770b\u5230\u768432\u4e2a\u5b57\u7b26\u7684MD5\u503c\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u5c0f\u63d0\u793a\uff1a<\/span><\/p>\n<div id=\"sc_blue\"><span style=\"font-size: 12pt;\">\u5c0f\u63d0\u793a\uff1a<br \/>\n\u6839\u636e\u7ef4\u57fa\u767e\u79d1\uff0cMD5\u7684\u6458\u8981\u957f\u5ea6\u662f128\u4f4d\uff0c\u90a3\u4e48\u5e94\u8be5\u662f128\/8=16\u5b57\u8282\uff0c\u4e3a\u4ec0\u4e48\u6211\u4eec\u770b\u5230\u7684\u6458\u8981\u957f\u5ea6\u90fd\u662f32\u5462\uff1f\u54e6\u662f\u8fd9\u6837\u7684\uff0cMD5\u8fd0\u7b97\u4e4b\u540e\u7684\u7ed3\u679c\u662f\u4e8c\u8fdb\u5236\uff0c\u57fa\u672c\u4e0a\u662f\u4e0d\u53ef\u8bfb\u7684\uff08\u65e0\u6cd5\u6b63\u786e\u663e\u793a\u51fa\u6765\uff09\uff0c\u6240\u4ee5\u6211\u4eec\u4e00\u822c\u90fd\u4f1a\u628a\u7ed3\u679c\u8f6c\u6362\u6210\u5341\u516d\u8fdb\u5236\uff0c\u8fd9\u6837\u5c31\u662f\u53ef\u4ee5\u770b\u5230\u7684\u5b57\u7b26\u5566\u3002\u53ea\u4e0d\u8fc7\u6211\u4eec\u662f4\u4f4d\u8f6c\u6362\u4e00\u4e2a\uff0c\u7528\u4e24\u4e2a\u201c\u5b57\u7b26\u201d\u8868\u793a\uff0c \u6240\u4ee5128\u4f4d\uff0816\u5b57\u8282\uff09\u7684\u6458\u8981\u4ee516\u8fdb\u5236\u8868\u793a\u6cd5\u663e\u793a\u662f32\u4e2a\u201c\u5b57\u7b26\u201d\u5566\u3002<\/span><\/div>\n<p><span style=\"font-size: 12pt;\">\u63a5\u4e0b\u6765\u5c31\u662f\u4e00\u6bb5for\u5faa\u73af\uff0c\u53cd\u6b63<strong>\u5f53\u65f6<\/strong>\u6211\u662f\u6ca1\u592a\u641e\u61c2\u8fd9\u6bb5for\u5faa\u73af\u7684\u542b\u4e49\u3002\u597d\u5427\uff0c\u5c31\u5f53\u6211\u4eec\u62ff\u5230\u4e86\u771f\u6b63\u7684key\uff0c\u90a3\u4e48\u6211\u4eec\u770b\u4e0bdecrypt_file\u8fd9\u4e2a\u51fd\u6570\u5427\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u903b\u8f91\u5c31\u4e0d\u7ec6\u8bf4\u4e86\uff0c\u57fa\u672c\u4e0a\u5c31\u662f\u5224\u65ad\u5f53\u524d\u7684\u6587\u4ef6\u6307\u9488\u4f4d\u7f6e\uff0c\u9700\u8981\u5904\u7406\u6587\u4ef6\u5927\u5c0f\u4e0e\u6587\u4ef6\u5c3e\uff0c\u7136\u540e\u8fdb\u884c\u89e3\u5bc6\u5199\u5165\u6587\u4ef6\u3002<\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">Port\u5230Python\u4e4b\u4f7f\u7528MD5\u8ba1\u7b97AES Key<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">\u7531\u4e8e\u540e\u9762\u9700\u8981\u7528\u5230aes\uff0c\u6240\u4ee5\u8fd9\u91cc\u5c31\u90fd\u4f7f\u7528<a href=\"https:\/\/github.com\/pyca\/cryptography\">cryptography<\/a>\u5566\uff0c\u8981\u662f\u53ea\u8fdb\u884c\u6563\u5217\u5012\u662f\u53ef\u4ee5\u7528\u7528\u81ea\u5e26\u7684hashlib\u5462\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u751f\u6210\u6458\u8981\u5f88\u7b80\u5355\uff0c\u51e0\u884c\u800c\u5df2\uff1a<\/span><\/p>\n<pre class=\"prettyprint linenums\">from binascii import hexlify\n\nfrom cryptography.hazmat.backends import default_backend\nfrom cryptography.hazmat.primitives import hashes\n\ndigest = hashes.Hash(hashes.MD5(), backend=default_backend())\ndigest.update(&#039;hello world&#039;)\nprint hexlify(digest.finalize())\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u6709\u4e24\u70b9\u9700\u8981\u6ce8\u610f\uff1a<\/span><\/p>\n<ol>\n<li><span style=\"font-size: 12pt;\">\u8981\u8bb0\u5f97MD5\u7684\u6458\u8981\u672c\u8d28\u4e0a\u662f\u4e8c\u8fdb\u5236\uff0c\u6240\u4ee5\u6211\u4eecprint\u4e00\u5b9a\u662f\u4e71\u7801\u7684\uff0c\u6240\u4ee5\u6211\u4eec\u6b64\u65f6\u8981\u8f6c\u6362\u6210\u5341\u516d\u8fdb\u5236\u8868\u793a\u51fa\u6765\uff1b<\/span><\/li>\n<li><span style=\"font-size: 12pt;\">\u8981\u8bb0\u5f97<code>digest.update()<\/code>\u63a5\u53d7\u7684\u53c2\u6570\u662fbytes\u7c7b\u578b\uff0c\u4e5f\u5c31\u662f\u4e8c\u8fdb\u5236\uff0c\u6240\u4ee5\u5982\u679c\u4f60\u4f7f\u7528Python 2\uff0c\u90a3\u4e48\u76f4\u63a5\u5f15\u53f7\u5305\u56f4\u7684\u5c31\u662f\u4e8c\u8fdb\u5236\u4e86\uff0c\u5982\u679c\u4f60\u4f7f\u7528Python 3\uff0c\u90a3\u4e48\u8981\u5e26b\u524d\u7f00\uff0c\u6216\u8005\u52a0\u4e0a<code>encode('utf-8')<\/code>\u6216\u8005<code>bytes(your_str, encoding='utf-8')<\/code>\u3002\u5982\u679c\u60f3\u8981\u8ba1\u7b97\u6587\u4ef6\u7684\u6563\u5217\u503c\uff0c\u90a3\u4e48\u76f4\u63a5\u628a<code>f.read()<\/code>\u4f20\u9012\u8fc7\u53bb\u5c31\u597d\u4e86\u3002<\/span><\/li>\n<\/ol>\n<h2><span style=\"font-size: 12pt;\">Port\u5230Python\u4e4b\u4f7f\u7528AES-ECB<\/span><\/h2>\n<h3><span style=\"font-size: 12pt;\">\u7b80\u5355\u8c08\u8c08AES<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\">\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u9996\u5148\u6211\u8981\u79d1\u666e\u4e00\u4e0b\uff0cAES\u662f\u4e00\u79cd\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\uff0c\u6240\u8c13\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\uff0c\u5c31\u662f\u6307\u7684\u52a0\u5bc6\u89e3\u5bc6\u7528\u540c\u4e00\u4e2a\u5bc6\u94a5\u3002\u5728\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u4e2d\uff0c\u53ef\u4ee5\u5206\u6210\u4e24\u79cd\uff0c\u4e00\u79cd\u662f\u6d41\u5bc6\u7801\uff0c\u4e00\u79cd\u662f\u5206\u7ec4\u5bc6\u7801\uff08\u5757\u5bc6\u7801\uff09\uff0c\u50cfAES\u5c31\u662f\u5178\u578b\u7684\u5757\u5bc6\u7801\uff0c\u800cRC4\u662f\u5178\u578b\u7684\u6d41\u5bc6\u7801\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u987e\u540d\u601d\u4e49\uff0c\u5757\u5bc6\u7801\u5c31\u662f\u5c06\u660e\u6587\u5206\u6210\u591a\u4e2a\u7b49\u957f\u7684\u6a21\u5757\uff08\u4e0d\u8db3\u5c31padding\uff09\uff0c\u4f7f\u7528\u786e\u5b9a\u7684\u7b97\u6cd5\u548c\u5bf9\u79f0\u5bc6\u94a5\u5bf9\u6bcf\u7ec4\u5206\u522b\u52a0\u5bc6\u89e3\u5bc6\u3002\u6bd4\u5982\u8bf4\uff0cAES\u7684\u5757\u957f\u5ea6\u56fa\u5b9a\u4e3a128\u6bd4\u7279\uff0c\u5bc6\u94a5\u957f\u5ea6\u5219\u53ef\u4ee5\u662f128\uff0c192\u6216256\u6bd4\u7279\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u4f60\u7684\u5bc6\u94a5\uff0c\u5982\u679c\u7528\u8089\u773c\u53ef\u89c1\u7684\u5b57\u7b26\u6765\u8bf4\u8bdd\u7684\u8bdd\uff0c\u90a3\u4e48\u5c31\u5fc5\u987b\u662f16\u5b57\u8282\u300124\u5b57\u8282\u300132\u5b57\u8282\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u53e6\u5916\uff0c\u5757\u5bc6\u7801\u6709<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81%E5%B7%A5%E4%BD%9C%E6%A8%A1%E5%BC%8F\">\u5206\u7ec4\u6a21\u5f0f<\/a>\u8fd9\u79cd\u8bf4\u6cd5\uff0c\u5373\u4f7f\u662f\u4e0d\u540c\u7684\u5206\u7ec4\u6a21\u5f0f\u3001\u76f8\u540c\u7684\u5bc6\u94a5\u4e5f\u4f1a\u4ea7\u751f\u4e0d\u540c\u7684\u5bc6\u6587\u3002\u6240\u4ee5\u6211\u4eec\u5982\u679c\u8981\u7cbe\u786e\u7684\u7528AES\u63cf\u8ff0\u52a0\u5bc6\uff0c\u90a3\u4e48\u5927\u6982\u6a21\u5f0f\u662f\u8fd9\u6837\u7684\uff1a<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">AES-256-CFB\uff0c\u4f7f\u7528AES\u52a0\u5bc6\u7b97\u6cd5\uff0c\u5bc6\u94a5\u957f\u5ea6\u662f256\u6bd4\u7279\uff0c\u5206\u7ec4\u6a21\u5f0f\u662fCFB\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u5206\u7ec4\u6a21\u5f0f\u7a76\u7adf\u662f\u4e2a\u5565\u554a\uff0c\u4e0d\u540c\u7684\u5206\u7ec4\u6a21\u5f0f\u4e4b\u95f4\u6709\u5565\u533a\u522b\u554a\uff0c\u80fd\u52a0\u5bc6\u4e0d\u5c31\u884c\u4e86\u5417\uff1f<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u4e0d\u4e0d\u4e0d\u8fd9\u6837\u662f\u8fdc\u8fdc\u4e0d\u591f\u7684\u3002\u7531\u4e8e\u5757\u5bc6\u7801\u7ed3\u6784\u7684\u7279\u6b8a\u6027\uff0c\u6211\u4eec\u5fc5\u987b\u8981\u5b9a\u4e49\u6bcf\u4e00\u4e2a\u5757\u4e0e\u5bc6\u94a5\u4e4b\u95f4\u7684\u8fd0\u7b97\u5173\u7cfb\u3002\u50cf\u662f\u6700\u7b80\u5355\u7684\u7535\u5b50\u5bc6\u7801\u672c\uff08Electronic codebook\uff0cECB\uff09\u6a21\u5f0f\uff0c\u5c31\u662f\u628a\u6bcf\u4e2a\u5757\u548c\u76f8\u540c\u7684\u5bc6\u94a5\u8fdb\u884c\u52a0\u5bc6\u8fd0\u7b97\uff0c\u5f97\u5230\u7684\u5bc6\u6587\u518d\u7ec4\u5408\u5230\u4e00\u8d77\uff1b<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/2018021013221440.png\" alt=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" title=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" alt=\"File:Ecb encryption.png\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u50cf\u662f\u5bc6\u7801\u5206\u7ec4\u94fe\u63a5\uff08CBC\uff0cCipher-block chaining\uff09\u6a21\u5f0f\uff0c\u6bcf\u4e2a\u660e\u6587\u5757\u5148\u4e0e\u524d\u4e00\u4e2a\u5bc6\u6587\u5757\u8fdb\u884c\u5f02\u6216\u540e\uff0c\u518d\u8fdb\u884c\u52a0\u5bc6\uff0c\u7b2c\u4e00\u4e2a\u660e\u6587\u5757\u4e0e\u521d\u59cb\u5316\u5411\u91cf\u8fdb\u884c\u5f02\u6216\u518d\u52a0\u5bc6\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/201802101322163.png\" alt=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" title=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" alt=\"File:Cbc encryption.png\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u7a0d\u5fae\u601d\u8003\u4e00\u4e0b\u4e0b\u6211\u4eec\u5176\u5b9e\u53ef\u4ee5\u5f97\u51fa\u7ed3\u8bba\uff0cECB\u6a21\u5f0f\u672c\u8d28\u4e0a\u662f\u4e0d\u5b89\u5168\u7684\uff08\u5b9e\u73b0\u6700\u7b80\u5355\uff0c\u6ca1\u9519\uff09\u3002\u4e3a\u4ec0\u4e48\u5462\uff1f\u53ea\u8981\u660e\u6587\u5757\u4e00\u6837\uff0c\u90a3\u4e48\u5f97\u51fa\u6765\u7684\u5bc6\u6587\u4e5f\u5c31\u4e00\u6837\u4e86\uff0c\u65e0\u8bba\u4f7f\u7528\u591a\u957f\u7684\u5bc6\u94a5\u957f\u5ea6\u90fd\u662f\u8fd9\u6837\u7684\u3002\u6709\u6ca1\u6709\u60f3\u8d77\u91cd\u653e\u653b\u51fb\uff0c\u6709\u6ca1\u6709\u60f3\u8d77\u90a3\u7fa4<a href=\"https:\/\/dmesg.app\/school-6.html#title-8\">\u81ea\u4f5c\u806a\u660e\u7528HMAC\u4fdd\u5b58\u5bc6\u7801<\/a>\u7684\u4eba\uff1f<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/2018021013222558.png\" alt=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" title=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" \/><\/span><\/p>\n<p><a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E5%88%86%E7%BB%84%E5%AF%86%E7%A0%81%E5%B7%A5%E4%BD%9C%E6%A8%A1%E5%BC%8F#%E7%94%B5%E5%AD%90%E5%AF%86%E7%A0%81%E6%9C%AC%EF%BC%88ECB%EF%BC%89\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: 10pt;\">\u56fe\u7247\u6765\u81ea\u4e8e\u7ef4\u57fa\u767e\u79d1<\/span><\/a><\/p>\n<p><span style=\"font-size: 12pt;\">\u53e6\u5916\uff0c\u6211\u5728\u63a8\u7279\u4e0a\u4fdd\u5b58\u4e86\u8fd9\u4e48\u4e00\u5f20\u6709\u8da3\u7684\u56fe\uff0c\u633a\u597d\u73a9\u7684\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/2018021013222835.png\" alt=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" title=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" \/><\/span><\/p>\n<h3><span style=\"font-size: 12pt;\">\u5728Cryptography\u4e2d\u4f7f\u7528AES<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\">\u975e\u5e38\u7b80\u5355\uff0c\u5982\u4e0b\u51e0\u884c\u4ee3\u7801\uff1a<\/span><\/p>\n<pre class=\"prettyprint linenums\">from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes\nfrom cryptography.hazmat.backends import default_backend\n\nkey=&#039;1111111111111111&#039;\ncipher = Cipher(algorithms.AES(key), modes.ECB(), backend=default_backend())\nencryptor = cipher.encryptor()\ndecryptor = cipher.decryptor()\nct = encryptor.update(&quot;a secret message&quot;) + encryptor.finalize()\nprint ct\nprint decryptor.update(ct) + decryptor.finalize()\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u6709\u51e0\u70b9\u9700\u8981\u6ce8\u610f\uff1a<\/span><\/p>\n<ol>\n<li><span style=\"font-size: 12pt;\">Key\u9700\u898116\u300124\u6216\u800532\u5b57\u8282\uff0c\u6570\u636e\u7c7b\u578b\u4e3a\u4e8c\u8fdb\u5236\uff0c\u4e5f\u5c31\u662fPython 2\u7684str\uff0cPython 3\u5e26b\u524d\u7f00\u6216\u8005encode\u6216\u8005bytes\u4e00\u4e0b\uff1b<\/span><\/li>\n<li><span style=\"font-size: 12pt;\"><code>modes.ECB()<\/code>\u6307\u5b9a\u5206\u7ec4\u6a21\u5f0f\u4e3aECB\u6a21\u5f0f\uff0c\u5982\u679c\u4f7f\u7528CBC\u6a21\u5f0f\uff0c\u90a3\u4e48\u8fd8\u8981\u63d0\u4f9b\u4e00\u4e2a\u521d\u59cb\u5316\u5411\u91cf\uff0c\u5982<code>modes.CBC(os.urandom(16))<\/code>\uff1b<\/span><\/li>\n<li><span style=\"font-size: 12pt;\">\u5bc6\u6587\u4e5f\u662f\u4e8c\u8fdb\u5236\u7c7b\u578b\u7684\uff0c\u540c\u8fdb\u884chash\uff0c\u5982\u679c\u8981\u52a0\u5bc6\u6587\u4ef6\uff0c\u90a3\u4e48\u76f4\u63a5f.read()\u4f20\u9012\u8fc7\u53bb\u5c31\u597d\u4e86\uff0c\u52a0\u5bc6\u4e4b\u540e\u7684\u8fd4\u56de\u503c\u4e5f\u662f\u4e8c\u8fdb\u5236\uff1b<\/span><\/li>\n<li><span style=\"font-size: 12pt;\">\u52a0\u5bc6\u5bc6\u94a5\u5b9e\u9645\u4e0a\u5c31\u662fMD5\u6563\u5217\u503c\uff0c\u56e0\u4e3aMD5\u6563\u5217\u503c\u6070\u5de7\u662f128\u6bd4\u7279\uff0c\u6070\u5de7\u7b26\u5408\u9700\u6c42\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5bc6\u94a5\u662f\u4e8c\u8fdb\u5236\uff0c\u6240\u4ee5\u6211\u4eec\u76f4\u63a5\u628a<code>digest.finalize()<\/code>\u4f20\u8fc7\u53bb\u5c31\u597d\u4e86\uff0c\u4e0d\u8981\u518dhexlify\u5566\u3002<\/span><\/li>\n<li><span style=\"font-size: 12pt;\">\u7406\u8bba\u4e0a\u6765\u8bf4\uff0c\u4f60\u7528\u4ec0\u4e48\u5bc6\u94a5\u90fd\u662f\u53ef\u4ee5\u89e3\u5bc6\u786e\u5b9a\u7684\u5bc6\u6587\u7684\uff0c\u53ea\u662f\u6b63\u786e\u7684\u5bc6\u94a5\u4f1a\u89e3\u5bc6\u51fa\u6765\u6709\u610f\u4e49\u7684\u4e1c\u897f\uff08\u6bd4\u5982\u8bf4\u5199\u7ed9\u4f60\u7684\u60c5\u4e66\uff09\uff0c\u9519\u8bef\u7684\u5bc6\u94a5\u4f1a\u89e3\u5bc6\u51fa\u6765\u65e0\u610f\u4e49\u7684\u4e1c\u897f\uff08\u4e00\u5806\u80e1\u4e71\u76840\u548c1\uff09\u3002<\/span><\/li>\n<\/ol>\n<h2><span style=\"font-size: 12pt;\">Port\u5230Python\u4e4b\u201c\u6309\u4f4d\u201d\u64cd\u4f5c\u6587\u4ef6<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">\u7ed9\u4eba\u7684\u611f\u89c9\uff0cPython\u4f3c\u4e4e\u662f\u4e00\u79cd\u201c\u9ad8\u7ea7\u201d\u7684\u7f16\u7a0b\u8bed\u8a00\uff08\u6211\u8fd9\u91cc\u7684\u9ad8\u7ea7\u6307\u7684\u662f\u5bf9\u5e94\u5e95\u5c42\u7684\u90a3\u4e2a\u610f\u601d\uff09\uff0c\u6ca1\u6709\u6307\u9488\uff0c\u4e5f\u6ca1\u6709\u5404\u79cd\u7cbe\u7075\u53e4\u602a\u7684\u6982\u5ff5\u3002\u90a3Python\u600e\u4e48\u6309\u7167\u6bd4\u7279\u64cd\u7eb5\u6587\u4ef6\u5462\uff1f<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u5176\u5b9e\u662f\u6709\u7684\uff0c\u6211\u4eec\u60f3\u4e00\u60f3\uff0c\u5bf9\u6587\u4ef6\u53e5\u67c4\u6267\u884cread\u7684\u65f6\u5019\uff0cread\u662f\u8981\u4e00\u4e2a\u53c2\u6570\u7684\u554a\uff0c\u5982\u679c\u4f60\u53c2\u6570\u662f1\uff0c\u90a3\u4e48\u5c31\u662f\u8bfb\u4e00\u4e2a\u5b57\u8282\u5566\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u6240\u4ee5\u5982\u679c\u8981\u8bfb\u524d16\u4e2a\u5b57\u8282\uff0c\u90a3\u4e48\u53ef\u4ee5\u8fd9\u4e48\u505a\uff1a<\/span><\/p>\n<pre class=\"prettyprint linenums\">raw_file = open(&#039;sample.mp4&#039;, &#039;rb&#039;)\nprint hexlify(raw_file.read(16))\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u8f6c\u6362\u6210\u5341\u516d\u8fdb\u5236\u4e4b\u540e\uff0c\u770b\u770b\u7ed3\u679c\u662f\u4e0d\u662f\u548chexcompare\u4e2d\u7b2c\u4e00\u884c\u4e00\u6837\u7684\uff1f<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/2018021013223069.png\" alt=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" title=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u90a3\u63a5\u4e0b\u6765\u7684\u95ee\u9898\u5c31\u597d\u529e\u4e86\uff0c\u7ee7\u7eed\u8bfb4080\u4e2a\u5b57\u8282\uff0c\u5199\u5165\u6587\u4ef6\uff0c\u7136\u540e\u8bfb16\u4e2a\u89e3\u5bc6\uff0c\u8bfb4080\u2026\u2026\u90a3\u2026\u2026\u6587\u4ef6\u5c3e\u600e\u4e48\u529e\uff1f\u4e0d\u8981\u62c5\u5fc3\uff0c\u5f53\u6211\u4eec\u8bfb\u5230\u6587\u4ef6\u5c3e\u7684\u65f6\u5019\uff0c<code>read()<\/code>\u7684\u8fd4\u56de\u503c\u5c31\u4f1a\u662f\u5e03\u5c14\u5047\uff0c\u6211\u4eec\u5c31\u4f1a\u6709\u7ec8\u6b62\u6761\u4ef6\u4e86\uff0c\u4e0d\u7528\u6211\u4eec\u64cd\u5fc3\u5224\u65ad\u8fd9\u90a3\u7684\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u6240\u4ee5\u64cd\u4f5c\u6587\u4ef6\u8fd9\u5757\u6211\u4eec\u53ef\u4ee5\u8fd9\u4e48\u5199\uff08\u6ce8\u610f\u8981\u4ee5rb\u3001wb\u6a21\u5f0f\u8bfb\u5199\u6587\u4ef6\uff09\uff1a<\/span><\/p>\n<pre class=\"prettyprint linenums\">data = 1\nwhile data:\n    data = raw_file.read(16)\n    final_file.write(decrypt(data, key))\n    data = raw_file.read(4080)\n    final_file.write(data)\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u5176\u4e2ddecrypt\u662f\u7528\u4e8e\u89e3\u5bc6\u7684\u51fd\u6570\uff0c\u8fb9\u5904\u7406\u8fb9\u5199\u5165\u6587\u4ef6\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u6240\u4ee5\u7cc5\u5408\u4e00\u4e0b\uff0c\u52a0\u4e0a\u5355\u5143\u6d4b\u8bd5\u3002\u8fd9\u4e2a\u73a9\u610f\u57fa\u672c\u4e0a\u5c31\u5199\u5b8c\u4e86\u3002\u603b\u8ba152\u884c\uff0c\u5f88\u7cbe\u7b80\u5427\u3002<\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">\u901a\u8fc7dnspy\u53cd\u7f16\u8bd1\u7ed3\u679c<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">\u5927\u6982\u53ea\u641c\u7d22\u5230\u4e86\u8fd9\u4e48\u4e00\u4e2a\u6709\u7528\u7684\u4fe1\u606f\u5757\uff0c\u53ef\u4ee5\u6e05\u695a\u770b\u5230\uff0c\u4f7f\u7528AES-ECB\u6a21\u5f0f\uff0c\u4e0d\u586b\u5145\uff1f\uff1f<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/2018021013223279.png\" alt=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" title=\"\u89e3\u5bc6\u4eba\u4eba\u5f71\u89c6\u5ba2\u6237\u7aef\u52a0\u5bc6\u7684\u89c6\u9891\u6587\u4ef6\uff1a\u4eceC++ Port\u5230Python\u7684\u7ecf\u8fc7\" \/><\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">\u672c\u9879\u76ee\u7684\u4ee3\u7801<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">\u6b22\u8fceStar\u3001PR\u3001Fork\uff0c\u76ee\u524d\u8fd8\u5dee\u4e00\u4e2afile_id\u751f\u6210\u7684\u95ee\u9898\u3002<\/span><br \/>\n<a class=\"dl\" href=\"https:\/\/github.com\/BennyThink\/yyets-restorer\" target=\"_blank\" rel=\"nofollow\"><i class=\"fa fa-github-alt\"><\/i>\u5f00\u6e90\u5730\u5740<\/a><\/p>\n<h2><span style=\"font-size: 12pt;\">\u6700\u540e\u7684\u4e00\u4e9b\u70b9\u8bc4<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">\u4eba\u4eba\u5f71\u89c6\u5ba3\u4f20\u8bed\u4e2d\u6709\u4e00\u53e5\u8bdd\u6211\u5370\u8c61\u7279\u522b\u6e05\u695a\uff1a<\/span><\/p>\n<blockquote><p><span style=\"font-size: 12pt;\">\u5168\u7a0b<strong>\u52a0\u5bc6<\/strong>\u7684P2P\u4f20\u8f93\uff0c\u4fdd\u8bc1\u5b89\u5168\uff0c\u6d77\u5916\u7528\u6237\u4e5f\u4e0d\u7528\u62c5\u5fc3\u88ab\u8fd0\u8425\u5546\u8d77\u8bc9\u3002<\/span><\/p><\/blockquote>\n<p><span style=\"font-size: 12pt;\">\u662f\u7684\u5c31\u662f<strong>\u52a0\u5bc6<\/strong>\u8fd9\u4fe9\u5b57\uff0c\u6211\u7279\u654f\u611f\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u4ece\u5f00\u5934\u7528Postman\u54b1\u80fd\u53d1\u73b0\uff0c\u662fpost\u7684https\u5730\u5740\uff08\u4e70\u4e86\u4e00\u5e74\u7684\u6cdb\u57df\u540d\u8bc1\u4e66\uff09\uff0c\u7136\u540e\u88ab\u8df3\u8f6c\u5230\u4e86http\u7684\u5404\u8defIP\uff0c\u4e0b\u8f7d\u56de\u6765\u9762\u76ee\u5168\u975e\u7684\u7684\u6587\u4ef6\uff0c\u518d\u8fdb\u884c\u89e3\u5bc6\u3002\u53eb\u6211\u600e\u4e48\u8bf4\u5462\u2026\u2026\u8fd0\u8425\u5546\u5e94\u8be5\u4e0d\u4f1a\u50cf\u6211\u8fd9\u4e48\u65e0\u804a\uff0c\u4e5f\u662f\u4e2a\u529e\u6cd5\u5427\u2026\u2026<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u53ef\u80fd\u8d70\u4e0a\u4e86\u79fb\u690d\u7684\u4e0d\u5f52\u8def \u5728\u51e0\u4e2a\u6708\u5f00\u59cb\u7ed9ExpressBot\u52a0\u5165\u4eba\u4eba\u5f71\u89c6\u7684API\u7684\u65f6\u5019\uff0c\u53d1\u73b0\u6709\u4e00\u4e2a\u5f88\u795e\u5947\u7684AP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,38],"tags":[],"class_list":["post-3460","post","type-post","status-publish","format-standard","hentry","category-security","category-program"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/posts\/3460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/comments?post=3460"}],"version-history":[{"count":0,"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/posts\/3460\/revisions"}],"wp:attachment":[{"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/media?parent=3460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/categories?post=3460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/tags?post=3460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}