{"id":4996,"date":"2020-05-10T14:43:22","date_gmt":"2020-05-10T06:43:22","guid":{"rendered":"https:\/\/www.xttblog.com\/?p=4996"},"modified":"2020-05-10T14:43:22","modified_gmt":"2020-05-10T06:43:22","slug":"%e6%85%95%e8%af%be%e7%bd%91%e8%a7%86%e9%a2%91%e4%b8%8b%e8%bd%bd%e8%a7%a3%e5%af%86","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=4996","title":{"rendered":"\u6155\u8bfe\u7f51\u89c6\u9891\u4e0b\u8f7d\u89e3\u5bc6"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u8fd9\u5df2\u7ecf\u662f\u53bb\u5e74\u7684\u4e8b\u60c5\u4e86\uff0c\u8fd9\u4ef6\u4e8b\u8981\u4ece\u88ab\u540c\u4e8b\u6253\u8138\u5f00\u59cb\u8bf4\u8d77\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53bb\u5e74\u6211\u548c\u540c\u4e8b\u5f00\u73a9\u7b11\uff0c\u8bf4\u53ea\u8981\u7f51\u4e0a\u4f60\u80fd\u770b\u5230\u7684\u4e1c\u897f\uff0c\u6211\u5c31\u80fd\u4e0b\u8f7d\u4e0b\u6765\u8ba9\u4ed6\u4fdd\u5b58\u5728\u7535\u8111\u4e0a\u3002\u540c\u4e8b\u6447\u4e86\u6447\u5934\uff0c\u4e00\u8138\u7684\u4e0d\u76f8\u4fe1\uff0c\u7136\u540e\u62ff\u4f4f\u6211\u7684\u9f20\u6807\uff0c\u6253\u5f00\u4e86\u4f17\u6240\u5468\u77e5\u7684\u6155\u8bfe\u7f51\uff0c\u8bf4\uff1a\u201c\u6211\u8981\u8fd9\u4e2a\u89c6\u9891\uff0c\u4f60\u80fd\u628a\u6587\u4ef6\u7ed9\u6211\u5417\uff1f\u201d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u70b9\u5f00\u6d4f\u89c8\u5668\u63a7\u5236\u53f0\uff0c\u53d1\u73b0\u7f51\u7edc\u8bf7\u6c42\u4e2d\u4e00\u5806\u7684ts\u6587\u4ef6\uff0c\u4e4b\u524d\u6211\u53c8\u4e0d\u662f\u6ca1\u6709\u4e0b\u8f7d\u8fc7\u8fd9\u6837\u7684\u89c6\u9891\uff0cM3U8\u800c\u5df2\uff0c\u600e\u4e48\u80fd\u96be\u5f97\u4f4f\u6211\uff1f\u6211\u6ee1\u53e3\u5c31\u7b54\u5e94\u4e86\u540c\u4e8b\uff0c\u8bf4\uff1a\u201c5\u5206\u949f\u540e\u7ed9\u4f60\u3002\u201d\uff0c\u4e8b\u540e\u6211\u53d1\u73b0\u4eba\u4eec\u603b\u662f\u4f1a\u4f4e\u4f30\u4e00\u4ef6\u4e8b\u60c5\u7684\u96be\u5ea6\uff0c\u4ece\u4e1a\u8005\u90fd\u4f4e\u4f30\u81ea\u5df1\u6240\u9762\u5bf9\u7684\u9700\u6c42\uff0c\u66f4\u4f55\u51b5\u662f\u5916\u884c\u4eba\u5462\u3002\u4e0d\u8fc7\u6700\u540e\u6211\u8fd8\u662f\u7528\u5b9e\u9645\u884c\u52a8\u8bc1\u660e\u4e86\u6211\u7684\u89c2\u70b9\uff0c\u51e1\u662f\u6d4f\u89c8\u5668\u80fd\u64ad\u653e\u7684\u4e1c\u897f\uff0c\u90fd\u53ef\u4ee5\u4fdd\u5b58\u5728\u81ea\u5df1\u7684\u7535\u8111\u4e0a\uff0c\u4e0d\u7ba1\u591a\u4e48\u7684\u590d\u6742\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u867d\u7136\u6211\u770b\u5230\u4e86\u4e00\u5806\u7684ts\u6587\u4ef6\uff0c\u53ef\u662f\u6211\u82e6\u82e6\u5bfb\u627e\uff0c\u5e76\u6ca1\u6709\u627e\u5230M3U8\u6587\u4ef6\uff0c\u90a3\u4e48\u8fd9\u4f20\u8bf4\u4e2d\u7684M3U8\u6587\u4ef6\u5230\u5e95\u53bb\u4e86\u54ea\u91cc\u4e86\u5462\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u6211\u4ece\u4e00\u5957\u5927\u5bb6\u90fd\u89c1\u8fc7\u7684\u8bfe\u7a0b\u5f00\u59cb\u5165\u624b\u4e86\uff0c\u6162\u6162\u63a2\u7d22\u8fd9\u5176\u4e2d\u7684\u5965\u79d8\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u89c6\u9891\u7684\u64ad\u653e\u5730\u5740\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:\/\/www.imooc.com\/video\/1430<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u662f\u4e2a\u5b66\u7f16\u7a0b\u7684\u4eba\u90fd\u77e5\u9053\u540e\u9762\u76841430\u662f\u4e2aid\uff0c\u90a3\u4e48\u8fd9\u4e2aid\u7528\u6765\u505a\u4ec0\u4e48\u4e86\u5462\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u770b\u4e86\u770b\u7f51\u7edc\u8bf7\u6c42\uff0c\u53d1\u73b0\u4e86\u4e00\u4e2a\u975e\u5e38\u6709\u8da3\u7684\u94fe\u63a5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:\/\/www.imooc.com\/course\/playlist\/1430?t=m3u8&amp;_id=5848c001b3fee30a6c8b51bd&amp;cdn=aliyun1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">t=m3u8\uff0c\u55ef\uff1f\u770b\u5230\u4e86\u6211\u719f\u6089\u7684m3u8\uff0c\u90a3\u4e48t\u53ef\u80fd\u4ee3\u8868\u7684\u610f\u601d\u662ftype\u55bd\uff0c\u540e\u9762\u7684_id\u53c2\u6570\u53c8\u662f\u4ec0\u4e48\uff1f\u6beb\u4e0d\u72b9\u8c6b\u6211\u6309\u4e0b\u4e86ctrl + F\uff0c\u641c\u7d22\u4e00\u4e0b5848c001b3fee30a6c8b51bd\uff0c\u5728\u641c\u7d22\u7ed3\u679c\u4e2d\u6211\u770b\u4e86\u4e86HTML\u9875\u9762\u4e0a\u5c45\u7136\u6709\u8fd9\u4e2a\u4e1c\u897f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>OP_CONFIG.mongo_id=\"5848c001b3fee30a6c8b51bd\";\nOP_CONFIG.page=\"video2.4\";<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ca1\u6709\u95ee\u9898\uff0c\u5c31\u662f\u4ed6\u4e86\uff0c\u540e\u9762\u7684cdn=aliyun1\u8fd9\u4e2a\u4e0d\u7528\u60f3\u5c31\u77e5\u9053\u4ed6\u662f\u7528\u4e86\u963f\u91cc\u4e91\u7684cdn\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u94fe\u63a5\u4e2d\u7684\u53c2\u6570\u90fd\u627e\u5168\u4e86\uff0c\u4f46\u662f\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u8fd9\u4e2a\u94fe\u63a5\u771f\u7684\u662f\u8fd4\u56de\u7684m3u8\u6587\u4ef6\u5417\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u770b\u4e86\u4e00\u773c\u54cd\u5e94\u6570\u636e\uff0c\u6211\u53c8\u50bb\u773c\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"result\":1,\n    \"data\":{\n        \"info\":\"MkkqXqhmamoxAUB1PQ...\",\n        \"cdn\":[\"aliyun\",\"aliyun1\",\"letv\"]\n    },\n    \"msg\":\"\"\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">info\u4e2d\u4e00\u5806\u4e71\u4e03\u516b\u7cdf\u7684\u4e1c\u897f\uff0c\u8fd9\u5806\u4e1c\u897f\u5230\u5e95\u662f\u5565??? \u660e\u660e\u8fd9\u4e2a\u94fe\u63a5\u770b\u4e0a\u53bb\u597d\u50cf\u662f\u8981\u8fd4\u56deM3U8\u6765\u7740\uff0c\u4f46\u662f\u4e3a\u4ec0\u4e48\u8fd4\u56de\u4e86\u8fd9\u4e48\u4e00\u5806\u4e1c\u897f\uff0c\u4e00\u5b9a\u662f\u67d0\u79cd\u52a0\u5bc6\u65b9\u5f0f\uff0c\u4e0d\u63a2\u7d22\u51fa\u8fd9\u79cd\u52a0\u5bc6\u65b9\u5f0f\uff0c\u8fd8\u600e\u4e48\u5f80\u4e0b\u9762\u8fdb\u884c\u3002\u53ef\u662f\u554a\uff0c\u52a0\u5bc6\u65b9\u5f0f\u7684\u63a2\u7d22\uff0c\u54ea\u91cc\u6709\u90a3\u4e48\u5bb9\u6613\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u60f3\u4e86\u4e00\u4f1a\u513f\uff0c\u8fd9\u4e2a\u94fe\u63a5\u662f\u54ea\u91cc\u53d1\u9001\u51fa\u6765\u7684\u5462\uff1f\u6211\u5c31\u53ef\u4ee5\u4ece\u54ea\u91cc\u627e\u5230\u4ed6\u7684\u52a0\u5bc6\u65b9\u5f0f\u554a\u3002\u6211\u53c8\u5f00\u59cb\u4e86\u4e00\u987f\u641c\u7d22\uff0c\u5728\u4e00\u4e2ajs\u6587\u4ef6\u4e2d\u770b\u5230\u4e86\u8fd9\u4e2a\u94fe\u63a5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6458\u5f55\u4e00\u5c0f\u90e8\u5206\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\n\"https\" === h &amp;&amp; (v = \"https:\/\/www.imooc.com\/course\/playlist\/\" + pageInfo.mid + \"?t=m3u8&amp;_id=\" + OP_CONFIG.mongo_id),\nwindow.thePlayer = mocoplayer($(\"#video-box\"), {\n    url: v,\n    title: videoTitle,\n...<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u62fc\u63a5\u597d\u4e86\u94fe\u63a5\u5b57\u7b26\u4e32\u540e\uff0c\u53c8\u8c03\u7528\u4e86mocoplayer\u65b9\u6cd5\uff0c\u90a3\u4e48\u6211\u4e00\u5b9a\u53ef\u4ee5\u6839\u636e\u8fd9\u4e2amocoplayer\u65b9\u6cd5\u6765\u4e00\u6b65\u6b65\u8ddf\u8fdb\uff0c\u5f97\u77e5\u4ed6\u7684\u52a0\u5bc6\u7b97\u6cd5\u7684\u3002\u53c8\u4e00\u987f\u641c\u7d22\uff0c\u5f97\u77e5\u4e86\uff0cmocoplayer\u539f\u6765\u5728mocoplayer.js\u4e2d\u3002\u4e0d\u9519\u4e0d\u9519\u3002\u53ef\u662f\u96be\u9898\u6765\u4e86\uff0c\u8fd9\u4e2a\u6587\u4ef6\u597d\u5927\u554a\uff0c\u4f7f\u7528webpack\u6253\u5305\u7684\u6587\u4ef6\uff0c\u8ba9\u6211\u600e\u4e48\u770b\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u82e6\u60f3\u4e86\u5f88\u4e45\uff0c\u5e94\u8be5\u7528\u4ec0\u4e48\u601d\u8def\u53bb\u9762\u5bf9\u8fd9\u4e48\u5927\u7684\u6587\u4ef6\u5462\uff1f\u7a81\u7136\u60f3\u5230\u4e00\u62db\uff0c\u6211\u770b\u770b\u4e0a\u9762\u90a3\u4e2a\u94fe\u63a5\uff0c\u5230\u5e95\u662fjs\u7684\u54ea\u4e00\u884c\u8bf7\u6c42\u7684\u4e0d\u5c31\u884c\u4e86\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f88\u5feb\u6211\u5c31\u5230\u4e86\u53d1\u8d77\u94fe\u63a5\u8bf7\u6c42\u7684\u5730\u65b9\uff0c\u53ef\u662f\u8fd9\u4e5f\u592a\u96be\u627e\u4e86\u5427\uff0c\u53d1\u8d77\u4e86\u4e00\u4e2a\u94fe\u63a5\u8bf7\u6c42\u800c\u5df2\uff0c\u8ddd\u79bb\u89e3\u5bc6\u53ef\u80fd\u8fd8\u65e9\u7740\u5462!!!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ca1\u6709\u529e\u6cd5\uff0c\u65e2\u7136\u5230\u8fd9\u91cc\u4e86\uff0c\u90a3\u6211\u5c31\u5fc5\u987b\u8981\u6253\u7740\u65ad\u70b9\u5f80\u540e\u770b\uff0c\u6bd5\u7adf\u8fd9\u4e2a\u94fe\u63a5\u4e00\u65e6\u8bbf\u95ee\u6210\u529f\uff0c\u79bb\u6210\u529f\u5c31\u4e0d\u8fdc\u4e86\u554a\uff0c\u8fc7\u4e86\u597d\u957f\u4e00\u6bb5\u65f6\u95f4\uff0c\u6211\u770b\u5230\u4e86\u4ee3\u7801\u4e2d\u6709data.info\u8fd9\u51e0\u4e2a\u5b57\u7b26\uff0c\u7acb\u523b\u96c6\u4e2d\u4e86\u7cbe\u795e\uff0c\u9a6c\u4e0a\u8981\u5230\u4e86\uff0c\u7d27\u63a5\u7740\u6211\u5c31\u770b\u5230\u4e86\u4e0b\u9762\u7684\u4ee3\u7801\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/halo.cyblogs.top\/upload\/2020\/2\/image-b78893d27a7b43d5b53e948408f65058.png\" alt=\"\" \/><figcaption>\u6155\u8bfe\u7f51\u89c6\u9891\u89e3\u5bc6\u65b9\u6cd5<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u88ab\u5708\u8d77\u6765\u7684\u90e8\u5206\u957f\u5f97\u597d\u773c\u719f\uff0c\u90a3\u4e48\u5c31\u610f\u5473\u7740\u8fd9\u4e2adestm_1.default(mediadata.data.info);\u5c31\u662f\u89e3\u5bc6\u65b9\u6cd5\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6df1\u6df1\u7684\u547c\u5438\u4e86\u4e00\u53e3\u6c14\uff0c\u7ed9\u8fd9\u4e2a\u65b9\u6cd5\u6253\u4e0a\u65ad\u70b9\uff0c\u7136\u540e\u8fdb\u53bb\u770b\u770b\uff0c\u679c\u4e0d\u5176\u7136\uff0c\u6700\u7ec8\u786e\u5b9a\u8fd9\u4e2a\u6587\u4ef6\u768421919\u884c\u523022066\u884c\u662f\u6211\u60f3\u8981\u7684\u89e3\u5bc6\u7b97\u6cd5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7ed9\u8fd9\u4e2a\u5b57\u7b26\u4e32\u89e3\u5bc6\u540e\uff0c\u6211\u53d1\u73b0\uff0c\u5e76\u4e0d\u662f\u6211\u60f3\u7684\u90a3\u4e48\u7b80\u5355!!!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#EXTM3U\n#EXT-X-VERSION:3\n#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=512000, RESOLUTION=1280x720\nhttps:\/\/www.imooc.com\/video\/5848c001b3fee30a6c8b51bd\/medium.m3u8?cdn=aliyun1...\n#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=384000, RESOLUTION=1280x720\nhttps:\/\/www.imooc.com\/video\/5848c001b3fee30a6c8b51bd\/medium.m3u8?cdn=aliyun1...\n#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=256000, RESOLUTION=720x480\nhttps:\/\/www.imooc.com\/video\/5848c001b3fee30a6c8b51bd\/low.m3u8?cdn=aliyun1...<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u770b\u4e0a\u53bb\u50cf\u662fM3U8\u6587\u4ef6\uff0c\u53ef\u662f\u6587\u4ef6\u91cc\u9762\u7684\u94fe\u63a5\u5374\u53c8\u662fm3u8\u683c\u5f0f\u7684???<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u5c1d\u8bd5\u7740\u8bbf\u95ee\u4e86\u8fd9\u4e9bm3u8\u5730\u5740\uff0c\u4e8e\u662f\u53c8\u770b\u5230\u4e86\u719f\u6089\u7684\u4e1c\u897f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"code\":200,\n    \"data\":{\n        \"info\":\"Gm1kQ7hmVBYXVGoxVGdUVGA9VBwcKnAyF1RmJD1UY1QHVGRrVBxu...\"\n    },\n    \"msg\":\"OK\"\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5b9e\u603b\u662f\u90a3\u4e48\u7684\u51fa\u4e4e\u610f\u6599\uff0c\u8fd9\u4e00\u5b9a\u53c8\u662f\u4e00\u4e2a\u52a0\u5bc6\u540e\u7684\u5b57\u7b26\u4e32\uff0c\u6211\u6562\u786e\u5b9a\uff0c\u4e00\u5b9a\u548c\u4e0a\u4e00\u6b21\u7528\u4e86\u540c\u6837\u7684\u52a0\u5bc6\u65b9\u6cd5\uff0c\u6211\u518d\u6b21\u8bd5\u4e86\u8bd5\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/halo.cyblogs.top\/upload\/2020\/2\/image-c914653c9fc44fdd9f470cca94efc037.png\" alt=\"\" \/><figcaption>m3u8\u5b57\u7b26\u4e32<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e1d\u6beb\u6ca1\u6709\u95ee\u9898\uff0c\u89e3\u5bc6\u51fa\u6765\u4e86\uff0c\u8fd9\u5c31\u662f\u6211\u60f3\u8981\u7684m3u8\uff0c\u4f46\u662f\u771f\u7684\u6709\u90a3\u4e48\u7b80\u5355\u5417???<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u628a\u8fd9\u4e9bts\u6587\u4ef6\u76f4\u63a5\u4e0b\u8f7d\u4e0b\u6765\uff0c\u53ef\u662f\u52a0\u7740\u5bc6\u5462\u5440!!!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u9762M3U8\u5b57\u7b26\u4e32\u4e2d\u6709\u4e00\u4e32METHOD=AES-128\u5f15\u8d77\u4e86\u6211\u7684\u6ce8\u610f\uff0c\u8fd9\u660e\u663e\u662f\u544a\u8bc9\u6211\uff0c\u52a0\u5bc6\u65b9\u5f0f\u662f\u7528\u4e86\u4ec0\u4e48!!! \u540e\u9762\u7684\u90a3\u4e00\u4e32\u94fe\u63a5\u4e00\u5b9a\u662f\u5bc6\u94a5\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u662f\u6211\u6253\u5f00\u94fe\u63a5\u540e\uff0c\u5c45\u7136\u4e0e\u666e\u901a\u7684\u5bc6\u94a5\u5b8c\u5168\u4e0d\u4e00\u6837\uff0c\u4ed6\u957f\u8fd9\u6837\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n    \"code\":200,\n    \"data\":{\n        \"info\":\"I2RqhmmlX1UTHvYGIi4cQKqgARoiHh1rIjIo7WRlwhoT9h1nIg==t01UNGJIRvfj\"\n    },\n    \"msg\":\"OK\"\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5386\u53f2\u603b\u662f\u90a3\u4e48\u60ca\u4eba\u7684\u76f8\u4f3c\uff0c\u53c8\u89e3\u4e86\u4e00\u4e0b\u5bc6\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/halo.cyblogs.top\/upload\/2020\/2\/image-f5c2215b424a4462949232db78b1c1f3.png\" alt=\"\" \/><figcaption>\u89e3\u5bc6\u5b57\u7b26\u4e32<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u770b\u4e0a\u53bb\uff0c\u5e76\u4e0d\u662f\u90a3\u4e48\u56de\u4e8b\uff0c\u540e\u9762\u7684\u53c2\u6570\u6539\u6210\u4e86true\uff0c\u5b83\u957f\u6210\u4e86\u8fd9\u6837\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/halo.cyblogs.top\/upload\/2020\/2\/image-7359b7d8bf3341f4a038a8b2ac5e87af.png\" alt=\"\" \/><figcaption>\u89e3\u5bc6\u6155\u8bfe\u7f51\u89c6\u9891\u79d8\u5bc6<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u770b\u8d77\u6765\u50cf\u662f\u90a3\u4e48\u56de\u4e8b\u4e86\uff0c\u6b63\u597d16\u4e2a\u5b57\u8282\uff0c\u6b63\u597d\u7b26\u5408AES-128\u4e5f\u5c31\u662f\u4f20\u8bf4\u4e2d\u7684AES\/CBC\/PKCS5PADDING\uff0c\u597d\u4e86\uff0cjava\u89e3\u5bc6\u4ee3\u7801\u5b89\u6392\u8d77\u6765\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * AES-CBC\u52a0\u89e3\u5bc6\uff0c\u8be5\u7c7b\u7528\u6765\u5bf9\u6bcf\u4e00\u6bb5\u89c6\u9891\u8fdb\u884c\u89e3\u5bc6\n *\n * @author CY\n *\/\npublic class AESCBCDecrypt {\n\n    private static final String AES = \"AES\";\n\n    private static final String AES_CBC = \"AES\/CBC\/PKCS5PADDING\";\n\n    \/**\n     * \u4f7f\u7528AES\u52a0\u5bc6\u6216\u89e3\u5bc6\u65e0\u7f16\u7801\u7684\u539f\u59cb\u5b57\u8282\u6570\u7ec4, \u8fd4\u56de\u65e0\u7f16\u7801\u7684\u5b57\u8282\u6570\u7ec4\u7ed3\u679c.\n     *\n     * @param input \u539f\u59cb\u5b57\u8282\u6570\u7ec4\n     * @param key   \u7b26\u5408AES\u8981\u6c42\u7684\u5bc6\u94a5\n     * @param iv    \u521d\u59cb\u5411\u91cf\n     * @param mode  Cipher.ENCRYPT_MODE \u6216 Cipher.DECRYPT_MODE\n     *\/\n    public static byte[] aes(byte[] input, byte[] key, byte[] iv, int mode) {\n        try {\n            Cipher cipher = Cipher.getInstance(AES_CBC);\n            cipher.init(mode, new SecretKeySpec(key, AES), new IvParameterSpec(iv));\n            cipher.update(input);\n            return cipher.doFinal(input);\n        } catch (GeneralSecurityException e) {\n            throw new RuntimeException(\"\u52a0\u89e3\u5bc6\u51fa\u73b0\u4e86\u5f02\u5e38\uff0c\u5f53\u524d\u7684key\uff1a\" + Arrays.toString(key) + \"\uff0cIV\uff1a\" + Arrays.toString(iv));\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u662f\u554a\uff0c\u9700\u8981\u7684iv\u5462\uff0c\u4ed6\u53bb\u54ea\u91cc\u4e86\uff0c\u95ee\u9898\u53c8\u51fa\u6765\u4e86\uff0c\u6211\u5f97\u770b\u770b\uff0c\u662f\u54ea\u91cc\u53d1\u8d77\u7684ts\u6587\u4ef6\u8bf7\u6c42\uff0c\u53d1\u8d77\u8bf7\u6c42\u7684\u5730\u65b9\u5e94\u8be5\u4f1a\u6709iv\u5427\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53c8\u5982\u6211\u6240\u6599\uff0c\u627e\u5230\u4e86\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/halo.cyblogs.top\/upload\/2020\/2\/image-d3cda5e469814106902e02af35c3a046.png\" alt=\"\" \/><figcaption>ts\u6587\u4ef6\u8bf7\u6c42<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u8ddf\u7740\u65ad\u70b9\u8d70\u4e86\u597d\u51e0\u4e2ats\u6587\u4ef6\uff0c\u53d1\u73b0iv\u524d\u976215\u4f4d\u6c38\u8fdc\u90fd\u662f0\uff0c\u53ea\u662f\u7b2c16\u4f4d\u4f1a\u8ddf\u968fts\u6587\u4ef6\u7684\u53d8\u5316\u800c\u53d1\u751f\u53d8\u5316\uff0c\u4f1a\u9010\u6e10\u7684\u52a01\uff0c\u6211\u4e5f\u53ef\u4ee5\u6a21\u62df\u8fd9\u6837\u7684\u53d8\u5316\uff0c\u7528\u6765\u521b\u5efa\u89c6\u9891\u7684iv\u503c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7ecf\u8fc7\u4e86\u4e00\u4f1a\uff0c\u6211\u628a\u4e0a\u9762\u7684\u4e1c\u897f\u5168\u90e8\u68b3\u7406\u4e86\u4e00\u904d\uff0c\u89e3\u5bc6\u7b97\u6cd5\u662f\u7528js\u5199\u7684\uff0c\u800c\u6211\u4f7f\u7528\u4e86java\uff0c\u90a3\u4e48\u6211\u6709\u4e24\u79cd\u9009\u62e9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u628a\u5b83\u7528java\u4ee3\u7801\u91cd\u65b0\u6784\u5efa\u4e00\u904d\uff08\u6548\u7387\u9ad8\uff09<\/li><li>\u7528java\u6765\u6267\u884cjs\u6587\u4ef6\uff08\u6548\u7387\u4f4e\uff09<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">java\u6267\u884cjs\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/**\n * \u89e3\u7801\u7684\u5907\u7528\u65b9\u6cd5\uff0c\u8fd0\u884cJavaScript\u811a\u672c\uff0c\u901f\u5ea6\u8f83\u6162\n *\n * @author CY\n *\/\npublic class ImoocDecoderBackup {\n\n    \/**\n     * JavaScript\u89e3\u7801\u7b97\u6cd5\u6267\u884c\u5668\n     *\/\n    private static Invocable invocable;\n\n    \/* \u8bfb\u53d6JS\u6587\u4ef6\uff0c\u5e76\u6784\u9020\u6267\u884c\u5668 *\/\n    static {\n        InputStream inputStream = ImoocDecoderBackup.class.getClassLoader().getResourceAsStream(\"attachment\/decode.js\");\n        if (inputStream != null) {\n            try {\n                String javaScript = new BufferedReader(new InputStreamReader(inputStream)).lines().collect(Collectors.joining(\"\\n\"));\n                ScriptEngine engine = new ScriptEngineManager().getEngineByName(\"Nashorn\");\n                engine.eval(javaScript);\n                invocable = (Invocable) engine;\n            } catch (ScriptException ignored) {\n            }\n        }\n    }\n\n    \/**\n     * \u89e3\u7801\u6210\u5b57\u7b26\u4e32\n     *\n     * @param crypto \u5f85\u89e3\u7801\u7684\u5b57\u7b26\u4e32\n     * @return \u89e3\u7801\u540e\u7684\u5b57\u7b26\u4e32\n     *\/\n    public static String decoderString(String crypto) {\n        return invoke(\"decode2String\", crypto);\n    }\n\n    \/**\n     * \u83b7\u53d6\u6155\u8bfe\u7f51\u89c6\u9891\u7684\u5bc6\u5319key\n     *\n     * @param crypto \u5f85\u89e3\u7801\u7684\u5b57\u7b26\u4e32\n     * @return \u5b57\u8282\u6570\u7ec4\n     *\/\n    public static byte[] decoderKey(String crypto) {\n        return new Gson().fromJson(invoke(\"decode2Bytes\", crypto), byte[].class);\n    }\n\n    \/**\n     * \u8c03\u7528JavaScript\u65b9\u6cd5\n     *\n     * @param methodName   \u65b9\u6cd5\u540d\n     * @param encodeString \u5f85\u89e3\u7801\u7684\u5b57\u7b26\u4e32\n     * @return \u89e3\u7801\u540e\u7684\u7ed3\u679c\n     *\/\n    private static String invoke(String methodName, String encodeString) {\n        try {\n            return invocable.invokeFunction(methodName, encodeString).toString();\n        } catch (ScriptException | NoSuchMethodException ignored) {\n        }\n        return null;\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u89e3\u5bc6\u51fa\u6765\u4e4b\u540e\u751f\u6210\u4e00\u4e2am3u8\u6587\u4ef6\uff0c\u90a3\u4e48\u6211\u5c31\u9700\u8981\u89e3\u6790\u8fd9\u4e2am3u8\u4e86\uff0c\u89e3\u6790\u5b83\u5c31\u8981\u7b26\u5408HLS\u534f\u8bae\u7684\u89c4\u8303\uff0c\u6211\u5c1d\u8bd5\u5199\u4e86\u4e00\u4e0b\uff0c\u5e76\u4e14\u505a\u4e86\u6d4b\u8bd5\uff0c\u4f46\u662f\u6211\u53d1\u73b0\uff0c\u6211\u5199\u7684\u5e76\u4e0d\u90a3\u4e48\u7406\u60f3\uff0c\u9002\u7528\u8303\u56f4\u8f83\u5c0f\uff0c\u56e0\u4e3a\u6bd5\u7adfHLS\u534f\u8bae\u4e5f\u4e0d\u662f\u90a3\u4e48\u7b80\u5355\u7684\u89c4\u5b9a\uff0c\u4ed6\u9664\u4e86\u666e\u901a\u7684\u89c6\u9891\u6d41\uff0c\u8fd8\u6709\u76f4\u64ad\u6d41\u7684\uff0c\u6211\u627e\u4e86\u627e\u540c\u6027\u4ea4\u53cb\u7f51\u7ad9\uff0c\u770b\u89c1\u4e86\u4e00\u4e2a\u5de5\u5177<a href=\"https:\/\/github.com\/iheartradio\/open-m3u8\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"open-m3u8\uff08\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff09\">open-m3u8<\/a>\uff0c\u4e0d\u7ba1\u5b83\u597d\u4e0d\u597d\u7528\uff0c\u53cd\u6b63\u6211\u4e0d\u7528\uff0c\u65e2\u7136\u81ea\u5df1\u5199\u4e86\u4e00\u90e8\u5206\uff0c\u5c31\u7528\u81ea\u5df1\u7684\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u9762\u7684\u4e00\u5207\u5de5\u4f5c\u51c6\u5907\u5c31\u7eea\u4e86\uff0c\u73b0\u5728\u5df2\u7ecf\u62e5\u6709\u4e86\uff0c\u89e3\u5bc6\uff0c\u89e3\u6790\uff0c\u90a3\u4e48\u63a5\u4e0b\u6765\u5c31\u662f\u666e\u666e\u901a\u901a\u7684\u4e0b\u8f7d\u4e86\uff0c\u8fb9\u4e0b\u8f7d\u8fb9\u8fdb\u884cAES-128\u89e3\u5bc6\u5c31\u53ef\u4ee5\u4e86\uff0c\u53ef\u662f\u4e0b\u8f7d\u4e0b\u6765\u7684\u6587\u4ef6\u96f6\u96f6\u6563\u6563\uff0c\u6211\u8fd8\u9700\u8981\u5408\u5e76\u7684\uff0c\u521a\u5f00\u59cb\u7684\u65f6\u5019\u4f7f\u7528Java\u7684\u8f93\u51fa\u6d41\u62fc\u63a5\u7684\u65b9\u5f0f\u8fdb\u884c\u7684\u5408\u5e76\uff0c\u53ef\u662f\u6ca1\u591a\u4e45\u5c31\u53d1\u73b0\u4e86\u8fd9\u4e2a\u65b9\u5f0f\u5e76\u4e0d\u662f\u90a3\u4e48\u7684\u7406\u60f3\u3002\u56e0\u4e3a\u89c6\u9891\u4e5f\u6709\u5934\u548c\u5c3e\uff0c\u76f4\u63a5\u786c\u751f\u751f\u7684\u62fc\u63a5\u5728\u4e00\u8d77\uff0c\u76f8\u5f53\u4e8e\u73a9\u4e86\u4e00\u573a\u4eba\u4f53\u8708\u86a3\uff0c\u64ad\u653e\u7684\u65f6\u5019\u4f1a\u9020\u6210\u4e00\u5b9a\u7684\u5361\u987f\u73b0\u8c61\uff0c\u4e8e\u662f\u6211\u5c31\u9009\u62e9\u4e86\u4f7f\u7528FFMpeg\u7684\u65b9\u5f0f\u8fdb\u884c\u5408\u5e76\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/ffmpeg.exe -i \"concat:ts\u6587\u4ef61|ts\u6587\u4ef62\" -c copy -bsf:a aac_adtstoasc \"\u8f93\u51fa\u6587\u4ef6\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u7ec8\u89e3\u5bc6\u51fa\u6765\u4e86\u4e00\u5806\u5b8c\u6574\u7684\u89c6\u9891\uff0c\u653e\u4e00\u5f20\u6210\u679c\u56fe\u7247\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/halo.cyblogs.top\/upload\/2020\/2\/image-d0f4bf2a272f4ecbb65a16c8c7681c4f.png\" alt=\"\" \/><figcaption>\u4e0b\u8f7d\u6155\u8bfe\u7f51\u89c6\u9891<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a8\u8350\u9605\u8bfb\uff1ahttps:\/\/github.com\/iheartradio\/open-m3u8 \u548c https:\/\/halo.cyblogs.top\/archives\/decrypt-imooc-video-download.html<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=4996\">\u6155\u8bfe\u7f51\u89c6\u9891\u4e0b\u8f7d\u89e3\u5bc6<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u5df2\u7ecf\u662f\u53bb\u5e74\u7684\u4e8b\u60c5\u4e86\uff0c\u8fd9\u4ef6\u4e8b\u8981\u4ece\u88ab\u540c\u4e8b\u6253\u8138\u5f00\u59cb\u8bf4\u8d77\u2026 \u53bb\u5e74\u6211\u548c\u540c\u4e8b\u5f00\u73a9\u7b11\uff0c\u8bf4\u53ea\u8981\u7f51\u4e0a\u4f60\u80fd\u770b\u5230\u7684\u4e1c\u897f\uff0c\u6211\u5c31\u80fd\u4e0b\u8f7d [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[479,1016,1185,1948,1013],"class_list":["post-4996","post","type-post","status-publish","format-standard","hentry","category-java","tag-dubbo","tag-1016","tag-1185","tag-1948","tag-1013"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4996"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4996\/revisions"}],"predecessor-version":[{"id":4997,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4996\/revisions\/4997"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}