[{"content":"https:\/\/github.com\/m2kar\/m2kar.github.io\/blob\/7e9bedc2699dd22703ffe7b1d37c78f32d517101\/.github\/workflows\/issue-to-post.yml#L58\nIt can steal secrets&hellip;\n\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar((https:\/\/m2kar.cn)) \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u53d1\u90ae\u4ef6\u5f81\u6c42\u4f5c\u8005\u540c\u610f\uff0c\u5e76\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u5408\u89c4\u58f0\u660e: \u672c\u6587\u4ec5\u9650\u4e8e\u6280\u672f\u4ea4\u6d41\uff0c\u8bf7\u8bfb\u8005\u9075\u5b88\u5f53\u5730\u6cd5\u5f8b\uff0c\u5982\u9020\u6210\u4fb5\u6743\u3001\u8fdd\u6cd5\u3001\u72af\u7f6a\u884c\u4e3a\uff0c\u4e0e\u672c\u6587\u65e0\u5173\u3002\u5982\u672c\u6587\u4fb5\u72af\u5230\u60a8\u7684\u6743\u5229\uff0c\u8bf7\u53d1\u90ae\u4ef6\u544a\u77e5\uff0c\u672c\u7ad9\u5c06\u4f1a\u505a\u51fa\u9002\u5f53\u5904\u7406\u3002 \u4f5c\u8005: m2kar \u90ae\u7bb1: m2kar.cn&lt;at&gt;gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f \u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba: m2kar\/m2kar.github.io#30\n","permalink":"https:\/\/m2kar.cn\/posts\/20250721-unsafe-github-workflow\/","summary":"<p><a href=\"https:\/\/github.com\/m2kar\/m2kar.github.io\/blob\/7e9bedc2699dd22703ffe7b1d37c78f32d517101\/.github\/workflows\/issue-to-post.yml#L58\">https:\/\/github.com\/m2kar\/m2kar.github.io\/blob\/7e9bedc2699dd22703ffe7b1d37c78f32d517101\/.github\/workflows\/issue-to-post.yml#L58<\/a><\/p>\n<p>It can steal secrets&hellip;<\/p>\n<hr\/>\r\n<ul>\n<li>\u6b22\u8fce<a href=\"https:\/\/github.com\/m2kar\/m2kar.github.io\/issues\/30\">\u8bc4\u8bba<\/a>\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002<\/li>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar((<a href=\"https:\/\/m2kar.cn\">https:\/\/m2kar.cn<\/a>)) \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u53d1\u90ae\u4ef6\u5f81\u6c42\u4f5c\u8005\u540c\u610f\uff0c\u5e76\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u5408\u89c4\u58f0\u660e<\/strong>: \u672c\u6587\u4ec5\u9650\u4e8e\u6280\u672f\u4ea4\u6d41\uff0c\u8bf7\u8bfb\u8005\u9075\u5b88\u5f53\u5730\u6cd5\u5f8b\uff0c\u5982\u9020\u6210\u4fb5\u6743\u3001\u8fdd\u6cd5\u3001\u72af\u7f6a\u884c\u4e3a\uff0c\u4e0e\u672c\u6587\u65e0\u5173\u3002\u5982\u672c\u6587\u4fb5\u72af\u5230\u60a8\u7684\u6743\u5229\uff0c\u8bf7\u53d1\u90ae\u4ef6\u544a\u77e5\uff0c\u672c\u7ad9\u5c06\u4f1a\u505a\u51fa\u9002\u5f53\u5904\u7406\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <code>m2kar.cn&lt;at&gt;gmail.com<\/code><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>\n<hr\/>\r\n<p><strong>\u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba<\/strong>: <a href=\"https:\/\/github.com\/m2kar\/m2kar.github.io\/issues\/30\">m2kar\/m2kar.github.io#30<\/a><\/p>","title":"Unsafe GitHub workflow"},{"content":"\u5927\u4f6c\uff0c\u770b\u4e86\u60a8\u7684\u6587\u7ae0\u4e86\u89e3\u5230Airtest\u6280\u672f\uff0c\u73b0\u5728\u9047\u5230\u4e86Airtest\u5982\u4f55\u5b9e\u73b0\u9a8c\u8bc1\u7801\u6ed1\u5757\u95ee\u9898\uff0c\u8fd8\u671b\u5927\u4f6c\u5206\u4eab\u7ecf\u9a8c\n\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar((https:\/\/m2kar.cn)) \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u53d1\u90ae\u4ef6\u5f81\u6c42\u4f5c\u8005\u540c\u610f\uff0c\u5e76\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u5408\u89c4\u58f0\u660e: \u672c\u6587\u4ec5\u9650\u4e8e\u6280\u672f\u4ea4\u6d41\uff0c\u8bf7\u8bfb\u8005\u9075\u5b88\u5f53\u5730\u6cd5\u5f8b\uff0c\u5982\u9020\u6210\u4fb5\u6743\u3001\u8fdd\u6cd5\u3001\u72af\u7f6a\u884c\u4e3a\uff0c\u4e0e\u672c\u6587\u65e0\u5173\u3002\u5982\u672c\u6587\u4fb5\u72af\u5230\u60a8\u7684\u6743\u5229\uff0c\u8bf7\u53d1\u90ae\u4ef6\u544a\u77e5\uff0c\u672c\u7ad9\u5c06\u4f1a\u505a\u51fa\u9002\u5f53\u5904\u7406\u3002 \u4f5c\u8005: m2kar \u90ae\u7bb1: m2kar.cn&lt;at&gt;gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f \u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba: m2kar\/m2kar.github.io#27\n","permalink":"https:\/\/m2kar.cn\/posts\/20240428-airtest-%E6%BB%91%E5%8A%A8%E9%AA%8C%E8%AF%81%E7%A0%81%E5%AE%9E%E6%88%98\/","summary":"<p>\u5927\u4f6c\uff0c\u770b\u4e86\u60a8\u7684\u6587\u7ae0\u4e86\u89e3\u5230Airtest\u6280\u672f\uff0c\u73b0\u5728\u9047\u5230\u4e86Airtest\u5982\u4f55\u5b9e\u73b0\u9a8c\u8bc1\u7801\u6ed1\u5757\u95ee\u9898\uff0c\u8fd8\u671b\u5927\u4f6c\u5206\u4eab\u7ecf\u9a8c<\/p>\n<hr\/>\r\n<ul>\n<li>\u6b22\u8fce<a href=\"https:\/\/github.com\/m2kar\/m2kar.github.io\/issues\/27\">\u8bc4\u8bba<\/a>\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002<\/li>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar((<a href=\"https:\/\/m2kar.cn\">https:\/\/m2kar.cn<\/a>)) \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u53d1\u90ae\u4ef6\u5f81\u6c42\u4f5c\u8005\u540c\u610f\uff0c\u5e76\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u5408\u89c4\u58f0\u660e<\/strong>: \u672c\u6587\u4ec5\u9650\u4e8e\u6280\u672f\u4ea4\u6d41\uff0c\u8bf7\u8bfb\u8005\u9075\u5b88\u5f53\u5730\u6cd5\u5f8b\uff0c\u5982\u9020\u6210\u4fb5\u6743\u3001\u8fdd\u6cd5\u3001\u72af\u7f6a\u884c\u4e3a\uff0c\u4e0e\u672c\u6587\u65e0\u5173\u3002\u5982\u672c\u6587\u4fb5\u72af\u5230\u60a8\u7684\u6743\u5229\uff0c\u8bf7\u53d1\u90ae\u4ef6\u544a\u77e5\uff0c\u672c\u7ad9\u5c06\u4f1a\u505a\u51fa\u9002\u5f53\u5904\u7406\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <code>m2kar.cn&lt;at&gt;gmail.com<\/code><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>\n<hr\/>\r\n<p><strong>\u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba<\/strong>: <a href=\"https:\/\/github.com\/m2kar\/m2kar.github.io\/issues\/27\">m2kar\/m2kar.github.io#27<\/a><\/p>","title":"Airtest \u6ed1\u52a8\u9a8c\u8bc1\u7801\u5b9e\u6218"},{"content":"\u524d\u8a00 \u82f9\u679c\u516c\u53f8\u5728MacBook\u8fd9\u79cd\u751f\u4ea7\u529b\u5e73\u53f0\u4f7f\u7528\u65e0\u7591\u662f\u4e2a\u4f1f\u5927\u4e14\u5927\u80c6\u7684\u521b\u65b0\uff0c\u7ecf\u8fc7\u51e0\u5e74\u7684\u8f6f\u4ef6\u751f\u6001\u73af\u5883\u7684\u6539\u5584\uff0c\u5404\u79cd\u5e38\u7528\u5de5\u5177\u57fa\u672c\u90fd\u80fd\u5728mac\u4e0b\u8fd0\u884c\u3002\u4f46\u4ecd\u6709\u4e9b\u95ed\u6e90\u53d1\u5e03\u7684\u8f6f\u4ef6\u4ecd\u9700\u8981\u5728amd64\u67b6\u6784\u4e0b\u7684Linux\u73af\u5883\u4e2d\u624d\u80fd\u8fd0\u884c\uff0c\u6bd4\u5982\u672c\u6587\u4e2d\u7684IDA Pro 7.6\u7248\uff0c\u56e0\u6b64\u6574\u7406\u4e00\u4e0b\u8e29\u5751\u8bb0\u5f55\uff0c\u53ef\u4f9b\u76f8\u5173\u9700\u6c42\u7684\u540c\u5b66\u53c2\u8003\u3002\n\u5212\u91cd\u70b9\uff1aarm\u73af\u5883\u4e0b\u8fd0\u884camd64\u7a0b\u5e8f;ldd\u8de8\u67b6\u6784\u8fd0\u884c\n\u73af\u5883\u548c\u5de5\u5177 MacBook with M3 chip parallels Desktop 19 IDA Pro 8.3 for Linux \u5b89\u88c5\u5305 \u652f\u6301amd64\u7684Linux\u73af\u5883 parallels\u662fMac\u751f\u6001\u4e0b\u975e\u5e38\u597d\u7528\u7684\u865a\u62df\u673a\u8f6f\u4ef6\uff0c\u4f46\u4e4b\u524d\u7684\u7248\u672c\u4ec5\u652f\u6301\u8fd0\u884carm\u67b6\u6784\u7684\u865a\u62df\u673a\uff0c\u4e0d\u652f\u6301amd64\u7684\u7a0b\u5e8f\u3002\u5728parallels\u7684v19\u7248\u672c\u4e4b\u540e\uff0c\u57fa\u4e8e\u82f9\u679c\u5b98\u65b9\u63d0\u4f9b\u7684\u652f\u6301, parallels\u63a8\u51fa\u4e86\u5728arm\u865a\u62df\u673a\u4e2d\u8fd0\u884camd64\u7a0b\u5e8f\u7684\u80fd\u529b\uff0c\u5e76\u63d0\u4f9b\u4e86\u4e00\u5957\u914d\u7f6e\u597d\u4e86\u7684ubuntu 22.04\u865a\u62df\u673a\u955c\u50cf\u3002\n\u56e0\u6b64\uff0c\u6211\u4eec\u53ea\u9700\u8981\u70b9\u51fb\u521b\u5efa\u865a\u62df\u673a\uff0c\u4e0b\u8f7dUbuntu with x86_emulation\uff0c\u5373\u53ef\u83b7\u5f97amd64\u7684\u6a21\u62df\u8fd0\u884c\u73af\u5883\u3002\u5982\u4e0b\u56fe\u3002 \u5b89\u88c5IDA pro\u5e76\u89e3\u51b3\u5404\u79cd\u4f9d\u8d56\u7f3a\u5931 \u6253\u5f00\u5b89\u88c5\u597d\u7684\u865a\u62df\u673a\uff0c\u628a\u5b89\u88c5\u5305\u62f7\u8d1d\u8fdb\u6765\uff0c\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u3002\nsudo idapronl_xxx.run \u4f46\u76f4\u63a5\u62a5\u9519\uff1a rosetta error: failed to open elf at \/lib64\/ld-linux-x86-64.so.2\n\u8fd9\u662f\u56e0\u4e3aparallel\u63d0\u4f9b\u7684\u865a\u62df\u673a\u4ec5\u5b89\u88c5\u4e86\u57fa\u7840\u4e86amd64\u7684\u7ec4\u4ef6\uff0c\u4ecd\u6709\u5927\u91cf\u7684\u7ec4\u4ef6\u7f3a\u5931\u3002\u6bd4\u5982\u5728\u8fd9\u91cc\uff0c\u662f\u7f3a\u5931\u4e86binutils\u7ec4\u4ef6\u3002\n\u56e0\u6b64\u4f5c\u8005\u5b89\u88c5\u4e86amd64\u67b6\u6784\u4e0b\u7684binutils\uff0c\u6ce8\u610f\u4f7f\u7528:amd64\u9009\u62e9\u5b89\u88c5\u7684\u76ee\u6807\u67b6\u6784\nsudo apt-get update\rsudo apt-get install binutils:amd64 \u7136\u540e\uff0c\u5b89\u88c5\u7a0b\u5e8f\u987a\u5229\u8fdb\u884c\uff0c\u4f5c\u8005\u5c06idapro\u5b89\u88c5\u5728\/opt\/idapro-8.3\u76ee\u5f55\u4e0b\u3002\n\u5c1d\u8bd5\u8fd0\u884cida64\uff0c\u679c\u7136\u53c8\u63d0\u793a\u5404\u79cd\u5e93\u6587\u4ef6\u7f3a\u5931\u3002\n\u6bd4\u5982\u4ee5\u4e0b\u62a5\u9519\u63d0\u793a\uff1a\n\/opt\/idapro-8.3\/ida64: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory \u8868\u793a\u7f3a\u5931\u4e86libGL.so.1\u52a8\u6001\u94fe\u63a5\u5e93\uff0c\u8c37\u6b4c\u641c\u7d22\u540e\u53d1\u73b0\u9700\u8981\u5b89\u88c5libgl1-mesa-glx\u5e93\uff0c\u5219\u8fd0\u884c\u547d\u4ee4sudo apt install libgl1-mesa-glx:amd64\u5b89\u88c5amd64\u67b6\u6784\u4e0b\u7684libgl1-mesa-glx\u5e93\u3002\n\u7c7b\u4f3c\u7684\uff0c\u63d0\u793alibgthread-2.0.so.0\u7f3a\u5931\u5219\u5b89\u88c5libglib2.0-0:amd64\u3002\u63d0\u793alibSM.so.6\u5219\u5b89\u88c5libsm6:amd64\u548clibxext6:amd64\u3002\u63d0\u793alibfontconfig.so.1\u5219\u5b89\u88c5libsm6:amd64\n\u89e3\u51b3Qt\u63d2\u4ef6\u65e0\u6cd5\u8fd0\u884c\u7684\u95ee\u9898 \u7ecf\u8fc7\u4e0d\u65ad\u4fee\u8865\u7f3a\u5931\u94fe\u63a5\u5e93\uff0cida\u4e0d\u518d\u63d0\u793a\u7f3a\u5931\u94fe\u63a5\u5e93\uff0c\u5f00\u59cb\u63d0\u793aQT\u7684xcb\u63d2\u4ef6\u65e0\u6cd5\u52a0\u8f7d\u3002\u5982\u4e0b\uff1a\nqt.qpa.plugin: Could not load the Qt platform plugin &#34;xcb&#34; in &#34;&#34; even though it was found.\rThis application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.\rAvailable platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. \u8fd9\u662f\u56e0\u4e3aIDA\u5b89\u88c5\u76ee\u5f55\u4e0blibQt5XcbQpa.so.5\u6240\u4f9d\u8d56\u7684\u5176\u4ed6\u94fe\u63a5\u5e93\u65e0\u6cd5\u8fd0\u884c\uff0c\u5c06\u5728\u4e0b\u4e00\u7ae0\u4f7f\u7528ldd\u547d\u4ee4\u5206\u6790\u7f3a\u5931\u7684\u52a8\u6001\u94fe\u63a5\u5e93\u3002\n\u4fee\u6539ldd\u4f7f\u5176\u652f\u6301\u5206\u6790amd64\u7a0b\u5e8f \u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u9009\u62e9\u4f7f\u7528ldd\u547d\u4ee4\u5206\u6790\u7a0b\u5e8f\u6240\u9700\u7684\u52a8\u6001\u94fe\u63a5\u5e93\uff0c\u5bfb\u627e\u5176\u4e2d\u7684\u7f3a\u5931\u9879\u3002\n\u4f46\u5f53\u8fd0\u884cldd libQt5XcbQpa.so.5\uff0c\u7ec8\u7aef\u5374\u63d0\u793anot a dynamic executable\u3002\n\u800c\u5c1d\u8bd5\u4f7f\u7528ldd\u5206\u6790\u7cfb\u7edf\u81ea\u5e26\u7684arm\u67b6\u6784\u4e8c\u8fdb\u5236\u6587\u4ef6\u65f6\uff0c\u5374\u80fd\u6b63\u5e38\u663e\u793a\u3002\n\u56e0\u6b64\u731c\u6d4b\u662fldd\u65e0\u6cd5\u8de8\u67b6\u6784\u8fd0\u884c\u3002ldd\u5de5\u5177\u5305\u542b\u5728libc-bin\u4e2d\uff0c\u6240\u4ee5\u5c1d\u8bd5\u4f7f\u7528sudo apt install libc-bin:amd64\u5b89\u88c5amd64\u67b6\u6784\u4e0b\u7684ldd\u5de5\u5177\u3002\u4f46\u5f88\u4e0d\u5e78\uff0c\u7531\u4e8eamd64\u4e0b\u7684libc-bin\u548carm\u539f\u751f\u7684libc-bin\u51b2\u7a81\uff0c\u65e0\u6cd5\u6b63\u5e38\u5b89\u88c5\u3002\nThe following packages have unmet dependencies:\rlibc-bin : Conflicts: libc-bin:amd64\rlibc-bin:amd64 : Conflicts: libc-bin\rE: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. libc-bin\u770b\u8d77\u6765\u53c8\u50cf\u662f\u7cfb\u7edf\u6bd4\u8f83\u91cd\u8981\u7684\u5e93\uff0c\u56e0\u6b64\u6ca1\u6709\u5192\u9669\u628a\u539f\u672c\u7684libc-bin\u66ff\u6362\u4e3aamd64\u67b6\u6784\u7684\u8f6f\u4ef6\u3002\n\u901a\u8fc7\u8fdb\u4e00\u6b65\u67e5\u9605\u8d44\u6599\uff0c\u53d1\u73b0ldd\u7a0b\u5e8f\u672c\u8eab\u5176\u5b9e\u662f\u811a\u672c\uff0c\u5e76\u975e\u4e8c\u8fdb\u5236\u7a0b\u5e8f\u3002\/usr\/bin\/ldd\u4ee3\u7801\u4e2d\u4f7f\u7528RTLDLIST\u5b9a\u4e49\u4e86\u4f7f\u7528\u54ea\u4e2ald-linux\u3002\nRTLDLIST=\/lib\/ld-linux-aarch64.so.1 ldd\u662f\u4f9d\u8d56\u4e8eld-linux\u52a8\u6001\u94fe\u63a5\u5e93\u7684\u5b9e\u73b0\u7684\uff0c\u800cld-linux\u5728\u4e0d\u540c\u67b6\u6784\u4e0b\u5bf9\u5e94\u6709\u4e0d\u540c\u7684\u4e8c\u8fdb\u5236\u5305\u3002\u6bd4\u5982\u5728arm\u4e0b\u4e3ald-linux-aarch64.so.1\uff0c\u5728amd64\u4e0b\u4e3ald-linux-x86-64.so.2\u3002\n\u56e0\u6b64\uff0c\u4f5c\u8005\u5c1d\u8bd5\u4f7f\u7528\/lib64\/ld-linux-x86-64.so.2\u66ff\u6362\u6389arm\u67b6\u6784\u7684\u7248\u672c\uff0c\u5e76\u5c06\u7a0b\u5e8f\u4fdd\u5b58\u4e3a\/usr\/bin\/ldd-amd64\uff0c\u73b0\u5728\u53ef\u4ee5\u6210\u529f\u8fd0\u884c ldd libQt5XcbQpa.so.5\uff0c\u5206\u6790\u7f3a\u5931\u7684\u4f9d\u8d56\u9879\u3002\n\u7ee7\u7eed\u89e3\u51b3Qt\u63d2\u4ef6\u65e0\u6cd5\u8fd0\u884c\u7684\u95ee\u9898 \u5c1d\u8bd5\u8fd0\u884c ldd-amd64 libQt5XcbQpa.so.5\uff0c\u89e3\u51b3\u4f9d\u8d56\u7f3a\u5931\u95ee\u9898\u3002\n$ ldd-amd64 \/opt\/idapro-8.3\/libQt5XcbQpa.so.5 ...(\u7701\u7565)\r\/lib64\/ld-linux-x86-64.so.2 (0x00007ffffffc4000)\rlibdbus-1.so.3 =&gt; not found\rlibxcb-util.so.1 =&gt; \/lib\/x86_64-linux-gnu\/libxcb-util.so.1 (0x00007ffffe6b5000)\r...(\u7701\u7565) \u53d1\u73b0\u662flibdbus-1.so.3\u7f3a\u5931\uff0c\u641c\u7d22\u53d1\u73b0\u7f3a\u5c11\u4e86libdbus-1-3,\u4e8e\u662f\u8fd0\u884c\u5b89\u88c5sudo apt install libdbus-1-3:amd64\u3002\n\u7ec8\u4e8e\u53ef\u4ee5\u987a\u5229\u7684\u53cd\u7f16\u8bd1\uff01\n\u89e3\u51b3idapython\u65e0\u6cd5\u8fd0\u884c\u7684\u95ee\u9898 \u8fd0\u884c\u540e\uff0cIDA\u63a7\u5236\u53f0\u63d0\u793a\uff1a\ndlopen(\/opt\/idapro-8.3\/plugins\/idapython3_64.so): libpython3.6m.so.1.0: cannot open shared object file: No such file or directory\r\/opt\/idapro-8.3\/plugins\/idapython3_64.so: can&#39;t load file \u770b\u8d77\u6765\u662fidapython3_64.so\u8fd0\u884c\u65f6\u65e0\u6cd5\u627e\u5230libpython3.6m.so.1.0\uff0c\u5bfc\u81f4\u51fa\u9519\u3002\n\u8fd9\u91cc\u63a8\u8350\u7684\u65b9\u5f0f\u662f\u4e0d\u6539\u53d8\u7cfb\u7edf\u91cc\u7684libpython3\u548cpython3\u76f8\u5173\u5305\uff0c\u901a\u8fc7miniconda\u521b\u5efa\u5355\u72ec\u7684python\u73af\u5883\uff0c\u5e76\u8bbe\u5b9a\u5e93\u641c\u7d22\u8def\u5f84\u3002\n\u4f7f\u7528miniconda\u5b89\u88c5python3.6\u7684\u73af\u5883\u3002\ncurl -O https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/miniconda\/Miniconda3-latest-Linux-x86_64.sh\rbash .\/Miniconda3-latest-Linux-x86_64.sh\r\/opt\/miniconda3\/bin\/conda init\rsource ~\/.bashrc\rconda create --name idapy &#34;python=3.6,&lt;3.7&#34; \u8bbe\u5b9a\u5e93\u641c\u7d22\u8def\u5f84\n# \u7f16\u8f91.bashrc\rexport LD_LIBRARY_PATH=&#34;\/home\/parallels\/miniconda3\/envs\/idapy\/lib:$LD_LIBRARY_PATH&#34; \u5e94\u7528\u73af\u5883\u53d8\u91cf\u540e\u518d\u6b21\u6253\u5f00IDA\uff0c\u5df2\u7ecf\u53ef\u4ee5\u6b63\u786e\u8fd0\u884cidapython\u3002\n\u89e3\u51b3\u4e71\u7801\u7684\u7f3a\u5931\u5e93\u7684\u95ee\u9898 \u672c\u6765\u8fd0\u884c\u7684\u633a\u597d\uff0c\u4f46\u662f\u91cd\u542f\u540e\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\uff1a\n$ \/opt\/idapro-8.3\/ida\r\/opt\/idapro-8.3\/ida: error while loading shared libraries: \ufffd\ufffd: cannot open shared object file: No such file or directory \u5728\u7ed9Hex-Ray\u5b98\u65b9\u652f\u6301\u53d1\u4e86\u90ae\u4ef6\uff0c\u4f46\u5b98\u65b9\u8868\u793a\u4e0d\u652f\u6301rosette2\u73af\u5883\u4e0b\u7684\u8f6f\u4ef6\u8fd0\u884c\u3002\u6c42\u52a9stack overflow\u83b7\u5f97\u4e86\u89e3\u51b3\u65b9\u6848\u3002\n\u53ef\u4ee5\u6740\u6389rosettad\u8fdb\u7a0b\u6765\u89e3\u51b3\u8be5\u95ee\u9898\u3002\nsudo pkill rosettad \u8be6\u7ec6\u89e3\u91ca\u53c2\u770b\uff1a https:\/\/stackoverflow.com\/a\/78245031\/9841711\nAll in One \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u89e3\u51b3IDAPro\u5b89\u88c5\u65f6\u6240\u6709\u7684\u4f9d\u8d56\u95ee\u9898\u3002\nsudo apt-get update\rsudo apt-get install binutils:amd64 libgl1-mesa-glx:amd64 libglib2.0-0:amd64 libsecret-1-0:amd64\rsudo apt-get install libfontconfig1:amd64 libxcb-icccm4:amd64 libxcb-image0:amd64 libxcb-keysyms1:amd64 libxcb-render-util0:amd64 libxcb-render0:amd64 libxcb-shape0:amd64 libxcb-xinerama0:amd64 libxcb-xkb1:amd64 libsm6:amd64 libice6:amd64 libxkbcommon-x11-0:amd64 libxkbcommon0:amd64 libdbus-1-3:amd64\r# \u89e3\u51b3python\u73af\u5883\u7684\u4ee3\u7801\u5728\u6b64\u7701\u7565 \u603b\u7ed3 \u975e\u5e38\u5957\u5a03\u7684\u8e29\u4e86\u5b89\u88c5IDA Pro\u7684\u5751\uff0c\u5728arm\u67b6\u6784\u4e0b\u7684MacBook\u901a\u8fc7parallels+rosetta\u5b89\u88c5Linux amd64\u7248\u672c\u7684IDA Pro\u3002\u672c\u6280\u672f\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5b89\u88c5\u5176\u4ed6\u8de8\u67b6\u6784\u8f6f\u4ef6\u3002\n\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar((https:\/\/m2kar.cn)) \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u53d1\u90ae\u4ef6\u5f81\u6c42\u4f5c\u8005\u540c\u610f\uff0c\u5e76\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u5408\u89c4\u58f0\u660e: \u672c\u6587\u4ec5\u9650\u4e8e\u6280\u672f\u4ea4\u6d41\uff0c\u8bf7\u8bfb\u8005\u9075\u5b88\u5f53\u5730\u6cd5\u5f8b\uff0c\u5982\u9020\u6210\u4fb5\u6743\u3001\u8fdd\u6cd5\u3001\u72af\u7f6a\u884c\u4e3a\uff0c\u4e0e\u672c\u6587\u65e0\u5173\u3002\u5982\u672c\u6587\u4fb5\u72af\u5230\u60a8\u7684\u6743\u5229\uff0c\u8bf7\u53d1\u90ae\u4ef6\u544a\u77e5\uff0c\u672c\u7ad9\u5c06\u4f1a\u505a\u51fa\u9002\u5f53\u5904\u7406\u3002 \u4f5c\u8005: m2kar \u90ae\u7bb1: m2kar.cn&lt;at&gt;gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f \u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba: m2kar\/m2kar.github.io#26\n","permalink":"https:\/\/m2kar.cn\/posts\/20240325-%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB%E5%A5%97%E5%A8%83%E4%B9%8Barm%E6%9E%B6%E6%9E%84%E4%B8%8B%E7%9A%84macbook%E9%80%9A%E8%BF%87parallels+rosetta%E5%AE%89%E8%A3%85linux-amd64%E7%89%88%E6%9C%AC%E7%9A%84ida-pro\/","summary":"<h1 id=\"\u524d\u8a00\">\u524d\u8a00<\/h1>\n<p>\u82f9\u679c\u516c\u53f8\u5728MacBook\u8fd9\u79cd\u751f\u4ea7\u529b\u5e73\u53f0\u4f7f\u7528\u65e0\u7591\u662f\u4e2a\u4f1f\u5927\u4e14\u5927\u80c6\u7684\u521b\u65b0\uff0c\u7ecf\u8fc7\u51e0\u5e74\u7684\u8f6f\u4ef6\u751f\u6001\u73af\u5883\u7684\u6539\u5584\uff0c\u5404\u79cd\u5e38\u7528\u5de5\u5177\u57fa\u672c\u90fd\u80fd\u5728mac\u4e0b\u8fd0\u884c\u3002\u4f46\u4ecd\u6709\u4e9b\u95ed\u6e90\u53d1\u5e03\u7684\u8f6f\u4ef6\u4ecd\u9700\u8981\u5728amd64\u67b6\u6784\u4e0b\u7684Linux\u73af\u5883\u4e2d\u624d\u80fd\u8fd0\u884c\uff0c\u6bd4\u5982\u672c\u6587\u4e2d\u7684IDA Pro 7.6\u7248\uff0c\u56e0\u6b64\u6574\u7406\u4e00\u4e0b\u8e29\u5751\u8bb0\u5f55\uff0c\u53ef\u4f9b\u76f8\u5173\u9700\u6c42\u7684\u540c\u5b66\u53c2\u8003\u3002<\/p>\n<p><strong>\u5212\u91cd\u70b9<\/strong>\uff1aarm\u73af\u5883\u4e0b\u8fd0\u884camd64\u7a0b\u5e8f;ldd\u8de8\u67b6\u6784\u8fd0\u884c<\/p>\n<h1 id=\"\u73af\u5883\u548c\u5de5\u5177\">\u73af\u5883\u548c\u5de5\u5177<\/h1>\n<ul>\n<li>MacBook with M3 chip<\/li>\n<li>parallels Desktop 19<\/li>\n<li>IDA Pro 8.3 for Linux \u5b89\u88c5\u5305<\/li>\n<\/ul>\n<h1 id=\"\u652f\u6301amd64\u7684linux\u73af\u5883\">\u652f\u6301amd64\u7684Linux\u73af\u5883<\/h1>\n<p>parallels\u662fMac\u751f\u6001\u4e0b\u975e\u5e38\u597d\u7528\u7684\u865a\u62df\u673a\u8f6f\u4ef6\uff0c\u4f46\u4e4b\u524d\u7684\u7248\u672c\u4ec5\u652f\u6301\u8fd0\u884carm\u67b6\u6784\u7684\u865a\u62df\u673a\uff0c\u4e0d\u652f\u6301amd64\u7684\u7a0b\u5e8f\u3002\u5728parallels\u7684v19\u7248\u672c\u4e4b\u540e\uff0c\u57fa\u4e8e<a href=\"https:\/\/developer.apple.com\/documentation\/virtualization\/running_intel_binaries_in_linux_vms_with_rosetta\">\u82f9\u679c\u5b98\u65b9\u63d0\u4f9b\u7684\u652f\u6301<\/a>, parallels\u63a8\u51fa\u4e86<a href=\"https:\/\/kb.parallels.com\/en\/129871\">\u5728arm\u865a\u62df\u673a\u4e2d\u8fd0\u884camd64\u7a0b\u5e8f\u7684\u80fd\u529b<\/a>\uff0c\u5e76\u63d0\u4f9b\u4e86\u4e00\u5957\u914d\u7f6e\u597d\u4e86\u7684ubuntu 22.04\u865a\u62df\u673a\u955c\u50cf\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u6211\u4eec\u53ea\u9700\u8981\u70b9\u51fb\u521b\u5efa\u865a\u62df\u673a\uff0c\u4e0b\u8f7dUbuntu with x86_emulation\uff0c\u5373\u53ef\u83b7\u5f97amd64\u7684\u6a21\u62df\u8fd0\u884c\u73af\u5883\u3002\u5982\u4e0b\u56fe\u3002\n<img width=\"872\" alt=\"image\" src=\"https:\/\/github.com\/m2kar\/m2kar.github.io\/assets\/16930652\/d8e4710c-c9ca-4d28-b9df-d2c1ccac175a\"><\/p>\n<h1 id=\"\u5b89\u88c5ida-pro\u5e76\u89e3\u51b3\u5404\u79cd\u4f9d\u8d56\u7f3a\u5931\">\u5b89\u88c5IDA pro\u5e76\u89e3\u51b3\u5404\u79cd\u4f9d\u8d56\u7f3a\u5931<\/h1>\n<p>\u6253\u5f00\u5b89\u88c5\u597d\u7684\u865a\u62df\u673a\uff0c\u628a\u5b89\u88c5\u5305\u62f7\u8d1d\u8fdb\u6765\uff0c\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u3002<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">sudo idapronl_xxx.run\n<\/span><\/span><\/code><\/pre><\/div><p>\u4f46\u76f4\u63a5\u62a5\u9519\uff1a <code>rosetta error: failed to open elf at \/lib64\/ld-linux-x86-64.so.2<\/code><\/p>\n<p>\u8fd9\u662f\u56e0\u4e3aparallel\u63d0\u4f9b\u7684\u865a\u62df\u673a\u4ec5\u5b89\u88c5\u4e86\u57fa\u7840\u4e86amd64\u7684\u7ec4\u4ef6\uff0c\u4ecd\u6709\u5927\u91cf\u7684\u7ec4\u4ef6\u7f3a\u5931\u3002\u6bd4\u5982\u5728\u8fd9\u91cc\uff0c\u662f\u7f3a\u5931\u4e86binutils\u7ec4\u4ef6\u3002<\/p>\n<p>\u56e0\u6b64\u4f5c\u8005\u5b89\u88c5\u4e86amd64\u67b6\u6784\u4e0b\u7684binutils\uff0c\u6ce8\u610f\u4f7f\u7528<code>:amd64<\/code>\u9009\u62e9\u5b89\u88c5\u7684\u76ee\u6807\u67b6\u6784<\/p>\n<pre tabindex=\"0\"><code>sudo apt-get update\r\nsudo apt-get install binutils:amd64\n<\/code><\/pre><p>\u7136\u540e\uff0c\u5b89\u88c5\u7a0b\u5e8f\u987a\u5229\u8fdb\u884c\uff0c\u4f5c\u8005\u5c06idapro\u5b89\u88c5\u5728\/opt\/idapro-8.3\u76ee\u5f55\u4e0b\u3002<\/p>\n<p>\u5c1d\u8bd5\u8fd0\u884c<code>ida64<\/code>\uff0c\u679c\u7136\u53c8\u63d0\u793a\u5404\u79cd\u5e93\u6587\u4ef6\u7f3a\u5931\u3002<\/p>\n<p>\u6bd4\u5982\u4ee5\u4e0b\u62a5\u9519\u63d0\u793a\uff1a<\/p>\n<pre tabindex=\"0\"><code>\/opt\/idapro-8.3\/ida64: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory\n<\/code><\/pre><p>\u8868\u793a\u7f3a\u5931\u4e86<code>libGL.so.1<\/code>\u52a8\u6001\u94fe\u63a5\u5e93\uff0c\u8c37\u6b4c\u641c\u7d22\u540e\u53d1\u73b0\u9700\u8981\u5b89\u88c5<code>libgl1-mesa-glx<\/code>\u5e93\uff0c\u5219\u8fd0\u884c\u547d\u4ee4<code>sudo apt install libgl1-mesa-glx:amd64<\/code>\u5b89\u88c5amd64\u67b6\u6784\u4e0b\u7684<code>libgl1-mesa-glx<\/code>\u5e93\u3002<\/p>","title":"[\u6280\u672f\u5206\u4eab]\u5957\u5a03\u4e4barm\u67b6\u6784\u4e0b\u7684MacBook\u901a\u8fc7parallels+rosetta\u5b89\u88c5Linux amd64\u7248\u672c\u7684IDA Pro"},{"content":"IoT\/ICS\u9886\u57df\u6d89\u53ca\u975e\u5bf9\u79f0\u52a0\u5bc6\u7684\u7f51\u7edc\u534f\u8bae\u5206\u6790\uff1a\nTLS\/SSL\u534f\u8bae TLS\/SSL\u534f\u8bae\u3002\u6700\u5e38\u89c1\u7684HTTP\/Modbus\/MQTT\/FTPS\/XMPP\/AMQP\/OPC UA\/\u90fd\u53ef\u5728TLS\u534f\u8bae\u57fa\u7840\u4e0a\u5b9e\u73b0\u5b89\u5168\u4f20\u8f93\uff0c\u5f88\u591a\u79c1\u6709\u534f\u8bae\uff08\u5982\u897f\u95e8\u5b50S7comm-Plus\uff09\u4e5f\u662f\u5728TLS\u6216\u8005HTTPS\u4e0a\u5c42\u518d\u505a\u4e86\u5b9a\u5236\u3002\nTLS\u534f\u8bae\u6d89\u53ca\u7684\u79c1\u94a5\u6709\u4e24\u79cd\u3002\u4e00\u79cd\u662f\u7528\u4e8e\u8bc1\u4e66\u7684\u79c1\u94a5\uff0c\u9075\u5faaX.509\u683c\u5f0f\uff0c\u7528\u4e8e\u89e3\u5bc6\u5ba2\u6237\u7aef\u53d1\u6765\u7684\u5bf9\u79f0\u79d8\u94a5\uff0c\u5728\u8bbe\u5907\u4e2d\u5b58\u50a8\u3002\u7533\u8bf7\u4e0b\u6765\u7684\u8bc1\u4e66\u4e2d\u5305\u542b\u516c\u94a5\u3001\u53d7\u4fe1\u4efb\u7684\u8bbe\u5907\u6807\u8bc6\u548c\u4e0a\u7ea7CA\u673a\u6784\uff0c\u901a\u8fc7\u8bc1\u4e66\u94fe\u9a8c\u8bc1\u672c\u8bc1\u4e66\u7684\u53ef\u4fe1\u6027\u3002\u8bc1\u4e66\u5728\u5efa\u7acb\u8fde\u63a5\u65f6\u53d1\u7ed9\u5ba2\u6237\u7aef\uff0c\u7528\u4e8e\u8868\u793a\u8bbe\u5907\u7684\u53ef\u4fe1\u6027\u3002\u4e00\u79cd\u662f\u4f1a\u8bdd\u79c1\u94a5\uff0c\u8be5\u79c1\u94a5\u6bcf\u6b21\u4f1a\u8bdd\u4e34\u65f6\u751f\u6210\uff0c\u4e14\u4e0d\u5728\u7f51\u7edc\u4e0a\u4f20\u8f93\uff0c\u800c\u662f\u901a\u8fc7DH\u7c7b\u79d8\u94a5\u4ea4\u6362\u534f\u8bae\u548c\u5bf9\u65b9\u751f\u6210\u540c\u4e00\u4e2a\u5171\u4eab\u52a0\u5bc6\u79d8\u94a5\uff0c\u7528\u4e8e\u540e\u7eed\u7684\u5bf9\u79f0\u52a0\u5bc6\u3002\n\u8bc1\u4e66\u7684\u79d8\u94a5\u4f1a\u5728\u670d\u52a1\u5668\u7aef\u5b58\u50a8\u30021\uff09\u6709\u7684\u5382\u5546\uff08\u6bd4\u5982\u7fa4\u6656\uff09\u4f1a\u8981\u6c42\u7528\u6237\u81ea\u884c\u4e0a\u4f20\u8bc1\u4e66\u548c\u79d8\u94a5\u30022\uff09\u6709\u7684\u662f\u521d\u59cb\u5316\u7684\u65f6\u5019\u9700\u8981\u8054\u7f51\u91cd\u65b0\u7533\u8bf7\u8bc1\u4e66\u548c\u79d8\u94a5\u7684\u30023\uff09\u6709\u7684\u662f\u51fa\u5382\u5373\u9884\u7f6e\u4e86\u76f8\u540c\u8bc1\u4e66\u548c\u79d8\u94a5\u3002\u5728\u5df2\u77e5\u79c1\u94a5\u7684\u60c5\u51b5\u4e0b\uff0c\u7834\u89e3\u6d41\u91cf\u662f\u5f88\u5bb9\u6613\u7684\u3002\u6709\u4e9b\u60c5\u51b5\u4e0b\uff0c\u5ba2\u6237\u7aef\u4e5f\u9700\u8981\u8bc1\u4e66\u9a8c\u8bc1\uff0c\u8fd9\u65f6\u5019\u5ba2\u6237\u7aef\u4e5f\u4f1a\u6709\u5bf9\u5e94\u7684\u8bc1\u4e66\u79c1\u94a5\u3002\nDTLS\u534f\u8bae DTLS\u534f\u8bae\u3002\u548cTLS\u534f\u8bae\u7c7b\u4f3c\uff0c\u4f46\u57fa\u4e8eUDP\u5b9e\u73b0\u3002CoAP\u534f\u8bae\u662f\u5728DTLS\u534f\u8bae\u57fa\u7840\u4e0a\u5b9e\u73b0\u7684\u52a0\u5bc6\u4f20\u8f93\u3002\nSSH\u534f\u8bae SSH\u534f\u8bae\u3002SSH\u534f\u8bae\u652f\u6301\u53e3\u4ee4\u548c\u975e\u5bf9\u79f0\u5bc6\u7801\u9a8c\u8bc1\u3002\u975e\u5bf9\u79f0\u5bc6\u7801\u9a8c\u8bc1\u662f\u5c06\u516c\u94a5\u5b58\u5728\u670d\u52a1\u5668\u4e2d\uff0c\u79c1\u94a5\u5b58\u50a8\u5728\u5ba2\u6237\u7aef\u4e2d\u3002IoT\u8bbe\u5907\u4e00\u822c\u4f5c\u4e3a\u670d\u52a1\u5668\u7aef\uff0c\u5f88\u5c11\u4f5c\u4e3a\u5ba2\u6237\u7aef\uff0c\u56e0\u6b64\u4e5f\u4e0d\u5b58\u50a8\u79c1\u94a5\u3002\nIPSec\u534f\u8bae IPSec\u534f\u8bae\u3002IP\u5c42\u7684\u5b89\u5168\u534f\u8bae\uff0c\u4e00\u822c\u7528\u4e8eVPN\u8fde\u63a5\uff0c\u914d\u7f6e\u8fc7\u7a0b\u8f83\u4e3a\u590d\u6742\u3002\u540c\u6837\u57fa\u4e8eX.509\u8bc1\u4e66\uff0c\u8ba4\u8bc1\u8fc7\u7a0b\u8981\u6c42\u53cc\u65b9\u5747\u63d0\u4f9b\u8bc1\u4e66\u3002\u76f8\u5e94\u7684\uff0c\u53cc\u65b9\u5747\u5b58\u50a8\u81ea\u5df1\u7684\u79c1\u94a5\u3002\n\u5176\u4ed6\u79c1\u6709\u534f\u8bae \u5176\u4ed6\u79c1\u6709\u534f\u8bae\u3002\u5382\u5546\u5728TCP\/HTTP\u7b49\u534f\u8bae\u57fa\u7840\u4e0a\u81ea\u884c\u5b9e\u73b0\u7684\u5168\u6d41\u91cf\u52a0\u5bc6\u6216\u90e8\u5206\u52a0\u5bc6\u7684\u534f\u8bae\u3002\n\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar((https:\/\/m2kar.cn)) \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u53d1\u90ae\u4ef6\u5f81\u6c42\u4f5c\u8005\u540c\u610f\uff0c\u5e76\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u5408\u89c4\u58f0\u660e: \u672c\u6587\u4ec5\u9650\u4e8e\u6280\u672f\u4ea4\u6d41\uff0c\u8bf7\u8bfb\u8005\u9075\u5b88\u5f53\u5730\u6cd5\u5f8b\uff0c\u5982\u9020\u6210\u4fb5\u6743\u3001\u8fdd\u6cd5\u3001\u72af\u7f6a\u884c\u4e3a\uff0c\u4e0e\u672c\u6587\u65e0\u5173\u3002\u5982\u672c\u6587\u4fb5\u72af\u5230\u60a8\u7684\u6743\u5229\uff0c\u8bf7\u53d1\u90ae\u4ef6\u544a\u77e5\uff0c\u672c\u7ad9\u5c06\u4f1a\u505a\u51fa\u9002\u5f53\u5904\u7406\u3002 \u4f5c\u8005: m2kar \u90ae\u7bb1: m2kar.cn&lt;at&gt;gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f \u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba: m2kar\/m2kar.github.io#25\n","permalink":"https:\/\/m2kar.cn\/posts\/20230821-%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB-%E5%B7%A5%E6%8E%A7%E7%89%A9%E8%81%94%E7%BD%91%E4%B8%AD%E9%9D%9E%E5%AF%B9%E7%A7%B0%E5%8A%A0%E5%AF%86%E5%8D%8F%E8%AE%AE%E5%88%86%E6%9E%90\/","summary":"<p>IoT\/ICS\u9886\u57df\u6d89\u53ca\u975e\u5bf9\u79f0\u52a0\u5bc6\u7684\u7f51\u7edc\u534f\u8bae\u5206\u6790\uff1a<\/p>\n<h3 id=\"tlsssl\u534f\u8bae\">TLS\/SSL\u534f\u8bae<\/h3>\n<p>TLS\/SSL\u534f\u8bae\u3002\u6700\u5e38\u89c1\u7684HTTP\/Modbus\/MQTT\/FTPS\/XMPP\/AMQP\/OPC UA\/\u90fd\u53ef\u5728TLS\u534f\u8bae\u57fa\u7840\u4e0a\u5b9e\u73b0\u5b89\u5168\u4f20\u8f93\uff0c\u5f88\u591a\u79c1\u6709\u534f\u8bae\uff08\u5982\u897f\u95e8\u5b50S7comm-Plus\uff09\u4e5f\u662f\u5728TLS\u6216\u8005HTTPS\u4e0a\u5c42\u518d\u505a\u4e86\u5b9a\u5236\u3002<\/p>\n<p>TLS\u534f\u8bae\u6d89\u53ca\u7684\u79c1\u94a5\u6709\u4e24\u79cd\u3002\u4e00\u79cd\u662f\u7528\u4e8e\u8bc1\u4e66\u7684\u79c1\u94a5\uff0c\u9075\u5faaX.509\u683c\u5f0f\uff0c\u7528\u4e8e\u89e3\u5bc6\u5ba2\u6237\u7aef\u53d1\u6765\u7684\u5bf9\u79f0\u79d8\u94a5\uff0c\u5728\u8bbe\u5907\u4e2d\u5b58\u50a8\u3002\u7533\u8bf7\u4e0b\u6765\u7684\u8bc1\u4e66\u4e2d\u5305\u542b\u516c\u94a5\u3001\u53d7\u4fe1\u4efb\u7684\u8bbe\u5907\u6807\u8bc6\u548c\u4e0a\u7ea7CA\u673a\u6784\uff0c\u901a\u8fc7\u8bc1\u4e66\u94fe\u9a8c\u8bc1\u672c\u8bc1\u4e66\u7684\u53ef\u4fe1\u6027\u3002\u8bc1\u4e66\u5728\u5efa\u7acb\u8fde\u63a5\u65f6\u53d1\u7ed9\u5ba2\u6237\u7aef\uff0c\u7528\u4e8e\u8868\u793a\u8bbe\u5907\u7684\u53ef\u4fe1\u6027\u3002\u4e00\u79cd\u662f\u4f1a\u8bdd\u79c1\u94a5\uff0c\u8be5\u79c1\u94a5\u6bcf\u6b21\u4f1a\u8bdd\u4e34\u65f6\u751f\u6210\uff0c\u4e14\u4e0d\u5728\u7f51\u7edc\u4e0a\u4f20\u8f93\uff0c\u800c\u662f\u901a\u8fc7DH\u7c7b\u79d8\u94a5\u4ea4\u6362\u534f\u8bae\u548c\u5bf9\u65b9\u751f\u6210\u540c\u4e00\u4e2a\u5171\u4eab\u52a0\u5bc6\u79d8\u94a5\uff0c\u7528\u4e8e\u540e\u7eed\u7684\u5bf9\u79f0\u52a0\u5bc6\u3002<\/p>\n<p>\u8bc1\u4e66\u7684\u79d8\u94a5\u4f1a\u5728\u670d\u52a1\u5668\u7aef\u5b58\u50a8\u30021\uff09\u6709\u7684\u5382\u5546\uff08\u6bd4\u5982\u7fa4\u6656\uff09\u4f1a\u8981\u6c42\u7528\u6237\u81ea\u884c\u4e0a\u4f20\u8bc1\u4e66\u548c\u79d8\u94a5\u30022\uff09\u6709\u7684\u662f\u521d\u59cb\u5316\u7684\u65f6\u5019\u9700\u8981\u8054\u7f51\u91cd\u65b0\u7533\u8bf7\u8bc1\u4e66\u548c\u79d8\u94a5\u7684\u30023\uff09\u6709\u7684\u662f\u51fa\u5382\u5373\u9884\u7f6e\u4e86\u76f8\u540c\u8bc1\u4e66\u548c\u79d8\u94a5\u3002\u5728\u5df2\u77e5\u79c1\u94a5\u7684\u60c5\u51b5\u4e0b\uff0c\u7834\u89e3\u6d41\u91cf\u662f\u5f88\u5bb9\u6613\u7684\u3002\u6709\u4e9b\u60c5\u51b5\u4e0b\uff0c\u5ba2\u6237\u7aef\u4e5f\u9700\u8981\u8bc1\u4e66\u9a8c\u8bc1\uff0c\u8fd9\u65f6\u5019\u5ba2\u6237\u7aef\u4e5f\u4f1a\u6709\u5bf9\u5e94\u7684\u8bc1\u4e66\u79c1\u94a5\u3002<\/p>\n<h3 id=\"dtls\u534f\u8bae\">DTLS\u534f\u8bae<\/h3>\n<p>DTLS\u534f\u8bae\u3002\u548cTLS\u534f\u8bae\u7c7b\u4f3c\uff0c\u4f46\u57fa\u4e8eUDP\u5b9e\u73b0\u3002CoAP\u534f\u8bae\u662f\u5728DTLS\u534f\u8bae\u57fa\u7840\u4e0a\u5b9e\u73b0\u7684\u52a0\u5bc6\u4f20\u8f93\u3002<\/p>\n<h3 id=\"ssh\u534f\u8bae\">SSH\u534f\u8bae<\/h3>\n<p>SSH\u534f\u8bae\u3002SSH\u534f\u8bae\u652f\u6301\u53e3\u4ee4\u548c\u975e\u5bf9\u79f0\u5bc6\u7801\u9a8c\u8bc1\u3002\u975e\u5bf9\u79f0\u5bc6\u7801\u9a8c\u8bc1\u662f\u5c06\u516c\u94a5\u5b58\u5728\u670d\u52a1\u5668\u4e2d\uff0c\u79c1\u94a5\u5b58\u50a8\u5728\u5ba2\u6237\u7aef\u4e2d\u3002IoT\u8bbe\u5907\u4e00\u822c\u4f5c\u4e3a\u670d\u52a1\u5668\u7aef\uff0c\u5f88\u5c11\u4f5c\u4e3a\u5ba2\u6237\u7aef\uff0c\u56e0\u6b64\u4e5f\u4e0d\u5b58\u50a8\u79c1\u94a5\u3002<\/p>\n<h3 id=\"ipsec\u534f\u8bae\">IPSec\u534f\u8bae<\/h3>\n<p>IPSec\u534f\u8bae\u3002IP\u5c42\u7684\u5b89\u5168\u534f\u8bae\uff0c\u4e00\u822c\u7528\u4e8eVPN\u8fde\u63a5\uff0c\u914d\u7f6e\u8fc7\u7a0b\u8f83\u4e3a\u590d\u6742\u3002\u540c\u6837\u57fa\u4e8eX.509\u8bc1\u4e66\uff0c\u8ba4\u8bc1\u8fc7\u7a0b\u8981\u6c42\u53cc\u65b9\u5747\u63d0\u4f9b\u8bc1\u4e66\u3002\u76f8\u5e94\u7684\uff0c\u53cc\u65b9\u5747\u5b58\u50a8\u81ea\u5df1\u7684\u79c1\u94a5\u3002<\/p>\n<h3 id=\"\u5176\u4ed6\u79c1\u6709\u534f\u8bae\">\u5176\u4ed6\u79c1\u6709\u534f\u8bae<\/h3>\n<p>\u5176\u4ed6\u79c1\u6709\u534f\u8bae\u3002\u5382\u5546\u5728TCP\/HTTP\u7b49\u534f\u8bae\u57fa\u7840\u4e0a\u81ea\u884c\u5b9e\u73b0\u7684\u5168\u6d41\u91cf\u52a0\u5bc6\u6216\u90e8\u5206\u52a0\u5bc6\u7684\u534f\u8bae\u3002<\/p>\n<hr\/>\r\n<ul>\n<li>\u6b22\u8fce<a href=\"https:\/\/github.com\/m2kar\/m2kar.github.io\/issues\/25\">\u8bc4\u8bba<\/a>\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002<\/li>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar((<a href=\"https:\/\/m2kar.cn\">https:\/\/m2kar.cn<\/a>)) \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u53d1\u90ae\u4ef6\u5f81\u6c42\u4f5c\u8005\u540c\u610f\uff0c\u5e76\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u5408\u89c4\u58f0\u660e<\/strong>: \u672c\u6587\u4ec5\u9650\u4e8e\u6280\u672f\u4ea4\u6d41\uff0c\u8bf7\u8bfb\u8005\u9075\u5b88\u5f53\u5730\u6cd5\u5f8b\uff0c\u5982\u9020\u6210\u4fb5\u6743\u3001\u8fdd\u6cd5\u3001\u72af\u7f6a\u884c\u4e3a\uff0c\u4e0e\u672c\u6587\u65e0\u5173\u3002\u5982\u672c\u6587\u4fb5\u72af\u5230\u60a8\u7684\u6743\u5229\uff0c\u8bf7\u53d1\u90ae\u4ef6\u544a\u77e5\uff0c\u672c\u7ad9\u5c06\u4f1a\u505a\u51fa\u9002\u5f53\u5904\u7406\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <code>m2kar.cn&lt;at&gt;gmail.com<\/code><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>\n<hr\/>\r\n<p><strong>\u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba<\/strong>: <a href=\"https:\/\/github.com\/m2kar\/m2kar.github.io\/issues\/25\">m2kar\/m2kar.github.io#25<\/a><\/p>","title":"[\u6280\u672f\u5206\u4eab] \u5de5\u63a7\u7269\u8054\u7f51\u4e2d\u975e\u5bf9\u79f0\u52a0\u5bc6\u534f\u8bae\u5206\u6790"},{"content":"[IoT\u5b89\u5168]CVE-2018-5767\u5206\u6790\u548c\u590d\u73b0 0x00 \u6458\u8981 0x01 \u56fa\u4ef6\u4ecb\u7ecd \u56fa\u4ef6\u540d\u79f0\uff1a US_AC15V1.0BR_V15.03.1.16_multi_TD01.rar \u8be5\u56fa\u4ef6\u7528\u4e8e\u817e\u8fbeAC15V1.0\u7248\u672c\u7684WiFi\u8def\u7531\u5668\u4ea7\u54c1\u3002AC15V1.0\u662f\u8be5\u5382\u5546\u63a8\u51fa\u7684\u4e2d\u9ad8\u7aef\u53cc\u9891AC\u7cfb\u5217\u667a\u80fdWiFi\u8def\u7531\u5668\u3002\u8be5\u4ea7\u54c1\u652f\u6301802.11ac\u6807\u51c6,\u91c7\u7528Broadcom\u56db\u6838\u5904\u7406\u5668,\u914d\u59074\u4e2a\u9ad8\u589e\u76ca\u5185\u7f6e\u5929\u7ebf,\u53ef\u63d0\u4f9b\u7a33\u5b9a\u7684WiFi\u4fe1\u53f7\u3002\u56fa\u4ef6\u7248\u672c\u4e3aV15.03.1.16,\u652f\u6301\u591a\u8bed\u8a00\u7248\u672c\uff0c\u53d1\u5e03\u65f6\u95f4\u4e3a2015\u5e74\u3002\u6839\u636e\u56fa\u4ef6\u540d\u79f0\u63a8\u6d4b\u8be5\u8bbe\u5907\u4e3b\u8981\u7528\u4e8e\u7f8e\u56fd\u5e02\u573a\u3002\n\u56fa\u4ef6\u4e0b\u8f7d\u5730\u5740\uff1ahttps:\/\/us.softpedia-secure-download.com\/dl\/50b0d70af21488030c14cb2bd30e63b3\/63008144\/300482999\/drivers\/router\/US_AC15V1.0BR_V15.03.1.16_multi_TD01.rar 0x02 \u73af\u5883\u642d\u5efa \u6700\u8fd1\u5728\u7528manjaro\u7cfb\u7edf\uff0c\u5148\u8e29\u8e29\u73af\u5883\u7684\u5751\u3002\n\u8f6f\u4ef6:\nbinwalk ghidra FirmAE binwalk\u5b89\u88c5\u8e29\u5751 Manjaro\u53ef\u901a\u8fc7yay -S binwalk\u5b89\u88c5binwalk\u3002\u4f5c\u8005\u5b89\u88c5\u540e\u7f3a\u5931sasquatch\uff0c\u901a\u8fc7\u989d\u5916\u5b89\u88c5sasquatch-git\u5305\u89e3\u51b3\u3002\nFirmAE \u5728Manjaro\u4e0a\u914d\u7f6e\u6709\u4e9b\u95ee\u9898\uff0c\u6240\u4ee5\u8fd9\u91cc\u4f7f\u7528Docker\u7684\u65b9\u5f0f\u5b89\u88c5\u3002 (ps: Manjaro\u786e\u5b9e\u597d\u7528\uff0c\u4f46\u5927\u5bb6\u90fd\u5728\u7528kali\/ubuntu\uff0c\u6240\u4ee5\u751f\u6001\u4e0a\u5404\u79cd\u5c0f\u95ee\u9898)\n\u4f7f\u7528docker\u914d\u7f6eFirmAE\u7684\u6b65\u9aa4\u53ef\u53c2\u8003( https:\/\/github.com\/pr0v3rbs\/FirmAE\/tree\/master#docker)\n\u9488\u5bf9\u5b89\u88c5\u4e2d\u9047\u5230\u7684\u5404\u79cd\u56fd\u5185\u7f51\u7edc\u65e0\u6cd5\u8bbf\u95ee\u7684\u95ee\u9898\uff0c\u4f5c\u8005\u7528\u4e86\u7528\u4e86\u4e00\u53f0\u5df2root\u7684\u5b89\u5353\u624b\u673a\u4f5c\u4e3a\u900f\u660e\u4ee3\u7406\uff0c\u53ef\u4ee5\u89e3\u51b3\u7edd\u5927\u591a\u6570\u7f51\u7edc\u95ee\u9898\u3002\u5177\u4f53\u662f\u4f7f\u7528\u4e86VPN Hotspot\u8fd9\u4e2a\u8f6f\u4ef6\uff0c\u53ef\u53c2\u8003\u8fd9\u7bc7\u6587\u7ae0( https:\/\/vkuajing.net\/vpn-hotspot-wifi\/)\n0x03 \u89e3\u5305 \u76f4\u63a5\u8c03\u7528binwalk\u89e3\u5305\uff0c\u5e38\u89c4\u64cd\u4f5c\u3002\n$ binwalk -Me fw.bin\r$ ls _fw.bin.extracted\/squashfs-root bin etc home lib proc sbin tmp var webroot_ro\rdev etc_ro init mnt root sys usr webroot 0x04 \u6f0f\u6d1e\u539f\u7406 0x05 \u6a21\u62df\u542f\u52a8 0x06 PoC\u9a8c\u8bc1 \u53c2\u8003 IoT \u5b89\u5168\u4e4b CVE-2018-5767 \u5206\u6790 : https:\/\/paper.seebug.org\/2065\/ \u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar((https:\/\/m2kar.cn)) \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u53d1\u90ae\u4ef6\u5f81\u6c42\u4f5c\u8005\u540c\u610f\uff0c\u5e76\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u5408\u89c4\u58f0\u660e: \u672c\u6587\u4ec5\u9650\u4e8e\u6280\u672f\u4ea4\u6d41\uff0c\u8bf7\u8bfb\u8005\u9075\u5b88\u5f53\u5730\u6cd5\u5f8b\uff0c\u5982\u9020\u6210\u4fb5\u6743\u3001\u8fdd\u6cd5\u3001\u72af\u7f6a\u884c\u4e3a\uff0c\u4e0e\u672c\u6587\u65e0\u5173\u3002\u5982\u672c\u6587\u4fb5\u72af\u5230\u60a8\u7684\u6743\u5229\uff0c\u8bf7\u53d1\u90ae\u4ef6\u544a\u77e5\uff0c\u672c\u7ad9\u5c06\u4f1a\u505a\u51fa\u9002\u5f53\u5904\u7406\u3002 \u4f5c\u8005: m2kar \u90ae\u7bb1: m2kar.cn&lt;at&gt;gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f \u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba: m2kar\/m2kar.github.io#24\n","permalink":"https:\/\/m2kar.cn\/posts\/20230815-iot%E5%AE%89%E5%85%A8cve-2018-5767%E5%88%86%E6%9E%90%E5%92%8C%E5%A4%8D%E7%8E%B0\/","summary":"<h1 id=\"iot\u5b89\u5168cve-2018-5767\u5206\u6790\u548c\u590d\u73b0\">[IoT\u5b89\u5168]CVE-2018-5767\u5206\u6790\u548c\u590d\u73b0<\/h1>\n<h2 id=\"0x00-\u6458\u8981\">0x00 \u6458\u8981<\/h2>\n<h2 id=\"0x01-\u56fa\u4ef6\u4ecb\u7ecd\">0x01 \u56fa\u4ef6\u4ecb\u7ecd<\/h2>\n<ul>\n<li><code>\u56fa\u4ef6\u540d\u79f0<\/code>\uff1a US_AC15V1.0BR_V15.03.1.16_multi_TD01.rar<\/li>\n<\/ul>\n<p>\u8be5\u56fa\u4ef6\u7528\u4e8e\u817e\u8fbeAC15V1.0\u7248\u672c\u7684WiFi\u8def\u7531\u5668\u4ea7\u54c1\u3002AC15V1.0\u662f\u8be5\u5382\u5546\u63a8\u51fa\u7684\u4e2d\u9ad8\u7aef\u53cc\u9891AC\u7cfb\u5217\u667a\u80fdWiFi\u8def\u7531\u5668\u3002\u8be5\u4ea7\u54c1\u652f\u6301802.11ac\u6807\u51c6,\u91c7\u7528Broadcom\u56db\u6838\u5904\u7406\u5668,\u914d\u59074\u4e2a\u9ad8\u589e\u76ca\u5185\u7f6e\u5929\u7ebf,\u53ef\u63d0\u4f9b\u7a33\u5b9a\u7684WiFi\u4fe1\u53f7\u3002\u56fa\u4ef6\u7248\u672c\u4e3aV15.03.1.16,\u652f\u6301\u591a\u8bed\u8a00\u7248\u672c\uff0c\u53d1\u5e03\u65f6\u95f4\u4e3a2015\u5e74\u3002\u6839\u636e\u56fa\u4ef6\u540d\u79f0\u63a8\u6d4b\u8be5\u8bbe\u5907\u4e3b\u8981\u7528\u4e8e\u7f8e\u56fd\u5e02\u573a\u3002<\/p>\n<ul>\n<li><code>\u56fa\u4ef6\u4e0b\u8f7d\u5730\u5740<\/code>\uff1a<code>https:\/\/us.softpedia-secure-download.com\/dl\/50b0d70af21488030c14cb2bd30e63b3\/63008144\/300482999\/drivers\/router\/US_AC15V1.0BR_V15.03.1.16_multi_TD01.rar<\/code><\/li>\n<\/ul>\n<h2 id=\"0x02-\u73af\u5883\u642d\u5efa\">0x02 \u73af\u5883\u642d\u5efa<\/h2>\n<p>\u6700\u8fd1\u5728\u7528manjaro\u7cfb\u7edf\uff0c\u5148\u8e29\u8e29\u73af\u5883\u7684\u5751\u3002<\/p>\n<p>\u8f6f\u4ef6:<\/p>\n<ul>\n<li>binwalk<\/li>\n<li>ghidra<\/li>\n<li>FirmAE<\/li>\n<\/ul>\n<h3 id=\"binwalk\u5b89\u88c5\u8e29\u5751\">binwalk\u5b89\u88c5\u8e29\u5751<\/h3>\n<p>Manjaro\u53ef\u901a\u8fc7<code>yay -S binwalk<\/code>\u5b89\u88c5binwalk\u3002\u4f5c\u8005\u5b89\u88c5\u540e\u7f3a\u5931<code>sasquatch<\/code>\uff0c\u901a\u8fc7\u989d\u5916\u5b89\u88c5<code>sasquatch-git<\/code>\u5305\u89e3\u51b3\u3002<\/p>\n<h3 id=\"firmae\">FirmAE<\/h3>\n<p>\u5728Manjaro\u4e0a\u914d\u7f6e\u6709\u4e9b\u95ee\u9898\uff0c\u6240\u4ee5\u8fd9\u91cc\u4f7f\u7528Docker\u7684\u65b9\u5f0f\u5b89\u88c5\u3002 (ps: Manjaro\u786e\u5b9e\u597d\u7528\uff0c\u4f46\u5927\u5bb6\u90fd\u5728\u7528kali\/ubuntu\uff0c\u6240\u4ee5\u751f\u6001\u4e0a\u5404\u79cd\u5c0f\u95ee\u9898)<\/p>\n<p>\u4f7f\u7528docker\u914d\u7f6eFirmAE\u7684\u6b65\u9aa4\u53ef\u53c2\u8003( <a href=\"https:\/\/github.com\/pr0v3rbs\/FirmAE\/tree\/master#docker\">https:\/\/github.com\/pr0v3rbs\/FirmAE\/tree\/master#docker<\/a>)<\/p>\n<blockquote>\n<p>\u9488\u5bf9\u5b89\u88c5\u4e2d\u9047\u5230\u7684\u5404\u79cd\u56fd\u5185\u7f51\u7edc\u65e0\u6cd5\u8bbf\u95ee\u7684\u95ee\u9898\uff0c\u4f5c\u8005\u7528\u4e86\u7528\u4e86\u4e00\u53f0\u5df2root\u7684\u5b89\u5353\u624b\u673a\u4f5c\u4e3a\u900f\u660e\u4ee3\u7406\uff0c\u53ef\u4ee5\u89e3\u51b3\u7edd\u5927\u591a\u6570\u7f51\u7edc\u95ee\u9898\u3002\u5177\u4f53\u662f\u4f7f\u7528\u4e86<code>VPN Hotspot<\/code>\u8fd9\u4e2a\u8f6f\u4ef6\uff0c\u53ef\u53c2\u8003\u8fd9\u7bc7\u6587\u7ae0( <a href=\"https:\/\/vkuajing.net\/vpn-hotspot-wifi\/\">https:\/\/vkuajing.net\/vpn-hotspot-wifi\/<\/a>)<\/p>\n<\/blockquote>\n<h2 id=\"0x03-\u89e3\u5305\">0x03 \u89e3\u5305<\/h2>\n<p>\u76f4\u63a5\u8c03\u7528binwalk\u89e3\u5305\uff0c\u5e38\u89c4\u64cd\u4f5c\u3002<\/p>\n<pre tabindex=\"0\"><code>$ binwalk -Me fw.bin\r\n\r\n$ ls _fw.bin.extracted\/squashfs-root \r\nbin  etc     home  lib  proc  sbin  tmp  var      webroot_ro\r\ndev  etc_ro  init  mnt  root  sys   usr  webroot\n<\/code><\/pre><h2 id=\"0x04-\u6f0f\u6d1e\u539f\u7406\">0x04 \u6f0f\u6d1e\u539f\u7406<\/h2>\n<h2 id=\"0x05-\u6a21\u62df\u542f\u52a8\">0x05 \u6a21\u62df\u542f\u52a8<\/h2>\n<h2 id=\"0x06-poc\u9a8c\u8bc1\">0x06 PoC\u9a8c\u8bc1<\/h2>\n<h2 id=\"\u53c2\u8003\">\u53c2\u8003<\/h2>\n<ul>\n<li>IoT \u5b89\u5168\u4e4b CVE-2018-5767 \u5206\u6790 : <a href=\"https:\/\/paper.seebug.org\/2065\/\">https:\/\/paper.seebug.org\/2065\/<\/a><\/li>\n<\/ul>\n<hr\/>\r\n<ul>\n<li>\u6b22\u8fce<a href=\"https:\/\/github.com\/m2kar\/m2kar.github.io\/issues\/24\">\u8bc4\u8bba<\/a>\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002<\/li>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar((<a href=\"https:\/\/m2kar.cn\">https:\/\/m2kar.cn<\/a>)) \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u53d1\u90ae\u4ef6\u5f81\u6c42\u4f5c\u8005\u540c\u610f\uff0c\u5e76\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u5408\u89c4\u58f0\u660e<\/strong>: \u672c\u6587\u4ec5\u9650\u4e8e\u6280\u672f\u4ea4\u6d41\uff0c\u8bf7\u8bfb\u8005\u9075\u5b88\u5f53\u5730\u6cd5\u5f8b\uff0c\u5982\u9020\u6210\u4fb5\u6743\u3001\u8fdd\u6cd5\u3001\u72af\u7f6a\u884c\u4e3a\uff0c\u4e0e\u672c\u6587\u65e0\u5173\u3002\u5982\u672c\u6587\u4fb5\u72af\u5230\u60a8\u7684\u6743\u5229\uff0c\u8bf7\u53d1\u90ae\u4ef6\u544a\u77e5\uff0c\u672c\u7ad9\u5c06\u4f1a\u505a\u51fa\u9002\u5f53\u5904\u7406\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <code>m2kar.cn&lt;at&gt;gmail.com<\/code><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>\n<hr\/>\r\n<p><strong>\u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba<\/strong>: <a href=\"https:\/\/github.com\/m2kar\/m2kar.github.io\/issues\/24\">m2kar\/m2kar.github.io#24<\/a><\/p>","title":"[IoT\u5b89\u5168]CVE-2018-5767\u5206\u6790\u548c\u590d\u73b0"},{"content":"0x0 \u8bba\u6587\u4fe1\u606f \u6807\u9898: How Machine Learning Is Solving the Binary Function Similarity Problem \u4f5c\u8005: Andrea Marcelli, Mariano Graziano, Xabier Ugarte-Pedrero, and Yanick Fratantonio, Cisco Systems, Inc.; Mohamad Mansouri and Davide Balzarotti, EURECOM \u5173\u952e\u5b57: \u4e8c\u8fdb\u5236\u5b89\u5168 \u6765\u6e90: SEC'22 \u94fe\u63a5: https:\/\/www.usenix.org\/conference\/usenixsecurity22\/presentation\/marcelli \u5b9e\u9a8c\u4ee3\u7801: https:\/\/github.com\/Cisco-Talos\/binary_function_similarity 0x0 \u590d\u73b0\u73af\u5883 Window Ubuntu18.04(in WSL) \u7531\u4e8e\u73af\u5883\u4f9d\u8d56\u95ee\u9898\uff0c\u672c\u4eba\u590d\u73b0\u65f6\u4f1a\u5728Windows\u548cWSL\u4e4b\u95f4\u5207\u6362\uff0c\u6d89\u53ca\u5230IDA Pro\u7684\u90e8\u5206\u4f7f\u7528Windows\uff0c\u5176\u4ed6\u90e8\u5206\u4f7f\u7528WSL\nIDA Pro 7.3 For Windows capstone 3.0.5 Python 3.8.16 Python 2.7.13 0x01 \u6570\u636e\u83b7\u53d6 \u8bad\u7ec3\u6240\u9700\u7684\u6570\u636e\u4f5c\u8005\u5747\u6574\u7406\u5230\u4e86Google\u4e91\u76d8\uff0c\u5e76\u53ef\u901a\u8fc7gdrive_download.py\u811a\u672c\u4e0b\u8f7d\u3002\npython gdrive_download.py --binaries --features --results \u65e7\u7248\u672c\u7684\u4ee3\u7801\u4e2d\u7684gdown\u7248\u672c\u4e0d\u517c\u5bb9\uff0c\u9700\u8981\u5b89\u88c5gdown==4.6.4\uff0c\u6700\u65b0\u7248\u672c\u5df2\u89e3\u51b3\u6b64\u95ee\u9898\n0x02 \u6570\u636e\u96c6\u5904\u7406 \u6570\u636e\u96c6\u5904\u7406\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\n\u7f16\u8bd1\uff1a\u6539\u53d8\u914d\u7f6e\uff0c\u57fa\u4e8e\u6e90\u7801\uff0c\u7f16\u8bd1\u751f\u6210\u4e0d\u540c\u6307\u4ee4\u96c6\u67b6\u6784\u3001\u4f18\u5316\u9009\u9879\u3001\u7f16\u8bd1\u5668\u7c7b\u578b\u3001\u7f16\u8bd1\u5668\u7248\u672c\u7684\u4e8c\u8fdb\u5236Binary \u751f\u6210IDB\uff1a\u901a\u8fc7IDA Pro\uff0c\u57fa\u4e8eBinary\u751f\u6210IDB \u751f\u6210\u4ee3\u7801\u56fe\u6570\u636e\uff1a\u901a\u8fc7IDA Pro\u7684\u6269\u5c55\u63d2\u4ef6\uff0c\u57fa\u4e8eIDB\u751f\u6210Flow\u56fe\u3001ACFG\u6c47\u7f16\u4ee3\u7801\u548cACFG\u7279\u5f81 \u6570\u636e\u7b5b\u9009\u6e05\u6d17\uff1a \u751f\u6210\u51fd\u6570\u5bf9\uff1a\u6839\u636e\u5b9e\u9a8c\u7ec4\u4e2d\u7684\u7f16\u8bd1\u4f18\u5316\u3001\u6307\u4ee4\u96c6\u7b49\u5f02\u540c\uff0c\u7ec4\u5408\u751f\u6210\u7528\u4e8e\u8bad\u7ec3\u7684\u51fd\u6570\u5bf9 \u6570\u636e\u96c6\u62c6\u5206\uff1a\u62c6\u5206\u5f97\u5230\u8bad\u7ec3\u3001\u9a8c\u8bc1\u3001\u6d4b\u8bd5\u96c6 0x02.1 \u7f16\u8bd1 \u53c2\u770b\u4ee3\u7801\u7684 Binaries\/Compilation scripts\/README.md \u90e8\u5206\uff0c\u672c\u6587\u4e0d\u8be6\u7ec6\u4ecb\u7ecd\u3002\n0x02.2 \u751f\u6210IDB \u914d\u7f6eIDA Pro \u9996\u5148\u9700\u8981\u89e3\u51b3IDA Pro\u7684\u5b89\u88c5\u95ee\u9898\u3002\u4f5c\u8005\u5efa\u8bae\u4f7f\u7528IDA Pro 7.3\u7248\u672c\u8fdb\u884c\u5b9e\u9a8c\uff0c\u4f46\u7531\u4e8eIDA Pro 7.3 for linux\u7684\u8d44\u6e90\u5f88\u96be\u627e\uff0c\u6240\u4ee5\u672c\u4eba\u5728\u590d\u73b0\u7684\u65f6\u5019\u4f7f\u7528\u4e86Windows\u7248\u672c\u7684IDA Pro\uff0c\u4ee3\u7801\u53ef\u4ee5\u5b8c\u7f8e\u8fd0\u884c\u3002\n\u5728\u6b64\u4e4b\u524d\u9700\u8981\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u6307\u5b9aIDA pro\u7684\u4f4d\u7f6e\u3002\n# \u5728powershell\u4e0b\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf $env:IDA_PATH=&#39;D:\\IDA 7.3\\ida64.exe&#39; \u6216\u8005\u4e5f\u53ef\u4ee5\u901a\u8fc7WSL\u8c03\u7528\u5bbf\u4e3b\u673a\u7684IDA pro\nexport IDA_PATH=\/mnt\/d\/IDA\\ 7.3\/ida64.exe \u8fd0\u884c\u751f\u6210IDB \u73af\u5883\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u53ef\u901a\u8fc7\u8fd0\u884cIDA_scripts\/generate_idbs.py\u751f\u6210IDB\npython3 generate_idbs.py \u5176\u4e2d--db1 --db2 --dbvuln\u53c2\u6570\u53ef\u4ee5\u4efb\u610f\u7ec4\u5408\u3002\n\u6210\u529f\u8fd0\u884c\u7ed3\u679c\uff1a\n\u4ee3\u7801\u89e3\u6790\uff1a # \u7b2c72\u884c def export_idb(input_path, output_path): &#34;&#34;&#34;\u8fd0\u884cIDA Pro\u5e76\u5bfc\u51faIDB&#34;&#34;&#34; try: print(&#34;Export IDB for {}&#34;.format(input_path)) ida_output = str(subprocess.check_output([ IDA_PATH, &#34;-L{}&#34;.format(LOG_PATH), # name of the log file. &#34;Append mode&#34; &#34;-a-&#34;, # enables auto analysis &#34;-B&#34;, # batch mode. IDA will generate .IDB and .ASM files &#34;-o{}&#34;.format(output_path), input_path ])) $ ida64.exe -L debug.log -a- -B -obinaryfile.idb \/path\/to\/binaryfile 0x02.3 \u751f\u6210\u4ee3\u7801\u56fe\u6570\u636e \u901a\u8fc7IDA Pro\u7684\u6269\u5c55\u63d2\u4ef6\uff0c\u57fa\u4e8eIDB\u751f\u6210Flow\u56fe\u3001ACFG\u6c47\u7f16\u4ee3\u7801\u548cACFG\u7279\u5f81\u3002\n\u5b89\u88c5capstone\u63d2\u4ef6 \u672c\u6b65\u9aa4\u9700\u8981\u5728IDA pro\u7684python\u73af\u5883\u4e2d\u5b89\u88c5\u8fd0\u884ccapstone 3.0.4\u3002\u4f46\u7531\u4e8eida pro 7.3\u7684Linux\u7248\u672c\u4e0d\u597d\u627e\uff0c\u56e0\u6b64\u4f7f\u7528\u5728WSL\u4e2d\u8c03\u7528\u5bbf\u4e3b\u673a\u7684IDA Pro 7.3\u7684\u65b9\u5f0f\u6765\u8fd0\u884c\uff0c\u8fd9\u5c31\u9700\u8981\u5728IDA Pro 7.3\u7684python2.7\u73af\u5883\u4e2d\u5b89\u88c5capstone\u5305\u3002\u4f5c\u8005\u4f7f\u7528\u7684\u662fLinux\u73af\u5883\uff0c\u5b89\u88c5\u4e09\u65b9\u5305\u66f4\u5bb9\u6613\u3002\n\u56e0\u6b64\u672c\u4eba\u9009\u62e9\u5728window\u4e0b\u9700\u8981\u989d\u5916\u5b89\u88c5python 2.7 x64\uff0c\u5e76\u5728\u8be5\u73af\u5883\u4e2d\u5b89\u88c5capstone\u3002\n\u9996\u5148\u5c1d\u8bd5\u4f7f\u7528pip\u5b89\u88c5\uff0c\u4f46\u7531\u4e8e\u7f16\u8bd1\u95ee\u9898\u5bfc\u81f4\u7f16\u8bd1\u5931\u8d25\u3002\uff08Windows\u4e0b\uff0c\u6d89\u53caC\u4ee3\u7801\u7684pypi\u6269\u5c55\u5305\u7f16\u8bd1\u5b89\u88c5\u662f\u4e2a\u5927\u5751\uff09\n\u4ece\u9879\u76ee\u4e3b\u9875\u627e\u5230\u4e86\u9002\u7528\u4e8eWindows\u7684\u9884\u7f16\u8bd1\u5305\uff0c\u7531\u4e8e3.0.4\u7248\u672c\u672a\u653e\u51fa\u9884\u7f16\u8bd1\u5305\uff0c\u56e0\u6b64\u4f7f\u7528\u4e863.0.5\u7248\u672c\u3002\n\u94fe\u63a5\uff1ahttps:\/\/github.com\/capstone-engine\/capstone\/releases\/tag\/3.0.5\n\u4e0b\u8f7d\u5176\u4e2d\u7684msi\u5305\uff0c\u8fd0\u884c\uff0c\u9009\u62e9python2.7\u7684\u5b89\u88c5\u76ee\u5f55\u5373\u53ef\u5b89\u88c5\u3002\n\u5b89\u88c5\u6210\u529f\u540e\u5728ida python\u4e2d\u6210\u529fimport capstone\u3002\n\u751f\u6210Flow\u56fe \u5728IDA_scripts\\IDA_flowchart\u4e0b\u6267\u884c\uff1a\n#powershell $env:IDA_PATH=&#39;D:\\IDA 7.3\\ida64.exe&#39; python .\\cli_flowchart.py -i ..\\..\\IDBs\\Dataset-1\\ -o flowchart_Dataset-1.csv \u8fd0\u884c\u6210\u529f\u622a\u56fe\uff1a\n\u5982\u5728WSL\u4e0b\u8fd0\u884c\uff0c\u9700\u8981\u5904\u7406\u4f9d\u8d56\u8def\u5f84\u8f6c\u6362\u7684\u95ee\u9898\u3002\n\u751f\u6210ACFG\u6c47\u7f16\u4ee3\u7801 \u672c\u6b65\u9aa4\u53ef\u4ee5\u5bf9\u9009\u5b9a\u7684\u51fd\u6570\u751f\u6210ACFG\u3002\u5305\u62ec\u51fd\u6570\u4e2d\u6d89\u53ca\u7684\u57fa\u672c\u5757\u3001\u6c47\u7f16\u6307\u4ee4\u3001\u63a7\u5236\u6d41\u56fe\u7684\u8fb9\u7ed3\u6784\u7b49\u3002\n\u8fd0\u884c\u65b9\u5f0f\uff1a \u5728IDA_Script\/IDA_acfg_disam\u4e0b\u8fd0\u884ccli_acfg_disam.py\n\u793a\u4f8b(poweshell)\uff1a\n$env:IDA_PATH=&#39;D:\\IDA 7.3\\ida64.exe&#39; python cli_acfg_disasm.py -j ..\/..\/DBs\/Dataset-Vulnerability\/features\/selected_Dataset-Vulnerability.json -o acfg_disam_Dataset-Vulnerability2 \/\/ \u793a\u4f8b\u6587\u4ef6: ACFG_arm32-clang-3.5-O0_afalg.so_acfg_disasm.json { &#34;IDBs\/Dataset-1\/openssl\/arm32-clang-3.5-O0_afalg.so.i64&#34;: { &#34;arch&#34;: &#34;arm-32&#34;, &#34;0x215c&#34;: { \/\/ \u51fd\u6570\u5730\u5740 &#34;elapsed_time&#34;: 0.0019881725311279297, &#34;nodes&#34;: [ \/\/ \u63a7\u5236\u6d41\u56fe\u8282\u70b9,\u5373\u6bcf\u4e2a\u57fa\u672c\u5757\u7684\u7f16\u53f7 8640, 8584, 8652, 8588, 8660, 8620, 8540 ], &#34;edges&#34;: [ \/\/\u63a7\u5236\u6d41\u56fe\u7684\u8fb9 [ 8620, 8640 ], [ 8588, 8620 ], [ 8584, 8620 ], [ 8620, 8652 ], \/\/ ... ], &#34;basic_blocks&#34;: { \/\/\u6bcf\u4e2a\u57fa\u672c\u5757\u7684\u8be6\u7ec6\u4fe1\u606f &#34;8640&#34;: { \/\/\u57fa\u672c\u5757\u7f16\u53f7 &#34;bb_len&#34;: 12, \/\/\u57fa\u672c\u5757\u957f\u5ea6 &#34;bb_mnems&#34;: [ &#34;movw&#34;, &#34;str&#34;, &#34;b&#34; ], \/\/\u57fa\u672c\u5757\u4e2d\u7684\u6307\u4ee4(\u7b80\u5316\u7248) &#34;bb_norm&#34;: [ &#34;movw_r0,_0x0&#34;, &#34;str_r0,_[fp-4]&#34;, &#34;b_himm&#34; ], \/\/\u57fa\u672c\u5757\u4e2d\u7684\u6307\u4ee4(\u6807\u51c6\u7248) &#34;bb_disasm&#34;: [ &#34;movw r0, #0&#34;, &#34;str r0, [fp, #-4]&#34;, &#34;b #0x21d4&#34; ], \/\/\u57fa\u672c\u5757\u4e2d\u7684\u6307\u4ee4(\u53cd\u6c47\u7f16) &#34;b64_bytes&#34;: &#34;AAAA4wQAC+UBAADq&#34;, \/\/\u57fa\u672c\u5757\u7684\u5b57\u8282\u7801 &#34;bb_heads&#34;: [ 8640, 8644, 8648 ] \/\/\u57fa\u672c\u5757\u7684\u5934\u90e8 }, &#34;8584&#34;: {\/* ...*\/ } \/\/, \/\/ ... } } } } \u751f\u6210ACFG\u7279\u5f81 0x02.4 \u6570\u636e\u7b5b\u9009\u6e05\u6d17 0x02.5 \u751f\u6210\u51fd\u6570\u5bf9 \u6839\u636e\u5b9e\u9a8c\u7ec4\u4e2d\u7684\u7f16\u8bd1\u4f18\u5316\u3001\u6307\u4ee4\u96c6\u7b49\u5f02\u540c\uff0c\u7ec4\u5408\u751f\u6210\u7528\u4e8e\u8bad\u7ec3\u7684\u51fd\u6570\u5bf9\u3002\n0x02.6 \u6570\u636e\u96c6\u62c6\u5206\uff1a\u62c6\u5206\u5f97\u5230\u8bad\u7ec3\u3001\u9a8c\u8bc1\u3001\u6d4b\u8bd5\u96c6 0x03 \u590d\u73b0Asm2Vec &amp; Doc2vec\u5b9e\u9a8c Asm2vec\u548cDoc2vec\u5b9e\u73b0\u7531\u4e24\u4e2a\u6a21\u5757\u6784\u6210\u3002\u7b2c\u4e00\u4e2a\u6a21\u5757\u4ee5ACFG\u9006\u5411\u6570\u636e\u4e3a\u8f93\u5165\uff0c\u5e76\u8f93\u51fa\u6240\u9009\u51fd\u6570\u7684\u968f\u673a\u8def\u5f84\u3002\u7136\u540e\uff0c\u8fd9\u4e9b\u968f\u673a\u8def\u5f84\u4f5c\u4e3a\u673a\u5668\u5b66\u4e60\u7b2c\u4e8c\u90e8\u5206\u7684\u8f93\u5165\u3002\n\u5f85\u8865\u5145 \u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn&lt;at&gt;gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f \u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba: m2kar\/m2kar.github.io#19\n","permalink":"https:\/\/m2kar.cn\/posts\/20230319-%E5%AE%9E%E9%AA%8C%E5%A4%8D%E7%8E%B0-how-machine-learning-is-solving-the-binary-function-similarity-problem\/","summary":"<h2 id=\"0x0-\u8bba\u6587\u4fe1\u606f\">0x0 \u8bba\u6587\u4fe1\u606f<\/h2>\n<ul>\n<li><strong>\u6807\u9898:<\/strong>  How Machine Learning Is Solving the Binary Function Similarity Problem<\/li>\n<li><strong>\u4f5c\u8005:<\/strong> Andrea Marcelli, Mariano Graziano, Xabier Ugarte-Pedrero, and Yanick Fratantonio, Cisco Systems, Inc.; Mohamad Mansouri and Davide Balzarotti, EURECOM<\/li>\n<li><strong>\u5173\u952e\u5b57:<\/strong> \u4e8c\u8fdb\u5236\u5b89\u5168<\/li>\n<li><strong>\u6765\u6e90:<\/strong> SEC'22<\/li>\n<li><strong>\u94fe\u63a5:<\/strong> <a href=\"https:\/\/www.usenix.org\/conference\/usenixsecurity22\/presentation\/marcelli\">https:\/\/www.usenix.org\/conference\/usenixsecurity22\/presentation\/marcelli<\/a><\/li>\n<li><strong>\u5b9e\u9a8c\u4ee3\u7801:<\/strong> <a href=\"https:\/\/github.com\/Cisco-Talos\/binary_function_similarity\">https:\/\/github.com\/Cisco-Talos\/binary_function_similarity<\/a><\/li>\n<\/ul>\n<h2 id=\"0x0-\u590d\u73b0\u73af\u5883\">0x0 \u590d\u73b0\u73af\u5883<\/h2>\n<ul>\n<li>Window<\/li>\n<li>Ubuntu18.04(in WSL)<\/li>\n<\/ul>\n<blockquote>\n<p>\u7531\u4e8e\u73af\u5883\u4f9d\u8d56\u95ee\u9898\uff0c\u672c\u4eba\u590d\u73b0\u65f6\u4f1a\u5728Windows\u548cWSL\u4e4b\u95f4\u5207\u6362\uff0c\u6d89\u53ca\u5230IDA Pro\u7684\u90e8\u5206\u4f7f\u7528Windows\uff0c\u5176\u4ed6\u90e8\u5206\u4f7f\u7528WSL<\/p>\n<\/blockquote>\n<ul>\n<li>IDA Pro 7.3 For Windows<\/li>\n<li>capstone 3.0.5<\/li>\n<li>Python 3.8.16<\/li>\n<li>Python 2.7.13<\/li>\n<\/ul>\n<h2 id=\"0x01-\u6570\u636e\u83b7\u53d6\">0x01 \u6570\u636e\u83b7\u53d6<\/h2>\n<p>\u8bad\u7ec3\u6240\u9700\u7684\u6570\u636e\u4f5c\u8005\u5747\u6574\u7406\u5230\u4e86Google\u4e91\u76d8\uff0c\u5e76\u53ef\u901a\u8fc7<code>gdrive_download.py<\/code>\u811a\u672c\u4e0b\u8f7d\u3002<\/p>\n<pre tabindex=\"0\"><code>python gdrive_download.py --binaries --features --results\n<\/code><\/pre><blockquote>\n<p>\u65e7\u7248\u672c\u7684\u4ee3\u7801\u4e2d\u7684gdown\u7248\u672c\u4e0d\u517c\u5bb9\uff0c\u9700\u8981\u5b89\u88c5gdown==4.6.4\uff0c\u6700\u65b0\u7248\u672c\u5df2\u89e3\u51b3\u6b64\u95ee\u9898<\/p>\n<\/blockquote>\n<h2 id=\"0x02-\u6570\u636e\u96c6\u5904\u7406\">0x02 \u6570\u636e\u96c6\u5904\u7406<\/h2>\n<p>\u6570\u636e\u96c6\u5904\u7406\u7684\u6b65\u9aa4\u5305\u62ec\uff1a<\/p>\n<ol>\n<li>\u7f16\u8bd1\uff1a\u6539\u53d8\u914d\u7f6e\uff0c\u57fa\u4e8e\u6e90\u7801\uff0c\u7f16\u8bd1\u751f\u6210\u4e0d\u540c\u6307\u4ee4\u96c6\u67b6\u6784\u3001\u4f18\u5316\u9009\u9879\u3001\u7f16\u8bd1\u5668\u7c7b\u578b\u3001\u7f16\u8bd1\u5668\u7248\u672c\u7684\u4e8c\u8fdb\u5236Binary<\/li>\n<li>\u751f\u6210IDB\uff1a\u901a\u8fc7IDA Pro\uff0c\u57fa\u4e8eBinary\u751f\u6210IDB<\/li>\n<li>\u751f\u6210\u4ee3\u7801\u56fe\u6570\u636e\uff1a\u901a\u8fc7IDA Pro\u7684\u6269\u5c55\u63d2\u4ef6\uff0c\u57fa\u4e8eIDB\u751f\u6210Flow\u56fe\u3001ACFG\u6c47\u7f16\u4ee3\u7801\u548cACFG\u7279\u5f81<\/li>\n<li>\u6570\u636e\u7b5b\u9009\u6e05\u6d17\uff1a<\/li>\n<li>\u751f\u6210\u51fd\u6570\u5bf9\uff1a\u6839\u636e\u5b9e\u9a8c\u7ec4\u4e2d\u7684\u7f16\u8bd1\u4f18\u5316\u3001\u6307\u4ee4\u96c6\u7b49\u5f02\u540c\uff0c\u7ec4\u5408\u751f\u6210\u7528\u4e8e\u8bad\u7ec3\u7684\u51fd\u6570\u5bf9<\/li>\n<li>\u6570\u636e\u96c6\u62c6\u5206\uff1a\u62c6\u5206\u5f97\u5230\u8bad\u7ec3\u3001\u9a8c\u8bc1\u3001\u6d4b\u8bd5\u96c6<\/li>\n<\/ol>\n<h3 id=\"0x021-\u7f16\u8bd1\">0x02.1 \u7f16\u8bd1<\/h3>\n<p>\u53c2\u770b\u4ee3\u7801\u7684 <code>Binaries\/Compilation scripts\/README.md<\/code> \u90e8\u5206\uff0c\u672c\u6587\u4e0d\u8be6\u7ec6\u4ecb\u7ecd\u3002<\/p>","title":"[\u5b9e\u9a8c\u590d\u73b0] How Machine Learning Is Solving the Binary Function Similarity Problem"},{"content":" \u6807\u9898: How Machine Learning Is Solving the Binary Function Similarity Problem \u4f5c\u8005: Andrea Marcelli, Mariano Graziano, Xabier Ugarte-Pedrero, and Yanick Fratantonio, Cisco Systems, Inc.; Mohamad Mansouri and Davide Balzarotti, EURECOM \u5173\u952e\u5b57: \u4e8c\u8fdb\u5236\u5b89\u5168 \u6765\u6e90: SEC'22 \u94fe\u63a5: https:\/\/www.usenix.org\/conference\/usenixsecurity22\/presentation\/marcelli \u672c\u6587\u662f\u5173\u4e8e\u4e8c\u8fdb\u5236\u51fd\u6570\u76f8\u4f3c\u6027\u95ee\u9898\u7684Measurement\u7814\u7a76\uff0c\u8fd9\u662f\u4e00\u4e2a\u5728\u7cfb\u7edf\u5b89\u5168\u9886\u57df\u975e\u5e38\u91cd\u8981\u548c\u5177\u6709\u6311\u6218\u6027\u7684\u95ee\u9898\u3002\u4f5c\u8005\u5bf9\u73b0\u6709\u7684\u7814\u7a76\u8fdb\u884c\u4e86\u7cfb\u7edf\u5316\u7684\u5206\u6790\uff0c\u5e76\u91cd\u65b0\u5b9e\u73b0\u4e86\u4e00\u4e9b\u4ee3\u8868\u6027\u7684\u65b9\u6cd5\uff0c\u7136\u540e\u5728\u4e00\u4e2a\u65b0\u7684\u6570\u636e\u96c6\u4e0a\u8fdb\u884c\u4e86\u516c\u5e73\u548c\u6709\u610f\u4e49\u7684\u6bd4\u8f83\u3002\u4ed6\u4eec\u53d1\u73b0\u5f53\u524d\u7684\u7814\u7a76\u5b58\u5728\u4e00\u4e9b\u4e3b\u8981\u7684\u6311\u6218\uff0c\u4f8b\u5982\u53ef\u91cd\u590d\u6027\u3001\u8bc4\u4f30\u7ed3\u679c\u7684\u4e0d\u900f\u660e\u6027\u548c\u7814\u7a76\u65b9\u5411\u7684\u4e0d\u6e05\u6670\u3002\u4ed6\u4eec\u5e0c\u671b\u901a\u8fc7\u53d1\u5e03\u4ed6\u4eec\u7684\u6574\u4e2a\u6a21\u5757\u5316\u6846\u67b6\u548c\u6570\u636e\u96c6\u6765\u6fc0\u52b1\u672a\u6765\u5728\u8fd9\u4e2a\u7814\u7a76\u9886\u57df\u7684\u5de5\u4f5c\u3002\nMeasuring Function Similarity\u00a0\u51fd\u6570\u76f8\u4f3c\u6027\u5bf9\u6bd4\u6280\u672f\u7684\u5206\u7c7b\u3002 \u76f8\u4f3c\u6027\u5bf9\u6bd4\u6280\u672f \u9996\u5148\u4ecb\u7ecd\u4e86\u4e24\u79cd\u6d4b\u91cf\u51fd\u6570\u76f8\u4f3c\u5ea6\u7684\u6280\u672f\uff1a\u76f4\u63a5\u5bf9\u6bd4\u548c\u95f4\u63a5\u5bf9\u6bd4\u6280\u672f\u3002\u76f4\u63a5\u5bf9\u6bd4\u662f\u6307\u7ed9\u5b9a\u4e00\u5bf9\u51fd\u6570\u7684\u7279\u5f81\uff0c\u7528\u673a\u5668\u5b66\u4e60\u6a21\u578b\u8f93\u51fa\u4e00\u4e2a\u76f8\u4f3c\u5ea6\u5206\u6570\u3002\u95f4\u63a5\u5bf9\u6bd4\u662f\u6307\u5c06\u8f93\u5165\u7279\u5f81\u6620\u5c04\u5230\u4e00\u4e2a&quot;\u538b\u7f29&quot;\u7684\u4f4e\u7ef4\u7a7a\u95f4\uff0c\u7136\u540e\u7528\u7b80\u5355\u7684\u8ddd\u79bb\u5ea6\u91cf\u8ba1\u7b97\u76f8\u4f3c\u5ea6\u3002\u8fd9\u4e24\u79cd\u6280\u672f\u90fd\u9700\u8981\u5b9e\u73b0\u7d22\u5f15\u7b56\u7565\u6765\u63d0\u9ad8\u641c\u7d22\u6548\u7387\u3002\n\u5176\u4e2d\u6a21\u7cca\u54c8\u5e0c\u662f\u4f4e\u7ef4\u8868\u793a\u65b9\u6cd5\u7684\u5178\u578b\u4ee3\u8868\u3002\u6a21\u7cca\u54c8\u5e0c\u662f\u7531\u4e0e\u4f20\u7edf\u5bc6\u7801\u54c8\u5e0c\u4e0d\u540c\u7684\u7b97\u6cd5\u4ea7\u751f\u7684\uff0c\u56e0\u4e3a\u5b83\u4eec\u6545\u610f\u8bbe\u8ba1\u6210\u5c06\u76f8\u4f3c\u7684\u8f93\u5165\u503c\u6620\u5c04\u5230\u76f8\u4f3c\u7684\u54c8\u5e0c\u503c\u3002Pagani\u7b49\u4eba\u7814\u7a76\u4e86\u5728\u539f\u59cb\u53ef\u6267\u884c\u6587\u4ef6\u4e0a\u8ba1\u7b97\u4f20\u7edf\u6a21\u7cca\/\u5c40\u90e8\u654f\u611f\u54c8\u5e0c\u7684\u5c40\u9650\u6027\uff0c\u5f97\u51fa\u7ed3\u8bba\uff1a\u8f93\u5165\u5b57\u8282\u7684\u5fae\u5c0f\u53d8\u5316\u4f1a\u663e\u8457\u5f71\u54cd\u751f\u6210\u7684\u54c8\u5e0c\u503c\u3002\u7136\u800c\uff0c\u5373\u4f7f\u666e\u901a\u6a21\u7cca\u54c8\u5e0c\u53ef\u80fd\u4e0d\u9002\u5408\u51fd\u6570\u76f8\u4f3c\u5ea6\uff0c\u4e00\u4e9b\u65b9\u6cd5\uff08\u5982FunctionSimSearch\uff09\u63d0\u51fa\u4e86\u66f4\u4e13\u4e1a\u7684\u54c8\u5e0c\u6280\u672f\u6765\u6bd4\u8f83\u4e24\u4e2a\u51fd\u6570\u3002\n\u53e6\u4e00\u79cd\u4f4e\u7ef4\u8868\u793a\u5f62\u5f0f\u662f\u57fa\u4e8e\u5d4c\u5165\u3002\u5d4c\u5165\u6307\u7684\u662f\u5c06\u9ad8\u7ef4\u6837\u672c\u6620\u5c04\u5230\u4e00\u4e2a\u4f4e\u7ef4\u7a7a\u95f4\uff0c\u5176\u4e2d\u8bed\u4e49\u4e0a\u76f8\u4f3c\u7684\u8f93\u5165\u88ab\u6620\u5c04\u5230\u5f7c\u6b64\u63a5\u8fd1\u7684\u70b9\uff0c\u800c\u4e0d\u7ba1\u5b83\u4eec\u5728\u539f\u59cb\u8868\u793a\u4e2d\u770b\u8d77\u6765\u6709\u591a\u4e48\u4e0d\u540c\u3002\u673a\u5668\u5b66\u4e60\u6a21\u578b\u7684\u76ee\u6807\u662f\u5b66\u4e60\u5982\u4f55\u4ea7\u751f\u5d4c\u5165\uff0c\u4f7f\u5f97\u76f8\u4f3c\u51fd\u6570\u4e4b\u95f4\u7684\u76f8\u4f3c\u5ea6\u6700\u5927\u5316\uff0c\u800c\u4e0d\u540c\u51fd\u6570\u4e4b\u95f4\u7684\u76f8\u4f3c\u5ea6\u6700\u5c0f\u5316\u3002\u5728\u6587\u732e\u4e2d\u5305\u62ec\u4e24\u79cd\u4e3b\u8981\u7c7b\u578b\u7684\u5d4c\u5165\uff1a\u51fd\u6570\u4ee3\u7801\u7ea7\u5d4c\u5165\u548c\u56fe\u7ed3\u6784\u5d4c\u5165\u3002\n\u4ee3\u7801\u5d4c\u5165\u3002\u5229\u7528\u81ea\u7136\u8bed\u8a00\u5904\u7406\uff08NLP\uff09\u6280\u672f\u6765\u89e3\u51b3\u4e8c\u8fdb\u5236\u51fd\u6570\u76f8\u4f3c\u6027\u95ee\u9898\uff0c\u628a\u6c47\u7f16\u4ee3\u7801\u5f53\u4f5c\u6587\u672c\u6765\u5904\u7406\u3002\u4ee3\u7801\u5d4c\u5165\u6839\u636e\u4e0d\u540c\u7684\u6807\u8bb0\uff08\u4f8b\u5982\u6307\u4ee4\u3001\u52a9\u8bb0\u7b26\u3001\u64cd\u4f5c\u6570\u3001\u89c4\u8303\u5316\u6307\u4ee4\uff09\u751f\u6210\u4ee3\u7801\u5757\u6216\u6307\u4ee4\u7684\u5d4c\u5165\u5411\u91cf\u3002\u6709\u4e09\u7c7b\u65b9\u6cd5\uff1a\u4e00\u7c7b\u662f\u57fa\u4e8eword2vec\u7684\u65b9\u6cd5\uff0c\u5982Asm2Vec\uff0c\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u6307\u4ee4\u96c6\u4e0a\u8bad\u7ec3\uff0c\u4f46\u4e0d\u80fd\u8de8\u67b6\u6784\u6620\u5c04\u8bed\u4e49\uff1b\u4e00\u7c7b\u662f\u57fa\u4e8eseq2seq\u7f16\u7801\u5668-\u89e3\u7801\u5668\u6a21\u578b\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5c06\u4e0d\u540c\u67b6\u6784\u7684\u8bed\u4e49\u6620\u5c04\u5230\u540c\u4e00\u4e2a\u5d4c\u5165\u7a7a\u95f4\uff1b\u4e00\u7c7b\u662f\u57fa\u4e8eBERT\u7684\u65b9\u6cd5\uff0c\u5982OrderMatters\u548cTrex\uff0c\u4f7f\u7528\u9884\u8bad\u7ec3\u7684\u53d8\u6362\u5668\u6a21\u578b\u6765\u5b66\u4e60\u8fd1\u4f3c\u7a0b\u5e8f\u6267\u884c\u8bed\u4e49\uff0c\u5e76\u7528\u4e8e\u8bc6\u522b\u8bed\u4e49\u76f8\u4f3c\u7684\u51fd\u6570\u3002\n\u6c47\u7f16\u4ee3\u7801\u5d4c\u5165\u901a\u5e38\u53d7\u5230\u5b83\u4eec\u80fd\u591f\u5904\u7406\u7684\u4e0d\u540c\u6307\u4ee4\u6570\u91cf\uff08\u6240\u8c13\u7684\u8bcd\u6c47\u5916\u95ee\u9898\uff09\u548c\u80fd\u591f\u4f5c\u4e3a\u6a21\u578b\u8f93\u5165\u7684\u6700\u5927\u6307\u4ee4\u6570\u91cf\u7684\u5f71\u54cd\u3002\u56e0\u6b64\uff0c\u67d0\u4e9b\u65b9\u6cd5\u8ba1\u7b97\u6307\u4ee4\u7ea7\u5d4c\u5165\u3001\u57fa\u672c\u5757\u5d4c\u5165\u6216\u51fd\u6570\u7ea7\u5d4c\u5165\u3002\n\u56fe\u5d4c\u5165\u3002\u56fe\u5d4c\u5165\u662f\u4e00\u79cd\u4e3a\u56fe\u4e2d\u7684\u6bcf\u4e2a\u5b9e\u4f53\uff08\u901a\u5e38\u662f\u8282\u70b9\uff09\u786e\u5b9a\u56fa\u5b9a\u957f\u5ea6\u5411\u91cf\u8868\u793a\u7684\u65b9\u6cd5\uff0c\u8fd9\u4e9b\u5d4c\u5165\u662f\u56fe\u7684\u4f4e\u7ef4\u8868\u793a\uff0c\u4fdd\u7559\u4e86\u56fe\u7684\u62d3\u6251\u7ed3\u6784\u3002\u57fa\u4e8e\u51fd\u6570\u63a7\u5236\u6d41\u56fe\u7684\u56fe\u5d4c\u5165\u65b9\u6cd5\u5177\u6709\u8de8\u67b6\u6784\u7684\u7279\u70b9\u3002\u8fd9\u4e9b\u5d4c\u5165\u53ef\u4ee5\u7531\u5b9a\u5236\u7b97\u6cd5 \u6216\u66f4\u590d\u6742\u7684\u673a\u5668\u5b66\u4e60\u6280\u672f\uff0c\u5982\u56fe\u795e\u7ecf\u7f51\u7edc\uff08GNN\uff09 \u751f\u6210\u3002\u4e00\u4e9b\u6700\u65b0\u7684\u673a\u5668\u5b66\u4e60\u65b9\u6cd5\u63d0\u51fa\u4e86GNN\u7684\u53d8\u4f53\uff0c\u5982GMN\uff0c\u8fd9\u4e9b\u53d8\u4f53\u80fd\u591f\u5728\u5411\u91cf\u7a7a\u95f4\u4e2d\u4ea7\u751f\u53ef\u6bd4\u8f83\u7684\u5d4c\u5165 \uff0c\u8fd9\u4e9b\u5d4c\u5165\u5305\u542b\u4e86\u4ece\u8f93\u5165\u6a21\u578b\u7684\u4e24\u4e2a\u56fe\u4e2d\u63d0\u53d6\u7684\u4fe1\u606f\u3002\n\u56fe\u5d4c\u5165\u65b9\u6cd5\u8fd8\u7ecf\u5e38\u4e3a\u6bcf\u4e2a\u57fa\u672c\u5757\u5728\u5176\u5bf9\u5e94\u7684\u56fe\u8282\u70b9\u4e2d\u7f16\u7801\u4fe1\u606f\uff0c\u4ee5\u589e\u52a0\u8868\u8fbe\u80fd\u529b\u3002\u4f8b\u5982\uff0c\u4e00\u4e9b\u89e3\u51b3\u65b9\u6848\u4e3a\u6bcf\u4e2a\u8282\u70b9\u8ba1\u7b97\u4e00\u7ec4\u5c5e\u6027\uff0c\u4ece\u800c\u5bfc\u81f4\u5177\u6709\u5c5e\u6027\u7684\u63a7\u5236\u6d41\u56fe\uff08ACFG\uff09\uff0c\u8fd9\u4e9b\u5c5e\u6027\u53ef\u4ee5\u662f\u624b\u5de5\u8bbe\u8ba1\u7684 \u6216\u4ee5\u65e0\u76d1\u7763\u65b9\u5f0f\u81ea\u52a8\u5b66\u4e60\u7684\u3002\u5176\u4ed6\u4f5c\u8005\u5229\u7528\u5176\u4ed6\u5d4c\u5165\u8ba1\u7b97\u5c42\u4f7f\u7528\u524d\u9762\u8ba8\u8bba\u8fc7\u7684\u4e00\u4e9b\u6280\u672f\uff08\u4f8b\u5982\uff0c\u5728\u57fa\u672c\u5757\u7ea7\u522b)\u3002\n\u51fd\u6570\u8868\u793a\u6280\u672f \u4ece\u4e8c\u8fdb\u5236\u4e2d\u63d0\u53d6\u4fe1\u606f\u7684\u6280\u672f\u3002\nraw bytes \u539f\u59cb\u4e8c\u8fdb\u5236 \u76f4\u63a5\u4f7f\u7528\u539f\u59cb\u4e8c\u8fdb\u5236\u4fe1\u606f\u4f5c\u4e3a\u76f8\u4f3c\u6027\u5bf9\u6bd4\u7684\u8f93\u5165(Catalog1 [74])\uff0c\u6216\u8005\u5c06\u539f\u59cb\u5b57\u8282\u4e0e\u4e0e\u4ece\u63a7\u5236\u6d41\u56fe(CFG)\u6216\u8c03\u7528\u56fe\uff08CG\uff09[44]\u83b7\u53d6\u7684\u5176\u4ed6\u4fe1\u606f\u7ed3\u5408\u8d77\u6765 Assembly \u6c47\u7f16 \u6c47\u7f16\u6307\u4ee4\u4f5c\u4e3a\u8f93\u5165\u3001\u4f7f\u7528\u6c47\u7f16\u6307\u4ee4\u7684\u6570\u91cf\u4f5c\u4e3a\u8f93\u5165\u6765\u8ba1\u7b97\u51fd\u6570\u7684\u76f8\u4f3c\u6027 Normalized assembly \u6807\u51c6\u5316\u6c47\u7f16 \u7531\u4e8e\u6c47\u7f16\u4ee3\u7801\u7ecf\u5e38\u7f16\u7801\u5e38\u91cf\u503c\uff0c\u5bfc\u81f4\u64cd\u4f5c\u548c\u64cd\u4f5c\u6570\u7684\u7ec4\u5408\u975e\u5e38\u591a\u3002\u6c47\u7f16\u89c4\u8303\u5316\u662f\u53ef\u4ee5\u62bd\u8c61\u6389\u4e00\u4e9b\u53d8\u5316\uff0c\u51cf\u5c11\u8bcd\u6c47\u91cf\uff0c\u628a\u540c\u4e00\u64cd\u4f5c\u7684\u4e0d\u540c\u53d8\u4f53\u7edf\u4e00\u6210\u4e00\u4e2a\u8868\u793a\u3002 Intermediate representations \u4e2d\u95f4\u8868\u793a \u4e2d\u95f4\u8868\u793a\u662f\u4e00\u79cd\u5c06\u4e8c\u8fdb\u5236\u4ee3\u7801\u63d0\u5347\u5230\u66f4\u9ad8\u62bd\u8c61\u5c42\u6b21\u7684\u6280\u672f\uff0c\u53ef\u4ee5\u7edf\u4e00\u4e0d\u540c\u6307\u4ee4\u7684\u8bed\u4e49\uff0c\u6d88\u9664\u4e0d\u540c\u67b6\u6784\u7684\u5dee\u5f02\uff0c\u4ee5\u53ca\u5e94\u7528\u7a0b\u5e8f\u5206\u6790\u6280\u672f\u6765\u7b80\u5316\u4ee3\u7801\u7ed3\u6784\u3002\u5e38\u7528\u7684\u4e2d\u95f4\u8868\u793a\u6709LLVM\u3001VEX\u548cIDA\u5fae\u7801\u7b49\u3002 structure \u7ed3\u6784\u7279\u5f81 \u7ed3\u6784\u662f\u4e00\u79cd\u53cd\u6620\u51fd\u6570\u5185\u90e8\u6216\u8005\u5728\u7a0b\u5e8f\u4e2d\u7684\u4f5c\u7528\u7684\u7279\u5f81\u3002\u8bb8\u591a\u65b9\u6cd5\u63d0\u53d6\u51fd\u6570\u7684\u63a7\u5236\u6d41\u56fe\uff08CFG\uff09\uff0c\u5e76\u4e14\u6839\u636e\u57fa\u672c\u5757\u7684\u6570\u636e\u6216\u8005\u5176\u4ed6\u4fe1\u606f\u5bf9\u5176\u8fdb\u884c\u6269\u5c55\uff0c\u5f62\u6210\u5c5e\u6027\u63a7\u5236\u6d41\u56fe\uff08ACFG\uff09\u6216\u8005\u5176\u4ed6\u7c7b\u578b\u7684\u56fe\u3002\u8fd8\u6709\u4e00\u4e9b\u65b9\u6cd5\u5229\u7528CFG\u7684\u7ed3\u6784\u6765\u8ba1\u7b97\u5176\u4ed6\u7279\u5f81\uff0c\u4f8b\u5982tracelets\uff08CFG\u4e2d\u8fde\u7eed\u57fa\u672c\u5757\u7684\u5e8f\u5217\uff09\u3002 Data flow analysis \u6570\u636e\u6d41\u5206\u6790 \u6570\u636e\u6d41\u5206\u6790\u662f\u4e00\u79cd\u5904\u7406\u6c47\u7f16\u7ea7\u522b\u7684\u7b97\u672f\u8868\u8fbe\u5f0f\u7684\u4e0d\u540c\u5f62\u5f0f\u7684\u65b9\u6cd5\u3002\u4e00\u4e9b\u65b9\u6cd5\u901a\u8fc7\u8ba1\u7b97\u57fa\u4e8e\u6570\u636e\u6d41\u4f9d\u8d56\u7684\u7a0b\u5e8f\u5207\u7247\uff0c\u5e76\u5c06\u5b83\u4eec\u6807\u51c6\u5316\u548c\u4f5c\u4e3a\u7279\u5f81\u6765\u53cd\u6620\u51fd\u6570\u7684\u884c\u4e3a\u3002\u53e6\u4e00\u4e9b\u65b9\u6cd5\uff0c\u4f8b\u5982Vulseeker\uff0c\u4f7f\u7528\u5757\u4e4b\u95f4\u7684\u6570\u636e\u6d41\u8fb9\u4f5c\u4e3a\u989d\u5916\u7684\u7279\u5f81\u3002 Dynamic analysis \u52a8\u6001\u5206\u6790\u3002 \u52a8\u6001\u5206\u6790\u901a\u8fc7\u8fd0\u884c\u51fd\u6570\u5bf9\u5e76\u6839\u636e\u8f93\u5165\u8f93\u51fa\u5173\u7cfb\u63d0\u53d6\u7279\u5f81\uff0c\u6216\u8005\u6839\u636e\u6267\u884c\u8f68\u8ff9\u63d0\u53d6\u8bed\u4e49\u7279\u5f81\uff0c\u6216\u8005\u4f7f\u7528\u6a21\u62df\u6216\u6df7\u5408\u6280\u672f\u3002 Symbolic execution and analysis \u7b26\u53f7\u6267\u884c \u7528\u7b26\u53f7\u6267\u884c\u6765\u5b8c\u5168\u6355\u83b7\u5f85\u5206\u6790\u51fd\u6570\u7684\u884c\u4e3a\uff0c\u5e76\u786e\u5b9a\u5176\u8f93\u5165\u548c\u8f93\u51fa\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u6db5\u76d6\u6240\u6709\u53ef\u80fd\u7684\u8def\u5f84\u3002 \u672c\u6587\u9009\u62e9\u7684\u65b9\u6cd5 \u9009\u62e9\u6807\u51c6 \u53ef\u6269\u5c55\u6027\u548c\u5b9e\u9645\u5e94\u7528\u80fd\u529b \u5173\u6ce8\u5177\u6709\u4ee3\u8868\u6027\u7684\u65b9\u6cd5\uff0c\u800c\u4e0d\u662f\u7279\u5b9a\u7684\u8bba\u6587 \u6db5\u76d6\u4e0d\u540c\u7684\u7814\u7a76\u9886\u57df \u4f18\u5148\u8003\u8651\u6700\u65b0\u7684\u8d8b\u52bf \u4e8c\u8fdb\u5236\u4ee3\u7801\u76f8\u4f3c\u6027\u6280\u672f\u7684\u6f14\u53d8\uff1a \u6839\u636e\u65f6\u95f4\u7684\u5206\u7c7b\uff1a \u5b9e\u9a8c \u5173\u4e8e\u5b9e\u9a8c\u7684\u4e00\u70b9\u8865\u5145\u8bf4\u660e\u3002 \u5b9e\u9a8c\u4e2d\u6d89\u53ca\u4e86\u4e24\u79cd\u57fa\u4e8e\u795e\u7ecf\u7f51\u7edc\u7684\u65b9\u6cd5\uff0c\u5206\u522b\u662fOrder Matters\u548cCodeCMR\uff0c\u5b83\u4eec\u90fd\u662f\u7531\u817e\u8baf\u5b89\u5168\u79d1\u6069\u5b9e\u9a8c\u5ba4\u63d0\u51fa\u7684\u3002Order Matters\u662f\u4e00\u79cd\u5229\u7528\u56fe\u795e\u7ecf\u7f51\u7edc\u548c\u6ce8\u610f\u529b\u673a\u5236\u6765\u6355\u6349\u4e8c\u8fdb\u5236\u51fd\u6570\u7684\u8bed\u4e49\u4fe1\u606f\uff0c\u5e76\u751f\u6210\u51fd\u6570\u5d4c\u5165\u5411\u91cf\u7684\u65b9\u6cd5\u3002CodeCMR\u662f\u4e00\u79cd\u5229\u7528\u591a\u6a21\u6001\u68c0\u7d22\u6280\u672f\u6765\u5b9e\u73b0\u4e8c\u8fdb\u5236\u51fd\u6570\u548c\u6e90\u4ee3\u7801\u4e4b\u95f4\u7684\u5339\u914d\u7684\u65b9\u6cd5\u3002\u8fd9\u4e24\u79cd\u65b9\u6cd5\u90fd\u5728BinaryAI\u5e73\u53f0\u4e0a\u8fdb\u884c\u4e86\u5b9e\u73b0\uff0cBinaryAI\u662f\u4e00\u4e2a\u514d\u8d39\u5728\u7ebf\u7684\u8f6f\u4ef6\u6210\u5206\u5206\u6790\u5e73\u53f0\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u68c0\u6d4b\u4e8c\u8fdb\u5236\u7a0b\u5e8f\u4e2d\u7684\u6f0f\u6d1e\u3001\u514b\u9686\u4ee3\u7801\u3001\u7b2c\u4e09\u65b9\u5e93\u7b49\u3002\u8fd9\u6bb5\u6587\u5b57\u8fd8\u8bf4\u660e\u4e86\u4f5c\u8005\u6ca1\u6709\u516c\u5f00\u4ed6\u4eec\u7684\u6a21\u578b\u5b9e\u73b0\uff0c\u4f46\u662f\u4ed6\u4eec\u540c\u610f\u5728\u6211\u4eec\u63d0\u4f9b\u7684\u6570\u636e\u96c6\u4e0a\u91cd\u65b0\u8bad\u7ec3\u548c\u6d4b\u8bd5\u4ed6\u4eec\u7684\u6a21\u578b\uff0c\u5e76\u4e0e\u6211\u4eec\u5206\u4eab\u6d4b\u8bd5\u6570\u636e\u7684\u51fd\u6570\u5d4c\u5165\u5411\u91cf\u3002\u4e3a\u4e86\u8ba1\u7b97\u51fd\u6570\u4e4b\u95f4\u7684\u76f8\u4f3c\u5ea6\uff0cOrder Matters\u548cCodeCMR\u4f7f\u7528\u4f59\u5f26\u8ddd\u79bb\u4f5c\u4e3a\u76f8\u4f3c\u5ea6\u5ea6\u91cf\u3002\n\u5b9e\u9a8c\u590d\u73b0 \u53c2\u770b \uff1ahttps:\/\/github.com\/m2kar\/m2kar.github.io\/issues\/19\n\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn&lt;at&gt;gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f \u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba: m2kar\/m2kar.github.io#18\n","permalink":"https:\/\/m2kar.cn\/posts\/20230319-%E8%AE%BA%E6%96%87%E7%AC%94%E8%AE%B0--how-machine-learning-is-solving-the-binary-function-similarity-problem%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%87%BD%E6%95%B0%E7%9B%B8%E4%BC%BC%E6%80%A7%E9%97%AE%E9%A2%98\/","summary":"<ul>\n<li><strong>\u6807\u9898:<\/strong>  How Machine Learning Is Solving the Binary Function Similarity Problem<\/li>\n<li><strong>\u4f5c\u8005:<\/strong> Andrea Marcelli, Mariano Graziano, Xabier Ugarte-Pedrero, and Yanick Fratantonio, Cisco Systems, Inc.; Mohamad Mansouri and Davide Balzarotti, EURECOM<\/li>\n<li><strong>\u5173\u952e\u5b57:<\/strong> \u4e8c\u8fdb\u5236\u5b89\u5168<\/li>\n<li><strong>\u6765\u6e90:<\/strong> SEC'22<\/li>\n<li><strong>\u94fe\u63a5:<\/strong> <a href=\"https:\/\/www.usenix.org\/conference\/usenixsecurity22\/presentation\/marcelli\">https:\/\/www.usenix.org\/conference\/usenixsecurity22\/presentation\/marcelli<\/a><\/li>\n<\/ul>\n<p>\u672c\u6587\u662f\u5173\u4e8e\u4e8c\u8fdb\u5236\u51fd\u6570\u76f8\u4f3c\u6027\u95ee\u9898\u7684Measurement\u7814\u7a76\uff0c\u8fd9\u662f\u4e00\u4e2a\u5728\u7cfb\u7edf\u5b89\u5168\u9886\u57df\u975e\u5e38\u91cd\u8981\u548c\u5177\u6709\u6311\u6218\u6027\u7684\u95ee\u9898\u3002\u4f5c\u8005\u5bf9\u73b0\u6709\u7684\u7814\u7a76\u8fdb\u884c\u4e86\u7cfb\u7edf\u5316\u7684\u5206\u6790\uff0c\u5e76\u91cd\u65b0\u5b9e\u73b0\u4e86\u4e00\u4e9b\u4ee3\u8868\u6027\u7684\u65b9\u6cd5\uff0c\u7136\u540e\u5728\u4e00\u4e2a\u65b0\u7684\u6570\u636e\u96c6\u4e0a\u8fdb\u884c\u4e86\u516c\u5e73\u548c\u6709\u610f\u4e49\u7684\u6bd4\u8f83\u3002\u4ed6\u4eec\u53d1\u73b0\u5f53\u524d\u7684\u7814\u7a76\u5b58\u5728\u4e00\u4e9b\u4e3b\u8981\u7684\u6311\u6218\uff0c\u4f8b\u5982\u53ef\u91cd\u590d\u6027\u3001\u8bc4\u4f30\u7ed3\u679c\u7684\u4e0d\u900f\u660e\u6027\u548c\u7814\u7a76\u65b9\u5411\u7684\u4e0d\u6e05\u6670\u3002\u4ed6\u4eec\u5e0c\u671b\u901a\u8fc7\u53d1\u5e03\u4ed6\u4eec\u7684\u6574\u4e2a\u6a21\u5757\u5316\u6846\u67b6\u548c\u6570\u636e\u96c6\u6765\u6fc0\u52b1\u672a\u6765\u5728\u8fd9\u4e2a\u7814\u7a76\u9886\u57df\u7684\u5de5\u4f5c\u3002<\/p>\n<h2 id=\"measuring-function-similarity\u51fd\u6570\u76f8\u4f3c\u6027\u5bf9\u6bd4\u6280\u672f\u7684\u5206\u7c7b\">Measuring Function Similarity\u00a0\u51fd\u6570\u76f8\u4f3c\u6027\u5bf9\u6bd4\u6280\u672f\u7684\u5206\u7c7b\u3002<\/h2>\n<h3 id=\"\u76f8\u4f3c\u6027\u5bf9\u6bd4\u6280\u672f\">\u76f8\u4f3c\u6027\u5bf9\u6bd4\u6280\u672f<\/h3>\n<p>\u9996\u5148\u4ecb\u7ecd\u4e86\u4e24\u79cd\u6d4b\u91cf\u51fd\u6570\u76f8\u4f3c\u5ea6\u7684\u6280\u672f\uff1a\u76f4\u63a5\u5bf9\u6bd4\u548c\u95f4\u63a5\u5bf9\u6bd4\u6280\u672f\u3002\u76f4\u63a5\u5bf9\u6bd4\u662f\u6307\u7ed9\u5b9a\u4e00\u5bf9\u51fd\u6570\u7684\u7279\u5f81\uff0c\u7528\u673a\u5668\u5b66\u4e60\u6a21\u578b\u8f93\u51fa\u4e00\u4e2a\u76f8\u4f3c\u5ea6\u5206\u6570\u3002\u95f4\u63a5\u5bf9\u6bd4\u662f\u6307\u5c06\u8f93\u5165\u7279\u5f81\u6620\u5c04\u5230\u4e00\u4e2a&quot;\u538b\u7f29&quot;\u7684\u4f4e\u7ef4\u7a7a\u95f4\uff0c\u7136\u540e\u7528\u7b80\u5355\u7684\u8ddd\u79bb\u5ea6\u91cf\u8ba1\u7b97\u76f8\u4f3c\u5ea6\u3002\u8fd9\u4e24\u79cd\u6280\u672f\u90fd\u9700\u8981\u5b9e\u73b0\u7d22\u5f15\u7b56\u7565\u6765\u63d0\u9ad8\u641c\u7d22\u6548\u7387\u3002<\/p>\n<p>\u5176\u4e2d\u6a21\u7cca\u54c8\u5e0c\u662f\u4f4e\u7ef4\u8868\u793a\u65b9\u6cd5\u7684\u5178\u578b\u4ee3\u8868\u3002\u6a21\u7cca\u54c8\u5e0c\u662f\u7531\u4e0e\u4f20\u7edf\u5bc6\u7801\u54c8\u5e0c\u4e0d\u540c\u7684\u7b97\u6cd5\u4ea7\u751f\u7684\uff0c\u56e0\u4e3a\u5b83\u4eec\u6545\u610f\u8bbe\u8ba1\u6210\u5c06\u76f8\u4f3c\u7684\u8f93\u5165\u503c\u6620\u5c04\u5230\u76f8\u4f3c\u7684\u54c8\u5e0c\u503c\u3002Pagani\u7b49\u4eba\u7814\u7a76\u4e86\u5728\u539f\u59cb\u53ef\u6267\u884c\u6587\u4ef6\u4e0a\u8ba1\u7b97\u4f20\u7edf\u6a21\u7cca\/\u5c40\u90e8\u654f\u611f\u54c8\u5e0c\u7684\u5c40\u9650\u6027\uff0c\u5f97\u51fa\u7ed3\u8bba\uff1a\u8f93\u5165\u5b57\u8282\u7684\u5fae\u5c0f\u53d8\u5316\u4f1a\u663e\u8457\u5f71\u54cd\u751f\u6210\u7684\u54c8\u5e0c\u503c\u3002\u7136\u800c\uff0c\u5373\u4f7f\u666e\u901a\u6a21\u7cca\u54c8\u5e0c\u53ef\u80fd\u4e0d\u9002\u5408\u51fd\u6570\u76f8\u4f3c\u5ea6\uff0c\u4e00\u4e9b\u65b9\u6cd5\uff08\u5982FunctionSimSearch\uff09\u63d0\u51fa\u4e86\u66f4\u4e13\u4e1a\u7684\u54c8\u5e0c\u6280\u672f\u6765\u6bd4\u8f83\u4e24\u4e2a\u51fd\u6570\u3002<\/p>\n<p>\u53e6\u4e00\u79cd\u4f4e\u7ef4\u8868\u793a\u5f62\u5f0f\u662f\u57fa\u4e8e\u5d4c\u5165\u3002\u5d4c\u5165\u6307\u7684\u662f\u5c06\u9ad8\u7ef4\u6837\u672c\u6620\u5c04\u5230\u4e00\u4e2a\u4f4e\u7ef4\u7a7a\u95f4\uff0c\u5176\u4e2d\u8bed\u4e49\u4e0a\u76f8\u4f3c\u7684\u8f93\u5165\u88ab\u6620\u5c04\u5230\u5f7c\u6b64\u63a5\u8fd1\u7684\u70b9\uff0c\u800c\u4e0d\u7ba1\u5b83\u4eec\u5728\u539f\u59cb\u8868\u793a\u4e2d\u770b\u8d77\u6765\u6709\u591a\u4e48\u4e0d\u540c\u3002\u673a\u5668\u5b66\u4e60\u6a21\u578b\u7684\u76ee\u6807\u662f\u5b66\u4e60\u5982\u4f55\u4ea7\u751f\u5d4c\u5165\uff0c\u4f7f\u5f97\u76f8\u4f3c\u51fd\u6570\u4e4b\u95f4\u7684\u76f8\u4f3c\u5ea6\u6700\u5927\u5316\uff0c\u800c\u4e0d\u540c\u51fd\u6570\u4e4b\u95f4\u7684\u76f8\u4f3c\u5ea6\u6700\u5c0f\u5316\u3002\u5728\u6587\u732e\u4e2d\u5305\u62ec\u4e24\u79cd\u4e3b\u8981\u7c7b\u578b\u7684\u5d4c\u5165\uff1a\u51fd\u6570\u4ee3\u7801\u7ea7\u5d4c\u5165\u548c\u56fe\u7ed3\u6784\u5d4c\u5165\u3002<\/p>\n<p>\u4ee3\u7801\u5d4c\u5165\u3002\u5229\u7528\u81ea\u7136\u8bed\u8a00\u5904\u7406\uff08NLP\uff09\u6280\u672f\u6765\u89e3\u51b3\u4e8c\u8fdb\u5236\u51fd\u6570\u76f8\u4f3c\u6027\u95ee\u9898\uff0c\u628a\u6c47\u7f16\u4ee3\u7801\u5f53\u4f5c\u6587\u672c\u6765\u5904\u7406\u3002\u4ee3\u7801\u5d4c\u5165\u6839\u636e\u4e0d\u540c\u7684\u6807\u8bb0\uff08\u4f8b\u5982\u6307\u4ee4\u3001\u52a9\u8bb0\u7b26\u3001\u64cd\u4f5c\u6570\u3001\u89c4\u8303\u5316\u6307\u4ee4\uff09\u751f\u6210\u4ee3\u7801\u5757\u6216\u6307\u4ee4\u7684\u5d4c\u5165\u5411\u91cf\u3002\u6709\u4e09\u7c7b\u65b9\u6cd5\uff1a\u4e00\u7c7b\u662f\u57fa\u4e8eword2vec\u7684\u65b9\u6cd5\uff0c\u5982Asm2Vec\uff0c\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u6307\u4ee4\u96c6\u4e0a\u8bad\u7ec3\uff0c\u4f46\u4e0d\u80fd\u8de8\u67b6\u6784\u6620\u5c04\u8bed\u4e49\uff1b\u4e00\u7c7b\u662f\u57fa\u4e8eseq2seq\u7f16\u7801\u5668-\u89e3\u7801\u5668\u6a21\u578b\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5c06\u4e0d\u540c\u67b6\u6784\u7684\u8bed\u4e49\u6620\u5c04\u5230\u540c\u4e00\u4e2a\u5d4c\u5165\u7a7a\u95f4\uff1b\u4e00\u7c7b\u662f\u57fa\u4e8eBERT\u7684\u65b9\u6cd5\uff0c\u5982OrderMatters\u548cTrex\uff0c\u4f7f\u7528\u9884\u8bad\u7ec3\u7684\u53d8\u6362\u5668\u6a21\u578b\u6765\u5b66\u4e60\u8fd1\u4f3c\u7a0b\u5e8f\u6267\u884c\u8bed\u4e49\uff0c\u5e76\u7528\u4e8e\u8bc6\u522b\u8bed\u4e49\u76f8\u4f3c\u7684\u51fd\u6570\u3002<\/p>\n<p>\u6c47\u7f16\u4ee3\u7801\u5d4c\u5165\u901a\u5e38\u53d7\u5230\u5b83\u4eec\u80fd\u591f\u5904\u7406\u7684\u4e0d\u540c\u6307\u4ee4\u6570\u91cf\uff08\u6240\u8c13\u7684\u8bcd\u6c47\u5916\u95ee\u9898\uff09\u548c\u80fd\u591f\u4f5c\u4e3a\u6a21\u578b\u8f93\u5165\u7684\u6700\u5927\u6307\u4ee4\u6570\u91cf\u7684\u5f71\u54cd\u3002\u56e0\u6b64\uff0c\u67d0\u4e9b\u65b9\u6cd5\u8ba1\u7b97\u6307\u4ee4\u7ea7\u5d4c\u5165\u3001\u57fa\u672c\u5757\u5d4c\u5165\u6216\u51fd\u6570\u7ea7\u5d4c\u5165\u3002<\/p>\n<p>\u56fe\u5d4c\u5165\u3002\u56fe\u5d4c\u5165\u662f\u4e00\u79cd\u4e3a\u56fe\u4e2d\u7684\u6bcf\u4e2a\u5b9e\u4f53\uff08\u901a\u5e38\u662f\u8282\u70b9\uff09\u786e\u5b9a\u56fa\u5b9a\u957f\u5ea6\u5411\u91cf\u8868\u793a\u7684\u65b9\u6cd5\uff0c\u8fd9\u4e9b\u5d4c\u5165\u662f\u56fe\u7684\u4f4e\u7ef4\u8868\u793a\uff0c\u4fdd\u7559\u4e86\u56fe\u7684\u62d3\u6251\u7ed3\u6784\u3002\u57fa\u4e8e\u51fd\u6570\u63a7\u5236\u6d41\u56fe\u7684\u56fe\u5d4c\u5165\u65b9\u6cd5\u5177\u6709\u8de8\u67b6\u6784\u7684\u7279\u70b9\u3002\u8fd9\u4e9b\u5d4c\u5165\u53ef\u4ee5\u7531\u5b9a\u5236\u7b97\u6cd5 \u6216\u66f4\u590d\u6742\u7684\u673a\u5668\u5b66\u4e60\u6280\u672f\uff0c\u5982\u56fe\u795e\u7ecf\u7f51\u7edc\uff08GNN\uff09 \u751f\u6210\u3002\u4e00\u4e9b\u6700\u65b0\u7684\u673a\u5668\u5b66\u4e60\u65b9\u6cd5\u63d0\u51fa\u4e86GNN\u7684\u53d8\u4f53\uff0c\u5982GMN\uff0c\u8fd9\u4e9b\u53d8\u4f53\u80fd\u591f\u5728\u5411\u91cf\u7a7a\u95f4\u4e2d\u4ea7\u751f\u53ef\u6bd4\u8f83\u7684\u5d4c\u5165 \uff0c\u8fd9\u4e9b\u5d4c\u5165\u5305\u542b\u4e86\u4ece\u8f93\u5165\u6a21\u578b\u7684\u4e24\u4e2a\u56fe\u4e2d\u63d0\u53d6\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u56fe\u5d4c\u5165\u65b9\u6cd5\u8fd8\u7ecf\u5e38\u4e3a\u6bcf\u4e2a\u57fa\u672c\u5757\u5728\u5176\u5bf9\u5e94\u7684\u56fe\u8282\u70b9\u4e2d\u7f16\u7801\u4fe1\u606f\uff0c\u4ee5\u589e\u52a0\u8868\u8fbe\u80fd\u529b\u3002\u4f8b\u5982\uff0c\u4e00\u4e9b\u89e3\u51b3\u65b9\u6848\u4e3a\u6bcf\u4e2a\u8282\u70b9\u8ba1\u7b97\u4e00\u7ec4\u5c5e\u6027\uff0c\u4ece\u800c\u5bfc\u81f4\u5177\u6709\u5c5e\u6027\u7684\u63a7\u5236\u6d41\u56fe\uff08ACFG\uff09\uff0c\u8fd9\u4e9b\u5c5e\u6027\u53ef\u4ee5\u662f\u624b\u5de5\u8bbe\u8ba1\u7684 \u6216\u4ee5\u65e0\u76d1\u7763\u65b9\u5f0f\u81ea\u52a8\u5b66\u4e60\u7684\u3002\u5176\u4ed6\u4f5c\u8005\u5229\u7528\u5176\u4ed6\u5d4c\u5165\u8ba1\u7b97\u5c42\u4f7f\u7528\u524d\u9762\u8ba8\u8bba\u8fc7\u7684\u4e00\u4e9b\u6280\u672f\uff08\u4f8b\u5982\uff0c\u5728\u57fa\u672c\u5757\u7ea7\u522b)\u3002<\/p>\n<h3 id=\"\u51fd\u6570\u8868\u793a\u6280\u672f\">\u51fd\u6570\u8868\u793a\u6280\u672f<\/h3>\n<p>\u4ece\u4e8c\u8fdb\u5236\u4e2d\u63d0\u53d6\u4fe1\u606f\u7684\u6280\u672f\u3002<\/p>\n<table>\n  <thead>\n      <tr>\n          <th>raw bytes<\/th>\n          <th>\u539f\u59cb\u4e8c\u8fdb\u5236<\/th>\n          <th>\u76f4\u63a5\u4f7f\u7528\u539f\u59cb\u4e8c\u8fdb\u5236\u4fe1\u606f\u4f5c\u4e3a\u76f8\u4f3c\u6027\u5bf9\u6bd4\u7684\u8f93\u5165(Catalog1 [74])\uff0c\u6216\u8005\u5c06\u539f\u59cb\u5b57\u8282\u4e0e\u4e0e\u4ece\u63a7\u5236\u6d41\u56fe(CFG)\u6216\u8c03\u7528\u56fe\uff08CG\uff09[44]\u83b7\u53d6\u7684\u5176\u4ed6\u4fe1\u606f\u7ed3\u5408\u8d77\u6765<\/th>\n          <th>\u00a0<\/th>\n      <\/tr>\n  <\/thead>\n  <tbody>\n      <tr>\n          <td>Assembly<\/td>\n          <td>\u6c47\u7f16<\/td>\n          <td>\u6c47\u7f16\u6307\u4ee4\u4f5c\u4e3a\u8f93\u5165\u3001\u4f7f\u7528\u6c47\u7f16\u6307\u4ee4\u7684\u6570\u91cf\u4f5c\u4e3a\u8f93\u5165\u6765\u8ba1\u7b97\u51fd\u6570\u7684\u76f8\u4f3c\u6027<\/td>\n          <td>\u00a0<\/td>\n      <\/tr>\n      <tr>\n          <td>Normalized assembly<\/td>\n          <td>\u6807\u51c6\u5316\u6c47\u7f16<\/td>\n          <td>\u7531\u4e8e\u6c47\u7f16\u4ee3\u7801\u7ecf\u5e38\u7f16\u7801\u5e38\u91cf\u503c\uff0c\u5bfc\u81f4\u64cd\u4f5c\u548c\u64cd\u4f5c\u6570\u7684\u7ec4\u5408\u975e\u5e38\u591a\u3002\u6c47\u7f16\u89c4\u8303\u5316\u662f\u53ef\u4ee5\u62bd\u8c61\u6389\u4e00\u4e9b\u53d8\u5316\uff0c\u51cf\u5c11\u8bcd\u6c47\u91cf\uff0c\u628a\u540c\u4e00\u64cd\u4f5c\u7684\u4e0d\u540c\u53d8\u4f53\u7edf\u4e00\u6210\u4e00\u4e2a\u8868\u793a\u3002<\/td>\n          <td>\u00a0<\/td>\n      <\/tr>\n      <tr>\n          <td>Intermediate representations<\/td>\n          <td>\u4e2d\u95f4\u8868\u793a<\/td>\n          <td>\u4e2d\u95f4\u8868\u793a\u662f\u4e00\u79cd\u5c06\u4e8c\u8fdb\u5236\u4ee3\u7801\u63d0\u5347\u5230\u66f4\u9ad8\u62bd\u8c61\u5c42\u6b21\u7684\u6280\u672f\uff0c\u53ef\u4ee5\u7edf\u4e00\u4e0d\u540c\u6307\u4ee4\u7684\u8bed\u4e49\uff0c\u6d88\u9664\u4e0d\u540c\u67b6\u6784\u7684\u5dee\u5f02\uff0c\u4ee5\u53ca\u5e94\u7528\u7a0b\u5e8f\u5206\u6790\u6280\u672f\u6765\u7b80\u5316\u4ee3\u7801\u7ed3\u6784\u3002\u5e38\u7528\u7684\u4e2d\u95f4\u8868\u793a\u6709LLVM\u3001VEX\u548cIDA\u5fae\u7801\u7b49\u3002<\/td>\n          <td>\u00a0<\/td>\n      <\/tr>\n      <tr>\n          <td>structure<\/td>\n          <td>\u7ed3\u6784\u7279\u5f81<\/td>\n          <td>\u7ed3\u6784\u662f\u4e00\u79cd\u53cd\u6620\u51fd\u6570\u5185\u90e8\u6216\u8005\u5728\u7a0b\u5e8f\u4e2d\u7684\u4f5c\u7528\u7684\u7279\u5f81\u3002\u8bb8\u591a\u65b9\u6cd5\u63d0\u53d6\u51fd\u6570\u7684\u63a7\u5236\u6d41\u56fe\uff08CFG\uff09\uff0c\u5e76\u4e14\u6839\u636e\u57fa\u672c\u5757\u7684\u6570\u636e\u6216\u8005\u5176\u4ed6\u4fe1\u606f\u5bf9\u5176\u8fdb\u884c\u6269\u5c55\uff0c\u5f62\u6210\u5c5e\u6027\u63a7\u5236\u6d41\u56fe\uff08ACFG\uff09\u6216\u8005\u5176\u4ed6\u7c7b\u578b\u7684\u56fe\u3002\u8fd8\u6709\u4e00\u4e9b\u65b9\u6cd5\u5229\u7528CFG\u7684\u7ed3\u6784\u6765\u8ba1\u7b97\u5176\u4ed6\u7279\u5f81\uff0c\u4f8b\u5982tracelets\uff08CFG\u4e2d\u8fde\u7eed\u57fa\u672c\u5757\u7684\u5e8f\u5217\uff09\u3002<\/td>\n          <td>\u00a0<\/td>\n      <\/tr>\n      <tr>\n          <td>Data flow analysis<\/td>\n          <td>\u6570\u636e\u6d41\u5206\u6790<\/td>\n          <td>\u6570\u636e\u6d41\u5206\u6790\u662f\u4e00\u79cd\u5904\u7406\u6c47\u7f16\u7ea7\u522b\u7684\u7b97\u672f\u8868\u8fbe\u5f0f\u7684\u4e0d\u540c\u5f62\u5f0f\u7684\u65b9\u6cd5\u3002\u4e00\u4e9b\u65b9\u6cd5\u901a\u8fc7\u8ba1\u7b97\u57fa\u4e8e\u6570\u636e\u6d41\u4f9d\u8d56\u7684\u7a0b\u5e8f\u5207\u7247\uff0c\u5e76\u5c06\u5b83\u4eec\u6807\u51c6\u5316\u548c\u4f5c\u4e3a\u7279\u5f81\u6765\u53cd\u6620\u51fd\u6570\u7684\u884c\u4e3a\u3002\u53e6\u4e00\u4e9b\u65b9\u6cd5\uff0c\u4f8b\u5982Vulseeker\uff0c\u4f7f\u7528\u5757\u4e4b\u95f4\u7684\u6570\u636e\u6d41\u8fb9\u4f5c\u4e3a\u989d\u5916\u7684\u7279\u5f81\u3002<\/td>\n          <td>\u00a0<\/td>\n      <\/tr>\n      <tr>\n          <td>Dynamic analysis<\/td>\n          <td>\u52a8\u6001\u5206\u6790\u3002<\/td>\n          <td>\u52a8\u6001\u5206\u6790\u901a\u8fc7\u8fd0\u884c\u51fd\u6570\u5bf9\u5e76\u6839\u636e\u8f93\u5165\u8f93\u51fa\u5173\u7cfb\u63d0\u53d6\u7279\u5f81\uff0c\u6216\u8005\u6839\u636e\u6267\u884c\u8f68\u8ff9\u63d0\u53d6\u8bed\u4e49\u7279\u5f81\uff0c\u6216\u8005\u4f7f\u7528\u6a21\u62df\u6216\u6df7\u5408\u6280\u672f\u3002<\/td>\n          <td>\u00a0<\/td>\n      <\/tr>\n      <tr>\n          <td>Symbolic execution and analysis<\/td>\n          <td>\u7b26\u53f7\u6267\u884c<\/td>\n          <td>\u7528\u7b26\u53f7\u6267\u884c\u6765\u5b8c\u5168\u6355\u83b7\u5f85\u5206\u6790\u51fd\u6570\u7684\u884c\u4e3a\uff0c\u5e76\u786e\u5b9a\u5176\u8f93\u5165\u548c\u8f93\u51fa\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u6db5\u76d6\u6240\u6709\u53ef\u80fd\u7684\u8def\u5f84\u3002<\/td>\n          <td>\u00a0<\/td>\n      <\/tr>\n  <\/tbody>\n<\/table>\n<h2 id=\"\u672c\u6587\u9009\u62e9\u7684\u65b9\u6cd5\">\u672c\u6587\u9009\u62e9\u7684\u65b9\u6cd5<\/h2>\n<h3 id=\"\u9009\u62e9\u6807\u51c6\">\u9009\u62e9\u6807\u51c6<\/h3>\n<ol>\n<li>\u53ef\u6269\u5c55\u6027\u548c\u5b9e\u9645\u5e94\u7528\u80fd\u529b<\/li>\n<li>\u5173\u6ce8\u5177\u6709\u4ee3\u8868\u6027\u7684\u65b9\u6cd5\uff0c\u800c\u4e0d\u662f\u7279\u5b9a\u7684\u8bba\u6587<\/li>\n<li>\u6db5\u76d6\u4e0d\u540c\u7684\u7814\u7a76\u9886\u57df<\/li>\n<li>\u4f18\u5148\u8003\u8651\u6700\u65b0\u7684\u8d8b\u52bf<\/li>\n<\/ol>\n<p>\u4e8c\u8fdb\u5236\u4ee3\u7801\u76f8\u4f3c\u6027\u6280\u672f\u7684\u6f14\u53d8\uff1a\n<img alt=\"\u4e8c\u8fdb\u5236\u4ee3\u7801\u76f8\u4f3c\u6027\u6280\u672f\u7684\u6f14\u53d8\" loading=\"lazy\" src=\"https:\/\/user-images.githubusercontent.com\/16930652\/226182660-ef05108c-d902-4fe2-9b0a-a6e9f8af2d4c.png\"><\/p>","title":"[\u8bba\u6587\u7b14\u8bb0]  How Machine Learning Is Solving the Binary Function Similarity Problem\uff08\u673a\u5668\u5b66\u4e60\u5982\u4f55\u89e3\u51b3\u4e8c\u8fdb\u5236\u51fd\u6570\u76f8\u4f3c\u6027\u95ee\u9898\uff09"},{"content":"\u8fd9\u4e2a\u95ee\u9898\u6211\u95ee\u4e86chatgpt:\n\u95ee\u98981 \u751f\u6210\u4e00\u6bb5github\u7684workflows\u914d\u7f6e\u6587\u6863\uff0c\u5f53\u6709\u65b0issue\u7684\u65f6\u5019\uff0c\u81ea\u52a8\u5c06issue\u7684\u5185\u5bb9\u540c\u6b65\u5230\u8be5GitHub\u9879\u76ee\u7684blog\u5206\u652f\u7684content\/post\u6587\u4ef6\u5939\u4e2d\u7684\u65b0Markdown\u6587\u4ef6\u4e2d\u3002\u6587\u4ef6\u540d\u4e3a&quot;{YYYYMMDD}-{Title}.md&quot;,\u5176\u4e2d{YYYYMMDD}\u4e3aissue\u7684\u65e5\u671f\uff0c&quot;{Title}&ldquo;\u4e3aissue\u7684\u6807\u9898\u3002\u6587\u4ef6\u5f00\u5934\u52a0\u4e0a\n---\rtitle: data: lastmod:\rdraft: false\rtags:\r--- \u5b83\u7ed9\u6211\u56de\u590d\u4e86\u4e00\u4e2aGitHub Workflows \u914d\u7f6e\u6587\u6863\u3002\nname: Sync Issue to Blog on: issues: types: [opened, edited] jobs: sync-issue-to-blog: runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions\/checkout@v2 - name: Setup Hugo uses: peaceiris\/actions-hugo@v2 with: hugo-version: &#34;latest&#34; - name: Create Blog Post id: create_post run: | issue_title=$(echo &#34;${{ github.event.issue.title }}&#34; | sed &#39;s\/[[:space:]]\/-\/g&#39;) issue_date=$(echo &#34;${{ github.event.issue.created_at }}&#34; | cut -c1-10 | sed &#39;s\/-\/\/g&#39;) post_path=&#34;content\/post\/${issue_date}-${issue_title}.md&#34; post_date=$(echo &#34;${{ github.event.issue.created_at }}&#34; | cut -c1-10) post_title=$(echo &#34;${{ github.event.issue.title }}&#34; | sed &#39;s\/&#34;\/\\\\&#34;\/g&#39;) post_body=$(echo &#34;${{ github.event.issue.body }}&#34; | sed &#39;s\/&#34;\/\\\\&#34;\/g&#39;) echo &#34;---&#34; &gt; &#34;${post_path}&#34; echo &#34;title: \\&#34;${post_title}\\&#34;&#34; &gt;&gt; &#34;${post_path}&#34; echo &#34;date: \\&#34;${post_date}\\&#34;&#34; &gt;&gt; &#34;${post_path}&#34; echo &#34;lastmod: \\&#34;${post_date}\\&#34;&#34; &gt;&gt; &#34;${post_path}&#34; echo &#34;draft: false&#34; &gt;&gt; &#34;${post_path}&#34; echo &#34;tags:&#34; &gt;&gt; &#34;${post_path}&#34; echo &#34;---&#34; &gt;&gt; &#34;${post_path}&#34; echo &#34;${post_body}&#34; &gt;&gt; &#34;${post_path}&#34; - name: Commit and Push Changes run: | git config --global user.name &#34;${{ github.actor }}&#34; git config --global user.email &#34;${{ github.actor }}@users.noreply.github.com&#34; git add . git commit -m &#34;Sync issue #${{ github.event.issue.number }} to blog&#34; git push origin blog env: GH_TOKEN: ${{ secrets.GH_TOKEN }} \u8fd9\u4e2a Workflows \u5c06\u4f1a\u5728\u9879\u76ee\u4e2d\u6709\u65b0\u7684 issue \u88ab\u521b\u5efa\u6216\u7f16\u8f91\u65f6\u8fd0\u884c\u3002\u5b83\u9996\u5148\u4f1a\u68c0\u51fa\u4ee3\u7801\u5e93\uff0c\u5e76\u5b89\u88c5\u6700\u65b0\u7248\u7684 Hugo\u3002\u63a5\u4e0b\u6765\uff0c\u5b83\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Markdown \u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u4e86 issue \u7684\u6807\u9898\u548c\u6b63\u6587\uff0c\u5e76\u5c06\u5176\u4fdd\u5b58\u5230\u9879\u76ee\u7684 blog \u5206\u652f\u7684 content\/post \u76ee\u5f55\u4e0b\uff0c\u6587\u4ef6\u540d\u683c\u5f0f\u4e3a {YYYYMMDD}-{Title}.md\u3002\u6700\u540e\uff0c\u5b83\u4f1a\u5c06\u66f4\u6539\u63d0\u4ea4\u5230 blog \u5206\u652f\uff0c\u5e76\u4f7f\u7528 GitHub API \u7684 token \u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1\u3002\u6ce8\u610f\uff0c\u4e3a\u4e86\u4f7f Workflows \u6b63\u786e\u8fd0\u884c\uff0c\u4f60\u9700\u8981\u5c06 GitHub API \u7684 token \u5b58\u50a8\u5728\u4f60\u7684\u9879\u76ee\u7684 secrets \u4e2d\uff0c\u5e76\u5c06\u5176\u547d\u540d\u4e3a GH_TOKEN\u3002\n\u95ee\u98982 \u540e\u9762\u6211\u53c8\u5b8c\u5584\u4e86gpt\u7ed9\u7684\u56de\u7b54\uff0c\u91cd\u65b0\u95ee\u4e86new bing\u3002\n\u7f16\u5199github action\u914d\u7f6e\u6587\u4ef6: \u5f53issue\u7684open\/edit\u4e8b\u4ef6\u89e6\u53d1\u65f6\uff0c\u4f7f\u7528GitHub CLI client\u83b7\u53d6issue\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\n\u5b9a\u4e49issue\u7684id\u4e3aISSUE_ID\u3002\u904d\u5386content\/posts\/\u4e0b\u7684\u6240\u6709markdown\u6587\u4ef6\uff0c\u8bfb\u53d6markdown\u6587\u4ef6\u5934\u90e8\u7684yaml\u90e8\u5206\uff0c\u5982\u679c\u5b58\u5728issue_id=${ISSUE_ID}\uff0c\u90a3\u4e48\u5b9a\u4e49\u53d8\u91cfPOST_PATH=\u8be5markdown\u6587\u4ef6\u8def\u5f84\uff0c\u5426\u5219\u5b9a\u4e49\u53d8\u91cfPOST_PATH=&ldquo;content\/post\/${issue_date}-${issue_title}.md&rdquo;\u3002\n\u8bbe\u7f6e\u73af\u5883\u53d8\u91cfBLOG_TITLE\u4e3aissue\u7684\u6807\u9898\uff0c\n\u8bbe\u7f6e\u73af\u5883\u53d8\u91cfBLOG_DATE\u4e3aissue\u7684\u521b\u5efa\u65f6\u95f4\uff0c\n\u683c\u5f0f\u4e3a2020-09-15T11:30:03+00:00\uff0c\n\u8bbe\u7f6e\u73af\u5883\u53d8\u91cfBLOG_DESCRIPTION\u4e3a\u7a7a\u767d\uff0c\n\u8bbe\u7f6e\u73af\u5883\u53d8\u91cfBLOG_TAGS\u4e3aissue\u7684\u6807\u7b7e\u5217\u8868\uff0c\u683c\u5f0f\u4e3a[&ldquo;tag1&rdquo;,&ldquo;tag2&rdquo;],\n\u8bbe\u7f6e\u73af\u5883\u53d8\u91cfBLOG_CONTENT\u4e3aissue\u7684\u5185\u5bb9\uff0c\u57fa\u4e8emarkdown\u683c\u5f0f\u3002\n\u6700\u540e\uff0c\u4f7f\u7528envsubst\u547d\u4ee4\uff0c\u7528\u73af\u5883\u53d8\u91cf\u66f4\u65b0template\/template.md\u7684\u5185\u5bb9\uff0c\u5c06\u66f4\u65b0\u540e\u7684\u6587\u4ef6\u4fdd\u5b58\u5728${POST_PATH}\u8def\u5f84\u4e0b\u3002\n# This is a basic workflow to help you get started with Actions name: Blog Post Generator # Controls when the action will run. on: # Triggers the workflow on issue open or edit events issues: types: [opened, edited] # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This job generates a blog post from an issue generate-post: # The type of runner that the job will run on runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions\/checkout@v2 # Installs GitHub CLI on the runner (you may need to adjust this according to your OS) - name: Install GitHub CLI run: | sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 sudo apt-add-repository https:\/\/cli.github.com\/packages sudo apt update sudo apt install gh # Authenticates to GitHub using a personal access token (you need to store it as a secret in your repository settings) - name: Authenticate to GitHub env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh auth login --with-token &lt; $GITHUB_TOKEN # Runs a bash script to set environment variables and update template file using GitHub CLI and envsubst commands - name: Run bash script env: ISSUE_ID: ${{ github.event.issue.number }} run: | # Get the issue data from GitHub CLI using gh api command (you may need to specify owner and repo flags) issue_data=$(gh api issues\/${ISSUE_ID}) # Set BLOG_TITLE to the issue&#39;s title BLOG_TITLE=$(echo &#34;$issue_data&#34; | jq -r &#39;.title&#39;) # Set BLOG_DATE to the issue&#39;s creation time, formatted as 2020-09-15T11:30:03+00:00 BLOG_DATE=$(echo &#34;$issue_data&#34; | jq -r &#39;.created_at&#39;) # Set BLOG_DESCRIPTION to blank BLOG_DESCRIPTION=&#34;&#34; # Set BLOG_TAGS to the issue&#39;s label list, formatted as [&#34;tag1&#34;,&#34;tag2&#34;] BLOG_TAGS=$(echo &#34;$issue_data&#34; | jq -r &#39;[.labels[].name]&#39;) # Set BLOG_CONTENT to the issue&#39;s content, based on markdown format BLOG_CONTENT=$(echo &#34;$issue_data&#34; | jq -r &#39;.body&#39;) # Export these variables so they can be used by envsubst command later export BLOG_TITLE BLOG_DATE BLOG_DESCRIPTION BLOG_TAGS BLOG_CONTENT # Loop through all markdown files under content\/posts\/ for file in content\/posts\/*.md; do # Read the yaml part at the top of each file using yq command (you may need to install yq first) yaml_part=$(yq e &#39;.&#39; $file) # Check if there is an issue_id field that matches ISSUE_ID if [[ $(echo &#34;$yaml_part&#34; | yq e &#39;.issue_id&#39; -) == &#34;$ISSUE_ID&#34; ]]; then # If yes, set POST_PATH to that file path and break out of loop POST_PATH=$file break else # If no, set POST_PATH using issue date and title (you may need to adjust this according to your desired format) POST_PATH=&#34;content\/post\/${BLOG_DATE}-${BLOG_TITLE}.md&#34; fi done # Use these variables to update template\/template.md&#39;s content using envsubst command (you may need to adjust this according to your template format) envsubst &lt; template\/template.md &gt; ${POST_PATH} # Commits and pushes the updated file to your repository (you may need a personal access token for this step) - name: Commit and push changes run: | git config --global user.name &#39;GitHub Action&#39; git config --global user.email &#39;action@github.com&#39; git add ${POST_PATH} git commit -m &#34;Update blog post from issue $ISSUE_ID&#34; git push origin main \u5fae\u8c03 github cli\u5ba2\u6237\u7aef\u662f\u9ed8\u8ba4\u5b89\u88c5\u5728github workflow\u7684container\u4e2d\u7684\uff0c\u6240\u4ee5\u4e0d\u9700\u8981\u989d\u5916\u5b89\u88c5\uff0c\u53ea\u9700\u8981\u8c03\u7528\u7684\u65f6\u5019\u4f20\u5165\u73af\u5883\u53d8\u91cf${GITHUB_TOKEN}\u5c31\u597d\u4e86\u3002\n\u6240\u4ee5\u5220\u9664\u4e86Install GitHub CLI\u548cAuthenticate to GitHub\u7684\u6b65\u9aa4.\n\u89e6\u53d1\u7f51\u7ad9\u66f4\u65b0\u64cd\u4f5c \u5728gh-page.yml\u4e2d\u7684on\u4e0b\u6dfb\u52a0workflow_run\u914d\u7f6e\u3002\non: ...... workflow_run: workflows: - &#34;issue-to-post&#34; types: - completed \u6d4b\u8bd5\u6210\u529f\uff01 \u5c1d\u8bd5\u63a5\u5165openAI\u751f\u6210\u6587\u7ae0\u6458\u8981\u548c\u5173\u952e\u8bcd - name: Generate Abstract continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} OPENAI_API_KEY: ${{ secrets.OPENAI_TOKEN }} run: | ISSUE_ID=${{ github.event.issue.number }} issue_data=$(gh api \/repos\/${{ github.repository }}\/issues\/${ISSUE_ID}) BLOG_CONTENT=$(echo &#34;$issue_data&#34; | jq -r &#39;.body&#39;) BLOG_TITLE=$(echo &#34;$issue_data&#34; | jq -r &#39;.title&#39;) CONTENT=$(echo &#34;$issue_data&#34; | jq -r &#39;.body&#39; | sed &#39;s\/ [ [:punct:]]\/\/g&#39; | head -c 3000 ) REQUEST=&#39;{ &#34;model&#34;: &#34;text-davinci-003&#34;, &#34;prompt&#34;: &#34;\u4e0b\u9762\u662f\u4e00\u4e2amarkdown\u6587\u6863\uff0c\u8bf7\u751f\u6210\u4e0d\u8d85\u8fc7300\u5b57\u7684\u6458\u8981\u548c5\u4e2a\u5173\u952e\u8bcd\uff0c\u7528json\u683c\u5f0f\u8f93\u51fa\uff0c\u5982\uff1a{\\&#34;abstract\\&#34;:\\&#34;the abstract\\&#34;, \\&#34;keywords\\&#34;:[\\&#34;keyword1\\&#34;,\\&#34;keywordd2\\&#34;] }\u8bf7\u518d\u8f93\u51fa\u7ed3\u679c\u524d\u63d2\u5165--OPENAI-RESULT-START--\u3002\\n\\n&#34;, &#34;temperature&#34;: 0.618, &#34;max_tokens&#34;: 500, &#34;top_p&#34;: 1, &#34;frequency_penalty&#34;: 0, &#34;presence_penalty&#34;: 0 }&#39; REQUEST=$(echo &#34;$REQUEST&#34; | jq --ascii-output --arg CONTENT &#34;$CONTENT&#34; --arg TITLE &#34;$BLOG_TITLE&#34; &#39;.prompt = .prompt + &#34;\u6807\u9898\uff1a&#34;+ $TITLE + $CONTENT&#39;) RESPONSE=$(curl https:\/\/api.openai.com\/v1\/completions \\ -H &#34;Content-Type: application\/json&#34; \\ -H &#34;Authorization: Bearer $OPENAI_API_KEY&#34; \\ -d &#34;${REQUEST}&#34;) ANSWER=$(echo $RESPONSE | jq -r &#34;.choices[0].text&#34; | sed -n &#39;\/--OPENAI-RESULT-START--\/,$p&#39; | sed &#39;1d&#39;) BLOG_DESCRIPTION=$(echo $ANSWER | jq -r &#34;.abstract&#34;) BLOG_TAGS=$(echo $BLOG_TAGS $(echo $ANSWER | jq -r &#39;.keywords&#39;) | jq -s &#34;add&#34;) export BLOG_DESCRIPTION BLOG_TAGS CONTENT=$(echo &quot;$issue_data&quot; | jq -r '.body' | sed 's\/ [ [:punct:]]\/\/g' | head -c 3000 )\u51fa\u73b0\u7ba1\u9053\u9519\u8bef\u3002\u5c1d\u8bd5\u518d\u589e\u52a0 tr -d '\\n'| tr -d '\\r'\n\u8fd8\u662f\u5931\u8d25\uff0c\u518d\u5403\u5c1d\u8bd5\u3002\n\u53c2\u8003\uff1ahttps:\/\/docs.github.com\/en\/actions\/using-workflows\/using-github-cli-in-workflows\n\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn&lt;at&gt;gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f \u6b22\u8fce\u5728ISSUE\u53c2\u4e0e\u672c\u535a\u5ba2\u8ba8\u8bba: m2kar\/m2kar.github.io#14\n","permalink":"https:\/\/m2kar.cn\/posts\/20230317-%E5%A6%82%E4%BD%95%E6%8A%8Aissue%E5%8D%9A%E5%AE%A2%E8%87%AA%E5%8A%A8%E5%90%8C%E6%AD%A5%E5%88%B0github-page%E4%B8%AD\/","summary":"<p>\u8fd9\u4e2a\u95ee\u9898\u6211\u95ee\u4e86chatgpt:<\/p>\n<h3 id=\"\u95ee\u98981\">\u95ee\u98981<\/h3>\n<p>\u751f\u6210\u4e00\u6bb5github\u7684workflows\u914d\u7f6e\u6587\u6863\uff0c\u5f53\u6709\u65b0issue\u7684\u65f6\u5019\uff0c\u81ea\u52a8\u5c06issue\u7684\u5185\u5bb9\u540c\u6b65\u5230\u8be5GitHub\u9879\u76ee\u7684blog\u5206\u652f\u7684content\/post\u6587\u4ef6\u5939\u4e2d\u7684\u65b0Markdown\u6587\u4ef6\u4e2d\u3002\u6587\u4ef6\u540d\u4e3a&quot;{YYYYMMDD}-{Title}.md&quot;,\u5176\u4e2d{YYYYMMDD}\u4e3aissue\u7684\u65e5\u671f\uff0c&quot;{Title}&ldquo;\u4e3aissue\u7684\u6807\u9898\u3002\u6587\u4ef6\u5f00\u5934\u52a0\u4e0a<\/p>\n<pre tabindex=\"0\"><code>---\r\ntitle: \r\ndata: \r\nlastmod:\r\ndraft: false\r\ntags:\r\n---\n<\/code><\/pre><p>\u5b83\u7ed9\u6211\u56de\u590d\u4e86\u4e00\u4e2aGitHub Workflows \u914d\u7f6e\u6587\u6863\u3002<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-yml\" data-lang=\"yml\"><span class=\"line\"><span class=\"cl\"><span class=\"nt\">name<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l\">Sync Issue to Blog<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nt\">on<\/span><span class=\"p\">:<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">  <\/span><span class=\"nt\">issues<\/span><span class=\"p\">:<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">    <\/span><span class=\"nt\">types<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">[<\/span><span class=\"l\">opened, edited]<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nt\">jobs<\/span><span class=\"p\">:<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">  <\/span><span class=\"nt\">sync-issue-to-blog<\/span><span class=\"p\">:<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">    <\/span><span class=\"nt\">runs-on<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l\">ubuntu-latest<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">    <\/span><span class=\"nt\">steps<\/span><span class=\"p\">:<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">      <\/span>- <span class=\"nt\">name<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l\">Checkout Code<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">        <\/span><span class=\"nt\">uses<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l\">actions\/checkout@v2<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">      <\/span>- <span class=\"nt\">name<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l\">Setup Hugo<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">        <\/span><span class=\"nt\">uses<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l\">peaceiris\/actions-hugo@v2<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">        <\/span><span class=\"nt\">with<\/span><span class=\"p\">:<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">          <\/span><span class=\"nt\">hugo-version<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"s2\">&#34;latest&#34;<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">      <\/span>- <span class=\"nt\">name<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l\">Create Blog Post<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">        <\/span><span class=\"nt\">id<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l\">create_post<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">        <\/span><span class=\"nt\">run<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">|<\/span><span class=\"sd\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          issue_title=$(echo &#34;${{ github.event.issue.title }}&#34; | sed &#39;s\/[[:space:]]\/-\/g&#39;)\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          issue_date=$(echo &#34;${{ github.event.issue.created_at }}&#34; | cut -c1-10 | sed &#39;s\/-\/\/g&#39;)\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          post_path=&#34;content\/post\/${issue_date}-${issue_title}.md&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          post_date=$(echo &#34;${{ github.event.issue.created_at }}&#34; | cut -c1-10)\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          post_title=$(echo &#34;${{ github.event.issue.title }}&#34; | sed &#39;s\/&#34;\/\\\\&#34;\/g&#39;)\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          post_body=$(echo &#34;${{ github.event.issue.body }}&#34; | sed &#39;s\/&#34;\/\\\\&#34;\/g&#39;)\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          echo &#34;---&#34; &gt; &#34;${post_path}&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          echo &#34;title: \\&#34;${post_title}\\&#34;&#34; &gt;&gt; &#34;${post_path}&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          echo &#34;date: \\&#34;${post_date}\\&#34;&#34; &gt;&gt; &#34;${post_path}&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          echo &#34;lastmod: \\&#34;${post_date}\\&#34;&#34; &gt;&gt; &#34;${post_path}&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          echo &#34;draft: false&#34; &gt;&gt; &#34;${post_path}&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          echo &#34;tags:&#34; &gt;&gt; &#34;${post_path}&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          echo &#34;---&#34; &gt;&gt; &#34;${post_path}&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          echo &#34;${post_body}&#34; &gt;&gt; &#34;${post_path}&#34;<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">      <\/span>- <span class=\"nt\">name<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l\">Commit and Push Changes<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">        <\/span><span class=\"nt\">run<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"p\">|<\/span><span class=\"sd\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          git config --global user.name &#34;${{ github.actor }}&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          git config --global user.email &#34;${{ github.actor }}@users.noreply.github.com&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          git add .\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          git commit -m &#34;Sync issue #${{ github.event.issue.number }} to blog&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"sd\">          git push origin blog<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">        <\/span><span class=\"nt\">env<\/span><span class=\"p\">:<\/span><span class=\"w\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"w\">          <\/span><span class=\"nt\">GH_TOKEN<\/span><span class=\"p\">:<\/span><span class=\"w\"> <\/span><span class=\"l\">${{ secrets.GH_TOKEN }}<\/span><span class=\"w\">\n<\/span><\/span><\/span><\/code><\/pre><\/div><p>\u8fd9\u4e2a Workflows \u5c06\u4f1a\u5728\u9879\u76ee\u4e2d\u6709\u65b0\u7684 issue \u88ab\u521b\u5efa\u6216\u7f16\u8f91\u65f6\u8fd0\u884c\u3002\u5b83\u9996\u5148\u4f1a\u68c0\u51fa\u4ee3\u7801\u5e93\uff0c\u5e76\u5b89\u88c5\u6700\u65b0\u7248\u7684 Hugo\u3002\u63a5\u4e0b\u6765\uff0c\u5b83\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Markdown \u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u4e86 issue \u7684\u6807\u9898\u548c\u6b63\u6587\uff0c\u5e76\u5c06\u5176\u4fdd\u5b58\u5230\u9879\u76ee\u7684 blog \u5206\u652f\u7684 content\/post \u76ee\u5f55\u4e0b\uff0c\u6587\u4ef6\u540d\u683c\u5f0f\u4e3a {YYYYMMDD}-{Title}.md\u3002\u6700\u540e\uff0c\u5b83\u4f1a\u5c06\u66f4\u6539\u63d0\u4ea4\u5230 blog \u5206\u652f\uff0c\u5e76\u4f7f\u7528 GitHub API \u7684 token \u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1\u3002\u6ce8\u610f\uff0c\u4e3a\u4e86\u4f7f Workflows \u6b63\u786e\u8fd0\u884c\uff0c\u4f60\u9700\u8981\u5c06 GitHub API \u7684 token \u5b58\u50a8\u5728\u4f60\u7684\u9879\u76ee\u7684 secrets \u4e2d\uff0c\u5e76\u5c06\u5176\u547d\u540d\u4e3a GH_TOKEN\u3002<\/p>","title":"\u5982\u4f55\u628aIssue\u535a\u5ba2\u81ea\u52a8\u540c\u6b65\u5230github page\u4e2d"},{"content":"\u7528Docker\u5b9a\u5236Ubuntu\u542f\u52a8\u5149\u76d8\u955c\u50cf ubuntu \u542f\u52a8\u5149\u76d8\u955c\u50cf\u901a\u5e38\u7528\u4e8e\u5b89\u88c5Ubuntu\uff0c\u4f46\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5176\u4ed6\u4e00\u4e9b\u60c5\u51b5\uff0c\u5305\u62ec\u6ca1\u6709\u6301\u4e45\u6027\u7684\u9884\u914d\u7f6e\u684c\u9762\u548c\u7528\u4e8e\u5b89\u88c5\u7684\u81ea\u5b9a\u4e49iso\u3002\u4f20\u7edf\u4e0a\uff0c\u8fd9\u4e9b\u90fd\u662f\u7528chroots\u5236\u4f5c\u7684\u3002\u8fd8\u6709\u4e00\u4e9b\u56fe\u5f62\u5316\u5de5\u5177\u4e5f\u53ef\u4ee5\u5236\u4f5c\uff0c\u6bd4\u5982Cubic\uff0c\u8fd9\u4f7f\u5f97\u8fd9\u4e2a\u8fc7\u7a0b\u66f4\u5bb9\u6613\u3002 \u4f46\u662f\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u6ca1\u6709\u4efb\u4f55\u5185\u7f6e\u7684\u201c\u68c0\u67e5\u70b9\u201d\uff0c\u6240\u4ee5\u5f88\u96be\u8fed\u4ee3\u3002\u4e0d\u8fc7\uff0cDocker\u7684\u955c\u50cf\u521b\u5efa\u7cfb\u7edf\u662f\u5176\u4e2d\u4e00\u4e2a\u505a\u5f97\u5f88\u597d\u7684\u5de5\u5177. \u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8be5\u7cfb\u7edf\u521b\u5efaubuntu \u542f\u52a8\u5149\u76d8\u955c\u50cf\u3002\n\u6784\u5efa\u73af\u5883 \u672c\u5de5\u5177\u9700\u8981\u4e00\u4e2a\u652f\u6301squashfs-tools-ng\u5de5\u5177\u7684Linux\u53d1\u884c\u7248\uff0c\u7528\u6765\u89e3\u5305\u548c\u91cd\u6253\u5305ISO\u955c\u50cf\u3002\u622a\u6b62\u672c\u6587\u521b\u4f5c\u65f6\uff0cUbuntu 20.04LTS\u65f6\u662f\u6700\u597d\u7684\u652f\u6301\u8be5\u5de5\u5177\u7684Ubuntu\u53d1\u884c\u7248\u3002\u56e0\u6b64\u672c\u5de5\u5177\u91c7\u53d6\u4e86\u4e00\u4e2aUbuntu 20.04LTS\u7684\u865a\u62df\u673a\u4f5c\u4e3a\u6784\u5efa\u73af\u5883\u3002\nDocker \u5f53\u7136\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684.\n# \u5b89\u88c5docker curl -fsSL https:\/\/get.docker.com -o get-docker.sh sudo sh .\/get-docker.sh \u7528\u4e0b\u9762\u7684\u547d\u4ee4\u5b89\u88c5\u5176\u4ed6\u7684\u4f9d\u8d56\u5305\u3002\nsudo apt-get install p7zip-full grub2-common mtools xorriso squashfs-tools-ng \u6700\u540e\uff0c\u9700\u8981\u4e0b\u8f7d\u57fa\u7840\u7684Ubuntu\u542f\u52a8\u5149\u76d8\u955c\u50cf\u3002\u4e0b\u8f7d\u5730\u5740\u5728https:\/\/ubuntu.com\/download\/desktop\u3002 (\u6b64\u8fc7\u7a0b\u53ef\u80fd\u4e5f\u9002\u7528\u4e8e\u5176\u4ed6Ubuntu\u7248\u672c\uff08\u4f8b\u5982\u670d\u52a1\u5668\u7248\u672c\uff09\uff0c\u4f46\u662f\u901a\u5e38\u6709\u66f4\u597d\u7684\u65b9\u6cd5\u6765\u90e8\u7f72\u670d\u52a1\u5668\u3002)\n\u521b\u5efaDocker\u57fa\u7840\u6620\u50cf ISO\u901a\u8fc7\u5f15\u5bfcLinux\u5185\u6838\uff0c\u6302\u8f7dsquashfs\u6620\u50cf\u5e76\u4ece\u4e2d\u542f\u52a8Ubuntu\u6765\u5de5\u4f5c\u3002 \u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u4eceISO\u4e2d\u83b7\u53d6\u8be5squashfs\u6620\u50cf\u5e76\u4ece\u4e2d\u521b\u5efa\u4e00\u4e2aDocker\u57fa\u7840\u6620\u50cf\u3002\n\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u4eceISO\u4e2d\u63d0\u53d6squashfs\u6620\u50cf\uff1a\n# UBUNTU_ISO_PATH=path to the Ubuntu live ISO downloaded earlier 7z e -o. &#34;$UBUNTU_ISO_PATH&#34; casper\/filesystem.squashfs \u7136\u540e\u5c06\u8be5squashfs\u6620\u50cf\u5bfc\u5165Docker\uff1a\nsqfs2tar filesystem.squashfs | sudo docker import - &#34;ubuntulive:base&#34; \u8fd9\u5c06\u9700\u8981\u51e0\u5206\u949f\u624d\u80fd\u5b8c\u6210\u3002\nCustomising using a Dockerfile \u73b0\u5728\uff0csquashfs\u6620\u50cf\u53ef\u4f5c\u4e3aDocker\u4e2d\u7684\u6620\u50cf\u4f7f\u7528\uff0c\u6211\u4eec\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2a\u5bf9\u5176\u8fdb\u884c\u4fee\u6539\u7684Dockerfile\u3002\n# \u5728\u4e0a\u4e00\u8282\u4e2d\uff0c\u6211\u4eec\u5c06squashfs\u6620\u50cf\u5bfc\u5165Docker\u4e2d\uff0c\u955c\u50cf\u540d\u4e3a&#39;ubuntulive:base&#39; FROM ubuntulive:base # \u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u4ee5\u4fbfapt\u975e\u4ea4\u4e92\u5730\u5b89\u88c5\u8f6f\u4ef6\u5305 # \u8fd9\u4e9b\u53d8\u91cf\u5c06\u4ec5\u5728Docker\u4e2d\u8bbe\u7f6e\uff0c\u800c\u4e0d\u5728\u5b89\u88c5\u955c\u50cf\u4e2d\u8bbe\u7f6e ENV DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical # \u8fdb\u884c\u4e00\u4e9b\u4fee\u6539\uff0c\u4f8b\u5982 \u5b89\u88c5\u8c37\u6b4c\u6d4f\u89c8\u5668 RUN wget -q -O - https:\/\/dl-ssl.google.com\/linux\/linux_signing_key.pub | apt-key add - RUN sh -c &#39;echo &#34;deb [arch=amd64] http:\/\/dl.google.com\/linux\/chrome\/deb\/ stable main&#34; &gt;&gt; \/etc\/apt\/sources.list.d\/google-chrome.list&#39; RUN apt-get update RUN apt-get install -y google-chrome-stable # \u5b89\u88c5\u91cd\u65b0\u5305\u88c5ISO\u6240\u9700\u7684\u8f6f\u4ef6\u5305\uff08\u6211\u4eec\u5c06\u4f7f\u7528\u6b64\u6620\u50cf\u91cd\u65b0\u5305\u88c5\u81ea\u8eab\uff09 # \u5b89\u88c5BIOS\u652f\u6301\uff1agrub-pc-bin # \u5b89\u88c5EFI\u652f\u6301\uff1agrub-egi-amd64-bin and grub-efi-amd64-signed # \u6784\u5efaISO\uff1agrub2-common, mtools and xorriso # \u5176\u4e2dxorriso\u5728universe\u6e90 RUN add-apt-repository &#34;deb http:\/\/archive.ubuntu.com\/ubuntu $(lsb_release -sc) universe&#34; RUN apt-get install -y grub2-common grub-pc-bin grub-efi-amd64-bin grub-efi-amd64-signed mtools xorriso # \u5220\u9664\u8fc7\u65f6\u7684\u8f6f\u4ef6\u5305\u548c\u4efb\u4f55\u4e34\u65f6\u72b6\u6001 RUN apt-get autoremove -y &amp;&amp; apt-get clean RUN rm -rf \\ \/tmp\/* \\ \/boot\/* \\ \/var\/backups\/* \\ \/var\/log\/* \\ \/var\/run\/* \\ \/var\/crash\/* \\ \/var\/lib\/apt\/lists\/* \\ ~\/.bash_history \u5728\u5c1d\u8bd5\u6784\u5efa\u81ea\u5b9a\u4e49\u6620\u50cf\u4e4b\u524d\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ece\u6784\u5efa\u4e0a\u4e0b\u6587\u4e2d\u6392\u9664squashfs\u6620\u50cf\u548cISO\uff0c\u4ee5\u8282\u7701\u65f6\u95f4\u3002\necho &#34;**\/*.squashfs&#34; &gt;&gt; .dockerignore echo &#34;**\/*.iso&#34; &gt;&gt; .dockerignore \u73b0\u5728\uff0c\u8981\u6784\u5efa\u60a8\u7684\u81ea\u5b9a\u4e49\u56fe\u50cf\uff0c\u8bf7\u8fd0\u884c\u3002\nsudo docker build -t ubuntulive:image . \u5982\u679c\u60a8\u5bf9\u8f93\u51fa\u4e0d\u6ee1\u610f\u6216\u53d1\u751f\u9519\u8bef\uff0c\u8bf7\u4fee\u6539Dockerfile\u5e76\u518d\u6b21\u8fd0\u884c\u4ee5\u4e0a\u547d\u4ee4\u4ee5\u91cd\u8bd5\u3002 \u901a\u8fc7\u590d\u5236docker build\u8f93\u51fa\u4e2d\u7684\u6700\u540e\u4e00\u4e2a\u6210\u529f\u7684Image ID\u5e76\u8fd0\u884c\u5176\u5b9e\u4f8b\uff0c\u8fd8\u53ef\u4ee5\u968f\u65f6\u63a2\u7d22\u6620\u50cf\u548c\/\u6216\u6d4b\u8bd5\u547d\u4ee4\u3002 \u4f8b\u5982\uff1asudo docker run -it --rm IMAGE_ID \/bin\/bash.\n\u91cd\u65b0\u6253\u5305squashfs\u6620\u50cf \u5b8c\u6210docker build\u540e\uff0c\u63d0\u53d6Docker\u955c\u50cf\u5e76\u5c06\u5176\u8f6c\u6362\u56desquashfs\u955c\u50cf\u3002\n# run an instance of the Docker image CONTAINER_ID=$(sudo docker run -d ubuntulive:image \/usr\/bin\/tail -f \/dev\/null) # delete the auto-created .dockerenv marker file so it doesn&#39;t end up in the squashfs image sudo docker exec &#34;${CONTAINER_ID}&#34; rm \/.dockerenv # extract the Docker image contents to a tarball sudo docker cp &#34;${CONTAINER_ID}:\/&#34; - &gt; newfilesystem.tar # get the package listing for installation from ISO sudo docker exec &#34;${CONTAINER_ID}&#34; dpkg-query -W --showformat=&#39;${Package} ${Version}\\n&#39; &gt; newfilesystem.manifest # kill the container instance of the Docker image sudo docker rm -f &#34;${CONTAINER_ID}&#34; # convert the image tarball into a squashfs image tar2sqfs --quiet newfilesystem.squashfs &lt; newfilesystem.tar \u91cd\u65b0\u6253\u5305ISO\u6620\u50cf \u73b0\u5728\u6211\u4eec\u6709\u4e86\u65b0\u7684squashfs\u955c\u50cf\uff0c\u4e0b\u4e00\u6b65\u5c06\u91cd\u65b0\u6253\u5305ISO\u955c\u50cf\u3002\n# create a directory to build the ISO from mkdir iso # extract the contents of the ISO to the directory, except the original squashfs image # UBUNTU_ISO_PATH=path to the Ubuntu live ISO downloaded earlier 7z x &#39;-xr!filesystem.squashfs&#39; -oiso &#34;$UBUNTU_ISO_PATH&#34; # copy our custom squashfs image and manifest into place cp newfilesystem.squashfs iso\/casper\/filesystem.squashfs stat --printf=&#34;%s&#34; iso\/casper\/filesystem.squashfs &gt; iso\/casper\/filesystem.size cp newfilesystem.manifest iso\/casper\/filesystem.manifest # update state files (cd iso; find . -type f -print0 | xargs -0 md5sum | grep -v &#34;\\.\/md5sum.txt&#34; &gt; md5sum.txt) # remove obsolete files rm iso\/casper\/filesystem.squashfs.gpg # build the ISO image using the image itself sudo docker run \\ -it \\ --rm \\ -v &#34;$(pwd):\/app&#34; \\ ubuntulive:image \\ grub-mkrescue -v -o \/app\/ubuntulive.iso \/app\/iso\/ -- -volid UbuntuLive \u5927\u529f\u544a\u6210\uff01 \u91cd\u65b0\u6253\u5305\u7684\u81ea\u5b9a\u4e49Ubuntu\u542f\u52a8\u5149\u76d8\u955c\u50cf\u73b0\u5728\u53ef\u4ee5\u5728.\/ubuntulive.iso\u4e2d\u627e\u5230\u3002 \u4f7f\u7528GNOME Boxes\u6216\u5176\u4ed6VM\u5de5\u5177\u5bf9\u5176\u8fdb\u884c\u6d4b\u8bd5\uff0c\u6216\u4f7f\u7528dd\u6216GUI\u5de5\u5177\uff08\u4f8b\u5982balenaEtcher\uff09\u5c06\u5176\u8f6c\u53d8\u4e3a\u53ef\u542f\u52a8\u7684USB\u9a71\u52a8\u5668\u3002\n\u6ce8\u610f\u4e8b\u9879 \u6211\u6ca1\u6709\u4f7f\u7528\u8fd9\u4e9bISO\u8fdb\u884c\u5b89\u88c5\uff0c\u56e0\u6b64\u81ea\u5b9a\u4e49\u540e\u6211\u8fd8\u6ca1\u6709\u6d4b\u8bd5\u8fc7\u90e8\u5206\u529f\u80fd \u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u4e0esystemd\u4ea4\u4e92\u7684\u8f6f\u4ef6\u5305\u5c06\u5931\u8d25\uff0c\u56e0\u4e3aDocker\u73af\u5883\u4e2d\u6ca1\u6709\u8fd0\u884csystemd\u5b9e\u4f8b\u3002 \u8fd9\u4ec5\u662f\u975e\u6807\u51c6\u5305\u88c5\u7684\u95ee\u9898\uff1b \u6240\u6709Ubuntu \/ Debian\u8f6f\u4ef6\u5305\u90fd\u53ef\u4ee5\u6b63\u786e\u5904\u7406\u8fd9\u79cd\u60c5\u51b5 \u7528\u4e8e\u5f15\u5bfc\u7684\u5185\u6838\u6620\u50cf\u662fISO\u7684\u4e00\u90e8\u5206\uff0c\u4e0d\u4f1a\u901a\u8fc7\u6b64\u8fc7\u7a0b\u4eceDockerfile\u4e2d\u8fdb\u884c\u66f4\u65b0\uff08\u4f8b\u5982\uff0c\u901a\u8fc7apt\uff09\u3002 \u8981\u66f4\u65b0\u5185\u6838\u6620\u50cf\uff0c\u8bf7\u4e0b\u8f7d\u65b0\u7684Ubuntu live ISO\uff0c\u7136\u540e\u91cd\u590d\u6240\u6709\u6b65\u9aa4\uff0c\u5305\u62ec\u91cd\u65b0\u521b\u5efaDocker\u57fa\u672c\u6620\u50cf\u3002 \u5982\u679c\u672a\u91cd\u65b0\u521b\u5efaDocker\u57fa\u672c\u6620\u50cf\uff0c\u5219\u5b83\u53ef\u80fd\u4e0e\u5185\u6838\u6620\u50cf\u7248\u672c\u4e0d\u540c\u6b65\uff0c\u5e76\u4e14ISO\u4e0d\u4f1a\u542f\u52a8\u3002 \u53c2\u8003 Customising Ubuntu live ISOs with Docker \u76f8\u5173\u4ee3\u7801\u5df2\u7ecf\u4e0a\u4f20\u81f3\u6b64\uff1agithub:m2kar\/make-live-iso \u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20201221-%E7%94%A8docker%E5%AE%9A%E5%88%B6ubuntu%E5%90%AF%E5%8A%A8%E5%85%89%E7%9B%98\/","summary":"<h1 id=\"\u7528docker\u5b9a\u5236ubuntu\u542f\u52a8\u5149\u76d8\u955c\u50cf\">\u7528Docker\u5b9a\u5236Ubuntu\u542f\u52a8\u5149\u76d8\u955c\u50cf<\/h1>\n<p>ubuntu \u542f\u52a8\u5149\u76d8\u955c\u50cf\u901a\u5e38\u7528\u4e8e\u5b89\u88c5Ubuntu\uff0c\u4f46\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5176\u4ed6\u4e00\u4e9b\u60c5\u51b5\uff0c\u5305\u62ec\u6ca1\u6709\u6301\u4e45\u6027\u7684\u9884\u914d\u7f6e\u684c\u9762\u548c\u7528\u4e8e\u5b89\u88c5\u7684\u81ea\u5b9a\u4e49iso\u3002\u4f20\u7edf\u4e0a\uff0c\u8fd9\u4e9b\u90fd\u662f\u7528<a href=\"https:\/\/help.ubuntu.com\/community\/LiveCDCustomizationFromScratch\">chroots<\/a>\u5236\u4f5c\u7684\u3002\u8fd8\u6709\u4e00\u4e9b\u56fe\u5f62\u5316\u5de5\u5177\u4e5f\u53ef\u4ee5\u5236\u4f5c\uff0c\u6bd4\u5982<a href=\"https:\/\/launchpad.net\/cubic\">Cubic<\/a>\uff0c\u8fd9\u4f7f\u5f97\u8fd9\u4e2a\u8fc7\u7a0b\u66f4\u5bb9\u6613\u3002\n\u4f46\u662f\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u6ca1\u6709\u4efb\u4f55\u5185\u7f6e\u7684\u201c\u68c0\u67e5\u70b9\u201d\uff0c\u6240\u4ee5\u5f88\u96be\u8fed\u4ee3\u3002\u4e0d\u8fc7\uff0cDocker\u7684<a href=\"https:\/\/docs.docker.com\/develop\/develop-images\/baseimages\/\">\u955c\u50cf\u521b\u5efa\u7cfb\u7edf<\/a>\u662f\u5176\u4e2d\u4e00\u4e2a\u505a\u5f97\u5f88\u597d\u7684\u5de5\u5177. \u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8be5\u7cfb\u7edf\u521b\u5efaubuntu \u542f\u52a8\u5149\u76d8\u955c\u50cf\u3002<\/p>\n<h2 id=\"\u6784\u5efa\u73af\u5883\">\u6784\u5efa\u73af\u5883<\/h2>\n<p>\u672c\u5de5\u5177\u9700\u8981\u4e00\u4e2a\u652f\u6301<a href=\"https:\/\/github.com\/AgentD\/squashfs-tools-ng\">squashfs-tools-ng<\/a>\u5de5\u5177\u7684Linux\u53d1\u884c\u7248\uff0c\u7528\u6765\u89e3\u5305\u548c\u91cd\u6253\u5305ISO\u955c\u50cf\u3002\u622a\u6b62\u672c\u6587\u521b\u4f5c\u65f6\uff0cUbuntu 20.04LTS\u65f6\u662f\u6700\u597d\u7684\u652f\u6301\u8be5\u5de5\u5177\u7684Ubuntu\u53d1\u884c\u7248\u3002\u56e0\u6b64\u672c\u5de5\u5177\u91c7\u53d6\u4e86\u4e00\u4e2aUbuntu 20.04LTS\u7684\u865a\u62df\u673a\u4f5c\u4e3a\u6784\u5efa\u73af\u5883\u3002<\/p>\n<p><a href=\"https:\/\/docs.docker.com\/engine\/install\/ubuntu\/\">Docker<\/a> \u5f53\u7136\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684.<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># \u5b89\u88c5docker<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">curl -fsSL https:\/\/get.docker.com -o get-docker.sh\n<\/span><\/span><span class=\"line\"><span class=\"cl\">sudo sh .\/get-docker.sh\n<\/span><\/span><\/code><\/pre><\/div><p>\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u5b89\u88c5\u5176\u4ed6\u7684\u4f9d\u8d56\u5305\u3002<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-sh\" data-lang=\"sh\"><span class=\"line\"><span class=\"cl\">sudo apt-get install p7zip-full grub2-common mtools xorriso squashfs-tools-ng\n<\/span><\/span><\/code><\/pre><\/div><p>\u6700\u540e\uff0c\u9700\u8981\u4e0b\u8f7d\u57fa\u7840\u7684Ubuntu\u542f\u52a8\u5149\u76d8\u955c\u50cf\u3002\u4e0b\u8f7d\u5730\u5740\u5728https:\/\/ubuntu.com\/download\/desktop\u3002 (\u6b64\u8fc7\u7a0b\u53ef\u80fd\u4e5f\u9002\u7528\u4e8e\u5176\u4ed6Ubuntu\u7248\u672c\uff08\u4f8b\u5982\u670d\u52a1\u5668\u7248\u672c\uff09\uff0c\u4f46\u662f\u901a\u5e38\u6709\u66f4\u597d\u7684\u65b9\u6cd5\u6765\u90e8\u7f72\u670d\u52a1\u5668\u3002)<\/p>\n<h2 id=\"\u521b\u5efadocker\u57fa\u7840\u6620\u50cf\">\u521b\u5efaDocker\u57fa\u7840\u6620\u50cf<\/h2>\n<p>ISO\u901a\u8fc7\u5f15\u5bfcLinux\u5185\u6838\uff0c\u6302\u8f7dsquashfs\u6620\u50cf\u5e76\u4ece\u4e2d\u542f\u52a8Ubuntu\u6765\u5de5\u4f5c\u3002 \u56e0\u6b64\uff0c\u6211\u4eec\u9700\u8981\u4eceISO\u4e2d\u83b7\u53d6\u8be5squashfs\u6620\u50cf\u5e76\u4ece\u4e2d\u521b\u5efa\u4e00\u4e2aDocker\u57fa\u7840\u6620\u50cf\u3002<\/p>\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u4eceISO\u4e2d\u63d0\u53d6squashfs\u6620\u50cf\uff1a<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-sh\" data-lang=\"sh\"><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># UBUNTU_ISO_PATH=path to the Ubuntu live ISO downloaded earlier<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">7z e -o. <span class=\"s2\">&#34;<\/span><span class=\"nv\">$UBUNTU_ISO_PATH<\/span><span class=\"s2\">&#34;<\/span> casper\/filesystem.squashfs\n<\/span><\/span><\/code><\/pre><\/div><p>\u7136\u540e\u5c06\u8be5squashfs\u6620\u50cf\u5bfc\u5165Docker\uff1a<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-sh\" data-lang=\"sh\"><span class=\"line\"><span class=\"cl\">sqfs2tar filesystem.squashfs <span class=\"p\">|<\/span> sudo docker import - <span class=\"s2\">&#34;ubuntulive:base&#34;<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p>\u8fd9\u5c06\u9700\u8981\u51e0\u5206\u949f\u624d\u80fd\u5b8c\u6210\u3002<\/p>\n<h2 id=\"customising-using-a-dockerfile\">Customising using a Dockerfile<\/h2>\n<p>\u73b0\u5728\uff0csquashfs\u6620\u50cf\u53ef\u4f5c\u4e3aDocker\u4e2d\u7684\u6620\u50cf\u4f7f\u7528\uff0c\u6211\u4eec\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2a\u5bf9\u5176\u8fdb\u884c\u4fee\u6539\u7684<a href=\"https:\/\/docs.docker.com\/engine\/reference\/builder\/\">Dockerfile<\/a>\u3002<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-dockerfile\" data-lang=\"dockerfile\"><span class=\"line\"><span class=\"cl\"><span class=\"c\"># \u5728\u4e0a\u4e00\u8282\u4e2d\uff0c\u6211\u4eec\u5c06squashfs\u6620\u50cf\u5bfc\u5165Docker\u4e2d\uff0c\u955c\u50cf\u540d\u4e3a&#39;ubuntulive:base&#39;<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">FROM<\/span><span class=\"w\"> <\/span><span class=\"s\">ubuntulive:base<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c\"># \u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u4ee5\u4fbfapt\u975e\u4ea4\u4e92\u5730\u5b89\u88c5\u8f6f\u4ef6\u5305<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c\"># \u8fd9\u4e9b\u53d8\u91cf\u5c06\u4ec5\u5728Docker\u4e2d\u8bbe\u7f6e\uff0c\u800c\u4e0d\u5728\u5b89\u88c5\u955c\u50cf\u4e2d\u8bbe\u7f6e<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">ENV<\/span> <span class=\"nv\">DEBIAN_FRONTEND<\/span><span class=\"o\">=<\/span>noninteractive <span class=\"nv\">DEBIAN_PRIORITY<\/span><span class=\"o\">=<\/span>critical\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c\"># \u8fdb\u884c\u4e00\u4e9b\u4fee\u6539\uff0c\u4f8b\u5982 \u5b89\u88c5\u8c37\u6b4c\u6d4f\u89c8\u5668<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">RUN<\/span> wget -q -O - https:\/\/dl-ssl.google.com\/linux\/linux_signing_key.pub <span class=\"p\">|<\/span> apt-key add -<span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">RUN<\/span> sh -c <span class=\"s1\">&#39;echo &#34;deb [arch=amd64] http:\/\/dl.google.com\/linux\/chrome\/deb\/ stable main&#34; &gt;&gt; \/etc\/apt\/sources.list.d\/google-chrome.list&#39;<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">RUN<\/span> apt-get update<span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">RUN<\/span> apt-get install -y google-chrome-stable<span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c\"># \u5b89\u88c5\u91cd\u65b0\u5305\u88c5ISO\u6240\u9700\u7684\u8f6f\u4ef6\u5305\uff08\u6211\u4eec\u5c06\u4f7f\u7528\u6b64\u6620\u50cf\u91cd\u65b0\u5305\u88c5\u81ea\u8eab\uff09<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c\"># \u5b89\u88c5BIOS\u652f\u6301\uff1agrub-pc-bin<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c\"># \u5b89\u88c5EFI\u652f\u6301\uff1agrub-egi-amd64-bin and grub-efi-amd64-signed <\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c\"># \u6784\u5efaISO\uff1agrub2-common, mtools and xorriso<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c\"># \u5176\u4e2dxorriso\u5728universe\u6e90<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">RUN<\/span> add-apt-repository <span class=\"s2\">&#34;deb http:\/\/archive.ubuntu.com\/ubuntu <\/span><span class=\"k\">$(<\/span>lsb_release -sc<span class=\"k\">)<\/span><span class=\"s2\"> universe&#34;<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">RUN<\/span> apt-get install -y grub2-common grub-pc-bin grub-efi-amd64-bin grub-efi-amd64-signed mtools xorriso<span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c\"># \u5220\u9664\u8fc7\u65f6\u7684\u8f6f\u4ef6\u5305\u548c\u4efb\u4f55\u4e34\u65f6\u72b6\u6001<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">RUN<\/span> apt-get autoremove -y <span class=\"o\">&amp;&amp;<\/span> apt-get clean<span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">RUN<\/span> rm -rf <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    \/tmp\/* <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    \/boot\/* <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    \/var\/backups\/* <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    \/var\/log\/* <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    \/var\/run\/* <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    \/var\/crash\/* <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    \/var\/lib\/apt\/lists\/* <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    ~\/.bash_history<span class=\"err\">\n<\/span><\/span><\/span><\/code><\/pre><\/div><p>\u5728\u5c1d\u8bd5\u6784\u5efa\u81ea\u5b9a\u4e49\u6620\u50cf\u4e4b\u524d\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ece\u6784\u5efa\u4e0a\u4e0b\u6587\u4e2d\u6392\u9664squashfs\u6620\u50cf\u548cISO\uff0c\u4ee5\u8282\u7701\u65f6\u95f4\u3002<\/p>","title":"\u7528Docker\u5b9a\u5236Ubuntu\u542f\u52a8\u5149\u76d8\u955c\u50cf"},{"content":" \u6807\u9898: FIRMSCOPE: Automatic Uncovering of Privilege-Escalation Vulnerabilities in Pre-Installed Apps in Android Firmware \u4f5c\u8005: Mohamed Elsabagh, Ryan Johnson,..,Chaoshun Zuo \u5173\u952e\u5b57: \u8bba\u6587\u7b14\u8bb0, \u7cfb\u7edf\u5b89\u5168, \u5b89\u5353\u5e94\u7528, \u63d0\u6743\u6f0f\u6d1e \u6765\u6e90: sec20 \u94fe\u63a5: \u5f15\u7528: Elsabagh, Mohamed, Ryan Johnson, Angelos Stavrou, Chaoshun Zuo, Qingchuan Zhao, and Zhiqiang Lin. \u201cFIRMSCOPE: Automatic Uncovering of Privilege-Escalation Vulnerabilities in Pre-Installed Apps in Android Firmware.\u201d In 29th USENIX Security Symposium (USENIX Security 20), 2379\u201396, 2020. https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/elsabagh. \u6458\u8981 Android\u8bbe\u5907\u5728\u56fa\u4ef6\u4e2d\u9884\u88c5\u4e86\u7279\u6743\u5e94\u7528\u7a0b\u5e8f\u2014\u2014\u5176\u4e2d\u4e00\u4e9b\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u7cfb\u7edf\u7ec4\u4ef6\uff0c\u53e6\u4e00\u4e9b\u5219\u63d0\u4f9b\u4e86\u7528\u6237\u65e0\u6cd5\u7981\u7528\u7684\u72ec\u7279\u7528\u6237\u4f53\u9a8c\u3002\u8fd9\u4e9b\u9884\u5b89\u88c5\u7684\u5e94\u7528\u7a0b\u5e8f\u88ab\u8ba4\u4e3a\u662f\u5b89\u5168\u7684\uff0c\u56e0\u4e3a\u5b83\u4eec\u662f\u7531\u8bbe\u5907\u4f9b\u5e94\u5546\u81ea\u5df1\u800c\u4e0d\u662f\u7b2c\u4e09\u65b9\u4eb2\u81ea\u6311\u9009\u6216\u5f00\u53d1\u7684\u3002\u4e0d\u5e78\u7684\u662f\uff0c\u6211\u4eec\u53d1\u73b0\u5927\u91cfAndroid\u56fa\u4ef6\u5728\u9884\u88c5\u7684\u5e94\u7528\u7a0b\u5e8f\u4e2d\u5b58\u5728\u6743\u9650\u63d0\u5347\u6f0f\u6d1e\uff0c\u4f7f\u5f97\u653b\u51fb\u8005\u80fd\u591f\u6267\u884c\u672a\u7ecf\u6388\u6743\u7684\u64cd\u4f5c\uff0c\u5982\u6267\u884c\u4efb\u610f\u547d\u4ee4\u3001\u5f55\u5236\u8bbe\u5907\u97f3\u9891\u548c\u5c4f\u5e55\u4ee5\u53ca\u8bbf\u95ee\u4e2a\u4eba\u6570\u636e\u7b49\u7b49\u3002\u4e3a\u4e86\u53d1\u73b0\u8fd9\u4e9b\u6f0f\u6d1e\uff0c\u6211\u4eec\u6784\u5efa\u4e86FIRMSCOPE\uff0c\u8fd9\u662f\u4e00\u4e2a\u65b0\u7684\u9759\u6001\u5206\u6790\u7cfb\u7edf\uff0c\u5b83\u901a\u8fc7\u9ad8\u6548\u5b9e\u7528\u7684\u4e0a\u4e0b\u6587\u654f\u611f\u3001\u6d41\u654f\u611f\u3001\u5b57\u6bb5\u654f\u611f\u548c\u90e8\u5206\u5bf9\u8c61\u654f\u611f\u7684\u6c61\u67d3\u5206\u6790\u6765\u5206\u6790Android\u56fa\u4ef6\uff0c\u4ee5\u66b4\u9732\u9884\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f\u4e2d\u4e0d\u9700\u8981\u7684\u529f\u80fd\u3002\u6211\u4eec\u7684\u5b9e\u9a8c\u7ed3\u679c\u8868\u660e\uff0cFIRMSCOPE\u5728\u68c0\u6d4b\u80fd\u529b\u548c\u8fd0\u884c\u65f6\u6027\u80fd\u65b9\u9762\u90fd\u660e\u663e\u4f18\u4e8e\u6700\u5148\u8fdb\u7684Android\u6c61\u70b9\u5206\u6790\u89e3\u51b3\u65b9\u6848\u3002\u6211\u4eec\u4f7f\u7528FIRMSCOPE\u626b\u63cf\u4e86\u6765\u81ea100\u591a\u5bb6Android\u5382\u5546\u76842017\u5e74Android\u56fa\u4ef6\u6620\u50cf331342\u4e2a\u9884\u88c5\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ecev4.0\u5230v9.0\u3002\u5176\u4e2d\uff0cFIRMSCOPE\u53d1\u73b0\u4e86850\u4e2a\u72ec\u7279\u7684\u6743\u9650\u63d0\u5347\u6f0f\u6d1e\uff0c\u5176\u4e2d\u8bb8\u591a\u6f0f\u6d1e\u662f\u53ef\u5229\u7528\u7684\uff0c\u4e14\u4e3a0 day\u3002\n\u4ecb\u7ecd \u73b0\u5b9e\u95ee\u9898 \u9884\u5b89\u88c5\u7684\u5e94\u7528\u7a0b\u5e8f\u5177\u6709\u9884\u6279\u51c6\u7684\u654f\u611f\u6743\u9650\u548c\u529f\u80fd\uff0c\u8fd9\u4e9b\u6743\u9650\u548c\u529f\u80fd\u5bf9\u4e8e\u4ece\u5e94\u7528\u7a0b\u5e8f\u5546\u5e97\u4e0b\u8f7d\u7684\u7528\u6237\u7ea7\u5e94\u7528\u7a0b\u5e8f\u4e0d\u53ef\u7528\uff0c\u5e76\u4e14\u901a\u5e38\u4e0d\u9700\u8981\u7528\u6237\u6279\u51c6\u6216\u540c\u610f\u624d\u80fd\u8fd0\u884c\u3002\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u5373\u4f7f\u662f\u88ab\u9884\u88c5\u7684\u5e94\u7528\u7a0b\u5e8f\u4e5f\u65e0\u6cd5\u88ab\u7528\u6237\u9884\u5148\u5b89\u88c5\uff0c\u6216\u8005\u88ab\u7cfb\u7edf\u53d1\u73b0\u662f\u6076\u610f\u7684\u3002\u5f53\u7528\u6237\u9762\u4e34\u8fd9\u4e9b\u5a01\u80c1\u65f6\uff0c\u4ed6\u4eec\u7684\u9009\u62e9\u662f\u6709\u9650\u7684\uff1a\u7b49\u5f85\u66f4\u65b0\uff0c\u5e0c\u671b\u80fd\u4fee\u590d\u6613\u53d7\u653b\u51fb\u7684\u9884\u88c5\u5e94\u7528\u7a0b\u5e8f\uff1b\u6216\u8005\u901a\u8fc7\u5bf9\u8bbe\u5907\u8fdb\u884c\u6839\u76ee\u5f55\u5220\u9664\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ece\u800c\u53ef\u80fd\u4f7f\u5176\u4fdd\u4fee\u5931\u6548\u5e76\u635f\u5bb3\u5176\u5b89\u5168\u6027\u3002\n\u901a\u8fc7\u56fa\u4ef6\u5206\u53d1\u7684\u8f6f\u4ef6\u4f1a\u4f7f\u6700\u7ec8\u7528\u6237\u66b4\u9732\u5728\u4ed6\u4eec\u4e0d\u77e5\u9053\u7684\u4e25\u91cd\u5b89\u5168\u98ce\u9669\u4e2d\uff0c\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u751a\u81f3\u5bf9\u8bbe\u5907\u5236\u9020\u5546\u4e5f\u662f\u5982\u6b64\u3002\n\u5f85\u89e3\u51b3\u7684\u95ee\u9898 \u8feb\u5207\u9700\u8981\u89e3\u51b3\u6765\u81ea\u901a\u8fc7\u79fb\u52a8\u8bbe\u5907\u56fa\u4ef6\u6620\u50cf\u5206\u53d1\u7684\u6613\u53d7\u653b\u51fb\u6216\u6076\u610f\u8f6f\u4ef6\u7684\u4f9b\u5e94\u94fe\u5a01\u80c1\u3002\nbenchmark\uff1a DroidBench 2.0 [12], and is 2X to 24X faster than FlowDroid [9], Amandroid [10], and DroidSafe [11].\n\u4e3b\u8981\u8d21\u732e \u672c\u6587\u63d0\u51fa\u4e86FIRMSCOPE\uff0c\u4e00\u4e2a\u53ef\u6269\u5c55\u7684\u3001\u5168\u9762\u7684\u3001\u81ea\u52a8\u5316\u7684\u9759\u6001\u6c61\u67d3\u5206\u6790\u7cfb\u7edf\uff0c\u7528\u4e8e\u8bc6\u522bAndroid\u56fa\u4ef6\u4e2d\u5b58\u5728\u7684\u6076\u610f\u548c\uff08\u975e\uff09\u6545\u610f\u4e0d\u5b89\u5168\u7684\u9884\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u56fa\u4ef6\u6f0f\u6d1e\u3002\u5e76\u975e\u6240\u6709\u7684\u6f0f\u6d1e\u90fd\u662f\u6211\u4eec\u611f\u5174\u8da3\u7684\uff0c\u76f8\u53cd\uff0c\u6211\u4eec\u7279\u522b\u5173\u6ce8\u4e8e\u68c0\u6d4b\u9884\u88c5\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u6743\u9650\u6269\u5c55\u6f0f\u6d1e\uff0c\u5176\u4e2d\u654f\u611f\u884c\u4e3a\u53ef\u7531\u5916\u90e8\u8c03\u7528\uff08\u4f8b\u5982\uff0c\u7531\u7b2c\u4e09\u65b9\u5e94\u7528\u7a0b\u5e8f\u6216\u8fdc\u7a0b\u65b9\u8c03\u7528\uff09\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u672a\u7ecf\u6388\u6743\u7684\u7b2c\u4e09\u65b9\u5e94\u7528\u7a0b\u5e8f\uff0c\u901a\u8fc7\u5229\u7528\u9884\u88c5\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0d\u5b89\u5168\u63a5\u53e3\uff0c\u4ee5\u7cfb\u7edf\u7528\u6237\u7684\u8eab\u4efd\u6267\u884c\u547d\u4ee4\u3002\n\u6211\u4eec\u5bf9FIRMSCOPE\u4ece2017\u5e74Android\u56fa\u4ef6\u6620\u50cf\uff08\u4ecev4.0\u5230v9.0\uff09\u7684331342\u4e2a\u9884\u88c5\u5e94\u7528\u8fdb\u884c\u4e86\u8bc4\u4f30\uff0c\u6db5\u76d6\u4e86100\u591a\u5bb6Android\u4f9b\u5e94\u5546\uff0c\u5176\u4e2d\u5305\u62ec\u5168\u7403\u6392\u540d\u524d20\u7684Android\u4f9b\u5e94\u5546\u3002FIRMSCOPE\u57281547\u4e2a\u56fa\u4ef6\uff08\u5360\u6240\u5206\u6790\u6620\u50cf\u768477%\uff09\u4e2d\u53d1\u73b0\u4e86850\u4e2a\u72ec\u7279\u7684\u6743\u9650\u63d0\u5347\u6f0f\u6d1e\uff08\u603b\u51713483\u4e2a\uff09\u3002\u8fd9\u4e9b\u6f0f\u6d1e\u5305\u62ec\u4ee3\u7801\u548c\u547d\u4ee4\u6ce8\u5165\uff1b\u83b7\u53d6\u8c03\u5236\u89e3\u8c03\u5668\u65e5\u5fd7\u548cLogcat\u65e5\u5fd7\uff1b\u4ece\u8bbe\u5907\u4e2d\u64e6\u9664\u6240\u6709\u7528\u6237\u6570\u636e\uff08\u5373\u51fa\u5382\u91cd\u7f6e\uff09\uff1b\u8bbf\u95ee\u3001\u53d1\u9001\u548c\u64cd\u4f5c\u547c\u53eb\u548c\u77ed\u4fe1\uff1b\uff08\u53d6\u6d88\uff09\u5b89\u88c5\u4efb\u610f\u5e94\u7528\u7a0b\u5e8f\uff1b\u5f55\u5236\u8bbe\u5907\u5c4f\u5e55\u548c\u9ea6\u514b\u98ce\u7b49\u3002\u534f\u8c03\u62ab\u9732\u6211\u4eec\u7684\u8c03\u67e5\u7ed3\u679c\u4ecd\u5728\u8fdb\u884c\u4e2d\u3002\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u6211\u4eec\u5df2\u7ecf\u5411\u53d7\u5f71\u54cd\u7684\u4f9b\u5e94\u5546\u62ab\u9732\u4e86Android 7\u52309\u4e2d\u7684370\u4e2a\u6f0f\u6d1e\uff0c\u5e76\u6536\u5230\u4e86147\u4e2aCVE\u3002 \u7b80\u800c\u8a00\u4e4b\uff0c\u6211\u4eec\u4f5c\u51fa\u4ee5\u4e0b\u8d21\u732e\uff1a\n\u65b0\u9896\u7684\u7cfb\u7edf\u3002\u6211\u4eec\u4ecb\u7ecd\u4e86FIRMSCOPE\uff0c\u4e00\u4e2a\u53ef\u6269\u5c55\u7684\u3001\u5168\u9762\u7684\u3001\u81ea\u52a8\u5316\u7684\u7cfb\u7edf\uff0c\u7528\u4e8e\u5927\u89c4\u6a21\u8bc6\u522b\u5b89\u5353\u56fa\u4ef6\u4e2d\u9884\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u7279\u6743\u6269\u5c55\u6f0f\u6d1e\u3002 \u9ad8\u6548\u6280\u672f\u3002\u6211\u4eec\u901a\u8fc7\u9ad8\u6548\u7684\u6309\u9700\u5b9a\u5236\u6d41\u3001\u4e0a\u4e0b\u6587\u3001\u5b57\u6bb5\u654f\u611f\u548c\u90e8\u5206\u5bf9\u8c61\u654f\u611f\u7684\u5206\u6790\uff0c\u663e\u8457\u63d0\u9ad8\u4e86\u73b0\u6709\u9759\u6001\u6c61\u67d3\u5206\u6790\u7684\u53ef\u4f38\u7f29\u6027\u548c\u51c6\u786e\u6027\u3002 \u5927\u89c4\u6a21\u8bc4\u4f30\u3002\u6211\u4eec\u4f7f\u7528\u6765\u81ea2000\u591a\u4e2a\u56fa\u4ef6\u7684\u6570\u5341\u4e07\u4e2a\u9884\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f\u5bf9FIRMSCOPE\u8fdb\u884c\u8bc4\u4f30\uff0c\u5176\u4e2d\u53d1\u73b0\u4e863000\u591a\u4e2a\u6743\u9650\u63d0\u5347\u6f0f\u6d1e\u3002 \u4e4b\u524d\u7814\u7a76\u7684\u4e0d\u8db3 \u65b9\u6cd5 \u5b9e\u9a8c\u8bc4\u4f30 \u6570\u636e\u96c6 \u5b9e\u9a8c\u65b9\u6cd5 \u5b9e\u9a8c\u6548\u679c \u8ba8\u8bba \u603b\u7ed3 \u4f5c\u8005\u4ecb\u7ecd \u6536\u83b7 \u672c\u6587\u4f18\u52bf \u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206: \u2b50\u2b50\u2b50\u2b50\u2b50\n\u8bc4\u4ef7:\n\u53c2\u8003\u8d44\u6599\u53ca\u9644\u4ef6 ","permalink":"https:\/\/m2kar.cn\/posts\/20201201-firmscope-%E8%87%AA%E5%8A%A8%E5%8C%96%E5%8F%91%E7%8E%B0%E5%AE%89%E5%8D%93%E7%B3%BB%E7%BB%9F%E5%BA%94%E7%94%A8%E7%9A%84%E6%8F%90%E6%9D%83%E6%BC%8F%E6%B4%9E\/","summary":"<ul>\n<li><strong>\u6807\u9898:<\/strong> FIRMSCOPE: Automatic Uncovering of Privilege-Escalation Vulnerabilities in Pre-Installed Apps in Android Firmware<\/li>\n<li><strong>\u4f5c\u8005:<\/strong> Mohamed Elsabagh, Ryan Johnson,..,Chaoshun Zuo<\/li>\n<li><strong>\u5173\u952e\u5b57:<\/strong> \u8bba\u6587\u7b14\u8bb0, \u7cfb\u7edf\u5b89\u5168, \u5b89\u5353\u5e94\u7528, \u63d0\u6743\u6f0f\u6d1e<\/li>\n<li><strong>\u6765\u6e90:<\/strong> sec20<\/li>\n<li><strong>\u94fe\u63a5:<\/strong><\/li>\n<li><strong>\u5f15\u7528:<\/strong> Elsabagh, Mohamed, Ryan Johnson, Angelos Stavrou, Chaoshun Zuo, Qingchuan Zhao, and Zhiqiang Lin. \u201cFIRMSCOPE: Automatic Uncovering of Privilege-Escalation Vulnerabilities in Pre-Installed Apps in Android Firmware.\u201d In 29th USENIX Security Symposium (USENIX Security 20), 2379\u201396, 2020. <a href=\"https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/elsabagh\">https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/elsabagh<\/a>.<\/li>\n<\/ul>\n<h2 id=\"\u6458\u8981\">\u6458\u8981<\/h2>\n<p>Android\u8bbe\u5907\u5728\u56fa\u4ef6\u4e2d\u9884\u88c5\u4e86\u7279\u6743\u5e94\u7528\u7a0b\u5e8f\u2014\u2014\u5176\u4e2d\u4e00\u4e9b\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u7cfb\u7edf\u7ec4\u4ef6\uff0c\u53e6\u4e00\u4e9b\u5219\u63d0\u4f9b\u4e86\u7528\u6237\u65e0\u6cd5\u7981\u7528\u7684\u72ec\u7279\u7528\u6237\u4f53\u9a8c\u3002\u8fd9\u4e9b\u9884\u5b89\u88c5\u7684\u5e94\u7528\u7a0b\u5e8f\u88ab\u8ba4\u4e3a\u662f\u5b89\u5168\u7684\uff0c\u56e0\u4e3a\u5b83\u4eec\u662f\u7531\u8bbe\u5907\u4f9b\u5e94\u5546\u81ea\u5df1\u800c\u4e0d\u662f\u7b2c\u4e09\u65b9\u4eb2\u81ea\u6311\u9009\u6216\u5f00\u53d1\u7684\u3002\u4e0d\u5e78\u7684\u662f\uff0c\u6211\u4eec\u53d1\u73b0<strong>\u5927\u91cfAndroid\u56fa\u4ef6\u5728\u9884\u88c5\u7684\u5e94\u7528\u7a0b\u5e8f\u4e2d\u5b58\u5728\u6743\u9650\u63d0\u5347\u6f0f\u6d1e<\/strong>\uff0c\u4f7f\u5f97\u653b\u51fb\u8005\u80fd\u591f\u6267\u884c\u672a\u7ecf\u6388\u6743\u7684\u64cd\u4f5c\uff0c\u5982\u6267\u884c\u4efb\u610f\u547d\u4ee4\u3001\u5f55\u5236\u8bbe\u5907\u97f3\u9891\u548c\u5c4f\u5e55\u4ee5\u53ca\u8bbf\u95ee\u4e2a\u4eba\u6570\u636e\u7b49\u7b49\u3002\u4e3a\u4e86\u53d1\u73b0\u8fd9\u4e9b\u6f0f\u6d1e\uff0c\u6211\u4eec\u6784\u5efa\u4e86FIRMSCOPE\uff0c\u8fd9\u662f\u4e00\u4e2a\u65b0\u7684\u9759\u6001\u5206\u6790\u7cfb\u7edf\uff0c\u5b83\u901a\u8fc7\u9ad8\u6548\u5b9e\u7528\u7684\u4e0a\u4e0b\u6587\u654f\u611f\u3001\u6d41\u654f\u611f\u3001\u5b57\u6bb5\u654f\u611f\u548c\u90e8\u5206\u5bf9\u8c61\u654f\u611f\u7684\u6c61\u67d3\u5206\u6790\u6765\u5206\u6790Android\u56fa\u4ef6\uff0c\u4ee5\u66b4\u9732\u9884\u5b89\u88c5\u5e94\u7528\u7a0b\u5e8f\u4e2d\u4e0d\u9700\u8981\u7684\u529f\u80fd\u3002\u6211\u4eec\u7684\u5b9e\u9a8c\u7ed3\u679c\u8868\u660e\uff0cFIRMSCOPE\u5728\u68c0\u6d4b\u80fd\u529b\u548c\u8fd0\u884c\u65f6\u6027\u80fd\u65b9\u9762\u90fd\u660e\u663e\u4f18\u4e8e\u6700\u5148\u8fdb\u7684Android\u6c61\u70b9\u5206\u6790\u89e3\u51b3\u65b9\u6848\u3002\u6211\u4eec\u4f7f\u7528FIRMSCOPE\u626b\u63cf\u4e86\u6765\u81ea100\u591a\u5bb6Android\u5382\u5546\u76842017\u5e74Android\u56fa\u4ef6\u6620\u50cf331342\u4e2a\u9884\u88c5\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ecev4.0\u5230v9.0\u3002\u5176\u4e2d\uff0cFIRMSCOPE\u53d1\u73b0\u4e86<strong>850\u4e2a\u72ec\u7279\u7684\u6743\u9650\u63d0\u5347\u6f0f\u6d1e<\/strong>\uff0c\u5176\u4e2d\u8bb8\u591a\u6f0f\u6d1e\u662f\u53ef\u5229\u7528\u7684\uff0c\u4e14\u4e3a0 day\u3002<\/p>\n<h2 id=\"\u4ecb\u7ecd\">\u4ecb\u7ecd<\/h2>\n<h3 id=\"\u73b0\u5b9e\u95ee\u9898\">\u73b0\u5b9e\u95ee\u9898<\/h3>\n<p>\u9884\u5b89\u88c5\u7684\u5e94\u7528\u7a0b\u5e8f\u5177\u6709<strong>\u9884\u6279\u51c6\u7684\u654f\u611f\u6743\u9650\u548c\u529f\u80fd<\/strong>\uff0c\u8fd9\u4e9b\u6743\u9650\u548c\u529f\u80fd\u5bf9\u4e8e\u4ece\u5e94\u7528\u7a0b\u5e8f\u5546\u5e97\u4e0b\u8f7d\u7684\u7528\u6237\u7ea7\u5e94\u7528\u7a0b\u5e8f\u4e0d\u53ef\u7528\uff0c\u5e76\u4e14\u901a\u5e38\u4e0d\u9700\u8981\u7528\u6237\u6279\u51c6\u6216\u540c\u610f\u624d\u80fd\u8fd0\u884c\u3002\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u5373\u4f7f\u662f\u88ab\u9884\u88c5\u7684\u5e94\u7528\u7a0b\u5e8f\u4e5f\u65e0\u6cd5\u88ab\u7528\u6237\u9884\u5148\u5b89\u88c5\uff0c\u6216\u8005\u88ab\u7cfb\u7edf\u53d1\u73b0\u662f\u6076\u610f\u7684\u3002\u5f53\u7528\u6237\u9762\u4e34\u8fd9\u4e9b\u5a01\u80c1\u65f6\uff0c\u4ed6\u4eec\u7684\u9009\u62e9\u662f\u6709\u9650\u7684\uff1a\u7b49\u5f85\u66f4\u65b0\uff0c\u5e0c\u671b\u80fd\u4fee\u590d\u6613\u53d7\u653b\u51fb\u7684\u9884\u88c5\u5e94\u7528\u7a0b\u5e8f\uff1b\u6216\u8005\u901a\u8fc7\u5bf9\u8bbe\u5907\u8fdb\u884c\u6839\u76ee\u5f55\u5220\u9664\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ece\u800c\u53ef\u80fd\u4f7f\u5176\u4fdd\u4fee\u5931\u6548\u5e76\u635f\u5bb3\u5176\u5b89\u5168\u6027\u3002<\/p>\n<p><strong>\u901a\u8fc7\u56fa\u4ef6\u5206\u53d1\u7684\u8f6f\u4ef6<\/strong>\u4f1a\u4f7f\u6700\u7ec8\u7528\u6237\u66b4\u9732\u5728\u4ed6\u4eec\u4e0d\u77e5\u9053\u7684\u4e25\u91cd\u5b89\u5168\u98ce\u9669\u4e2d\uff0c\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\u751a\u81f3\u5bf9\u8bbe\u5907\u5236\u9020\u5546\u4e5f\u662f\u5982\u6b64\u3002<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011FIRMSCOPE\uff1a\u81ea\u52a8\u5316\u53d1\u73b0\u5b89\u5353\u7cfb\u7edf\u5e94\u7528\u7684\u63d0\u6743\u6f0f\u6d1e"},{"content":" \u6807\u9898: A Large-scale Empirical Study on the Vulnerability of Deployed IoT Devices **\u4f5c\u8005:**Binbin Zhao, Shouling Ji, Wei-Han Lee, Changting Lin, Haiqin Weng, Jingzheng Wu, Pan Zhou, Liming Fang, Raheem Beyah \u5173\u952e\u5b57: IoT Search Engine, Vulnerable Device Assessment. \u6765\u6e90: IEEE Trans. Dependable and Secure Comput. **\u94fe\u63a5:**https:\/\/ieeexplore.ieee.org\/document\/9259111\/ **\u5f15\u7528:**Zhao, Binbin, Shouling Ji, Wei-Han Lee, Changting Lin, Haiqin Weng, Jingzheng Wu, Pan Zhou, Liming Fang, and Raheem Beyah. \u201cA Large-Scale Empirical Study on the Vulnerability of Deployed IoT Devices.\u201d IEEE Transactions on Dependable and Secure Computing, 2020, 1\u20131. https:\/\/doi.org\/10.1109\/TDSC.2020.3037908. \u6458\u8981 \u7269\u8054\u7f51 \uff08IoT\uff09 \u5df2\u53d8\u5f97\u65e0\u5904\u4e0d\u5728\uff0c\u6781\u5927\u5730\u5f71\u54cd\u4e86\u4eba\u4eec\u7684\u65e5\u5e38\u751f\u6d3b\u3002\u968f\u7740\u7269\u8054\u7f51\u8bbe\u5907\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u76f8\u5e94\u7684\u5b89\u5168\u95ee\u9898\u53d8\u5f97\u8d8a\u6765\u8d8a\u5177\u6709\u6311\u6218\u6027\u3002\u5982\u6b64\u4e25\u5cfb\u7684\u5b89\u5168\u5f62\u52bf\u63d0\u51fa\u4e86\u4ee5\u4e0b\u9700\u8981\u7d27\u6025\u5173\u6ce8\u7684\u95ee\u9898\uff1aIoT \u8bbe\u5907\u5f53\u524d\u9762\u4e34\u7684\u4e3b\u8981\u5b89\u5168\u5a01\u80c1\u662f\u4ec0\u4e48\uff1f\u4f9b\u5e94\u5546\u548c\u7528\u6237\u5982\u4f55\u5904\u7406\u8fd9\u4e9b\u5a01\u80c1\uff1f \u672c\u6587\u65e8\u5728\u901a\u8fc7\u5927\u89c4\u6a21\u7684\u7cfb\u7edf\u7814\u7a76\u6765\u56de\u7b54\u8fd9\u4e9b\u5173\u952e\u95ee\u9898\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4eec\u5bf9 1,362,906 \u53f0 IoT \u8bbe\u5907\u7684\u6f0f\u6d1e\u8fdb\u884c\u4e86\u4e3a\u671f 10 \u4e2a\u6708\u7684\u5b9e\u8bc1\u7814\u7a76\uff0c\u8fd9\u4e9b\u8bbe\u5907\u6709\u516d\u79cd\u7c7b\u578b\u3002\u7ed3\u679c\u663e\u793a\uff0cNday\u6f0f\u6d1e\u4e25\u91cd\u5371\u53ca\u7269\u8054\u7f51\u8bbe\u5907\u7684\u8bc1\u636e\uff1a385,060 \uff0828.25%\uff09\u8bbe\u5907\u81f3\u5c11\u5b58\u5728\u4e00\u4e2aNday\u6f0f\u6d1e\u3002\u6b64\u5916\uff0c\u8fd9\u4e9b\u6613\u53d7\u653b\u51fb\u7684\u88c5\u7f6e\u4e2d\uff0c\u67092 669\u4e2a\u53ef\u80fd\u53d7\u5230\u50f5\u5c38\u7f51\u7edc\u7684\u5371\u5bb3\u3002\u6211\u4eec\u8fdb\u4e00\u6b65\u63ed\u793a\u4e86\u4e94\u4e2a\u6d41\u884c\u7684\u7269\u8054\u7f51\u641c\u7d22\u5f15\u64ce\u4e4b\u95f4\u7684\u5de8\u5927\u5dee\u5f02\uff1aShodan [1]\uff0cCensys [2]\uff0c [3]\uff0c Zoomeye [4]\uff0c Fofa [5] \u548cNTI [6]\u3002\u4e3a\u4e86\u7814\u7a76\u4f9b\u5e94\u5546\u548c\u7528\u6237\u662f\u5426\u91c7\u53d6\u9632\u5fa1\u5a01\u80c1\u7684\u63aa\u65bd\uff0c\u6211\u4eec\u6d4b\u91cf MQTT [7] \u670d\u52a1\u5668\u7684\u5b89\u5168\u6027\uff0c\u5e76\u786e\u5b9a 12,740 \uff0888%\uff09MQTT \u670d\u52a1\u5668\u6ca1\u6709\u5bc6\u7801\u4fdd\u62a4\u3002\u6211\u4eec\u7684\u5206\u6790\u53ef\u4ee5\u4f5c\u4e3a\u7814\u7a76\u7269\u8054\u7f51\u8bbe\u5907\u5b89\u5168\u6027\u4ee5\u53ca\u63a8\u8fdb\u7269\u8054\u7f51\u7cfb\u7edf\u66f4\u5b89\u5168\u73af\u5883\u5f00\u53d1\u7684\u91cd\u8981\u6307\u5357\u3002\n\u4ecb\u7ecd \u73b0\u5b9e\u95ee\u9898 \u7269\u8054\u7f51\u8bbe\u5907\u5f88\u591a\uff0c\u901a\u8fc7\u5404\u79cd\u65b9\u5f0f\u8fde\u63a5\u4e92\u8054\u7f51\u3002\u4f46\u662f\u8fd9\u4e9b\u8bbe\u5907\u5f88\u591a\u90fd\u6709N-Day\u6f0f\u6d1e\u3002\u81ea\u52a8\u66f4\u65b0\u53ef\u4ee5\u89e3\u51b3\u6b64\u7c7b\u95ee\u9898\uff0c\u4f46\u662f\u5f88\u591a\u5382\u5546\u6ca1\u6709\u7ed9\u7528\u6237\u63d0\u4f9b\u81ea\u52a8\u66f4\u65b0\u7684\u65b9\u5f0f\u3002\u8fd8\u7531\u4e8e\u9519\u8bef\u7684\u914d\u7f6e\uff0c\u5f88\u591a\u7269\u8054\u7f51\u8bbe\u5907\u66b4\u9732\u5728\u516c\u7f51\u4e2d\u3002\n\u5f85\u89e3\u51b3\u7684\u95ee\u9898 \u4e3a\u4e86\u80fd\u5bf9\u8fd9\u4e9b\u60c5\u51b5\u6709\u7740\u66f4\u6df1\u523b\u7684\u7406\u89e3\uff0c\u672c\u6587\u8bc4\u4ef7\u4e86\u8fd9\u4e9b\u7269\u8054\u7f51\u8bbe\u5907\u7684\u5b89\u5168\u6027\uff0c\u76ee\u7684\u662f\uff1a\n\u7efc\u5408\u4e86\u89e3\u7269\u8054\u7f51\u8bbe\u5907\u5f53\u524d\u5b89\u5168\u72b6\u6001 \u5f53\u524d\u4ed6\u4eec\u9762\u4e34\u7684\u4e3b\u8981\u6311\u6218 \u5382\u5546\u548c\u7528\u6237\u5982\u4f55\u5904\u7406\u8fd9\u4e9b\u6311\u6218\u3002 \u4e3b\u8981\u8d21\u732e \u8fdb\u884c\u4e86\u7b2c\u4e00\u6b21\u7cfb\u7edf\u7684\u7814\u7a76\uff0c\u8bc4\u4f30\u4e94\u4e2a\u73b0\u6709\u7684\u6d41\u884c\u7269\u8054\u7f51\u641c\u7d22\u5f15\u64ce\uff1ashodan\u3001Censys\u3001Zoomeye\u3001Fofa\u548cNTI\u3002\u63ed\u793a\u4e86\u5b83\u4eec\u5728\u641c\u7d22\u80fd\u529b\u3001\u6570\u636e\u51c6\u786e\u6027\u3001\u54cd\u5e94\u65f6\u95f4\u548c\u626b\u63cf\u5468\u671f\u65b9\u9762\u7684\u91cd\u5927\u5dee\u5f02\uff0c\u5728\u6b64\u57fa\u7840\u4e0a\uff0c\u627e\u51fa\u4e86\u6bcf\u4e2a\u7269\u8054\u7f51\u641c\u7d22\u5f15\u64ce\u7684\u5408\u9002\u5e94\u7528\u8303\u56f4\uff0c\u4e3a\u7269\u8054\u7f51\u8bbe\u5907\u6536\u96c6\u63d0\u4f9b\u4e86\u6709\u7528\u7684\u6307\u5357\u3002\n\u8fdb\u884c\u4e86\u8fc4\u4eca\u4e3a\u6b62\u5bf9 1*,362,906 \u53f0 IoT \u8bbe\u5907\u548c14,477 \u53f0 MQTT \u670d\u52a1\u5668\u6f0f\u6d1e\u8fdb\u884c\u7684\u6700\u5927\u5b9e\u8bc1\u7814\u7a76\u3002\u6211\u4eec\u5df2\u7ecf\u786e\u5b9a 385,060\uff0828.25%\uff09IoT \u8bbe\u5907\u5bb9\u6613\u53d7\u5230 N \u5929\u6f0f\u6d1e\u653b\u51fb\uff0c12,740 \u53f0\u8bbe\u5907\uff0888%\uff09MQTT \u670d\u52a1\u5668\u6ca1\u6709\u5bc6\u7801\u4fdd\u62a4\u3002\u6211\u4eec\u8fdb\u4e00\u6b65\u900f\u9732\uff0c 2,*669\u53f0\u8bbe\u5907\u53ef\u80fd\u5df2\u7ecf\u611f\u67d3\u4e86\u50f5\u5c38\u7f51\u7edc\u3002\u6b64\u5916\uff0c\u6211\u4eec\u786e\u8ba4\u5927\u591a\u6570\u6613\u53d7\u653b\u51fb\u7684\u8bbe\u5907\u4e3b\u8981\u4f4d\u4e8e\u5c11\u6570\u56fd\u5bb6\uff08\u5982\u7f8e\u56fd\u548c\u4e2d\u56fd\uff09\u7684\u7269\u8054\u7f51\u8bbe\u5907\u5b89\u5168\u6027\u7684\u5730\u7406\u5dee\u5f02\u3002\n\u80cc\u666f\u77e5\u8bc6 \u7269\u8054\u7f51\u641c\u7d22\u5f15\u64ce \u4f20\u7edf\u7684\u8c37\u6b4c\u3001\u5fc5\u5e94\u7b49\u641c\u7d22\u5f15\u64ce\u9488\u5bf9\u8bbe\u5907\u7684\u641c\u7d22\u5e76\u4e0d\u53cb\u597d\u3002\u57282019\u5e74\uff0cshodan\u63a8\u51fa\u4e86\u6700\u65e9\u7684\u9488\u5bf9\u8bbe\u5907\u7684\u641c\u7d22\u5f15\u64ce\u3002\u968f\u540eCensys\u3001Zoomeye\u3001Fofa\u548cNTI\u4e5f\u7eb7\u7eb7\u51fa\u4e16\u3002\u5b89\u5168\u7814\u7a76\u4eba\u5458\u548c\u653b\u51fb\u8005\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e9b IoT \u641c\u7d22\u5f15\u64ce\u4e86\u89e3 IoT \u8bbe\u5907\u7684\u7ec4\u4ef6\u8986\u76d6\u8303\u56f4\u548c\u6f0f\u6d1e\u7684\u5a01\u80c1\u8303\u56f4\u3002\nshodan Shodan \u662f\u4e16\u754c\u7b2c\u4e00\u4e2a\u7528\u4e8e\u4e92\u8054\u7f51\u8fde\u63a5\u8bbe\u5907\u7684\u641c\u7d22\u5f15\u64ce\u3002\u4e16\u754c\u5404\u5730\u7684\u5927\u578b\u4f01\u4e1a\u548c\u5b89\u5168\u7814\u7a76\u4eba\u5458\u90fd\u4f7f\u7528 Shodan\u3002\u5b83\u90e8\u7f72\u904d\u5e03\u5168\u7403\u7684\u591a\u4e2a\u670d\u52a1\u5668\uff0c\u8fd9\u4e9b\u670d\u52a1\u5668\u901a\u8fc7 Internet \u63d0\u4f9b 24*7 \u7684\u8fde\u7eed\u68c0\u6d4b\u3002\u7531\u4e8e\u6b63\u5728\u8fdb\u884c\u7684\u626b\u63cf\uff0cShodan \u63d0\u4f9b\u6700\u65b0\u7684 Internet \u667a\u80fd\uff0c\u7528\u6237\u53ef\u4ee5\u77e5\u9053\u7279\u5b9a\u7ec4\u4ef6\u7684\u5f71\u54cd\u6216\u6f0f\u6d1e\u5f71\u54cd\u5728 Internet \u89c4\u6a21\u3002Shodan \u8fd8\u4e3a\u7528\u6237\u63d0\u4f9b\u516c\u5171 API\uff0c\u5e2e\u52a9\u7528\u6237\u66f4\u65b9\u4fbf\u5730\u8bbf\u95ee Shodan \u7684\u6240\u6709\u6570\u636e\u3002\nCensys Censys \u662f\u4e00\u4e2a\u5e73\u53f0\uff0c\u53ef\u5e2e\u52a9\u4fe1\u606f\u5b89\u5168\u4ece\u4e1a\u8005\u53d1\u73b0\u548c\u5206\u6790\u53ef\u4ece Internet \u8bbf\u95ee\u7684 IoT \u8bbe\u5907\u3002Zakir\u7b49\u4eba\u4e8e2015\u5e74\u53d1\u5e03\u4e86Censys\u7684\u7b2c\u4e00\u4e2a\u7248\u672c\uff0c\u73b0\u5728\u4e00\u4e2a\u56e2\u961f\u5305\u62ec\u4e16\u754c\u9886\u5148\u7684\u4e92\u8054\u7f51\u5b89\u5168\u4e13\u5bb6\uff0c\u6b63\u5728\u652f\u6301\u8fd9\u4e2a\u641c\u7d22\u5f15\u64ce\u3002\u5728\u8fc7\u53bb\u7684\u4e94\u5e74\u91cc\uff0cCensys \u5df2\u7ecf\u8fdb\u884c\u4e86\u6570\u5343\u6b21\u4e92\u8054\u7f51\u626b\u63cf\uff0c\u5176\u4e2d\u5305\u62ec\u6570\u4e07\u4ebf\u4e2a\u63a2\u6d4b\u5668\uff0c\u8fd9\u4e9b\u63a2\u6d4b\u5668\u5728\u53d1\u73b0\u548c\u5206\u6790\u51e0\u4e2a\u4e25\u91cd\u7684\u4e92\u8054\u7f51\u89c4\u6a21\u6f0f\u6d1e\u65b9\u9762\u53d1\u6325\u4e86\u91cd\u8981\u4f5c\u7528\uff1aFREAK\u3001\u5fc3\u810f\u6ef4\u8840\u6f0f\u6d1e \u548c Mirai\u75c5\u6bd2\u3002\nZoomeye Zoomeye\u662f\u4e2d\u56fd\u7684\u7f51\u7edc\u7a7a\u95f4\u641c\u7d22\u5f15\u64ce\uff0c\u4e13\u95e8\u8bb0\u5f55\u8bbe\u5907\u3001\u7f51\u7ad9\u3001\u670d\u52a1\u548c\u7ec4\u4ef6\u7b49\u7684\u4fe1\u606f\u3002Zoomeye \u62e5\u6709\u4e24\u4e2a\u5f3a\u5927\u7684\u68c0\u6d4b\u5f15\u64ce Xmap \u548c Wmap\uff0c\u5206\u522b\u9488\u5bf9\u7f51\u7edc\u7a7a\u95f4\u4e2d\u7684\u8bbe\u5907\u548c\u7f51\u7ad9\u3002\u5b89\u5168\u7814\u7a76\u4eba\u5458\u53ef\u4ee5\u901a\u8fc7 24\/7 \u8fde\u7eed\u68c0\u6d4b\u6765\u8bc6\u522b IoT \u8bbe\u5907\u3002Zoomeye \u4e13\u4e3a\u4e92\u8054\u7f51\u89c4\u6a21\u7684\u5a01\u80c1\u68c0\u6d4b\u548c\u6001\u52bf\u611f\u77e5\u800c\u8bbe\u8ba1\u3002\nFofa Fofa \u662f IoT \u8bbe\u5907\u7684\u641c\u7d22\u5f15\u64ce\uff0c\u65e8\u5728\u4ee5\u5b89\u5168\u4e14\u4fdd\u62a4\u9690\u79c1\u7684\u65b9\u5f0f\u4f7f\u771f\u5b9e\u4e16\u754c\u7684\u6570\u636e\u53ef\u8bbf\u95ee\u4e14\u53ef\u64cd\u4f5c\u3002Fofa \u4e3a\u5176 VIP \u7528\u6237\u63d0\u4f9b\u4e00\u4e2a\u6f0f\u6d1e\u5e02\u573a\uff0c\u5176\u4e2d\u5305\u542b\u4ece N \u5929\u6f0f\u6d1e\u7684 PoC \u751f\u6210\u7684\u6570\u5343\u4e2a\u811a\u672c\u3002\u7528\u6237\u53ef\u4ee5\u8d2d\u4e70\u8fd9\u4e9b\u811a\u672c\uff0c\u5e76\u5229\u7528\u5b83\u4eec\u6765\u8bc4\u4f30 IoT \u8bbe\u5907\u7684\u5b89\u5168\u6027\u3002\nNTI NTI \u662f\u4e00\u4e2a\u975e\u8425\u5229\u6027\u641c\u7d22\u5f15\u64ce\uff0c\u4f46\u5c1a\u672a\u516c\u5f00\u5f00\u653e\uff0c\u73b0\u5728\u7531 NSFOCUS \u652f\u6301 [6]\u3002NTI \u5728 2018 \u5e74\u68c0\u6d4b\u5230\u6570\u5343\u53f0\u50f5\u5c38\u7f51\u7edc\u547d\u4ee4\u548c\u63a7\u5236\u670d\u52a1\u5668\u548c\u6570\u767e\u4e07\u53f0\u53d7\u611f\u67d3\u7684\u4e3b\u673a\u3002\u6b64\u5916\uff0cNTI \u6bcf\u5e74\u5bf9 IoT \u5b89\u5168\u72b6\u6001\u8fdb\u884c\u8c03\u67e5\u3002\n\u8fd9\u4e94\u4e2a\u7269\u8054\u7f51\u641c\u7d22\u5f15\u64ce\u90fd\u80fd\u591f\u5728\u77ed\u65f6\u95f4\u5185\u626b\u63cf\u6574\u4e2a IPv4 \u516c\u5171\u4e92\u8054\u7f51\u3002\u5b83\u4eec\u4e4b\u95f4\u7684\u663e\u8457\u5dee\u5f02\u662f\u5b83\u4eec\u4e0d\u540c\u7684\u626b\u63cf\u5468\u671f\u3001\u626b\u63cf\u7b56\u7565\u3001\u4ed6\u4eec\u6536\u96c6\u7684 IoT \u8bbe\u5907\u6a2a\u5e45\u4fe1\u606f\u91cf\u4ee5\u53ca\u4fdd\u5b58\u6570\u636e\u7684\u51c6\u786e\u7387\u3002\u5728\u7b2c 3.2 \u8282\u4e2d\uff0c\u6211\u4eec\u6f14\u793a\u4e86\u8fd9\u4e94\u4e2a IoT \u641c\u7d22\u5f15\u64ce\u7684\u6bd4\u8f83\u7ed3\u679c\u3002\u9664\u4e86\u4e0a\u8ff0\u4e94\u4e2a\u7269\u8054\u7f51\u641c\u7d22\u5f15\u64ce\u5916\uff0c\u8fd8\u6709\u53e6\u5916\u4e24\u4e2a\u7269\u8054\u7f51\u641c\u7d22\u5f15\u64ce\uff0cThingful \u548c IoT \u722c\u866b\u3002Thingful \u63d0\u4f9b\u7684\u6570\u636e\u4e3b\u8981\u7528\u4e8e\u5546\u4e1a\u76ee\u7684\uff0c\u800c\u4e0d\u662f\u5b89\u5168\u7814\u7a76\uff0c\u7269\u8054\u7f51\u722c\u7f51\u7a0b\u5e8f\u4ecd\u5728\u5f00\u53d1\u4e2d\u3002\u56e0\u6b64\uff0c\u5728\u6211\u4eec\u7684\u6d4b\u8bd5\u4e2d\u4e0d\u8003\u8651\u8fd9\u4e24\u4e2a IoT \u641c\u7d22\u5f15\u64ce\u3002\n\u7269\u8054\u7f51\u5b89\u5168\u6311\u6218 \u7269\u8054\u7f51\u7684\u5b89\u5168\u6311\u6218\n\u914d\u7f6e\u9519\u8bef \u5728 IoT \u641c\u7d22\u5f15\u64ce\u7684\u5e2e\u52a9\u4e0b\uff0c\u6536\u96c6\u6570\u767e\u4e07\u8fde\u63a5\u5230 Internet \u7684 IoT \u8bbe\u5907\u5e76\u4e0d\u96be\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u7b80\u5355\u7684\u5173\u952e\u5b57\u8def\u7531\u5668\uff0c\u4eba\u4eec\u53ef\u4ee5\u4ece Zoomeye \u83b7\u5f97\u81ea 2018 \u5e74\u4ee5\u6765\u6536\u96c6\u7684\u8d85\u8fc7 1000 \u4e07\u6761\u76f8\u5173\u8bb0\u5f55\u3002\u5927\u591a\u6570\u66b4\u9732\u7684 IoT \u8bbe\u5907\u7684\u5173\u952e\u539f\u56e0\u662f\u8fd9\u4e9b\u8bbe\u5907\u6240\u6709\u8005\u914d\u7f6e\u9519\u8bef\u3002\u7531\u4e8e\u5b89\u5168\u610f\u8bc6\u6709\u9650\u6216\u8ba1\u7b97\u673a\u7f51\u7edc\u77e5\u8bc6\u6709\u9650\uff0c\u5927\u91cf\u7528\u6237\u53ef\u80fd\u5728\u4e0d\u77e5\u4e0d\u89c9\u4e2d\u6253\u5f00\u5e7f\u57df\u7f51 \uff08WAN\uff09 \u6216\u914d\u7f6e NAT-DDNS\uff0c\u800c\u65e0\u9700\u4efb\u4f55\u4fdd\u62a4\u3002\u7136\u800c\uff0c\u7531\u4e8e\u641c\u7d22\u5f15\u64ce\u6bcf\u5e74\u53ef\u4ee5\u6536\u96c6\u6570\u4ee5\u4ebf\u8ba1\u7684\u65b0\u66b4\u9732\u7684 IoT \u8bbe\u5907\uff0c\u56e0\u6b64\u60c5\u51b5\u53d8\u5f97\u8d8a\u6765\u8d8a\u4e25\u91cd\u3002\u4f8b\u5982\uff0cZoomeye \u81ea\u6210\u7acb\u4ee5\u6765\u5df2\u6536\u96c6\u4e86\u8d85\u8fc7 10 \u4ebf\u53f0 IoT \u8bbe\u5907\u3002\u56e0\u6b64\uff0c\u914d\u7f6e\u9519\u8bef\u662f\u7269\u8054\u7f51\u8bbe\u5907\u5f53\u524d\u9762\u4e34\u7684\u6700\u4e25\u5cfb\u6311\u6218\u4e4b\u4e00\u3002\n\u9ed8\u8ba4\u51ed\u636e \u9ed8\u8ba4\u51ed\u636e\u3002\u5927\u591a\u6570\u4f9b\u5e94\u5546\u90fd\u4e3a\u4ed6\u4eec\u7684\u8bbe\u5907\u63d0\u4f9b\u9ed8\u8ba4\u5e10\u6237\u548c\u5bc6\u7801\uff0c\u4f46\u662f\uff0c\u8fd9\u53ef\u80fd\u5bf9 IoT \u8bbe\u5907\u7684\u5b89\u5168\u6784\u6210\u65b0\u7684\u5a01\u80c1\u3002\u5b83\u7559\u4e0b\u4e86\u9690\u85cf\u7684\u4e3b\u8981\u5371\u9669\u6e90\u3002\u4f8b\u5982\uff0c\u6700\u81ed\u540d\u662d\u8457\u7684\u50f5\u5c38\u7f51\u7edc Mirai \u5229\u7528\u9ed8\u8ba4\u5bc6\u7801\u5f71\u54cd\u6570\u767e\u4e07\u53f0 IoT \u8bbe\u5907\u3002\u4e8b\u5b9e\u4e0a\uff0c\u9ed8\u8ba4\u51ed\u636e\u662f\u4e00\u4e2a\u666e\u904d\u5b58\u5728\u7684\u5b89\u5168\u95ee\u9898\uff0c\u5b83\u4e0d\u9650\u4e8e IoT \u8bbe\u5907\u3002\u867d\u7136\u8fd9\u4e2a\u5b89\u5168\u95ee\u9898\u5df2\u7ecf\u5b58\u5728\u8fd9\u4e48\u591a\u5e74\u4e86\uff0c\u4f46\u6211\u4eec\u6ca1\u6709\u770b\u5230\u4efb\u4f55\u7f13\u89e3\u7684\u8d8b\u52bf\u3002\u540c\u65f6\uff0c\u4ee4\u4eba\u60ca\u8bb6\u7684\u662f\uff0c\u4f9b\u5e94\u5546\u5f88\u5c11\u63d0\u4f9b\u5bf9\u7b56\u6765\u7f13\u89e3\u8fd9\u4e00\u4e25\u91cd\u95ee\u9898\u3002\n\u6f0f\u6d1e\u653b\u51fb 0day\u6f0f\u6d1e\u653b\u51fb\u548c N-day\u6f0f\u6d1e\u653b\u51fb\u4e25\u91cd\u5371\u53ca\u6240\u6709 IoT \u8bbe\u5907\u7684\u5b89\u5168\u3002\u5f7b\u5e95\u89e3\u51b3\u96f6\u65e5\u6f0f\u6d1e\u662f\u4e0d\u73b0\u5b9e\u7684\uff0c\u56e0\u4e3a\u5f00\u53d1\u4eba\u5458\u65e0\u6cd5\u907f\u514d\u8be5\u9519\u8bef\uff0c\u5373\u4f7f\u4ed6\u4eec\u5728\u7f16\u7a0b\u548c\u4ee3\u7801\u5ba1\u6838\u65b9\u9762\u975e\u5e38\u8c28\u614e\u3002\u4f9b\u5e94\u5546\u5df2\u7ecf\u91c7\u53d6\u4e86\u591a\u79cd\u7b56\u7565\u6765\u7f13\u89e3\u6b64\u95ee\u9898\u3002\u4f8b\u5982\uff0c\u4ed6\u4eec\u5728\u4e16\u754c\u5404\u5730\u90e8\u7f72\u871c\u7f50\uff0c\u53ef\u4ee5\u6355\u83b7\u91ce\u5916\u7684\u96f6\u65e5\u6f0f\u6d1e\uff0c\u4e00\u4e9b\u4f9b\u5e94\u5546\u9009\u62e9\u4e0d\u62ab\u9732\u4ed6\u4eec\u7684\u56fa\u4ef6\uff0c\u56e0\u4e3a\u9ed1\u5ba2\u53ef\u4ee5\u53cd\u7f16\u8bd1\u56fa\u4ef6\uff0c\u4ee5\u53d1\u73b0\u7f3a\u9677\u3002\u7136\u800c\uff0c\u8fd9\u4e9b\u5bf9\u7b56\u662f\u975e\u5e38\u4f4e\u6548\u7684\uff0c\u56e0\u4e3a\u871c\u7f50\u9700\u8981\u88ab\u52a8\u5730\u7b49\u5f85\u653b\u51fb\uff0c\u9ed1\u5ba2\u53ef\u4ee5\u901a\u8fc7\u5176\u4ed6\u65b9\u6cd5\u83b7\u5f97\u56fa\u4ef6\u3002\u6b64\u5916\uff0c\u4f20\u7edf\u7684\u6a21\u7cca\u65b9\u6cd5\u4e0d\u80fd\u76f4\u63a5\u5e94\u7528\u4e8e\u7269\u8054\u7f51\u56fa\u4ef6\u3002\u867d\u7136\u516c\u4f17\u66f4\u52a0\u5173\u6ce80-day\u6f0f\u6d1e\uff0c\u4f46 N-day\u6f0f\u6d1e\u5b9e\u9645\u4e0a\u7ed9 IoT \u8bbe\u5907\u5e26\u6765\u4e86\u4e25\u91cd\u98ce\u9669\u3002N \u5929\u6f0f\u6d1e\u662f\u9ed1\u5ba2\u7684\u91d1\u77ff\uff0c\u56e0\u4e3a\u8fd9\u4e9b\u6f0f\u6d1e\u7684\u5229\u7528\u5df2\u7ecf\u4e3a\u4eba\u6240\u77e5\u3002\u5728\u7269\u8054\u7f51\u641c\u7d22\u5f15\u64ce\u7684\u5e2e\u52a9\u4e0b\uff0c\u9ed1\u5ba2\u53ef\u4ee5\u4f7f\u7528 N \u5929\u6f0f\u6d1e\u8f7b\u677e\u901a\u8fc7\u4e92\u8054\u7f51\u653b\u51fb\u66b4\u9732\u7684\u8bbe\u5907\u3002\n\u8bc4\u4ef7\u65b9\u6cd5\u8bbe\u7f6e \u4ece\u7f51\u7edc\u7a7a\u95f4\u6d4b\u7ed8\u5f15\u64ce\u641c\u7d22\u8fd9\u4e9b\u8bbe\u5907\u3002Shodan, Censys, Zoomeye, Fofa and NTI\u3002\n\u8bc4\u4ef7\u8fd9\u4e9b\u7269\u8054\u7f51\u8bbe\u5907\uff0c\u4f7f\u7528\u4e8673\u79cd\u5df2\u77e5\u7684N-day\u6f0f\u6d1e\u3002\u8ba8\u8bba\u7ed3\u679c\u548c\u4f4d\u7f6e\u7684\u5173\u7cfb\u3002\n\u6700\u7ec8\u6536\u96c6\u4e868*,554,*183\u4e2a\u7269\u8054\u7f51\u8bbe\u5907\uff0c\u5305\u542b1,362,906\u4e2a\u53ef\u80fd\u5b58\u5728\u6f0f\u6d1e\u7684\u8bbe\u5907\u3002\n\u53e6\u5916\uff0c\u8fd8\u6d4b\u8bd5\u53d1\u73b0\u4e8614477 MQTT \u670d\u52a1\u5668\u672a\u5305\u542b\u5bc6\u7801\u4fdd\u62a4\u3002\n\u8bbe\u5907\u9009\u62e9 \u8def\u7531\u5668\u3001IP \u6444\u50cf\u673a\u548c\u6253\u5370\u673a\n\u5b9e\u9a8c\u8bc4\u4f30 \u6570\u636e\u96c6 \u5b9e\u9a8c\u65b9\u6cd5 \u5b9e\u9a8c\u6548\u679c \u8ba8\u8bba \u603b\u7ed3 \u4f5c\u8005\u4ecb\u7ecd \u6536\u83b7 \u672c\u6587\u4f18\u52bf \u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206: \u2b50\u2b50\u2b50\u2b50\u2b50\n\u8bc4\u4ef7:\n\u53c2\u8003\u8d44\u6599\u53ca\u9644\u4ef6 ","permalink":"https:\/\/m2kar.cn\/posts\/20201118-a-large-scale-empirical-study-on-the-vulnerability-of-deployed-iot-devices-nesa-binbin-zhao\/","summary":"<ul>\n<li><strong>\u6807\u9898:<\/strong>  A Large-scale Empirical Study on the Vulnerability of Deployed IoT Devices<\/li>\n<li>**\u4f5c\u8005:**Binbin Zhao, Shouling Ji, Wei-Han Lee, Changting Lin, Haiqin Weng, Jingzheng Wu, Pan Zhou,  Liming Fang, Raheem Beyah<\/li>\n<li><strong>\u5173\u952e\u5b57:<\/strong> IoT Search Engine, Vulnerable Device Assessment.<\/li>\n<li><strong>\u6765\u6e90:<\/strong> IEEE Trans. Dependable and Secure Comput.<\/li>\n<li>**\u94fe\u63a5:**<a href=\"https:\/\/ieeexplore.ieee.org\/document\/9259111\/\">https:\/\/ieeexplore.ieee.org\/document\/9259111\/<\/a><\/li>\n<li>**\u5f15\u7528:**Zhao, Binbin, Shouling Ji, Wei-Han Lee, Changting Lin, Haiqin Weng, Jingzheng Wu, Pan Zhou, Liming Fang, and Raheem Beyah. \u201cA Large-Scale Empirical Study on the Vulnerability of Deployed IoT Devices.\u201d <em>IEEE Transactions on Dependable and Secure Computing<\/em>, 2020, 1\u20131. <a href=\"https:\/\/doi.org\/10.1109\/TDSC.2020.3037908\">https:\/\/doi.org\/10.1109\/TDSC.2020.3037908<\/a>.<\/li>\n<\/ul>\n<h2 id=\"\u6458\u8981\">\u6458\u8981<\/h2>\n<p>\u7269\u8054\u7f51 \uff08IoT\uff09 \u5df2\u53d8\u5f97\u65e0\u5904\u4e0d\u5728\uff0c\u6781\u5927\u5730\u5f71\u54cd\u4e86\u4eba\u4eec\u7684\u65e5\u5e38\u751f\u6d3b\u3002\u968f\u7740\u7269\u8054\u7f51\u8bbe\u5907\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u76f8\u5e94\u7684\u5b89\u5168\u95ee\u9898\u53d8\u5f97\u8d8a\u6765\u8d8a\u5177\u6709\u6311\u6218\u6027\u3002\u5982\u6b64\u4e25\u5cfb\u7684\u5b89\u5168\u5f62\u52bf\u63d0\u51fa\u4e86\u4ee5\u4e0b\u9700\u8981\u7d27\u6025\u5173\u6ce8\u7684\u95ee\u9898\uff1a<strong>IoT \u8bbe\u5907\u5f53\u524d\u9762\u4e34\u7684\u4e3b\u8981\u5b89\u5168\u5a01\u80c1\u662f\u4ec0\u4e48\uff1f\u4f9b\u5e94\u5546\u548c\u7528\u6237\u5982\u4f55\u5904\u7406\u8fd9\u4e9b\u5a01\u80c1\uff1f<\/strong> \u672c\u6587\u65e8\u5728\u901a\u8fc7\u5927\u89c4\u6a21\u7684\u7cfb\u7edf\u7814\u7a76\u6765\u56de\u7b54\u8fd9\u4e9b\u5173\u952e\u95ee\u9898\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4eec\u5bf9 1,362,906 \u53f0 IoT \u8bbe\u5907\u7684\u6f0f\u6d1e\u8fdb\u884c\u4e86\u4e3a\u671f 10 \u4e2a\u6708\u7684\u5b9e\u8bc1\u7814\u7a76\uff0c\u8fd9\u4e9b\u8bbe\u5907\u6709\u516d\u79cd\u7c7b\u578b\u3002\u7ed3\u679c\u663e\u793a\uff0cNday\u6f0f\u6d1e\u4e25\u91cd\u5371\u53ca\u7269\u8054\u7f51\u8bbe\u5907\u7684\u8bc1\u636e\uff1a385,060 \uff0828.25%\uff09\u8bbe\u5907\u81f3\u5c11\u5b58\u5728\u4e00\u4e2aNday\u6f0f\u6d1e\u3002\u6b64\u5916\uff0c\u8fd9\u4e9b\u6613\u53d7\u653b\u51fb\u7684\u88c5\u7f6e\u4e2d\uff0c\u67092 669\u4e2a\u53ef\u80fd\u53d7\u5230\u50f5\u5c38\u7f51\u7edc\u7684\u5371\u5bb3\u3002\u6211\u4eec\u8fdb\u4e00\u6b65\u63ed\u793a\u4e86\u4e94\u4e2a\u6d41\u884c\u7684\u7269\u8054\u7f51\u641c\u7d22\u5f15\u64ce\u4e4b\u95f4\u7684\u5de8\u5927\u5dee\u5f02\uff1aShodan [1]\uff0cCensys [2]\uff0c [3]\uff0c Zoomeye [4]\uff0c Fofa [5] \u548cNTI [6]\u3002\u4e3a\u4e86\u7814\u7a76\u4f9b\u5e94\u5546\u548c\u7528\u6237\u662f\u5426\u91c7\u53d6\u9632\u5fa1\u5a01\u80c1\u7684\u63aa\u65bd\uff0c\u6211\u4eec\u6d4b\u91cf MQTT [7] \u670d\u52a1\u5668\u7684\u5b89\u5168\u6027\uff0c\u5e76\u786e\u5b9a 12,740 \uff0888%\uff09MQTT \u670d\u52a1\u5668\u6ca1\u6709\u5bc6\u7801\u4fdd\u62a4\u3002\u6211\u4eec\u7684\u5206\u6790\u53ef\u4ee5\u4f5c\u4e3a\u7814\u7a76\u7269\u8054\u7f51\u8bbe\u5907\u5b89\u5168\u6027\u4ee5\u53ca\u63a8\u8fdb\u7269\u8054\u7f51\u7cfb\u7edf\u66f4\u5b89\u5168\u73af\u5883\u5f00\u53d1\u7684\u91cd\u8981\u6307\u5357\u3002<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011\u9488\u5bf9\u5df2\u90e8\u7f72\u7684\u7269\u8054\u7f51\u8bbe\u5907\u6f0f\u6d1e\u7684\u5927\u89c4\u6a21\u7814\u7a76-NESA\u5b9e\u9a8c\u5ba4-\u6d59\u6c5f\u5927\u5b66"},{"content":" \u6807\u9898: CyGraph: Graph-Based Analytics and Visualization for Cybersecurity \u4f5c\u8005: S. Noel1, E. Harley, K.H. Tam, M. Limiero and M. Share \u5173\u952e\u5b57: \u6d41\u91cf\u5206\u6790, \u77e5\u8bc6\u56fe\u8c31 \u6765\u6e90: The MITRE Corporation, McLean, VA, United States \u94fe\u63a5: http:\/\/www.sciencedirect.com\/science\/article\/pii\/S0169716116300426 \u5f15\u7528: Noel, S., E. Harley, K. H. Tam, M. Limiero, and M. Share. \u201cCyGraph: Graph-Based Analytics and Visualization for Cybersecurity.\u201d In Handbook of Statistics, edited by Venkat N. Gudivada, Vijay V. Raghavan, Venu Govindaraju, and C. R. Rao, 35:117\u201367. Cognitive Computing: Theory and Applications. Elsevier, 2016. https:\/\/doi.org\/10.1016\/bs.host.2016.07.001. \u6458\u8981 CyGraph\uff0c\u5b83\u662f\u4e00\u79cd\u7528\u4e8e\u6539\u5584\u7f51\u7edc\u5b89\u5168\u72b6\u51b5\uff0c\u5728\u9762\u5bf9\u7f51\u7edc\u653b\u51fb\u65f6\u4fdd\u6301\u6001\u52bf\u611f\u77e5\u5e76\u7740\u91cd\u4e8e\u4fdd\u62a4\u5173\u952e\u4efb\u52a1\u8d44\u4ea7\u7684\u7cfb\u7edf\u3002 CyGraph\u91c7\u7528\u4e0e\u6f5c\u5728\u548c\u5b9e\u9645\u7f51\u7edc\u653b\u51fb\uff0c\u9632\u5fa1\u548c\u4efb\u52a1\u5f71\u54cd\u76f8\u5173\u7684\u57fa\u4e8e\u56fe\u7684\u7edf\u4e00\u7f51\u7edc\u5b89\u5168\u6a21\u578b\u3002\u5b83\u6355\u83b7\u7f51\u7edc\u73af\u5883\u4e2d\u7684\u589e\u91cf\u653b\u51fb\u6f0f\u6d1e\uff0c\u5b89\u5168\u4e8b\u4ef6\u548c\u4efb\u52a1\u4f9d\u5b58\u5173\u7cfb\uff0c\u5efa\u7acb\u53ef\u80fd\u7684\u653b\u51fb\u8def\u5f84\u548c\u5173\u952e\u6f0f\u6d1e\u7684\u9884\u6d4b\u6a21\u578b\uff0c\u5e76\u5c06\u4e8b\u4ef6\u4e0e\u5df2\u77e5\u6f0f\u6d1e\u8def\u5f84\u76f8\u5173\u8054\u3002\u5b83\u8fd8\u5305\u62ec\u4efb\u52a1\u9700\u6c42\u548c\u7f51\u7edc\u8d44\u4ea7\u4e4b\u95f4\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u4ee5\u4fbf\u5728\u4efb\u52a1\u4fdd\u8bc1\u7684\u80cc\u666f\u4e0b\u8fdb\u884c\u5206\u6790\u3002\u77e5\u8bc6\u56fe\u8c31\u6355\u83b7\u4e86\u7f51\u7edc\u5b89\u5168\u9886\u57df\u4e2d\u5b9e\u4f53\u4e4b\u95f4\u7684\u590d\u6742\u5173\u7cfb\u3002 CyGraph\u5c06\u5b64\u7acb\u7684\u6570\u636e\u548c\u4e8b\u4ef6\u6c47\u603b\u5728\u4e00\u8d77\uff0c\u4ee5\u63d0\u4f9b\u51b3\u7b56\u652f\u6301\u548c\u6001\u52bf\u611f\u77e5\u3002\u5728\u4efb\u52a1\u5173\u952e\u578b\u8d44\u4ea7\u7684\u60c5\u51b5\u4e0b\uff0c\u5b83\u5bf9\u66b4\u9732\u5728\u5916\u7684\u6f0f\u6d1e\uff08\u6620\u5c04\u5230\u6f5c\u5728\u5a01\u80c1\uff09\u8fdb\u884c\u4f18\u5148\u7ea7\u6392\u5e8f\u3002\u9762\u5bf9\u5b9e\u9645\u7684\u653b\u51fb\uff0c\u5b83\u5c06\u5165\u4fb5\u8b66\u62a5\u4e0e\u5df2\u77e5\u7684\u6f0f\u6d1e\u8def\u5f84\u76f8\u5173\u8054\uff0c\u5e76\u63d0\u51fa\u6700\u4f73\u63aa\u65bd\u4ee5\u54cd\u5e94\u653b\u51fb\u3002\u5bf9\u4e8e\u653b\u51fb\u540e\u53d6\u8bc1\uff0c\u5b83\u663e\u793a\u4e86\u53ef\u80fd\u9700\u8981\u66f4\u6df1\u5165\u68c0\u67e5\u7684\u6613\u53d7\u653b\u51fb\u7684\u8def\u5f84\u3002 CyGraph\u8fd8\u652f\u6301CyQL\uff08CyGraph\u67e5\u8be2\u8bed\u8a00\uff09\uff0cCyQL\u662f\u4e00\u79cd\u9886\u57df\u7279\u5b9a\u7684\u67e5\u8be2\u8bed\u8a00\uff0c\u7528\u4e8e\u8868\u8fbe\u611f\u5174\u8da3\u7684\u56fe\u5f62\u6a21\u5f0f\uff0c\u5e76\u5177\u6709\u4ea4\u4e92\u5f0f\u53ef\u89c6\u5316\u67e5\u8be2\u7ed3\u679c\u7684\u529f\u80fd\u3002\u4e3a\u4e86\u5e2e\u52a9\u7ba1\u7406\u89c6\u89c9\u590d\u6742\u6027\uff0cCyGraph\u652f\u6301\u5c06\u56fe\u6a21\u578b\u5206\u79bb\u4e3a\u76f8\u4e92\u4f9d\u8d56\u7684\u5c42\u3002\u5bf9\u4e8e\u65f6\u95f4\u76f8\u5173\u7684\u56fe\u6a21\u578b\uff0c\u5b83\u63d0\u4f9b\u4e86\u52a8\u6001\u7684\u56fe\u72b6\u6001\u52a8\u6001\u53ef\u89c6\u5316\u3002 CyGraph\u8fd8\u4e0e\u7b2c\u4e09\u65b9\u5de5\u5177\u96c6\u6210\uff0c\u4ee5\u53ef\u89c6\u5316\u56fe\u5f62\u72b6\u6001\u53d8\u5316\uff08\u4f8b\u5982\uff0c\u7531\u4eff\u771f\u9a71\u52a8\uff09\u3002\u6b64\u5916\uff0c\u5b83\u5177\u6709\u5408\u6210\u5177\u6709\u7279\u5b9a\u7edf\u8ba1\u5c5e\u6027\u7684\u56fe\u5f62\u6a21\u578b\u7684\u529f\u80fd\u3002\n\u4ecb\u7ecd \u73b0\u5b9e\u95ee\u9898 \u7f51\u7edc\u653b\u51fb\u548c\u9488\u5bf9\u5b83\u4eec\u7684\u9632\u5fa1\u662f\u5728\u590d\u6742\u7684\u73af\u5883\u4e2d\u8fdb\u884c\u7684\uff0c\u4f17\u591a\u56e0\u7d20\u6709\u52a9\u4e8e\u653b\u51fb\u6210\u529f\u548c\u6267\u884c\u4efb\u52a1\u3002 \u7f51\u7edc\u62d3\u6251\uff0c\u4e3b\u673a\u914d\u7f6e\uff0c\u6f0f\u6d1e\uff0c\u9632\u706b\u5899\u8bbe\u7f6e\uff0c\u5165\u4fb5\u68c0\u6d4b\u7cfb\u7edf\uff0c\u4efb\u52a1\u4f9d\u8d56\u6027\u4ee5\u53ca\u8bb8\u591a\u5176\u4ed6\u5143\u7d20\u90fd\u53ef\u4ee5\u53d1\u6325\u4f5c\u7528\u3002 \u4e3a\u4e86\u8d85\u8d8a\u5bf9\u5b89\u5168\u72b6\u51b5\u7684\u57fa\u672c\u8bc4\u4f30\uff0c\u7ec4\u7ec7\u9700\u8981\u5c06\u9694\u79bb\u7684\u6570\u636e\u5408\u5e76\u5230\u66f4\u9ad8\u7684\u7f51\u7edc\u8303\u56f4\u653b\u51fb\u8106\u5f31\u6027\u548c\u9762\u5bf9\u7f51\u7edc\u5a01\u80c1\u65f6\u7684\u4efb\u52a1\u51c6\u5907\u77e5\u8bc6\u3002\n\u5f85\u89e3\u51b3\u7684\u95ee\u9898 \u6570\u636e\u91cf\u8db3\u591f\uff0c\u4f46\u7f3a\u4e4f\u5bf9\u6570\u636e\u7684\u826f\u597d\u5f52\u7eb3\u6574\u7406\u3002\n\u4e3b\u8981\u8d21\u732e \u4e3a\u4e86\u5e2e\u52a9\u5e94\u5bf9\u8fd9\u4e9b\u6311\u6218\uff0c\u6211\u4eec\u63a8\u51fa\u4e86CyGraph\uff0c\u8fd9\u662f\u4e00\u79cd\u7528\u4e8e\u7f51\u7edc\u6218\u5206\u6790\uff0c\u53ef\u89c6\u5316\u548c\u77e5\u8bc6\u7ba1\u7406\u7684\u5de5\u5177\u3002\nCyGraph\u5c06\u5b64\u7acb\u7684\u6570\u636e\u548c\u4e8b\u4ef6\u6c47\u603b\u5230\u4e00\u4e2a\u6301\u7eed\u7684\u6574\u4f53\u56fe\u4e2d\uff0c\u4ee5\u63d0\u4f9b\u51b3\u7b56\u652f\u6301\u548c\u6001\u52bf\u611f\u77e5\u3002 \u5728\u4efb\u52a1\u5173\u952e\u578b\u8d44\u4ea7\u7684\u60c5\u51b5\u4e0b\uff0c\u5b83\u5bf9\u66b4\u9732\u5728\u5916\u7684\u6f0f\u6d1e\uff08\u6620\u5c04\u5230\u6f5c\u5728\u5a01\u80c1\uff09\u8fdb\u884c\u4f18\u5148\u7ea7\u6392\u5e8f\u3002 \u9762\u5bf9\u5b9e\u9645\u7684\u653b\u51fb\uff0c\u5b83\u5c06\u5165\u4fb5\u8b66\u62a5\u4e0e\u5df2\u77e5\u7684\u6f0f\u6d1e\u8def\u5f84\u76f8\u5173\u8054\uff0c\u5e76\u63d0\u51fa\u6700\u4f73\u63aa\u65bd\u4ee5\u54cd\u5e94\u653b\u51fb\u3002 \u5bf9\u4e8e\u653b\u51fb\u540e\u53d6\u8bc1\uff0c\u5b83\u663e\u793a\u4e86\u53ef\u80fd\u9700\u8981\u66f4\u6df1\u5c42\u68c0\u67e5\u7684\u8106\u5f31\u8def\u5f84\u3002\n\u76f8\u5173\u7814\u7a76 \u4f20\u7edf\u4e0a\uff0c\u7f3a\u4e4f\u4fe1\u606f\u5171\u4eab\u963b\u788d\u4e86\u7f51\u7edc\u5b89\u5168\u6a21\u578b\u548c\u5206\u6790\u7684\u53d1\u5c55\u3002\n\u5728\u4ea7\u54c1\u65b9\u9762\uff0c\u63d0\u4f9b\u4e86\u591a\u79cd\u7528\u4e8e\u653b\u51fb\u56fe\u5206\u6790\u7684\u5de5\u5177\u3002\u653b\u51fb\u56fe\u5206\u6790\u7684\u5148\u524d\u65b9\u6cd5\u548c\u5de5\u5177\u901a\u5e38\u91c7\u7528\u4e13\u95e8\u7684\u6570\u636e\u7ed3\u6784\u548c\u7b97\u6cd5\u6765\u89e3\u51b3\u7279\u5b9a\u95ee\u9898\uff0c\u4f46\u4e4b\u540e\u5df2\u6709\u7814\u7a76\u4e3a\u653b\u51fb\u56fe\u63d0\u51fa\u4e86\u5173\u7cfb\u6570\u636e\u5e93\u8868\u793a\u5f62\u5f0f\u3002\n\u65b9\u6cd5 CyGraph\u662f\u4e00\u4e2a\u5168\u9762\u7684\uff0c\u53ef\u6269\u5c55\u7684\u9ad8\u6027\u80fd\u7cfb\u7edf\uff0c\u7528\u4e8e\u5206\u6790\u548c\u63a8\u7406\u7f51\u7edc\u653b\u51fb\u5173\u7cfb\u3002 \u5b83\u5c06\u6765\u81ea\u4f17\u591a\u6765\u6e90\uff08\u62d3\u6251\uff0c\u6f0f\u6d1e\uff0c\u5ba2\u6237\u7aef\/\u670d\u52a1\u5668\u914d\u7f6e\uff0c\u9632\u706b\u5899\u89c4\u5219\uff0c\u4e8b\u4ef6\u7b49\uff09\u7684\u6570\u636e\u5173\u8054\u5230\u4e00\u4e2a\u901a\u7528\u7684\u6807\u51c6\u5316\u6a21\u578b\u4e2d\uff0c\u5e76\u5efa\u7acb\u4e00\u4e2a\u8868\u793a\u7f51\u7edc\u653b\u51fb\u5173\u7cfb\u548c\u76f8\u5173\u7f51\u7edc\u6570\u636e\u7684\u6301\u4e45\u56fe\u6570\u636e\u5b58\u50a8\u3002 CyGraph\u652f\u6301\u67e5\u8be2\u4ee5\u8bc6\u522b\u5173\u952e\u6f0f\u6d1e\uff0c\u63d0\u51fa\u6700\u4f73\u7f13\u89e3\u7b56\u7565\uff0c\u6620\u5c04\u4e3b\u673a\u5bf9\u4e3b\u673a\u4fe1\u4efb\u5173\u7cfb\uff0c\u663e\u793a\u4e0b\u6e38\/\u4e0a\u6e38\u8def\u5f84\u4ee5\u8fdb\u884c\u653b\u51fb\u54cd\u5e94\u7b49\u67e5\u8be2\u3002\u8be5\u7cfb\u7edf\u5305\u62ec\u7528\u4e8e\u8ba1\u7b97\u5206\u6790\u56fe\u8bba\u5ea6\u91cf\u7684\u7ec4\u4ef6\uff0c\u4f8b\u5982\u4e2d\u5fc3\u6027\uff0c\u7a0b\u5ea6\uff0c \u8fde\u63a5\u6027\u548c\u76f4\u5f84\u3002 \u5b83\u8fd8\u63d0\u4f9b\u4e86\u4ea4\u4e92\u7684\u53ef\u89c6\u5316\u529f\u80fd\uff0c\u4ee5\u4f20\u8fbe\u590d\u6742\u7684\u4f9d\u8d56\u5173\u7cfb\u3002\n\u67b6\u6784 \u56fe\uff1aCyGraph\u67b6\u6784\n\u4e0a\u56fe\u4e3aCyGraph\u67b6\u6784\u7684\u9ad8\u7ea7\u89c6\u56fe\u3002\u8be5\u4f53\u7cfb\u7ed3\u6784\u5305\u62ec\u7528\u4e8e\u8868\u793a\uff0c\u8f6c\u6362\u548c\u5206\u6790\uff08\u67e5\u8be2\u548c\u53ef\u89c6\u5316\uff09\u7684\u4ee3\u8868\u6027\u72b6\u6001\u4f20\u8f93\uff08REST\uff09Web\u670d\u52a1\u3002 CyGraph\u4ece\u5176\u7f51\u7edc\u77e5\u8bc6\u5806\u6808\u7684\u6240\u6709\u5c42\u63d0\u53d6\u5404\u79cd\u6765\u6e90\u7684\u6570\u636e\uff0c\u5c06\u7279\u5b9a\u4e8e\u6765\u6e90\u7684\u6570\u636e\u6620\u5c04\u5230\u901a\u7528\u7684\u6807\u51c6\u5316\u6570\u636e\u6a21\u578b\u3002\u7136\u540e\u5c06\u6807\u51c6\u5316\u6a21\u578b\u7684\u5b64\u7acb\u5143\u7d20\u8f6c\u6362\u4e3a\u56fe\u6a21\u578b\uff0c\u4ee5\u6355\u83b7\u7f51\u7edc\u5b89\u5168\u548c\u4efb\u52a1\u4f9d\u8d56\u57df\u7684\u76f8\u5173\u5173\u7cfb\u3002 CyGraph\u8fd8\u63d0\u4f9b\u4e86\u5404\u79cd\u5ba2\u6237\u7aef\u5206\u6790\u548c\u53ef\u89c6\u529f\u80fd\uff0c\u5305\u62ec\u56fe\u5f62\u52a8\u6001\uff0c\u5206\u5c42\uff0c\u5206\u7ec4\uff0c\u8fc7\u6ee4\u548c\u5206\u5c42\u89c6\u56fe\u3002 \u5728CyGraph\u67b6\u6784\u4e2d\uff0c\u7f51\u7edc\u5b89\u5168\u6a21\u578b\u67b6\u6784\u53ef\u4ee5\u968f\u53ef\u7528\u7684\u6570\u636e\u6e90\u548c\u6240\u9700\u7684\u5206\u6790\u81ea\u7531\u53d1\u5c55\uff0c\u800c\u4e0d\u662f\u5728\u8bbe\u8ba1\u65f6\u5c31\u56fa\u5b9a\u4e0b\u6765\u3002\u6570\u636e\u6a21\u578b\u57fa\u4e8eNeo4j\u4e2d\u5b9e\u73b0\u7684\u7075\u6d3b\u7684\u7279\u6027\u56fe\u516c\u5f0f\u3002\u6a21\u578b\u6269\u5c55\u53ea\u662f\u5728\u5c5e\u6027\u56fe\u6570\u636e\u6a21\u578b\u4e2d\u521b\u5efa\u989d\u5916\u7684\u8282\u70b9\uff0c\u5173\u7cfb\u548c\u5c5e\u6027\uff0c\u800c\u65e0\u9700\u67b6\u6784\u66f4\u6539\u6216\u5176\u4ed6\u6570\u636e\u5e93\u91cd\u65b0\u89c4\u8303\u5316\u3002\u56fe\u5f62\u6a21\u5f0f\u5339\u914d\u67e5\u8be2\u4ee5\u672c\u673aNeone4\u67e5\u8be2\u8bed\u8a00\uff08Cypher\uff09\u6216\u6211\u4eec\u7684\u57df\u7279\u5b9aCyGraph\u67e5\u8be2\u8bed\u8a00\uff08CyQL\uff09\u8868\u793a\uff0cCyGraph\u7f16\u8bd1\u4e3a\u672c\u673aCypher\u3002\n\u6570\u636e\u6e90 \u4e00\u4e9bCyGraph\u793a\u4f8b\u6570\u636e\u6e90\u3002\n\u5927\u6570\u636e\u5206\u6790 \u5927\u6570\u636e\u5206\u6790\u6280\u672f\u6808\n\u77e5\u8bc6\u56fe\u8c31\u6a21\u578b \u793a\u4f8b\u5e94\u7528 \u7f51\u7edc\u5206\u6790 \u7f51\u7edc\u57fa\u7840\u8bbe\u65bd\u548c\u7f51\u7edc\u72b6\u6001 \u7f51\u7edc\u62d3\u6251\uff0c\u6f0f\u6d1e\u548c\u9632\u706b\u5899\u89c4\u5219\nTVA\u653b\u51fb\u56fe\u53ef\u89c6\u5316\u3002\n\u8de8\u5b50\u7f51\u548c\u5b50\u7f51\u6210\u5458\u8eab\u4efd\u6613\u53d7\u653b\u51fb\u7684\u8ba1\u7b97\u673a\u3002\n\u5b89\u5168\u5a01\u80c1 \u603b\u7ed3 CyGraph\u5f15\u5165\u4e86\u4e00\u79cd\u65b0\u9896\u7684\u7edf\u4e00\u6570\u636e\u6a21\u578b\uff0c\u8be5\u6a21\u578b\u6355\u83b7\u4e86\u7f51\u7edc\u5b89\u5168\u5143\u7d20\uff08\u7f51\u7edc\u62d3\u6251\uff0c\u9632\u706b\u5899\uff0c\u4e3b\u673a\uff0c\u6f0f\u6d1e\u7b49\uff09\uff0c\u5a01\u80c1\u6307\u793a\u5668\uff08\u5165\u4fb5\u68c0\u6d4b\u8b66\u62a5\uff0c\u65e5\u5fd7\u6587\u4ef6\u6761\u76ee\uff0c\u53ef\u7591\u6d41\u91cf\u7b49\uff09\u4e0e\u4efb\u52a1\u4f9d\u8d56\u6027\u4e4b\u95f4\u7684\u590d\u6742\u5173\u7cfb\u3002 \u5728\u7f51\u7edc\u8d44\u4ea7\u4e0a\u3002 \u8fd9\u4f7f\u5b89\u5168\u64cd\u4f5c\u5458\u53ef\u4ee5\u66f4\u597d\u5730\u4e86\u89e3\u653b\u51fb\u8005\u6d3b\u52a8\u7684\u5168\u90e8\u8303\u56f4\uff0c\u4e0e\u5df2\u77e5\u7f51\u7edc\u6f0f\u6d1e\u8def\u5f84\u7684\u76f8\u5173\u6027\u4ee5\u53ca\u5bf9\u7279\u5b9a\u4efb\u52a1\u7684\u6f5c\u5728\u5f71\u54cd\u3002\n\u4f5c\u8005\u4ecb\u7ecd Steven Noel, Ph.D\nLinkedIn: https:\/\/www.linkedin.com\/in\/snoel1\/\nGoogle\u5b66\u672f\u641c\u7d22\uff1ahttps:\/\/scholar.google.com\/citations?user=Q9rV52cAAAAJ\n\u4e8c\u5341\u591a\u5e74\u6765\uff0c\u5728\u4f17\u591a\u8054\u90a6\u673a\u6784\u7684\u8d44\u52a9\u4e0b\uff0c\u53f2\u8482\u82ac\u00b7\u8bfa\u57c3\u5c14\uff08Steven Noel\uff09\u535a\u58eb\u5728\u7f51\u7edc\u5b89\u5168\u5efa\u6a21\uff0c\u5206\u6790\u548c\u53ef\u89c6\u5316\u7814\u7a76\u4e0e\u5f00\u53d1\u4e2d\u53d1\u6325\u4e86\u9886\u5bfc\u4f5c\u7528\u3002 \u4ed6\u62e5\u670980\u591a\u79cd\u51fa\u7248\u7269\uff0c\u88ab\u5f15\u7528\u8fd14000\u6b21\uff08h\u6307\u657030\uff09\uff0c\u5e76\u62e5\u670910\u9879\u4e13\u5229\u3002 \u4ed6\u9886\u5bfc\u4e86\u7528\u4e8e\u7f51\u7edc\u5b89\u5168\u56fe\u5206\u6790\/\u53ef\u89c6\u5316\u7684CyGraph\u548cCauldron\u5de5\u5177\u7684\u5f00\u53d1\uff0c\u8fd9\u4e9b\u5de5\u5177\u5df2\u7ecf\u8fc7\u6e21\u5230\u653f\u5e9c\u548c\u5546\u4e1a\u90e8\u95e8\uff08\u5305\u62ec\u6218\u672f\u519b\u4e8b\uff09\u3002\n\u4e13\u957f\uff1a\u7f51\u7edc\u6218\u5206\u6790\uff0c\u6f0f\u6d1e\u5206\u6790\uff0c\u4efb\u52a1\u4fdd\u8bc1\uff0c\u5165\u4fb5\u68c0\u6d4b\uff0c\u4fe1\u606f\u53ef\u89c6\u5316\uff0c\u6570\u636e\u6316\u6398\uff0c\u6570\u5b57\u4fe1\u53f7\u5904\u7406\n\u6536\u83b7 \u672c\u6587\u4f18\u52bf \u5c06\u6d41\u91cf\u5206\u6790\u3001\u5a01\u80c1\u68c0\u6d4b\u548c\u77e5\u8bc6\u56fe\u8c31\u975e\u5e38\u597d\u7684\u7ed3\u5408\u5230\u4e86\u4e00\u8d77\uff0c\u975e\u5e38\u5177\u6709\u53c2\u8003\u4ef7\u503c\u3002\n\u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u6269\u5c55\u7f51\u7edc\u6d41\u91cf\u5206\u6790\u548c\u77e5\u8bc6\u56fe\u8c31\u7684\u5e94\u7528\u3002\n\u672c\u6587\u5b58\u5728\u7684\u95ee\u9898 \u975e\u5f00\u6e90\u3002\n\u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206: \u2b50\u2b50\u2b50\u2b50\u2b50\n\u53c2\u8003\u8d44\u6599\u53ca\u9644\u4ef6 [1] \u8bba\u6587\u539f\u6587: Noel, S., E. Harley, K. H. Tam, M. Limiero, and M. Share. \u201cCyGraph: Graph-Based Analytics and Visualization for Cybersecurity.\u201d In Handbook of Statistics, edited by Venkat N. Gudivada, Vijay V. Raghavan, Venu Govindaraju, and C. R. Rao, 35:117\u201367. Cognitive Computing: Theory and Applications. Elsevier, 2016. https:\/\/doi.org\/10.1016\/bs.host.2016.07.001. [2] \u6f14\u8bb2: https:\/\/youtu.be\/Iowq7n_-NJg ","permalink":"https:\/\/m2kar.cn\/posts\/20201019-cygraph\/","summary":"<ul>\n<li><strong>\u6807\u9898:<\/strong> CyGraph: Graph-Based Analytics and Visualization for Cybersecurity<\/li>\n<li><strong>\u4f5c\u8005:<\/strong> S. Noel1, E. Harley, K.H. Tam, M. Limiero and M. Share<\/li>\n<li><strong>\u5173\u952e\u5b57:<\/strong> \u6d41\u91cf\u5206\u6790, \u77e5\u8bc6\u56fe\u8c31<\/li>\n<li><strong>\u6765\u6e90:<\/strong> The MITRE Corporation, McLean, VA, United States<\/li>\n<li><strong>\u94fe\u63a5:<\/strong> <a href=\"http:\/\/www.sciencedirect.com\/science\/article\/pii\/S0169716116300426\">http:\/\/www.sciencedirect.com\/science\/article\/pii\/S0169716116300426<\/a><\/li>\n<li><strong>\u5f15\u7528:<\/strong> Noel, S., E. Harley, K. H. Tam, M. Limiero, and M. Share. \u201cCyGraph: Graph-Based Analytics and Visualization for Cybersecurity.\u201d In <em>Handbook of Statistics<\/em>, edited by Venkat N. Gudivada, Vijay V. Raghavan, Venu Govindaraju, and C. R. Rao, 35:117\u201367. Cognitive Computing: Theory and Applications. Elsevier, 2016. <a href=\"https:\/\/doi.org\/10.1016\/bs.host.2016.07.001\">https:\/\/doi.org\/10.1016\/bs.host.2016.07.001<\/a>.<\/li>\n<\/ul>\n<h2 id=\"\u6458\u8981\">\u6458\u8981<\/h2>\n<p>CyGraph\uff0c\u5b83\u662f\u4e00\u79cd\u7528\u4e8e\u6539\u5584\u7f51\u7edc\u5b89\u5168\u72b6\u51b5\uff0c\u5728\u9762\u5bf9\u7f51\u7edc\u653b\u51fb\u65f6\u4fdd\u6301\u6001\u52bf\u611f\u77e5\u5e76\u7740\u91cd\u4e8e\u4fdd\u62a4\u5173\u952e\u4efb\u52a1\u8d44\u4ea7\u7684\u7cfb\u7edf\u3002 CyGraph\u91c7\u7528\u4e0e\u6f5c\u5728\u548c\u5b9e\u9645\u7f51\u7edc\u653b\u51fb\uff0c\u9632\u5fa1\u548c\u4efb\u52a1\u5f71\u54cd\u76f8\u5173\u7684\u57fa\u4e8e\u56fe\u7684\u7edf\u4e00\u7f51\u7edc\u5b89\u5168\u6a21\u578b\u3002\u5b83\u6355\u83b7\u7f51\u7edc\u73af\u5883\u4e2d\u7684\u589e\u91cf\u653b\u51fb\u6f0f\u6d1e\uff0c\u5b89\u5168\u4e8b\u4ef6\u548c\u4efb\u52a1\u4f9d\u5b58\u5173\u7cfb\uff0c\u5efa\u7acb\u53ef\u80fd\u7684\u653b\u51fb\u8def\u5f84\u548c\u5173\u952e\u6f0f\u6d1e\u7684\u9884\u6d4b\u6a21\u578b\uff0c\u5e76\u5c06\u4e8b\u4ef6\u4e0e\u5df2\u77e5\u6f0f\u6d1e\u8def\u5f84\u76f8\u5173\u8054\u3002\u5b83\u8fd8\u5305\u62ec\u4efb\u52a1\u9700\u6c42\u548c\u7f51\u7edc\u8d44\u4ea7\u4e4b\u95f4\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u4ee5\u4fbf\u5728\u4efb\u52a1\u4fdd\u8bc1\u7684\u80cc\u666f\u4e0b\u8fdb\u884c\u5206\u6790\u3002<strong>\u77e5\u8bc6\u56fe\u8c31\u6355\u83b7\u4e86\u7f51\u7edc\u5b89\u5168\u9886\u57df\u4e2d\u5b9e\u4f53\u4e4b\u95f4\u7684\u590d\u6742\u5173\u7cfb<\/strong>\u3002 <strong>CyGraph\u5c06\u5b64\u7acb\u7684\u6570\u636e\u548c\u4e8b\u4ef6\u6c47\u603b\u5728\u4e00\u8d77<\/strong>\uff0c\u4ee5\u63d0\u4f9b\u51b3\u7b56\u652f\u6301\u548c\u6001\u52bf\u611f\u77e5\u3002\u5728<strong>\u4efb\u52a1\u5173\u952e\u578b\u8d44\u4ea7<\/strong>\u7684\u60c5\u51b5\u4e0b\uff0c\u5b83\u5bf9\u66b4\u9732\u5728\u5916\u7684\u6f0f\u6d1e\uff08\u6620\u5c04\u5230\u6f5c\u5728\u5a01\u80c1\uff09\u8fdb\u884c\u4f18\u5148\u7ea7\u6392\u5e8f\u3002\u9762\u5bf9<strong>\u5b9e\u9645\u7684\u653b\u51fb<\/strong>\uff0c\u5b83\u5c06<strong>\u5165\u4fb5\u8b66\u62a5\u4e0e\u5df2\u77e5\u7684\u6f0f\u6d1e\u8def\u5f84\u76f8\u5173\u8054<\/strong>\uff0c\u5e76\u63d0\u51fa\u6700\u4f73\u63aa\u65bd\u4ee5\u54cd\u5e94\u653b\u51fb\u3002\u5bf9\u4e8e<strong>\u653b\u51fb\u540e\u53d6\u8bc1<\/strong>\uff0c\u5b83\u663e\u793a\u4e86\u53ef\u80fd\u9700\u8981\u66f4\u6df1\u5165\u68c0\u67e5\u7684\u6613\u53d7\u653b\u51fb\u7684\u8def\u5f84\u3002 CyGraph\u8fd8\u652f\u6301CyQL\uff08CyGraph\u67e5\u8be2\u8bed\u8a00\uff09\uff0cCyQL\u662f\u4e00\u79cd\u9886\u57df\u7279\u5b9a\u7684\u67e5\u8be2\u8bed\u8a00\uff0c\u7528\u4e8e\u8868\u8fbe\u611f\u5174\u8da3\u7684\u56fe\u5f62\u6a21\u5f0f\uff0c\u5e76\u5177\u6709\u4ea4\u4e92\u5f0f\u53ef\u89c6\u5316\u67e5\u8be2\u7ed3\u679c\u7684\u529f\u80fd\u3002\u4e3a\u4e86\u5e2e\u52a9\u7ba1\u7406\u89c6\u89c9\u590d\u6742\u6027\uff0cCyGraph\u652f\u6301\u5c06\u56fe\u6a21\u578b\u5206\u79bb\u4e3a\u76f8\u4e92\u4f9d\u8d56\u7684\u5c42\u3002\u5bf9\u4e8e\u65f6\u95f4\u76f8\u5173\u7684\u56fe\u6a21\u578b\uff0c\u5b83\u63d0\u4f9b\u4e86\u52a8\u6001\u7684\u56fe\u72b6\u6001\u52a8\u6001\u53ef\u89c6\u5316\u3002 CyGraph\u8fd8\u4e0e\u7b2c\u4e09\u65b9\u5de5\u5177\u96c6\u6210\uff0c\u4ee5\u53ef\u89c6\u5316\u56fe\u5f62\u72b6\u6001\u53d8\u5316\uff08\u4f8b\u5982\uff0c\u7531\u4eff\u771f\u9a71\u52a8\uff09\u3002\u6b64\u5916\uff0c\u5b83\u5177\u6709\u5408\u6210\u5177\u6709\u7279\u5b9a\u7edf\u8ba1\u5c5e\u6027\u7684\u56fe\u5f62\u6a21\u578b\u7684\u529f\u80fd\u3002<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011CyGraph:\u7528\u56fe\u6570\u636e\u5e93\u53d1\u73b0\u5e76\u53ef\u89c6\u5316\u7f51\u7edc\u6d41\u91cf\u4e2d\u7684\u5b89\u5168\u5a01\u80c1"},{"content":" \u6807\u9898: FuzzGen: Automatic Fuzzer Generation \u4f5c\u8005: Kyriakos Ispoglou, Daniel Austin, Vishwath Mohan, Mathias Payer, \u5173\u952e\u5b57: \u7cfb\u7edf\u5b89\u5168, Fuzzing, \u52a8\u6001\u5206\u6790 \u6765\u6e90: USENIX Security 2020 \u94fe\u63a5: https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/ispoglou \u5f15\u7528: Ispoglou Kyriakos, Austin Daniel, Mohan Vishwath, and Payer Mathias. \u201cFuzzGen: Automatic Fuzzer Generation,\u201d 2271\u201387, 2020. https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/ispoglou. \u6458\u8981 \u6a21\u7cca\u6d4b\u8bd5\u662f\u4e00\u79cd\u53d1\u73b0\u8f6f\u4ef6\u4e2d\u672a\u77e5\u6f0f\u6d1e\u7684\u6d4b\u8bd5\u6280\u672f\u3002\u5c06\u6a21\u7cca\u6d4b\u8bd5\u5e94\u7528\u4e8e\u5e93\u65f6\uff0c\u63d0\u4f9b\u968f\u673a\u8f93\u5165\u7684\u6838\u5fc3\u601d\u60f3\u4fdd\u6301\u4e0d\u53d8\uff0c\u4f46\u662f\u5b9e\u73b0\u826f\u597d\u7684\u4ee3\u7801\u8986\u76d6\u7387\u5e76\u975e\u6613\u4e8b\u3002\u5e93\u4e0d\u80fd\u4f5c\u4e3a\u72ec\u7acb\u7a0b\u5e8f\u8fd0\u884c\uff0c\u800c\u662f\u901a\u8fc7\u53e6\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u8c03\u7528\u3002\u5728\u5e93\u4e2d\u6df1\u5c42\u89e6\u53d1\u4ee3\u7801\u4ecd\u7136\u5177\u6709\u6311\u6218\u6027\uff0c\u56e0\u4e3a\u9700\u8981\u7279\u5b9a\u7684API\u8c03\u7528\u5e8f\u5217\u6765\u5efa\u7acb\u5fc5\u8981\u7684\u72b6\u6001\u3002\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u56fe\u4e66\u9986\u662f\u591a\u79cd\u591a\u6837\u7684\uff0c\u5e76\u4e14\u5177\u6709\u72ec\u7279\u7684\u754c\u9762\uff0c\u8fd9\u4e9b\u754c\u9762\u9700\u8981\u72ec\u7279\u7684\u6a21\u7cca\u5668\uff0c\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u8be5\u5206\u6790\u5668\u662f\u7531\u4eba\u7c7b\u5206\u6790\u5e08\u7f16\u5199\u7684\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86FuzzGen\uff0c\u8fd9\u662f\u4e00\u79cd\u7528\u4e8e\u5728\u7ed9\u5b9a\u73af\u5883\u4e2d\u81ea\u52a8\u5408\u6210\u590d\u6742\u5e93\u7684\u6a21\u7cca\u5668\u7684\u5de5\u5177\u3002 FuzzGen\u5229\u7528\u6574\u4e2a\u7cfb\u7edf\u5206\u6790\u6765\u63a8\u65ad\u5e93\u7684\u754c\u9762\uff0c\u5e76\u4e3a\u8be5\u5e93\u4e13\u95e8\u5408\u6210\u6a21\u7cca\u5668\u3002 FuzzGen\u4e0d\u9700\u8981\u4eba\u5de5\u5e72\u9884\uff0c\u53ef\u4ee5\u5e94\u7528\u4e8e\u5404\u79cd\u5e93\u3002\u6b64\u5916\uff0c\u751f\u6210\u7684\u6a21\u7cca\u5668\u5229\u7528LibFuzzer\u6765\u5b9e\u73b0\u66f4\u597d\u7684\u4ee3\u7801\u8986\u76d6\u7387\u5e76\u66b4\u9732\u5e93\u6df1\u5904\u7684\u9519\u8bef\u3002\u5728Debian\u548cAndroid\u5f00\u653e\u6e90\u4ee3\u7801\u9879\u76ee\uff08AOSP\uff09\u4e0a\u5bf9FuzzGen\u8fdb\u884c\u4e86\u8bc4\u4f30\uff0c\u9009\u62e9\u4e867\u4e2a\u5e93\u6765\u751f\u6210\u6a21\u7cca\u5668\u3002\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u6211\u4eec\u53d1\u73b0\u4e8617\u4e2a\u5148\u524d\u672a\u4fee\u8865\u7684\u6f0f\u6d1e\uff0c\u5176\u4e2d\u5305\u542b6\u4e2a\u5206\u914d\u7684CVE\u3002\u751f\u6210\u7684\u6a21\u7cca\u5668\u5e73\u5747\u53ef\u5b9e\u73b054\uff1a94\uff05\u7684\u4ee3\u7801\u8986\u76d6\u7387\uff1b\u4e0e\u624b\u52a8\u7f16\u5199\u7684\u6a21\u7cca\u5668\u76f8\u6bd4\uff0c\u6539\u8fdb\u4e866\uff1a94\uff05\uff0c\u8bc1\u660e\u4e86FuzzGen\u7684\u6709\u6548\u6027\u548c\u901a\u7528\u6027\u3002\n\u4ecb\u7ecd \u73b0\u5b9e\u95ee\u9898 \u5f85\u89e3\u51b3\u7684\u95ee\u9898 \u4e3b\u8981\u601d\u8def FuzzGen\u80cc\u540e\u7684\u4e3b\u8981\u601d\u8def\u3002 \u4e3a\u4e86\u5408\u6210Fuzzer\uff0cFuzzGen\u6267\u884c\u6574\u4e2a\u7cfb\u7edf\u5206\u6790\u4ee5\u63d0\u53d6\u6240\u6709\u6709\u6548\u7684API\u4ea4\u4e92\u3002\n\u4e3b\u8981\u8d21\u732e \u4e4b\u524d\u7814\u7a76\u7684\u4e0d\u8db3 \u65b9\u6cd5\u8bbe\u8ba1 FuzzGen\u5de5\u4f5c\u6d41\u3002 FuzzGen\u4ee5CFG(a)\u5f00\u5934\uff0c\u5e76\u63d0\u53d6\u76f8\u5e94\u7684A2DG(b)\uff08\u6709\u5173\u5176\u4ed6\u6a21\u5757\u7684\u56fe\uff0c\u8bf7\u53c2\u9605(c)\uff09\u3002 \u7136\u540e\u5c06\u4e24\u4e2aA2DG\u56fe\u5408\u5e76\uff08d\uff09\u3002 \u7136\u540e\uff0c\u5408\u5e76\u7684A2DG\u7528\u4e8e\u6839\u636e\u529f\u80fd\u987a\u5e8f\uff08e\uff09\u521b\u5efa\u6a21\u7cca\u5668\u3002 \u8fd9\u4e9b\u56fe\u7531FuzzGen\u81ea\u52a8\u751f\u6210\u3002\n\u5b9e\u73b0 \u5b9e\u9a8c\u8bc4\u4f30 \u6570\u636e\u96c6 \u5b9e\u9a8c\u65b9\u6cd5 \u5b9e\u9a8c\u6548\u679c \u8ba8\u8bba \u603b\u7ed3 \u4f5c\u8005\u4ecb\u7ecd \u6536\u83b7 \u672c\u6587\u4f18\u52bf \u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206: \u2b50\u2b50\u2b50\u2b50\u2b50\n\u8bc4\u4ef7:\n\u53c2\u8003\u8d44\u6599\u53ca\u9644\u4ef6 ","permalink":"https:\/\/m2kar.cn\/posts\/20201019-fuzzgen\/","summary":"<ul>\n<li><strong>\u6807\u9898:<\/strong>  FuzzGen: Automatic Fuzzer Generation<\/li>\n<li><strong>\u4f5c\u8005:<\/strong> Kyriakos Ispoglou, Daniel Austin, Vishwath Mohan, Mathias Payer,<\/li>\n<li><strong>\u5173\u952e\u5b57:<\/strong> \u7cfb\u7edf\u5b89\u5168, Fuzzing, \u52a8\u6001\u5206\u6790<\/li>\n<li><strong>\u6765\u6e90:<\/strong> USENIX Security 2020<\/li>\n<li><strong>\u94fe\u63a5:<\/strong> <a href=\"https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/ispoglou\">https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/ispoglou<\/a><\/li>\n<li><strong>\u5f15\u7528:<\/strong> Ispoglou Kyriakos, Austin Daniel, Mohan Vishwath, and Payer Mathias. \u201cFuzzGen: Automatic Fuzzer Generation,\u201d 2271\u201387, 2020. <a href=\"https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/ispoglou\">https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/ispoglou<\/a>.<\/li>\n<\/ul>\n<h2 id=\"\u6458\u8981\">\u6458\u8981<\/h2>\n<p>\u6a21\u7cca\u6d4b\u8bd5\u662f\u4e00\u79cd\u53d1\u73b0\u8f6f\u4ef6\u4e2d\u672a\u77e5\u6f0f\u6d1e\u7684\u6d4b\u8bd5\u6280\u672f\u3002\u5c06\u6a21\u7cca\u6d4b\u8bd5\u5e94\u7528\u4e8e\u5e93\u65f6\uff0c\u63d0\u4f9b\u968f\u673a\u8f93\u5165\u7684\u6838\u5fc3\u601d\u60f3\u4fdd\u6301\u4e0d\u53d8\uff0c\u4f46\u662f\u5b9e\u73b0\u826f\u597d\u7684\u4ee3\u7801\u8986\u76d6\u7387\u5e76\u975e\u6613\u4e8b\u3002\u5e93\u4e0d\u80fd\u4f5c\u4e3a\u72ec\u7acb\u7a0b\u5e8f\u8fd0\u884c\uff0c\u800c\u662f\u901a\u8fc7\u53e6\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u8c03\u7528\u3002\u5728\u5e93\u4e2d\u6df1\u5c42\u89e6\u53d1\u4ee3\u7801\u4ecd\u7136\u5177\u6709\u6311\u6218\u6027\uff0c\u56e0\u4e3a\u9700\u8981\u7279\u5b9a\u7684API\u8c03\u7528\u5e8f\u5217\u6765\u5efa\u7acb\u5fc5\u8981\u7684\u72b6\u6001\u3002\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u56fe\u4e66\u9986\u662f\u591a\u79cd\u591a\u6837\u7684\uff0c\u5e76\u4e14\u5177\u6709\u72ec\u7279\u7684\u754c\u9762\uff0c\u8fd9\u4e9b\u754c\u9762\u9700\u8981\u72ec\u7279\u7684\u6a21\u7cca\u5668\uff0c\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u8be5\u5206\u6790\u5668\u662f\u7531\u4eba\u7c7b\u5206\u6790\u5e08\u7f16\u5199\u7684\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86FuzzGen\uff0c\u8fd9\u662f\u4e00\u79cd\u7528\u4e8e\u5728\u7ed9\u5b9a\u73af\u5883\u4e2d\u81ea\u52a8\u5408\u6210\u590d\u6742\u5e93\u7684\u6a21\u7cca\u5668\u7684\u5de5\u5177\u3002 FuzzGen\u5229\u7528\u6574\u4e2a\u7cfb\u7edf\u5206\u6790\u6765\u63a8\u65ad\u5e93\u7684\u754c\u9762\uff0c\u5e76\u4e3a\u8be5\u5e93\u4e13\u95e8\u5408\u6210\u6a21\u7cca\u5668\u3002 FuzzGen\u4e0d\u9700\u8981\u4eba\u5de5\u5e72\u9884\uff0c\u53ef\u4ee5\u5e94\u7528\u4e8e\u5404\u79cd\u5e93\u3002\u6b64\u5916\uff0c\u751f\u6210\u7684\u6a21\u7cca\u5668\u5229\u7528LibFuzzer\u6765\u5b9e\u73b0\u66f4\u597d\u7684\u4ee3\u7801\u8986\u76d6\u7387\u5e76\u66b4\u9732\u5e93\u6df1\u5904\u7684\u9519\u8bef\u3002\u5728Debian\u548cAndroid\u5f00\u653e\u6e90\u4ee3\u7801\u9879\u76ee\uff08AOSP\uff09\u4e0a\u5bf9FuzzGen\u8fdb\u884c\u4e86\u8bc4\u4f30\uff0c\u9009\u62e9\u4e867\u4e2a\u5e93\u6765\u751f\u6210\u6a21\u7cca\u5668\u3002\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u6211\u4eec\u53d1\u73b0\u4e8617\u4e2a\u5148\u524d\u672a\u4fee\u8865\u7684\u6f0f\u6d1e\uff0c\u5176\u4e2d\u5305\u542b6\u4e2a\u5206\u914d\u7684CVE\u3002\u751f\u6210\u7684\u6a21\u7cca\u5668\u5e73\u5747\u53ef\u5b9e\u73b054\uff1a94\uff05\u7684\u4ee3\u7801\u8986\u76d6\u7387\uff1b\u4e0e\u624b\u52a8\u7f16\u5199\u7684\u6a21\u7cca\u5668\u76f8\u6bd4\uff0c\u6539\u8fdb\u4e866\uff1a94\uff05\uff0c\u8bc1\u660e\u4e86FuzzGen\u7684\u6709\u6548\u6027\u548c\u901a\u7528\u6027\u3002<\/p>\n<h2 id=\"\u4ecb\u7ecd\">\u4ecb\u7ecd<\/h2>\n<h3 id=\"\u73b0\u5b9e\u95ee\u9898\">\u73b0\u5b9e\u95ee\u9898<\/h3>\n<h3 id=\"\u5f85\u89e3\u51b3\u7684\u95ee\u9898\">\u5f85\u89e3\u51b3\u7684\u95ee\u9898<\/h3>\n<h3 id=\"\u4e3b\u8981\u601d\u8def\">\u4e3b\u8981\u601d\u8def<\/h3>\n<p><img alt=\"\u4e3b\u8981\u601d\u8def\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket@master\/img\/20201019172701.png\"><\/p>\n<p>FuzzGen\u80cc\u540e\u7684\u4e3b\u8981\u601d\u8def\u3002 \u4e3a\u4e86\u5408\u6210Fuzzer\uff0cFuzzGen\u6267\u884c\u6574\u4e2a\u7cfb\u7edf\u5206\u6790\u4ee5\u63d0\u53d6\u6240\u6709\u6709\u6548\u7684API\u4ea4\u4e92\u3002<\/p>\n<h3 id=\"\u4e3b\u8981\u8d21\u732e\">\u4e3b\u8981\u8d21\u732e<\/h3>\n<h2 id=\"\u4e4b\u524d\u7814\u7a76\u7684\u4e0d\u8db3\">\u4e4b\u524d\u7814\u7a76\u7684\u4e0d\u8db3<\/h2>\n<h2 id=\"\u65b9\u6cd5\u8bbe\u8ba1\">\u65b9\u6cd5\u8bbe\u8ba1<\/h2>\n<p><img alt=\"image-20201019172744547\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket@master\/img\/20201019172744.png\"><\/p>\n<p><strong>FuzzGen\u5de5\u4f5c\u6d41<\/strong>\u3002 FuzzGen\u4ee5CFG(a)\u5f00\u5934\uff0c\u5e76\u63d0\u53d6\u76f8\u5e94\u7684A2DG(b)\uff08\u6709\u5173\u5176\u4ed6\u6a21\u5757\u7684\u56fe\uff0c\u8bf7\u53c2\u9605(c)\uff09\u3002 \u7136\u540e\u5c06\u4e24\u4e2aA2DG\u56fe\u5408\u5e76\uff08d\uff09\u3002 \u7136\u540e\uff0c\u5408\u5e76\u7684A2DG\u7528\u4e8e\u6839\u636e\u529f\u80fd\u987a\u5e8f\uff08e\uff09\u521b\u5efa\u6a21\u7cca\u5668\u3002 \u8fd9\u4e9b\u56fe\u7531FuzzGen\u81ea\u52a8\u751f\u6210\u3002<\/p>\n<h2 id=\"\u5b9e\u73b0\">\u5b9e\u73b0<\/h2>\n<p><img alt=\"FuzzGen\u5b9e\u65bd\u6982\u8ff0\u3002\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket@master\/img\/20201019173010.png\"><\/p>\n<h2 id=\"\u5b9e\u9a8c\u8bc4\u4f30\">\u5b9e\u9a8c\u8bc4\u4f30<\/h2>\n<h3 id=\"\u6570\u636e\u96c6\">\u6570\u636e\u96c6<\/h3>\n<h3 id=\"\u5b9e\u9a8c\u65b9\u6cd5\">\u5b9e\u9a8c\u65b9\u6cd5<\/h3>\n<h3 id=\"\u5b9e\u9a8c\u6548\u679c\">\u5b9e\u9a8c\u6548\u679c<\/h3>\n<h2 id=\"\u8ba8\u8bba\">\u8ba8\u8bba<\/h2>\n<h2 id=\"\u603b\u7ed3\">\u603b\u7ed3<\/h2>\n<h2 id=\"\u4f5c\u8005\u4ecb\u7ecd\">\u4f5c\u8005\u4ecb\u7ecd<\/h2>\n<h2 id=\"\u6536\u83b7\">\u6536\u83b7<\/h2>\n<h3 id=\"\u672c\u6587\u4f18\u52bf\">\u672c\u6587\u4f18\u52bf<\/h3>\n<h3 id=\"\u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9\">\u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9<\/h3>\n<h2 id=\"\u8bba\u6587\u8bc4\u4ef7\">\u8bba\u6587\u8bc4\u4ef7<\/h2>\n<p><strong>\u8bc4\u5206<\/strong>: \u2b50\u2b50\u2b50\u2b50\u2b50<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011FuzzGen\u81ea\u52a8\u5316\u751f\u6210\u6a21\u7cca\u6d4b\u8bd5\u5668"},{"content":" **\u6807\u9898:**HALucinator: Firmware Re-hosting Through Abstraction Layer Emulation \u4f5c\u8005: Abraham A Clements, Eric Gustafson; Tobias Scharnowski; Paul Grosen; David Fritz; Christopher Kruegel and Giovanni Vigna; Saurabh Bagchi; Mathias Payer \u6765\u6e90: USENIX Security 2020 \u94fe\u63a5: https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/clements \u5f15\u7528: Clements, A. A., Gustafson, E., Scharnowski, T., Grosen, P., Fritz, D., Kruegel, C., \u2026 Payer, M. (2020). HALucinator: Firmware Re-hosting Through Abstraction Layer Emulation. 29th USENIX Security Symposium (USENIX Security 20), 1201\u20131218. USENIX Association. Retrieved from https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/clements \u6458\u8981 \u9274\u4e8e\u5728\u7ebf\u5d4c\u5165\u5f0f\u8bbe\u5907\u65e0\u5904\u4e0d\u5728\u7684\u60c5\u51b5\uff0c\u5206\u6790\u5176\u56fa\u4ef6\u5bf9\u4e8e\u5b89\u5168\u6027\uff0c\u9690\u79c1\u6027\u548c\u5b89\u5168\u6027\u81f3\u5173\u91cd\u8981\u3002\u786c\u4ef6\u548c\u56fa\u4ef6\u4e4b\u95f4\u7684\u7d27\u5bc6\u8026\u5408\u4ee5\u53ca\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e2d\u7684\u591a\u6837\u6027\u4f7f\u5f97\u96be\u4ee5\u5bf9\u56fa\u4ef6\u6267\u884c\u52a8\u6001\u5206\u6790\u3002\u4f46\u662f\uff0c\u56fa\u4ef6\u5f00\u53d1\u4eba\u5458\u4f1a\u5b9a\u671f\u4f7f\u7528\u8bf8\u5982\u786c\u4ef6\u62bd\u8c61\u5c42\uff08HAL\uff09\u4e4b\u7c7b\u7684\u62bd\u8c61\u6765\u5f00\u53d1\u4ee3\u7801\uff0c\u4ee5\u7b80\u5316\u5176\u5de5\u4f5c\u3002\u6211\u4eec\u5229\u7528\u8fd9\u4e9b\u62bd\u8c61\u4f5c\u4e3a\u91cd\u65b0\u6258\u7ba1\u548c\u5206\u6790\u56fa\u4ef6\u7684\u57fa\u7840\u3002\u901a\u8fc7\u63d0\u4f9bHAL\u529f\u80fd\u7684\u9ad8\u7ea7\u66ff\u4ee3\u54c1\uff08\u79f0\u4e3a\u201cHLE\u201d\uff09\uff0c\u6211\u4eec\u4f7f\u786c\u4ef6\u4e0e\u56fa\u4ef6\u8131\u94a9\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u662f\uff0c\u9996\u5148\u901a\u8fc7\u4e8c\u8fdb\u5236\u5206\u6790\u5728\u56fa\u4ef6\u6837\u672c\u4e2d\u627e\u5230\u5e93\u51fd\u6570\uff0c\u7136\u540e\u5728\u5168\u7cfb\u7edf\u4eff\u771f\u5668\u4e2d\u63d0\u4f9b\u8fd9\u4e9b\u51fd\u6570\u7684\u901a\u7528\u5b9e\u73b0\u3002\u6211\u4eec\u5728\u539f\u578b\u7cfb\u7edfHALucinator\u4e2d\u63d0\u51fa\u4e86\u8fd9\u4e9b\u60f3\u6cd5\uff0c\u8be5\u7cfb\u7edf\u53ef\u4ee5\u91cd\u65b0\u6258\u7ba1\u56fa\u4ef6\uff0c\u5e76\u5141\u8bb8\u865a\u62df\u8bbe\u5907\u6b63\u5e38\u4f7f\u7528\u3002\u9996\u5148\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u73b0\u6709\u5e93\u5339\u914d\u6280\u672f\u7684\u6269\u5c55\uff0c\u8fd9\u4e9b\u6269\u5c55\u662f\u8bc6\u522b\u4e8c\u8fdb\u5236\u56fa\u4ef6\u4e2d\u7684\u5e93\u51fd\u6570\uff0c\u51cf\u5c11\u51b2\u7a81\u4ee5\u53ca\u63a8\u65ad\u5176\u4ed6\u51fd\u6570\u540d\u6240\u5fc5\u9700\u7684\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u901a\u8fc7\u4f7f\u7528\u7b80\u5316\u7684\u5904\u7406\u7a0b\u5e8f\u548c\u5916\u56f4\u6a21\u578b\u6f14\u793a\u91cd\u65b0\u6258\u7ba1\u8fc7\u7a0b\uff0c\u8fd9\u4e9b\u8fc7\u7a0b\u4f7f\u56fa\u4ef6\u6837\u672c\u548c\u82af\u7247\u4f9b\u5e94\u5546\u4e4b\u95f4\u7684\u8fc7\u7a0b\u5feb\u901f\uff0c\u7075\u6d3b\u4e14\u53ef\u79fb\u690d\u3002\u6700\u540e\uff0c\u901a\u8fc7\u5411HALucinator\u6dfb\u52a0AFL\u6a21\u7cca\u5668\uff0c\u5728\u56fa\u4ef6\u4e2d\u95f4\u4ef6\u5e93\u4e2d\u5b9a\u4f4d\u591a\u4e2a\u4ee5\u524d\u672a\u77e5\u7684\u6f0f\u6d1e\uff0c\u6211\u4eec\u8bc1\u660e\u4e86HLE\u5728\u5b89\u5168\u6027\u5206\u6790\u65b9\u9762\u7684\u5b9e\u7528\u6027\u3002\n\u4ecb\u7ecd \u73b0\u5b9e\u95ee\u9898 \u7269\u8054\u7f51\u5b89\u5168\u95ee\u9898\u4e25\u5cfb\uff0c\u56fa\u4ef6\u68c0\u6d4b\u95ee\u9898\u96be\u4ee5\u89e3\u51b3\u3002\n\u56fa\u4ef6\u6d4b\u8bd5\u901a\u5e38\u4f7f\u7528\u7269\u7406\u65b9\u6cd5\u3002\u4f46\u5b58\u5728\u4ee5\u4e0b\u95ee\u9898\uff1a\n\u8c03\u8bd5\u63a5\u53e3 \u88ab\u7981\u7528 \u88ab\u9650\u5236 \u5e76\u884c\u56f0\u96be \u5176\u4ed6\u9650\u5236 \u8d35 \ud83d\udc8e\ud83d\udc8e\ud83d\udc8e \u6613\u574f\ud83d\udc80\ud83d\udc80\ud83d\udc80 \u5f85\u89e3\u51b3\u7684\u95ee\u9898 \u4f7f\u7528\u56fa\u4ef6\u6a21\u62df(firmware re-hosting)\u7684\u65b9\u5f0f\uff0c\u5728\u666e\u901a\u8ba1\u7b97\u673a\u4e0a\u6267\u884c\u56fa\u4ef6\u3002\u4f46\u7531\u4e8e\u56fa\u4ef6\u7684\u5dee\u5f02\u6027\uff0c\u56fa\u4ef6\u7684\u6a21\u62df\u96be\u4ee5\u5b9e\u73b0\u3002\n\u5f53\u524d\u7814\u7a76\u7684\u4e0d\u8db3 \u5f53\u524d\u7684\u7814\u7a76\u628a\u5bf9\u786c\u4ef6\u7684\u8bf7\u6c42\u8f6c\u53d1\u5230\u5b9e\u9645\u7684\u786c\u4ef6\u4e2d\uff0c\u4f46\u8fd9\u79cd\u65b9\u5f0f\u9700\u8981\u6e90\u786c\u4ef6\u3002\n\u53e6\u5916\u8fd8\u6709\u6280\u672f\u53ef\u4ee5\u91cd\u653e\u6216\u8005\u5bf9\u786c\u4ef6\u5efa\u6a21\uff0c\u4f46\u8fd9\u79cd\u65b9\u5f0f\u9650\u5236\u9700\u8981\u4e25\u683c\u6309\u7167\u5df2\u7ecf\u8bb0\u5f55\u597d\u7684\u8def\u5f84\u6267\u884c\u3002\n\u4e3b\u8981\u89e3\u51b3\u601d\u8def \u786c\u4ef6\u62bd\u8c61\u5c42\u662f\u4e00\u4e9b\u5bf9\u5b9e\u9645\u786c\u4ef6\u62bd\u8c61\u5904\u7406\u7684\u64cd\u4f5c\u7cfb\u7edf\u5e93\u3002\u901a\u8fc7\u6a21\u62df\u786c\u4ef6\u62bd\u8c61\u5c42\uff0c\u53ef\u4ee5\u8fbe\u5230\u6a21\u62df\u7684\u5e95\u5c42\u786c\u4ef6\u7684\u76ee\u7684\u3002\n\u4e3b\u8981\u8d21\u732e \u63d0\u51faHAL\u5e93\u6a21\u62df\u6280\u672f\uff0c\u53ef\u5728\u65e0\u9700\u4f9d\u8d56\u5b9e\u9645\u786c\u4ef6\u7684\u60c5\u51b5\u4e0b\u4f7f\u7528QEMU\u7b49\u6a21\u62df\u5668\u4eff\u771f\u4e8c\u8fdb\u5236\u56fa\u4ef6 \u6539\u8fdb\u4e86\u73b0\u6709\u7684\u4f9d\u8d56\u5e93\u5339\u914d\u6280\u672f \u63d0\u51faHALucinator\u4eff\u771f\u7cfb\u7edf\uff0c\u53ef\u901a\u8fc7\u62bd\u8c61\u5904\u7406\u7a0b\u5e8f\u548c\u5916\u56f4\u6a21\u578b\u5e93\u7684\u65b9\u5f0f\u8fdb\u884c\u4ea4\u4e92\u5f0f\u4eff\u771f\u548c\u56fa\u4ef6Fuzzing \u901a\u8fc7\u5bf916\u4e2a\u56fa\u4ef6\u7684\u6a21\u62df\uff0c\u8bc1\u660e\u4e86\u65b9\u6cd5\u7684\u5b9e\u7528\u6027\u3002\u5e76\u901a\u8fc7Fuzzing\u7684\u65b9\u5f0f\u53d1\u73b0\u4e86\u4e24\u4e2a0day\u6f0f\u6d1e \u52a8\u673a(Motivation) \u6a21\u62df\u786c\u4ef6\u548c\u5916\u8bbe\n\u6a21\u62df\u56fa\u4ef6\u6808\n\u9ad8\u5c42\u7ea7\u6a21\u62df\n\u8bbe\u8ba1 \u6700\u7ec8\u80fd\u8fbe\u5230\u591a\u5c42\u7ea7\u7684\u6a21\u62df\u3002\nhal-fuzz \u6a21\u7cca\u6d4b\u8bd5\u529f\u80fd \u57fa\u4e8eAFL-Unicorn \u8f93\u5165\u7528\u5c3d\u65f6\u7a0b\u5e8f\u9000\u51fa \u57fa\u4e8e\u5757\u8ba1\u6570\u7684\u786e\u5b9a\u6027\u8ba1\u65f6\u5668 \u4e2d\u65ad\u4e8b\u4ef6\u4e5f\u57fa\u4e8e\u5757\u8ba1\u6570 \u901a\u8fc7Unicorn\u81ea\u8eab\u7684\u9519\u8bef\u68c0\u6d4b\u5230\u5d29\u6e83 \u68c0\u6d4b\u5668\u4ee5\u53ca\u5904\u7406\u7a0b\u5e8f\u65ad\u8a00 \u5b9e\u9a8c\u8bc4\u4f30 \u5b9e\u9a8c\u6548\u679c CVE CVE-2019-8359\uff1aContiki OS\u6570\u636e\u5305\u91cd\u7ec4\u529f\u80fd\u4e2d\u7684\u7f13\u51b2\u533a\u6ea2\u51fa\u5bfc\u81f4\u7684\u8fdc\u7a0b\u6267\u884c\u4ee3\u7801\u6f0f\u6d1e\u3002 CVE-2019-9183\uff1aContiki OS\u6570\u636e\u5305\u91cd\u7ec4\u529f\u80fd\u4e2d\u7684\u6574\u6570\u4e0b\u6ea2\u6f0f\u6d1e\u5bfc\u81f4\u7684\u8fdc\u7a0b\u62d2\u7edd\u670d\u52a1\u6f0f\u6d1e\u3002 CSAW ESC 2019 \u6bd4\u8d5b\u7ed3\u679c ESC\u662f\u4e00\u4e2a\u6bd4\u8f83\u77e5\u540d\u7684\u5d4c\u5165\u5f0f\u5b89\u5168\u6bd4\u8d5b\u30022019\u5e74\u7684\u6bd4\u8d5b\u4e3a\u65e0\u7ebf\u5c04\u9891\u8bc6\u522b(RFID) \u7684\u5b89\u5168\u6027\u3002\n\u6bd4\u8d5b\u4f7f\u7528\u7f8e\u56fd\u56fd\u5bb6\u5b89\u5168\u5c40(NSA)\u5f00\u53d1\u7684\u9006\u5411\u5de5\u7a0b\u5de5\u5177\u9ed1\u5ba2\u5b9a\u5236\u7684 RFID \u8bfb\u5361\u5668\u56fa\u4ef6\u3002\n\u56e2\u961f\u6210\u7ee9\uff1a\n\u6a21\u62df\u4e86\u6240\u6709\u6311\u6218\u96c6\u7684ARM\u90e8\u5206 \u89e3\u51b3\u4e8618\/19\u7684\u6311\u6218 \u4f7f\u7528\u6a21\u7cca\u6d4b\u8bd5\u81ea\u52a8\u89e3\u51b33\u4e2a\u6311\u6218 \u83b7\u5f97\u7b2c\u4e00\u540d\uff01 \u8ba8\u8bba \u603b\u7ed3 \u4f5c\u8005\u4ecb\u7ecd Abraham A. Clements \u3010DBLP \u3011\n\u666e\u6e21\u5927\u5b66PhD\uff1b\u4ece2017\u5e74\u5f00\u59cb\u505a\u7269\u8054\u7f51\u5b89\u5168\u7814\u7a76\uff1b3\u7bc7\u4e00\u4f5c\u9876\u4f1a\nEric Gustafson \u3010\u4e3b\u9875\u3011\n\u52a0\u5dde\u5927\u5b66\u5723\u82ad\u82ad\u62c9\u5206\u6821\u5df2\u6bd5\u4e1aPhD\u3002\n\u4e13\u6ce8\u4e8e\u79fb\u52a8\u7aef\u548c\u7269\u8054\u7f51\u5b89\u5168\u3002\n\u6709\u5f88\u591a\u9876\u4f1a\u8bba\u6587\u3002\n\u5408\u4f5c\u5b9e\u9a8c\u5ba4 \u51e0\u4e2a\u5408\u4f5c\u5b9e\u9a8c\u5ba4\u90fd\u5f88\u6709\u6765\u5934\u3002\n\u6536\u83b7 \u672c\u6587\u4f18\u52bf \u8fd9\u7bc7\u8bba\u6587\u89e3\u51b3\u4e86\u4e00\u7bc7\u7ecf\u5178\u8bba\u6587Firmadyne\u5728\u56fa\u4ef6\u6a21\u62df\u4e0a\u7684\u6838\u5fc3\u95ee\u9898\u3002\n\u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u53ef\u4ee5\u5c1d\u8bd5\u590d\u73b0\u6b64\u6587\u7ae0\u6765\u89e3\u51b3\u56fa\u4ef6\u6f0f\u6d1e\u6316\u6398\u7684\u95ee\u9898\u3002\n\u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206: \u2b50\u2b50\u2b50\u2b50\u2b50\n\u8bc4\u4ef7: \u5f88\u6709\u53c2\u8003\u4ef7\u503c\uff01\n\u53c2\u8003\u8d44\u6599\u53ca\u9644\u4ef6 [1] \u8bba\u6587\u7b14\u8bb0\u5e7b\u706f\u7247: https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/annex\/papernote-slides-HALucinator-sec20.pdf [2] \u8bba\u6587\u539f\u7a3f: https:\/\/www.usenix.org\/system\/files\/sec20-clements.pdf [3] \u8bba\u6587\u539f\u5e7b\u706f\u7247: https:\/\/www.usenix.org\/system\/files\/sec20_slides_clements.pdf \u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20201018-halucinator\/","summary":"<ul>\n<li>**\u6807\u9898:**HALucinator: Firmware Re-hosting Through Abstraction Layer Emulation<\/li>\n<li><strong>\u4f5c\u8005:<\/strong> Abraham A Clements, Eric Gustafson; Tobias Scharnowski; Paul Grosen; David Fritz; Christopher Kruegel and Giovanni Vigna; Saurabh Bagchi; Mathias Payer<\/li>\n<li><strong>\u6765\u6e90:<\/strong> USENIX Security 2020<\/li>\n<li><strong>\u94fe\u63a5:<\/strong> <a href=\"https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/clements\">https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/clements<\/a><\/li>\n<li><strong>\u5f15\u7528:<\/strong> Clements, A. A., Gustafson, E., Scharnowski, T., Grosen, P., Fritz, D., Kruegel, C., \u2026 Payer, M. (2020). HALucinator: Firmware Re-hosting Through Abstraction Layer Emulation. <em>29th USENIX Security Symposium (USENIX Security 20)<\/em>, 1201\u20131218. USENIX Association. Retrieved from <a href=\"https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/clements\">https:\/\/www.usenix.org\/conference\/usenixsecurity20\/presentation\/clements<\/a><\/li>\n<\/ul>\n<h2 id=\"\u6458\u8981\">\u6458\u8981<\/h2>\n<p>\u9274\u4e8e\u5728\u7ebf\u5d4c\u5165\u5f0f\u8bbe\u5907\u65e0\u5904\u4e0d\u5728\u7684\u60c5\u51b5\uff0c\u5206\u6790\u5176\u56fa\u4ef6\u5bf9\u4e8e\u5b89\u5168\u6027\uff0c\u9690\u79c1\u6027\u548c\u5b89\u5168\u6027\u81f3\u5173\u91cd\u8981\u3002\u786c\u4ef6\u548c\u56fa\u4ef6\u4e4b\u95f4\u7684\u7d27\u5bc6\u8026\u5408\u4ee5\u53ca\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e2d\u7684\u591a\u6837\u6027\u4f7f\u5f97\u96be\u4ee5\u5bf9\u56fa\u4ef6\u6267\u884c\u52a8\u6001\u5206\u6790\u3002\u4f46\u662f\uff0c\u56fa\u4ef6\u5f00\u53d1\u4eba\u5458\u4f1a\u5b9a\u671f\u4f7f\u7528\u8bf8\u5982<strong>\u786c\u4ef6\u62bd\u8c61\u5c42\uff08HAL\uff09<strong>\u4e4b\u7c7b\u7684\u62bd\u8c61\u6765\u5f00\u53d1\u4ee3\u7801\uff0c\u4ee5\u7b80\u5316\u5176\u5de5\u4f5c\u3002\u6211\u4eec\u5229\u7528\u8fd9\u4e9b\u62bd\u8c61\u4f5c\u4e3a\u91cd\u65b0\u6258\u7ba1\u548c\u5206\u6790\u56fa\u4ef6\u7684\u57fa\u7840\u3002\u901a\u8fc7\u63d0\u4f9bHAL\u529f\u80fd\u7684\u9ad8\u7ea7\u66ff\u4ee3\u54c1\uff08\u79f0\u4e3a\u201cHLE\u201d\uff09\uff0c\u6211\u4eec\u4f7f\u786c\u4ef6\u4e0e\u56fa\u4ef6\u8131\u94a9\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u5de5\u4f5c\u65b9\u5f0f\u662f\uff0c\u9996\u5148\u901a\u8fc7\u4e8c\u8fdb\u5236\u5206\u6790\u5728\u56fa\u4ef6\u6837\u672c\u4e2d\u627e\u5230\u5e93\u51fd\u6570\uff0c\u7136\u540e\u5728\u5168\u7cfb\u7edf\u4eff\u771f\u5668\u4e2d\u63d0\u4f9b\u8fd9\u4e9b\u51fd\u6570\u7684\u901a\u7528\u5b9e\u73b0\u3002\u6211\u4eec\u5728\u539f\u578b\u7cfb\u7edfHALucinator\u4e2d\u63d0\u51fa\u4e86\u8fd9\u4e9b\u60f3\u6cd5\uff0c\u8be5\u7cfb\u7edf\u53ef\u4ee5\u91cd\u65b0\u6258\u7ba1\u56fa\u4ef6\uff0c\u5e76\u5141\u8bb8\u865a\u62df\u8bbe\u5907\u6b63\u5e38\u4f7f\u7528\u3002\u9996\u5148\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u73b0\u6709\u5e93\u5339\u914d\u6280\u672f\u7684\u6269\u5c55\uff0c\u8fd9\u4e9b\u6269\u5c55\u662f\u8bc6\u522b\u4e8c\u8fdb\u5236\u56fa\u4ef6\u4e2d\u7684\u5e93\u51fd\u6570\uff0c\u51cf\u5c11\u51b2\u7a81\u4ee5\u53ca\u63a8\u65ad\u5176\u4ed6\u51fd\u6570\u540d\u6240\u5fc5\u9700\u7684\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u901a\u8fc7\u4f7f\u7528\u7b80\u5316\u7684\u5904\u7406\u7a0b\u5e8f\u548c\u5916\u56f4\u6a21\u578b\u6f14\u793a\u91cd\u65b0\u6258\u7ba1\u8fc7\u7a0b\uff0c\u8fd9\u4e9b\u8fc7\u7a0b\u4f7f\u56fa\u4ef6\u6837\u672c\u548c\u82af\u7247\u4f9b\u5e94\u5546\u4e4b\u95f4\u7684\u8fc7\u7a0b\u5feb\u901f\uff0c\u7075\u6d3b\u4e14\u53ef\u79fb\u690d\u3002\u6700\u540e\uff0c\u901a\u8fc7\u5411<\/strong>HALucinator<\/strong>\u6dfb\u52a0AFL\u6a21\u7cca\u5668\uff0c\u5728\u56fa\u4ef6\u4e2d\u95f4\u4ef6\u5e93\u4e2d\u5b9a\u4f4d\u591a\u4e2a\u4ee5\u524d\u672a\u77e5\u7684\u6f0f\u6d1e\uff0c\u6211\u4eec\u8bc1\u660e\u4e86HLE\u5728\u5b89\u5168\u6027\u5206\u6790\u65b9\u9762\u7684\u5b9e\u7528\u6027\u3002<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011HALucinator \u865a\u62df\u5316\u786c\u4ef6\u5c42\u6a21\u62df\u542f\u52a8\u56fa\u4ef6"},{"content":"lvm\u78c1\u76d8\u5907\u4efd\u3001\u66ff\u4ee3\u3001\u548c\u4fee\u590d\u65b9\u6848 \u521b\u5efalvm\u7ec4VG0\u548c\u5206\u533aLVA\u5e76\u6302\u8f7d\u5230\/A Make lvm volume group VG0 and partition LVA and mount to \/A\nroot@vm-ubu:\/home\/rui# lvmdiskscan \/dev\/loop0 [ 14.50 MiB] \/dev\/loop1 [ 140.66 MiB] \/dev\/sda1 [ &lt;80.00 GiB] \/dev\/loop2 [ &lt;90.99 MiB] \/dev\/loop3 [ &lt;12.99 MiB] \/dev\/loop4 [ &lt;34.54 MiB] \/dev\/loop5 [ &lt;2.25 MiB] \/dev\/loop6 [ &lt;3.70 MiB] \/dev\/sdb [ 2.00 GiB] \/dev\/sdc [ 2.00 GiB] 2 disks 8 partitions 0 LVM physical volume whole disks 0 LVM physical volumes root@vm-ubu:\/home\/rui# pvcreate \/dev\/sdb Physical volume &#34;\/dev\/sdb&#34; successfully created. root@vm-ubu:\/home\/rui# vgcreate VG0 \/dev\/sdb Volume group &#34;VG0&#34; successfully created root@vm-ubu:\/home\/rui# lvcreate -L 1G VG0 -n LVA Logical volume &#34;LVA&#34; created. root@vm-ubu:\/home\/rui# mkfs.ext4 \/dev\/mapper\/VG0-LVA mke2fs 1.44.1 (24-Mar-2018) Creating filesystem with 262144 4k blocks and 65536 inodes Filesystem UUID: d2d61132-f79c-486f-a391-8471288bd20e Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Allocating group tables: done Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done root@vm-ubu:\/home\/rui# mkdir \/A root@vm-ubu:\/home\/rui# mount \/dev\/mapper\/VG0-LVA \/A root@vm-ubu:\/home\/rui# seq 100 | xargs -i dd if=\/dev\/urandom of=\/A\/{}.dat bs=1024 count=1 \u5907\u4efd\u5206\u533aLVA\u5230A.img Backup partition LVA to img file A.img\nroot@vm-ubu:\/home\/rui# apt install gddrescue root@vm-ubu:\/home\/rui# ddrescue -d -f -r3 \/dev\/mapper\/VG0-LVA \/data\/A.img &#34;rescue.$(date).log&#34; GNU ddrescue 1.22 ipos: 1073 MB, non-trimmed: 0 B, current rate: 181 MB\/s opos: 1073 MB, non-scraped: 0 B, average rate: 214 MB\/s non-tried: 0 B, bad-sector: 0 B, error rate: 0 B\/s rescued: 1073 MB, bad areas: 0, run time: 4s pct rescued: 100.00%, read errors: 0, remaining time: n\/a time since last successful read: n\/a Finished root@vm-ubu:\/home\/rui# \u6302\u8f7dA.img\u4f5c\u4e3a\u5185\u5b58\u8bbe\u5907\uff0c\u5e76\u66ff\u6362\u6389\u65e7\u7684\/A Mount A.img as loop device and replace old mount \/A\nroot@vm-ubu:\/home\/rui# losetup -P \/dev\/loop52 \/data\/ A.img lost+found\/ root@vm-ubu:\/home\/rui# losetup -P \/dev\/loop52 \/data\/A.img root@vm-ubu:\/home\/rui# umount \/A root@vm-ubu:\/home\/rui# mount \/dev\/loop52 \/A root@vm-ubu:\/home\/rui# ls A ls: cannot access &#39;A&#39;: No such file or directory root@vm-ubu:\/home\/rui# ls \/A 100.dat 15.dat 20.dat 26.dat 31.dat 37.dat 42.dat 48.dat 53.dat 59.dat root@vm-ubu:\/home\/rui# \u5220\u9664\u5206\u533a Delete partition A\nroot@vm-ubu:\/home\/rui# lvremove \/dev\/mapper\/VG0-LVA Do you really want to remove and DISCARD active logical volume VG0\/LVA? [y\/n]: y Logical volume &#34;LVA&#34; successfully removed \u6062\u590dA.img\u5230\u65b0\u7684lvm\u5206\u533a LVA\uff0c\u5e76\u6302\u8f7d\u5230\/A Recovery A.img to new lvm Partition A , Mount A to \/A and replace loop device A.img\nroot@vm-ubu:\/home\/rui# fdisk -l \/dev\/loop52 Disk \/dev\/loop52: 1 GiB, 1073741824 bytes, 2097152 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical\/physical): 512 bytes \/ 512 bytes I\/O size (minimum\/optimal): 512 bytes \/ 512 bytes root@vm-ubu:\/home\/rui# lvcreate -L 1073741824 bytes VG0 -n LVA Volume group &#34;bytes&#34; not found Cannot process volume group bytes root@vm-ubu:\/home\/rui# lvcreate -L 1073741824bytes VG0 -n LVA WARNING: ext4 signature detected on \/dev\/VG0\/LVA at offset 1080. Wipe it? [y\/n]: ^C Interrupted... Aborted wiping of ext4. 1 existing signature left on the device. Logical volume &#34;LVA&#34; created. root@vm-ubu:\/home\/rui# mkdir \/A2 root@vm-ubu:\/home\/rui# sudo mount \/dev\/mapper\/VG0-LVA \/A2\/ mount: \/A2: wrong fs type, bad option, bad superblock on \/dev\/mapper\/VG0-LVA, missing codepage or helper program, or other error. root@vm-ubu:\/home\/rui# ddrescue -d -f -r3 \/data\/A.img \/dev\/mapper\/VG0-LVA rescue_from_img.log GNU ddrescue 1.22 ipos: 1073 MB, non-trimmed: 0 B, current rate: 266 MB\/s opos: 1073 MB, non-scraped: 0 B, average rate: 357 MB\/s non-tried: 0 B, bad-sector: 0 B, error rate: 0 B\/s rescued: 1073 MB, bad areas: 0, run time: 2s pct rescued: 100.00%, read errors: 0, remaining time: n\/a time since last successful read: n\/a Finished root@vm-ubu:\/home\/rui# sudo mount \/dev\/mapper\/VG0-LVA \/A2\/ root@vm-ubu:\/home\/rui# ls \/A2\/ 100.dat 15.dat 20.dat 26.dat 31.dat 37.dat 42.dat 48.dat 53.dat 59.dat root@vm-ubu:\/home\/rui# \u5728\u7ebf\u7f29\u5bb9 root@vm-ubu:\/home\/rui# lvresize -L -300M --resizefs \/dev\/mapper\/VG0-LVA Do you want to unmount &#34;\/A2&#34; ? [Y|n] y fsck from util-linux 2.31.1 \/dev\/mapper\/VG0-LVA: 111\/65536 files (0.0% non-contiguous), 13055\/262144 blocks resize2fs 1.44.1 (24-Mar-2018) Resizing the filesystem on \/dev\/mapper\/VG0-LVA to 185344 (4k) blocks. The filesystem on \/dev\/mapper\/VG0-LVA is now 185344 (4k) blocks long. Size of logical volume VG0\/LVA changed from 1.00 GiB (256 extents) to 724.00 MiB (181 extents). Logical volume VG0\/LVA successfully resized. root@vm-ubu:\/home\/rui# root@vm-ubu:\/home\/rui# ls \/A2\/ 100.dat 15.dat 20.dat 26.dat 31.dat 37.dat 42.dat 48.dat 53.dat 59.dat \u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20201017-lvm-repair\/","summary":"<h1 id=\"lvm\u78c1\u76d8\u5907\u4efd\u66ff\u4ee3\u548c\u4fee\u590d\u65b9\u6848\">lvm\u78c1\u76d8\u5907\u4efd\u3001\u66ff\u4ee3\u3001\u548c\u4fee\u590d\u65b9\u6848<\/h1>\n<h2 id=\"\u521b\u5efalvm\u7ec4vg0\u548c\u5206\u533alva\u5e76\u6302\u8f7d\u5230a\">\u521b\u5efalvm\u7ec4VG0\u548c\u5206\u533aLVA\u5e76\u6302\u8f7d\u5230\/A<\/h2>\n<blockquote>\n<p>Make lvm volume group VG0 and partition LVA and mount to \/A<\/p>\n<\/blockquote>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">root@vm-ubu:\/home\/rui# lvmdiskscan \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \/dev\/loop0 <span class=\"o\">[<\/span>   14.50 MiB<span class=\"o\">]<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \/dev\/loop1 <span class=\"o\">[<\/span>   140.66 MiB<span class=\"o\">]<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \/dev\/sda1 <span class=\"o\">[<\/span>   &lt;80.00 GiB<span class=\"o\">]<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \/dev\/loop2 <span class=\"o\">[<\/span>   &lt;90.99 MiB<span class=\"o\">]<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \/dev\/loop3 <span class=\"o\">[<\/span>   &lt;12.99 MiB<span class=\"o\">]<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \/dev\/loop4 <span class=\"o\">[<\/span>   &lt;34.54 MiB<span class=\"o\">]<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \/dev\/loop5 <span class=\"o\">[<\/span>   &lt;2.25 MiB<span class=\"o\">]<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \/dev\/loop6 <span class=\"o\">[<\/span>   &lt;3.70 MiB<span class=\"o\">]<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \/dev\/sdb  <span class=\"o\">[<\/span>    2.00 GiB<span class=\"o\">]<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \/dev\/sdc  <span class=\"o\">[<\/span>    2.00 GiB<span class=\"o\">]<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"m\">2<\/span> disks\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"m\">8<\/span> partitions\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"m\">0<\/span> LVM physical volume whole disks\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> <span class=\"m\">0<\/span> LVM physical volumes\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">root@vm-ubu:\/home\/rui# pvcreate \/dev\/sdb\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> Physical volume <span class=\"s2\">&#34;\/dev\/sdb&#34;<\/span> successfully created.\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \n<\/span><\/span><span class=\"line\"><span class=\"cl\">root@vm-ubu:\/home\/rui# vgcreate VG0 \/dev\/sdb \n<\/span><\/span><span class=\"line\"><span class=\"cl\"> Volume group <span class=\"s2\">&#34;VG0&#34;<\/span> successfully created\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \n<\/span><\/span><span class=\"line\"><span class=\"cl\">root@vm-ubu:\/home\/rui# lvcreate -L 1G VG0 -n LVA\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> Logical volume <span class=\"s2\">&#34;LVA&#34;<\/span> created.\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \n<\/span><\/span><span class=\"line\"><span class=\"cl\">root@vm-ubu:\/home\/rui# mkfs.ext4 \/dev\/mapper\/VG0-LVA \n<\/span><\/span><span class=\"line\"><span class=\"cl\">mke2fs 1.44.1 <span class=\"o\">(<\/span>24-Mar-2018<span class=\"o\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">Creating filesystem with <span class=\"m\">262144<\/span> 4k blocks and <span class=\"m\">65536<\/span> inodes\n<\/span><\/span><span class=\"line\"><span class=\"cl\">Filesystem UUID: d2d61132-f79c-486f-a391-8471288bd20e\n<\/span><\/span><span class=\"line\"><span class=\"cl\">Superblock backups stored on blocks: \n<\/span><\/span><span class=\"line\"><span class=\"cl\">32768, 98304, 163840, <span class=\"m\">229376<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \n<\/span><\/span><span class=\"line\"><span class=\"cl\">Allocating group tables: <span class=\"k\">done<\/span>              \n<\/span><\/span><span class=\"line\"><span class=\"cl\">Writing inode tables: <span class=\"k\">done<\/span>              \n<\/span><\/span><span class=\"line\"><span class=\"cl\">Creating journal <span class=\"o\">(<\/span><span class=\"m\">8192<\/span> blocks<span class=\"o\">)<\/span>: <span class=\"k\">done<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">Writing superblocks and filesystem accounting information: <span class=\"k\">done<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"> \n<\/span><\/span><span class=\"line\"><span class=\"cl\">root@vm-ubu:\/home\/rui# mkdir \/A\n<\/span><\/span><span class=\"line\"><span class=\"cl\">root@vm-ubu:\/home\/rui# mount \/dev\/mapper\/VG0-LVA \/A\n<\/span><\/span><span class=\"line\"><span class=\"cl\">root@vm-ubu:\/home\/rui# seq <span class=\"m\">100<\/span> <span class=\"p\">|<\/span> xargs -i dd <span class=\"k\">if<\/span><span class=\"o\">=<\/span>\/dev\/urandom <span class=\"nv\">of<\/span><span class=\"o\">=<\/span>\/A\/<span class=\"o\">{}<\/span>.dat <span class=\"nv\">bs<\/span><span class=\"o\">=<\/span><span class=\"m\">1024<\/span> <span class=\"nv\">count<\/span><span class=\"o\">=<\/span><span class=\"m\">1<\/span>\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"\u5907\u4efd\u5206\u533alva\u5230aimg\">\u5907\u4efd\u5206\u533aLVA\u5230A.img<\/h2>\n<blockquote>\n<p>Backup partition LVA to img file A.img<\/p>","title":"lvm\u78c1\u76d8\u5907\u4efd\u3001\u66ff\u4ee3\u3001\u548c\u4fee\u590d\u65b9\u6848"},{"content":"\u628a\u65e7\u5b89\u5353\u6253\u9020\u4e3a\u5bb6\u7528\u5f00\u673a\u68d2 \u80cc\u666f \u786c\u4ef6 \u9b45\u65cf\n\u8f6f\u4ef6 Android 5.1\ntermux\n\u7248\u672c\u9650\u5b9a\nroot\n\u5f00\u53d1\u8005\u6a21\u5f0f\n\u4e0d\u4f11\u7720\n\u4ee3\u7406 \u8fdc\u7a0b\u7aef\u53e3\u8f6c\u53d1 ssh config\nautossh\n\u5347\u7ea7\u7248\uff1a\u89e3\u51b3\u7aef\u53e3\u5360\u7528\u95ee\u9898 #! bash set -x set -e if [ -z $PROXY_INTERVAL ];then PROXY_INTERVAL=60 fi echo &#34;=======================init proxy==========================&#34; while : ; do sshd rand_port=$(shuf -i 50040-50060 -n 1) ; echo &#34;$rand_port&#34; | ssh proxy1.isrc &#34;cat &gt;m2-ssh-port.txt&#34; ; ssh -vNC -R 0.0.0.0:$rand_port:localhost:2222 proxy1.isrc ; sleep $PROXY_INTERVAL ; echo &#34;=======================restart proxy==========================&#34; echo &#34;restart proxy1.isrc `date`&#34; ; done; \u8fde\u63a5\u547d\u4ee4\uff1a\nssh -o &#34;ProxyJump proxy.isrc&#34; -p $(ssh proxy.isrc cat m2-ssh-port.txt) localhost \u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20200615-android_ssh_proxy\/","summary":"<h1 id=\"\u628a\u65e7\u5b89\u5353\u6253\u9020\u4e3a\u5bb6\u7528\u5f00\u673a\u68d2\">\u628a\u65e7\u5b89\u5353\u6253\u9020\u4e3a\u5bb6\u7528\u5f00\u673a\u68d2<\/h1>\n<h2 id=\"\u80cc\u666f\">\u80cc\u666f<\/h2>\n<h2 id=\"\u786c\u4ef6\">\u786c\u4ef6<\/h2>\n<p>\u9b45\u65cf<\/p>\n<h2 id=\"\u8f6f\u4ef6\">\u8f6f\u4ef6<\/h2>\n<p>Android 5.1<\/p>\n<p>termux<\/p>\n<p>\u7248\u672c\u9650\u5b9a<\/p>\n<p>root<\/p>\n<p>\u5f00\u53d1\u8005\u6a21\u5f0f<\/p>\n<p>\u4e0d\u4f11\u7720<\/p>\n<h2 id=\"\u4ee3\u7406\">\u4ee3\u7406<\/h2>\n<h3 id=\"\u8fdc\u7a0b\u7aef\u53e3\u8f6c\u53d1\">\u8fdc\u7a0b\u7aef\u53e3\u8f6c\u53d1<\/h3>\n<p>ssh config<\/p>\n<p>autossh<\/p>\n<h3 id=\"\u5347\u7ea7\u7248\u89e3\u51b3\u7aef\u53e3\u5360\u7528\u95ee\u9898\">\u5347\u7ea7\u7248\uff1a\u89e3\u51b3\u7aef\u53e3\u5360\u7528\u95ee\u9898<\/h3>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#! bash\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nb\">set<\/span> -x\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nb\">set<\/span> -e\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">if<\/span> <span class=\"o\">[<\/span> -z <span class=\"nv\">$PROXY_INTERVAL<\/span> <span class=\"o\">]<\/span><span class=\"p\">;<\/span><span class=\"k\">then<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">  <span class=\"nv\">PROXY_INTERVAL<\/span><span class=\"o\">=<\/span><span class=\"m\">60<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">fi<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nb\">echo<\/span> <span class=\"s2\">&#34;=======================init proxy==========================&#34;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">while<\/span> : <span class=\"p\">;<\/span> <span class=\"k\">do<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">  sshd\n<\/span><\/span><span class=\"line\"><span class=\"cl\">  <span class=\"nv\">rand_port<\/span><span class=\"o\">=<\/span><span class=\"k\">$(<\/span>shuf -i 50040-50060 -n 1<span class=\"k\">)<\/span> <span class=\"p\">;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">  <span class=\"nb\">echo<\/span> <span class=\"s2\">&#34;<\/span><span class=\"nv\">$rand_port<\/span><span class=\"s2\">&#34;<\/span> <span class=\"p\">|<\/span> ssh proxy1.isrc <span class=\"s2\">&#34;cat &gt;m2-ssh-port.txt&#34;<\/span> <span class=\"p\">;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">  ssh -vNC -R 0.0.0.0:<span class=\"nv\">$rand_port<\/span>:localhost:2222 proxy1.isrc <span class=\"p\">;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">  sleep <span class=\"nv\">$PROXY_INTERVAL<\/span> <span class=\"p\">;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">  <span class=\"nb\">echo<\/span> <span class=\"s2\">&#34;=======================restart proxy==========================&#34;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">  <span class=\"nb\">echo<\/span> <span class=\"s2\">&#34;restart proxy1.isrc `date`&#34;<\/span> <span class=\"p\">;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">done<\/span><span class=\"p\">;<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p><strong>\u8fde\u63a5\u547d\u4ee4\uff1a<\/strong><\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">ssh -o <span class=\"s2\">&#34;ProxyJump proxy.isrc&#34;<\/span> -p <span class=\"k\">$(<\/span>ssh proxy.isrc cat m2-ssh-port.txt<span class=\"k\">)<\/span> localhost\n<\/span><\/span><\/code><\/pre><\/div><hr>\n<ul>\n<li>\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002<\/li>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"\u628a\u65e7\u5b89\u5353\u6253\u9020\u4e3a\u5bb6\u7528\u5f00\u673a\u68d2"},{"content":"Windows \u5b9a\u5236\u53f3\u952e\u83dc\u5355 Windows\u7684\u53f3\u952e\u5feb\u6377\u83dc\u5355\u662f\u4e2a\u975e\u5e38\u65b9\u4fbf\u7684\u4e1c\u897f\u3002\u4f46\u6709\u65f6\u5019\u56e0\u4e3a\u5b89\u88c5\u7a0b\u5e8f\u8fc7\u591a\uff0c\u6240\u4ee5\u53f3\u952e\u83dc\u5355\u8fc7\u4e8e\u5197\u4f59\u3002\u6709\u7684\u65f6\u5019\u6709\u9700\u8981\u81ea\u5b9a\u4e49\u4e00\u4e9b\u65b0\u7684\u53f3\u952e\u83dc\u5355\u9879\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u4e86\u89e3\u53f3\u952e\u83dc\u5355\u7684\u77e5\u8bc6\u3002\n\u5de5\u5177 \u6ce8\u518c\u8868 \u6240\u6709\u7684\u53f3\u952e\u83dc\u5355\u6761\u76ee\u90fd\u5728\u6ce8\u518c\u8868\u7684HKEY_CLASSES_ROOT\\XXXX\\shell\\\u91cc\u3002\n\u7b2c\u4e09\u65b9\u4fee\u6539\u5de5\u5177 \u53f3\u952e\u7ba1\u5bb6 Ultimate Windows Customizer, Right-Click Extender, Ultimate Windows Tweaker, &amp; Context Menu Editor ContextEdit ShellExtView or ShellMenuView Easy Context Menu MenuMaid File Menu Tools. \u8fd9\u91cc\u8fd8\u662f\u6bd4\u8f83\u63a8\u8350\u53f3\u952e\u7ba1\u5bb6\u7684\uff0c\u7b26\u5408\u4e2d\u56fd\u4eba\u64cd\u4f5c\u4e60\u60ef\uff0c\u800c\u4e14\u529f\u80fd\u5f88\u5f3a\u5927\u3002\n\u8be6\u7ec6\u8bf4\u660e\u53c2\u8003: https:\/\/www.thewindowsclub.com\/remove-click-context-menu-items-editors\/\n\u4fee\u6539\u6280\u5de7 \u4e0b\u9762\u4ecb\u7ecd\u4e00\u4e9b\u5e38\u7528\u7684\u4fee\u6539\u6280\u5de7\u3002\n\u5e38\u7528\u4e3b\u4f53\u7684\u6ce8\u518c\u8868\u4f4d\u7f6e \u5e38\u7528\u7684\u53f3\u952e\u83dc\u5355\u4e3b\u4f53\u90fd\u5728\u6ce8\u518c\u8868\u7684HKEY_CLASSES_ROOT\u4e0b\u9762\u3002\n* : \u8868\u793a\u6240\u6709\u6587\u4ef6 \u67d0\u6269\u5c55\u540d\uff1a\u5982.zip,\u8868\u793a\u6269\u5c55\u540d\u5bf9\u5e94\u7684\u53f3\u952e\u83dc\u5355 Directory\/Background: \u8868\u793a\u6587\u4ef6\u5939\u7684\u80cc\u666f \u53f3\u952e\u83dc\u5355\u6ce8\u518c\u8868\u9879\u7ed3\u6784 \u6240\u8c13\u767e\u95fb\u4e0d\u5982\u4e00\u89c1\uff0c\u4e0b\u9762\u5c31\u51e0\u4e2a\u793a\u4f8b\u6765\u8bb2\u89e3\u5e38\u7528\u7684\u53f3\u952e\u83dc\u5355\u914d\u7f6e\u53c2\u6570\u3002\n\u5728\u6240\u8981\u521b\u5efa\u7684\u4e3b\u4f53\u4e0b\u9762\u7684shell\u4e0b\u7684\u9879\u5373\u4e3a\u67d0\u4e2a\u53f3\u952e\u83dc\u5355\u9879\u3002\u5176\u4e2d\u9ed8\u8ba4\u503c\u5373\u4e3a\u6b64\u9879\u7684\u663e\u793a\u540d\u79f0\u3002\u5b57\u7b26\u4e32\u9879Icon\u4e3a\u56fe\u6807\u3002\u5982\u4e0b\u56fe\u6240\u793a\u3002\n\u5728\u53f3\u952e\u83dc\u5355\u9879\u7684\u4e0b\u4e00\u7ea7\u521b\u5efa\u9879\uff0c\u5e76\u547d\u540d\u4e3acommand\uff0c\u8868\u793a\u6b64\u9879\u7684\u6267\u884c\u547d\u4ee4\uff0c\u547d\u4ee4\u7684\u4f4d\u7f6e\u53ca\u53c2\u6570\u5e94\u5f53\u5199\u5728command\u5b50\u9879\u7684\u9ed8\u8ba4\u4e2d\u3002\u901a\u5e38\u7528%1\u8868\u793a\u672c\u6587\u4ef6\u7684\u6587\u4ef6\u540d\u53c2\u6570\u3002\n\u4e5f\u6709\u4e00\u4e9b\u9ad8\u7ea7\u7684\u53c2\u6570\u3002\u6bd4\u5982\u4e0b\u9762\u7684PowerShell\uff0c\u9ed8\u8ba4\u503c\u7528\u4e86\u4f7f\u7528\u4e86\u4e00\u4e2a\u52a8\u6001\u94fe\u63a5\u5e93\u3002\n\u7136\u540eExtended\u53c2\u6570\u8868\u793a\u628a\u6b64\u9879\u5728\u9ed8\u8ba4\u83dc\u5355\u4e2d\u9690\u85cf\uff0c\u9700\u8981\u6309Shift+\u53f3\u952e\u624d\u53ef\u4ee5\u663e\u793a\u3002\nNoWorkingDirectory\u8868\u793a\u4e0d\u8bbe\u7f6e\u5de5\u4f5c\u6587\u4ef6\u5939\u3002 \u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20200605-windows-rightclick-menu\/","summary":"<h1 id=\"windows-\u5b9a\u5236\u53f3\u952e\u83dc\u5355\">Windows \u5b9a\u5236\u53f3\u952e\u83dc\u5355<\/h1>\n<p>Windows\u7684\u53f3\u952e\u5feb\u6377\u83dc\u5355\u662f\u4e2a\u975e\u5e38\u65b9\u4fbf\u7684\u4e1c\u897f\u3002\u4f46\u6709\u65f6\u5019\u56e0\u4e3a\u5b89\u88c5\u7a0b\u5e8f\u8fc7\u591a\uff0c\u6240\u4ee5\u53f3\u952e\u83dc\u5355\u8fc7\u4e8e\u5197\u4f59\u3002\u6709\u7684\u65f6\u5019\u6709\u9700\u8981\u81ea\u5b9a\u4e49\u4e00\u4e9b\u65b0\u7684\u53f3\u952e\u83dc\u5355\u9879\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u4e86\u89e3\u53f3\u952e\u83dc\u5355\u7684\u77e5\u8bc6\u3002<\/p>\n<h2 id=\"\u5de5\u5177\">\u5de5\u5177<\/h2>\n<h3 id=\"\u6ce8\u518c\u8868\">\u6ce8\u518c\u8868<\/h3>\n<p>\u6240\u6709\u7684\u53f3\u952e\u83dc\u5355\u6761\u76ee\u90fd\u5728\u6ce8\u518c\u8868\u7684<code>HKEY_CLASSES_ROOT\\XXXX\\shell\\<\/code>\u91cc\u3002<\/p>\n<p><img alt=\"\u6ce8\u518c\u8868\u4f4d\u7f6e\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200605084132.png\"><\/p>\n<h3 id=\"\u7b2c\u4e09\u65b9\u4fee\u6539\u5de5\u5177\">\u7b2c\u4e09\u65b9\u4fee\u6539\u5de5\u5177<\/h3>\n<ol>\n<li><a href=\"http:\/\/youjiangj.com\/\">\u53f3\u952e\u7ba1\u5bb6<\/a><\/li>\n<li>Ultimate Windows Customizer, Right-Click Extender, Ultimate Windows Tweaker, &amp; Context Menu Editor<\/li>\n<li>ContextEdit<\/li>\n<li>ShellExtView or  ShellMenuView<\/li>\n<li>Easy Context Menu<\/li>\n<li>MenuMaid<\/li>\n<li>File Menu Tools.<\/li>\n<\/ol>\n<p>\u8fd9\u91cc\u8fd8\u662f\u6bd4\u8f83\u63a8\u8350<strong>\u53f3\u952e\u7ba1\u5bb6<\/strong>\u7684\uff0c\u7b26\u5408\u4e2d\u56fd\u4eba\u64cd\u4f5c\u4e60\u60ef\uff0c\u800c\u4e14\u529f\u80fd\u5f88\u5f3a\u5927\u3002<\/p>\n<p>\u8be6\u7ec6\u8bf4\u660e\u53c2\u8003: <a href=\"https:\/\/www.thewindowsclub.com\/remove-click-context-menu-items-editors\/\">https:\/\/www.thewindowsclub.com\/remove-click-context-menu-items-editors\/<\/a><\/p>\n<h2 id=\"\u4fee\u6539\u6280\u5de7\">\u4fee\u6539\u6280\u5de7<\/h2>\n<p>\u4e0b\u9762\u4ecb\u7ecd\u4e00\u4e9b\u5e38\u7528\u7684\u4fee\u6539\u6280\u5de7\u3002<\/p>\n<h3 id=\"\u5e38\u7528\u4e3b\u4f53\u7684\u6ce8\u518c\u8868\u4f4d\u7f6e\">\u5e38\u7528\u4e3b\u4f53\u7684\u6ce8\u518c\u8868\u4f4d\u7f6e<\/h3>\n<p>\u5e38\u7528\u7684\u53f3\u952e\u83dc\u5355\u4e3b\u4f53\u90fd\u5728\u6ce8\u518c\u8868\u7684<code>HKEY_CLASSES_ROOT<\/code>\u4e0b\u9762\u3002<\/p>\n<ul>\n<li><strong>*<\/strong> : \u8868\u793a\u6240\u6709\u6587\u4ef6<\/li>\n<li><strong>\u67d0\u6269\u5c55\u540d<\/strong>\uff1a\u5982<code>.zip<\/code>,\u8868\u793a\u6269\u5c55\u540d\u5bf9\u5e94\u7684\u53f3\u952e\u83dc\u5355<\/li>\n<li><strong>Directory\/Background<\/strong>: \u8868\u793a\u6587\u4ef6\u5939\u7684\u80cc\u666f<\/li>\n<\/ul>\n<h3 id=\"\u53f3\u952e\u83dc\u5355\u6ce8\u518c\u8868\u9879\u7ed3\u6784\">\u53f3\u952e\u83dc\u5355\u6ce8\u518c\u8868\u9879\u7ed3\u6784<\/h3>\n<p>\u6240\u8c13\u767e\u95fb\u4e0d\u5982\u4e00\u89c1\uff0c\u4e0b\u9762\u5c31\u51e0\u4e2a\u793a\u4f8b\u6765\u8bb2\u89e3\u5e38\u7528\u7684\u53f3\u952e\u83dc\u5355\u914d\u7f6e\u53c2\u6570\u3002<\/p>\n<p>\u5728\u6240\u8981\u521b\u5efa\u7684\u4e3b\u4f53\u4e0b\u9762\u7684<code>shell<\/code>\u4e0b\u7684<code>\u9879<\/code>\u5373\u4e3a\u67d0\u4e2a\u53f3\u952e\u83dc\u5355\u9879\u3002\u5176\u4e2d\u9ed8\u8ba4\u503c\u5373\u4e3a\u6b64\u9879\u7684\u663e\u793a\u540d\u79f0\u3002\u5b57\u7b26\u4e32\u9879<code>Icon<\/code>\u4e3a\u56fe\u6807\u3002\u5982\u4e0b\u56fe\u6240\u793a\u3002<\/p>\n<p><img alt=\"20200605084839\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200605084839.png\"><\/p>\n<p>\u5728\u53f3\u952e\u83dc\u5355\u9879\u7684\u4e0b\u4e00\u7ea7\u521b\u5efa\u9879\uff0c\u5e76\u547d\u540d\u4e3a<code>command<\/code>\uff0c\u8868\u793a\u6b64\u9879\u7684\u6267\u884c\u547d\u4ee4\uff0c\u547d\u4ee4\u7684\u4f4d\u7f6e\u53ca\u53c2\u6570\u5e94\u5f53\u5199\u5728<code>command<\/code>\u5b50\u9879\u7684<code>\u9ed8\u8ba4<\/code>\u4e2d\u3002\u901a\u5e38\u7528<code>%1<\/code>\u8868\u793a\u672c\u6587\u4ef6\u7684\u6587\u4ef6\u540d\u53c2\u6570\u3002<\/p>\n<p><img alt=\"20200605084857\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200605084857.png\"><\/p>\n<p>\u4e5f\u6709\u4e00\u4e9b\u9ad8\u7ea7\u7684\u53c2\u6570\u3002\u6bd4\u5982\u4e0b\u9762\u7684<code>PowerShell<\/code>\uff0c\u9ed8\u8ba4\u503c\u7528\u4e86\u4f7f\u7528\u4e86\u4e00\u4e2a\u52a8\u6001\u94fe\u63a5\u5e93\u3002<\/p>\n<p>\u7136\u540e<code>Extended<\/code>\u53c2\u6570\u8868\u793a\u628a\u6b64\u9879\u5728\u9ed8\u8ba4\u83dc\u5355\u4e2d\u9690\u85cf\uff0c\u9700\u8981\u6309<code>Shift+\u53f3\u952e<\/code>\u624d\u53ef\u4ee5\u663e\u793a\u3002<\/p>\n<p><code>NoWorkingDirectory<\/code>\u8868\u793a\u4e0d\u8bbe\u7f6e\u5de5\u4f5c\u6587\u4ef6\u5939\u3002\n<img alt=\"20200605084914\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200605084914.png\"><\/p>\n<p><img alt=\"20200605084935\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200605084935.png\"><\/p>\n<hr>\n<ul>\n<li>\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002<\/li>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"Windows \u5b9a\u5236\u53f3\u952e\u83dc\u5355"},{"content":"Zotero \u4f7f\u7528\u6280\u5de7 \u8bbe\u7f6e\u6587\u732e\u540c\u6b65 \u6587\u732e\u6570\u636e\u5e93\u4f7f\u7528Zotero\u8d26\u6237\u540c\u6b65 \u6587\u4ef6\u4f7f\u7528\u575a\u679c\u4e91\u7684WebDAV\u670d\u52a1\u540c\u6b65 \u4fee\u6539PDF\u9ed8\u8ba4\u6587\u4ef6\u540d \u6253\u5f00\u9996\u9009\u9879-\u9ad8\u7ea7-\u5e38\u89c4-\u8bbe\u7f6e\u7f16\u8f91\u5668\u3002\n\u641c\u7d22extensions.zotero.attachmentRenameFormatString\uff0c\u4fee\u6539\u4e3a\n\u5feb\u901f\u6253\u6807\u7b7e \u53ef\u4ee5\u901a\u8fc7\u5728\u6807\u7b7e\u4e0a\u6307\u5b9a\u989c\u8272\uff0c\u9009\u62e9\u4f4d\u7f6e\u3002\u5373\u53ef\u5728\u6761\u76ee\u4e0a\u6309\u6570\u5b57\u952e\u5feb\u901f\u6253\u6807\u7b7e\u3002 \u6807\u7b7e\u547d\u540d\u4e3a\u7b80\u5355\u7684\u6570\u5b57\u4e3a\u5f00\u5934\u6216\u8005*+\u6570\u5b57\u4e3a\u5f00\u5934\uff0c\u901a\u8fc7Zotero\u5bf9\u6807\u7b7e\u7684\u68c0\u7d22\u529f\u80fd\u5feb\u901f\u6253\u6807\u7b7e\u3002 \u5206\u7ea7 \u5206\u7ea7\u6253\u661f\u6807\u662fEndnote\u4e2d\u6bd4\u8f83\u597d\u7528\u7684\u529f\u80fd\uff0c\u4f46\u662fzotero\u4e2d\u6ca1\u6709\uff0c\u4f46\u662f\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u6807\u7b7e\u529f\u80fd\u5feb\u901f\u5206\u7ea7\u3002\n*1\u2b50 *2\u2b50\u2b50 *3\u2b50\u2b50\u2b50 *4\u2b50\u2b50\u2b50\u2b50 *5\u2b50\u2b50\u2b50\u2b50\u2b50 \u4e5f\u53ef\u4ee5\u4f7f\u7528\u5feb\u901f\u6253\u6807\u7b7e\u4e2d\u4ecb\u7ecd\u7684\u5185\u5bb9\u5b9e\u73b0\u5feb\u901f\u6807\u7b7e\nsci-hub\u652f\u6301 \u6b64\u529f\u80fd\u9700\u8981\u4e0b\u8f7d\u5b89\u88c5\u63d2\u4ef6\uff1a\n\u4e0b\u8f7d\u63d2\u4ef6\uff1azotero-scihub\/release \u62d6\u62fd\u5230\u5de5\u5177-\u63d2\u4ef6 \u91cd\u542fZotero \u53c2\u8003\uff1a https:\/\/github.com\/ethanwillis\/zotero-scihub\n\u53c2\u8003\u6587\u732e\u683c\u5f0f \u4e00\u822c\u9009\u62e9\u56fd\u6807 GB\/T 7714\u3002\u6700\u65b0\u7248\u4e3a2015.\n\u8f6f\u4ef6\u5b66\u62a5\u683c\u5f0f \u53c2\u89c1:\u8f6f\u4ef6\u5b66\u62a5\u53c2\u8003\u6587\u732e\u683c\u5f0f\n\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20200603-zotero-tips\/","summary":"<h1 id=\"zotero-\u4f7f\u7528\u6280\u5de7\">Zotero \u4f7f\u7528\u6280\u5de7<\/h1>\n<h2 id=\"\u8bbe\u7f6e\u6587\u732e\u540c\u6b65\">\u8bbe\u7f6e\u6587\u732e\u540c\u6b65<\/h2>\n<ol>\n<li>\u6587\u732e\u6570\u636e\u5e93\u4f7f\u7528Zotero\u8d26\u6237\u540c\u6b65<\/li>\n<li>\u6587\u4ef6\u4f7f\u7528\u575a\u679c\u4e91\u7684WebDAV\u670d\u52a1\u540c\u6b65<\/li>\n<\/ol>\n<p><img alt=\"Zotero\u914d\u7f6e\u6587\u732e\u540c\u6b65\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200603112907.png\"><\/p>\n<h2 id=\"\u4fee\u6539pdf\u9ed8\u8ba4\u6587\u4ef6\u540d\">\u4fee\u6539PDF\u9ed8\u8ba4\u6587\u4ef6\u540d<\/h2>\n<p>\u6253\u5f00<code>\u9996\u9009\u9879<\/code>-<code>\u9ad8\u7ea7<\/code>-<code>\u5e38\u89c4<\/code>-<code>\u8bbe\u7f6e\u7f16\u8f91\u5668<\/code>\u3002<\/p>\n<p>\u641c\u7d22<code>extensions.zotero.attachmentRenameFormatString<\/code>\uff0c\u4fee\u6539\u4e3a<\/p>\n<p><img alt=\"file name format\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/2020-06-05%20092357.png\"><\/p>\n<p><img alt=\"\u4fee\u6539PDF\u9ed8\u8ba4\u6587\u4ef6\u540d\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200603113221.png\"><\/p>\n<h2 id=\"\u5feb\u901f\u6253\u6807\u7b7e\">\u5feb\u901f\u6253\u6807\u7b7e<\/h2>\n<ol>\n<li>\n<p>\u53ef\u4ee5\u901a\u8fc7\u5728\u6807\u7b7e\u4e0a\u6307\u5b9a\u989c\u8272\uff0c\u9009\u62e9\u4f4d\u7f6e\u3002\u5373\u53ef\u5728\u6761\u76ee\u4e0a\u6309\u6570\u5b57\u952e\u5feb\u901f\u6253\u6807\u7b7e\u3002\n<img alt=\"\u6807\u7b7e\u5feb\u6377\u952e\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200603113627.png\"><\/p>\n<\/li>\n<li>\n<p>\u6807\u7b7e\u547d\u540d\u4e3a\u7b80\u5355\u7684\u6570\u5b57\u4e3a\u5f00\u5934\u6216\u8005<code>*+\u6570\u5b57<\/code>\u4e3a\u5f00\u5934\uff0c\u901a\u8fc7Zotero\u5bf9\u6807\u7b7e\u7684\u68c0\u7d22\u529f\u80fd\u5feb\u901f\u6253\u6807\u7b7e\u3002\n<img alt=\"\u6807\u7b7e\u547d\u540d\u6280\u5de7\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200603113830.png\"><\/p>\n<\/li>\n<\/ol>\n<h2 id=\"\u5206\u7ea7\">\u5206\u7ea7<\/h2>\n<p>\u5206\u7ea7\u6253\u661f\u6807\u662fEndnote\u4e2d\u6bd4\u8f83\u597d\u7528\u7684\u529f\u80fd\uff0c\u4f46\u662fzotero\u4e2d\u6ca1\u6709\uff0c\u4f46\u662f\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u6807\u7b7e\u529f\u80fd\u5feb\u901f\u5206\u7ea7\u3002<\/p>\n<p><img alt=\"\u6807\u7b7e\u5206\u7ea7\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200603113939.png\"><\/p>\n<pre tabindex=\"0\"><code>*1\u2b50\n*2\u2b50\u2b50\n*3\u2b50\u2b50\u2b50\n*4\u2b50\u2b50\u2b50\u2b50\n*5\u2b50\u2b50\u2b50\u2b50\u2b50\n<\/code><\/pre><p>\u4e5f\u53ef\u4ee5\u4f7f\u7528<a href=\"\/posts\/20200603-zotero-tips\/#%e5%bf%ab%e9%80%9f%e6%89%93%e6%a0%87%e7%ad%be\">\u5feb\u901f\u6253\u6807\u7b7e<\/a>\u4e2d\u4ecb\u7ecd\u7684\u5185\u5bb9\u5b9e\u73b0\u5feb\u901f\u6807\u7b7e<\/p>\n<h2 id=\"sci-hub\u652f\u6301\">sci-hub\u652f\u6301<\/h2>\n<p>\u6b64\u529f\u80fd\u9700\u8981\u4e0b\u8f7d\u5b89\u88c5\u63d2\u4ef6\uff1a<\/p>\n<ol>\n<li>\u4e0b\u8f7d\u63d2\u4ef6\uff1a<a href=\"https:\/\/github.com\/ethanwillis\/zotero-scihub\/releases\">zotero-scihub\/release<\/a><\/li>\n<li>\u62d6\u62fd\u5230<code>\u5de5\u5177<\/code>-<code>\u63d2\u4ef6<\/code><\/li>\n<li>\u91cd\u542fZotero<\/li>\n<\/ol>\n<p><img alt=\"zotero\u63d2\u4ef6\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20200603114800.png\"><\/p>\n<p>\u53c2\u8003\uff1a <a href=\"https:\/\/github.com\/ethanwillis\/zotero-scihub\">https:\/\/github.com\/ethanwillis\/zotero-scihub<\/a><\/p>\n<h2 id=\"\u53c2\u8003\u6587\u732e\u683c\u5f0f\">\u53c2\u8003\u6587\u732e\u683c\u5f0f<\/h2>\n<p>\u4e00\u822c\u9009\u62e9\u56fd\u6807 GB\/T 7714\u3002\u6700\u65b0\u7248\u4e3a2015.<\/p>\n<h3 id=\"\u8f6f\u4ef6\u5b66\u62a5\u683c\u5f0f\">\u8f6f\u4ef6\u5b66\u62a5\u683c\u5f0f<\/h3>\n<p>\u53c2\u89c1:<a href=\"https:\/\/m2kar.cn\/post\/20190905-jos-csl\/\">\u8f6f\u4ef6\u5b66\u62a5\u53c2\u8003\u6587\u732e\u683c\u5f0f<\/a><\/p>\n<hr>\n<ul>\n<li>\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002<\/li>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"Zotero\u4f7f\u7528\u6280\u5de7"},{"content":"Linux \u88c5\u673a\u5fc5\u5907\u7c7b\u8f6f\u4ef6 \u5f00\u53d1\u73af\u5883 apt-get install -y openssh-server \\ build-essentials \\ python3 \\ pythonpy \\ python \\ curl \\ wget \\ git \\ sshfs \\ screen \\ tmux \\ zsh \\ vim \u5b89\u88c5oh-my-zsh sh -c &#34;$(curl -fsSL https:\/\/raw.githubusercontent.com\/ohmyzsh\/ohmyzsh\/master\/tools\/install.sh)&#34; docker docker docker-compose \u5b89\u88c5\u65b9\u5f0f\u53c2\u770b\u5b98\u7f51\noh-my-tmux cd git clone https:\/\/github.com\/gpakosz\/.tmux.git ln -s -f .tmux\/.tmux.conf cp .tmux\/.tmux.conf.local . \u53c2\u770b: https:\/\/github.com\/gpakosz\/.tmux\n\u751f\u4ea7\u73af\u5883 apt-get install -y git \\ tmux \\ openssh-server \u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20200602-linux-software\/","summary":"<h1 id=\"linux-\u88c5\u673a\u5fc5\u5907\u7c7b\u8f6f\u4ef6\">Linux \u88c5\u673a\u5fc5\u5907\u7c7b\u8f6f\u4ef6<\/h1>\n<h2 id=\"\u5f00\u53d1\u73af\u5883\">\u5f00\u53d1\u73af\u5883<\/h2>\n<pre tabindex=\"0\"><code>apt-get install -y\nopenssh-server \\\nbuild-essentials \\\npython3 \\\npythonpy \\\npython \\\ncurl \\\nwget \\\ngit \\\nsshfs \\\nscreen \\\ntmux \\\nzsh \\\nvim \n<\/code><\/pre><h3 id=\"\u5b89\u88c5oh-my-zsh\">\u5b89\u88c5oh-my-zsh<\/h3>\n<pre tabindex=\"0\"><code>sh -c &#34;$(curl -fsSL https:\/\/raw.githubusercontent.com\/ohmyzsh\/ohmyzsh\/master\/tools\/install.sh)&#34;\n<\/code><\/pre><h3 id=\"docker\">docker<\/h3>\n<pre tabindex=\"0\"><code>docker\ndocker-compose\n<\/code><\/pre><p>\u5b89\u88c5\u65b9\u5f0f\u53c2\u770b\u5b98\u7f51<\/p>\n<h3 id=\"oh-my-tmux\">oh-my-tmux<\/h3>\n<pre tabindex=\"0\"><code>cd\ngit clone https:\/\/github.com\/gpakosz\/.tmux.git\nln -s -f .tmux\/.tmux.conf\ncp .tmux\/.tmux.conf.local .\n<\/code><\/pre><p>\u53c2\u770b: <a href=\"https:\/\/github.com\/gpakosz\/.tmux\">https:\/\/github.com\/gpakosz\/.tmux<\/a><\/p>\n<h2 id=\"\u751f\u4ea7\u73af\u5883\">\u751f\u4ea7\u73af\u5883<\/h2>\n<pre tabindex=\"0\"><code>apt-get install -y\ngit \\\ntmux \\\nopenssh-server\n<\/code><\/pre><hr>\n<ul>\n<li>\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002<\/li>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"Linux \u88c5\u673a\u5fc5\u5907\u7c7b\u8f6f\u4ef6"},{"content":"Bash\u4f18\u5316 Bash\u53ef\u4ee5\u79f0\u4e4b\u4e3a\u4f7f\u7528\u6700\u4e3a\u5e7f\u6cdb\u7684\u7ec8\u7aef\u7a0b\u5e8f\u4e86\uff01\n\u4e4b\u524d\u7279\u522b\u559c\u6b22\u7528zsh+oh-my-zsh\uff0c\u5f88\u65b9\u4fbf\u5f88\u597d\u770b\u7684\u7ec8\u7aef\u7a0b\u5e8f\uff0c\u50bb\u74dc\u5316\u4e14\u4eba\u6027\u5316\u7684\u914d\u7f6e\uff0c\u4f46\u662f\u65e0\u5948\u5728windows\u4e0b\u4e0d\u662f\u5f88\u7406\u60f3\u3002\u6700\u8fd1\u559c\u6b22\u7528\u4e0a\u4e86Windows\u4e0b\u7684git-bash\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u975e\u5e38\u7b80\u5355\u7684bash\u5728windows\u4e0b\u8fd0\u884c\u7684\u5f88\u5feb\u5f88\u597d\u3002\u56e0\u6b64\u4e5f\u5bfb\u627e\u4e86\u4e00\u4e0bzsh\u4e2d\u6bd4\u8f83\u559c\u6b22\u7684\u4e00\u4e9b\u529f\u80fd\uff0c\u5e76\u8ba9\u5b83\u80fd\u5728bash\u4e0b\u652f\u6301\u3002\n\u4e0b\u9762\u5c06\u5217\u4e3e\u4e00\u4e9b\u8ba9\u9ed8\u8ba4\u7684Bash\u66f4\u52a0\u597d\u7528\u7684\u4e00\u4e9b\u4fee\u6539\u3002\n\u4fee\u6539\u914d\u7f6e\u6587\u4ef6 \u914d\u7f6e\u6587\u4ef6\u79cd\u7c7b \u5168\u5c40\u914d\u7f6e\uff1a\/etc\/profile, \/etc\/profile.d\/*.sh, \/etc\/bashrc\n\u4e2a\u4eba\u914d\u7f6e\uff1a~\/.bash_profile, ~\/.bashrc\nprofile\u7c7b\u6587\u4ef6\u4f5c\u7528:\n\u5b9a\u4e49\u73af\u5883\u53d8\u91cf \u8fd0\u884c\u547d\u4ee4\u6216\u8005\u811a\u672c bashrc\u7c7b\u6587\u4ef6\u4f5c\u7528:\n\u5b9a\u4e49\u672c\u5730\u53d8\u91cf\uff0c\u51fd\u6570 \u547d\u4ee4\u522b\u540d \u901a\u5e38\u4f1a\u7f16\u8f91 ~\/.bashrc\uff0c\u5728\u6587\u4ef6\u6700\u540e\u6dfb\u52a0\u67d0\u4e9b\u8bed\u53e5\u3002\n\u52a0\u8f7d\u987a\u5e8f \u767b\u9646\u5f0fShell:\n\/etc\/profile &gt; .bash_profile &gt; .bash_login &gt; .profile &gt; .bash_logout \u975e\u767b\u9646\u5f0fShell:\n\/etc\/bash.bashrc &gt; .bashrc \u8be6\u60c5\u53c2\u770b\uff1a Bash\u914d\u7f6e\u6587\u4ef6\nBash\u5386\u53f2\u8bb0\u5f55\u4f18\u5316 Bash\u540c\u65f6\u4fdd\u5b58\u591a\u4e2a\u7ec8\u7aef\u7684\u547d\u4ee4\u8bb0\u5f55 \u7f16\u8f91 ~\/.bashrc\uff0c\u5728\u6587\u4ef6\u6700\u540e\u6dfb\u52a0\u4e0b\u9762\u7684\u8bed\u53e5\uff1a\nexport PROMPT_COMMAND=&#39;history -a&#39; \u91cd\u65b0\u542f\u52a8\u7ec8\u7aef\uff0c\u5373\u53ef\u5728\u591a\u4e2a\u7ec8\u7aef\u4e2d\u540c\u65f6\u4fdd\u5b58\u547d\u4ee4\u5230History.\n\u8bbe\u7f6e\u53ef\u4fdd\u5b58\u7684\u5386\u53f2\u8bb0\u5f55\u6570\u91cf export HISTSIZE=10000 \u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20200530-bash-history-multi-terminal\/","summary":"<h1 id=\"bash\u4f18\u5316\">Bash\u4f18\u5316<\/h1>\n<p>Bash\u53ef\u4ee5\u79f0\u4e4b\u4e3a\u4f7f\u7528\u6700\u4e3a\u5e7f\u6cdb\u7684\u7ec8\u7aef\u7a0b\u5e8f\u4e86\uff01<\/p>\n<p>\u4e4b\u524d\u7279\u522b\u559c\u6b22\u7528zsh+oh-my-zsh\uff0c\u5f88\u65b9\u4fbf\u5f88\u597d\u770b\u7684\u7ec8\u7aef\u7a0b\u5e8f\uff0c\u50bb\u74dc\u5316\u4e14\u4eba\u6027\u5316\u7684\u914d\u7f6e\uff0c\u4f46\u662f\u65e0\u5948\u5728windows\u4e0b\u4e0d\u662f\u5f88\u7406\u60f3\u3002\u6700\u8fd1\u559c\u6b22\u7528\u4e0a\u4e86Windows\u4e0b\u7684git-bash\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u975e\u5e38\u7b80\u5355\u7684bash\u5728windows\u4e0b\u8fd0\u884c\u7684\u5f88\u5feb\u5f88\u597d\u3002\u56e0\u6b64\u4e5f\u5bfb\u627e\u4e86\u4e00\u4e0bzsh\u4e2d\u6bd4\u8f83\u559c\u6b22\u7684\u4e00\u4e9b\u529f\u80fd\uff0c\u5e76\u8ba9\u5b83\u80fd\u5728bash\u4e0b\u652f\u6301\u3002<\/p>\n<p>\u4e0b\u9762\u5c06\u5217\u4e3e\u4e00\u4e9b\u8ba9\u9ed8\u8ba4\u7684Bash\u66f4\u52a0\u597d\u7528\u7684\u4e00\u4e9b\u4fee\u6539\u3002<\/p>\n<h2 id=\"\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\">\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<\/h2>\n<h3 id=\"\u914d\u7f6e\u6587\u4ef6\u79cd\u7c7b\">\u914d\u7f6e\u6587\u4ef6\u79cd\u7c7b<\/h3>\n<p>\u5168\u5c40\u914d\u7f6e\uff1a<code>\/etc\/profile<\/code>, <code>\/etc\/profile.d\/*.sh<\/code>, <code>\/etc\/bashrc<\/code><\/p>\n<p>\u4e2a\u4eba\u914d\u7f6e\uff1a<code>~\/.bash_profile<\/code>,  <code>~\/.bashrc<\/code><\/p>\n<p>profile\u7c7b\u6587\u4ef6\u4f5c\u7528:<\/p>\n<ul>\n<li>\u5b9a\u4e49\u73af\u5883\u53d8\u91cf<\/li>\n<li>\u8fd0\u884c\u547d\u4ee4\u6216\u8005\u811a\u672c<\/li>\n<\/ul>\n<p>bashrc\u7c7b\u6587\u4ef6\u4f5c\u7528:<\/p>\n<ul>\n<li>\u5b9a\u4e49\u672c\u5730\u53d8\u91cf\uff0c\u51fd\u6570<\/li>\n<li>\u547d\u4ee4\u522b\u540d<\/li>\n<\/ul>\n<p>\u901a\u5e38\u4f1a\u7f16\u8f91 ~\/.bashrc\uff0c\u5728\u6587\u4ef6\u6700\u540e\u6dfb\u52a0\u67d0\u4e9b\u8bed\u53e5\u3002<\/p>\n<h3 id=\"\u52a0\u8f7d\u987a\u5e8f\">\u52a0\u8f7d\u987a\u5e8f<\/h3>\n<p>\u767b\u9646\u5f0fShell:<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">\/etc\/profile &gt; .bash_profile &gt; .bash_login &gt; .profile &gt; .bash_logout\n<\/span><\/span><\/code><\/pre><\/div><p>\u975e\u767b\u9646\u5f0fShell:<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">\/etc\/bash.bashrc &gt; .bashrc\n<\/span><\/span><\/code><\/pre><\/div><p>\u8be6\u60c5\u53c2\u770b\uff1a <a href=\"https:\/\/www.cnblogs.com\/zhaojiedi1992\/p\/zhaojiedi_linux_010.html\">Bash\u914d\u7f6e\u6587\u4ef6<\/a><\/p>\n<h2 id=\"bash\u5386\u53f2\u8bb0\u5f55\u4f18\u5316\">Bash\u5386\u53f2\u8bb0\u5f55\u4f18\u5316<\/h2>\n<h3 id=\"bash\u540c\u65f6\u4fdd\u5b58\u591a\u4e2a\u7ec8\u7aef\u7684\u547d\u4ee4\u8bb0\u5f55\">Bash\u540c\u65f6\u4fdd\u5b58\u591a\u4e2a\u7ec8\u7aef\u7684\u547d\u4ee4\u8bb0\u5f55<\/h3>\n<p>\u7f16\u8f91 ~\/.bashrc\uff0c\u5728\u6587\u4ef6\u6700\u540e\u6dfb\u52a0\u4e0b\u9762\u7684\u8bed\u53e5\uff1a<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\"><span class=\"nb\">export<\/span> <span class=\"nv\">PROMPT_COMMAND<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;history -a&#39;<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p>\u91cd\u65b0\u542f\u52a8\u7ec8\u7aef\uff0c\u5373\u53ef\u5728\u591a\u4e2a\u7ec8\u7aef\u4e2d\u540c\u65f6\u4fdd\u5b58\u547d\u4ee4\u5230History.<\/p>\n<h3 id=\"\u8bbe\u7f6e\u53ef\u4fdd\u5b58\u7684\u5386\u53f2\u8bb0\u5f55\u6570\u91cf\">\u8bbe\u7f6e\u53ef\u4fdd\u5b58\u7684\u5386\u53f2\u8bb0\u5f55\u6570\u91cf<\/h3>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\"><span class=\"nb\">export<\/span> <span class=\"nv\">HISTSIZE<\/span><span class=\"o\">=<\/span><span class=\"m\">10000<\/span>\n<\/span><\/span><\/code><\/pre><\/div><hr>\n<ul>\n<li>\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002<\/li>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"Bash \u7ec8\u7aef\u914d\u7f6e\u4f18\u5316"},{"content":"\u5b89\u88c5ubuntu docker\u5b8c\u6574\u7248 \u56f0\u6270\u4e86\u5f88\u4e45\u600e\u4e48\u5b89\u88c5ubuntu docker\u7684\u5b8c\u6574\u7248\uff0c\u540e\u6765\u53d1\u73b0\u4ecessh\u767b\u9646\u8fdbdocker\u955c\u50cf\u7684\u65f6\u5019\u6709\u63d0\u793a\uff0c\u53ef\u4ee5\u7528\u4e00\u6761\u547d\u4ee4\u5b8c\u7f8e\u5b89\u88c5ubuntu\u7684\u5b8c\u6574\u7248\u3002\n\u547d\u4ee4 unminimize \u6267\u884c\u6548\u679c \u279c ~ unminimize This system has been minimized by removing packages and content that are not required on a system that users do not log into. This script restores content and packages that are found on a default Ubuntu server system in order to make this system more suitable for interactive use. Reinstallation of packages may fail due to changes to the system configuration, the presence of third-party packages, or for other reasons. This operation may take some time. Would you like to continue? \u5927\u529f\u544a\u6210\uff01\n\u811a\u672c\u5185\u5bb9 \u53d1\u73b0\u5e76\u4e0d\u662f\u6bcf\u4e2aubuntu \u7248\u672c\u90fd\u6709\u8fd9\u4e2a\u811a\u672c\uff0c\u6240\u4ee5\u628a\u8fd9\u4e2a\u811a\u672c\u8d34\u51fa\u6765\u4e86\u3002\n\u811a\u672c\u4f4d\u4e8e \/usr\/local\/sbin\/unminimize\u3002\n\u5177\u4f53\u5185\u5bb9\u5982\u4e0b\uff1a\n#!\/bin\/sh set -e echo &#34;This system has been minimized by removing packages and content that are&#34; echo &#34;not required on a system that users do not log into.&#34; echo &#34;&#34; echo &#34;This script restores content and packages that are found on a default&#34; echo &#34;Ubuntu server system in order to make this system more suitable for&#34; echo &#34;interactive use.&#34; echo &#34;&#34; echo &#34;Reinstallation of packages may fail due to changes to the system&#34; echo &#34;configuration, the presence of third-party packages, or for other&#34; echo &#34;reasons.&#34; echo &#34;&#34; echo &#34;This operation may take some time.&#34; echo &#34;&#34; read -p &#34;Would you like to continue? [y\/N]&#34; REPLY echo # (optional) move to a new line if [ &#34;$REPLY&#34; != &#34;y&#34; ] &amp;&amp; [ &#34;$REPLY&#34; != &#34;Y&#34; ] then exit 1 fi if [ -f \/etc\/dpkg\/dpkg.cfg.d\/excludes ] || [ -f \/etc\/dpkg\/dpkg.cfg.d\/excludes.dpkg-tmp ]; then echo &#34;Re-enabling installation of all documentation in dpkg...&#34; if [ -f \/etc\/dpkg\/dpkg.cfg.d\/excludes ]; then mv \/etc\/dpkg\/dpkg.cfg.d\/excludes \/etc\/dpkg\/dpkg.cfg.d\/excludes.dpkg-tmp fi echo &#34;Updating package list and upgrading packages...&#34; apt-get update # apt-get upgrade asks for confirmation before upgrading packages to let the user stop here apt-get upgrade echo &#34;Restoring system documentation...&#34; echo &#34;Reinstalling packages with files in \/usr\/share\/man\/ ...&#34; # Reinstallation takes place in two steps because a single dpkg --verified # command generates very long parameter list for &#34;xargs dpkg -S&#34; and may go # over ARG_MAX. Since many packages have man pages the second download # handles a much smaller amount of packages. dpkg -S \/usr\/share\/man\/ |sed &#39;s|, |\\n|g;s|: [^:]*$||&#39; | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y echo &#34;Reinstalling packages with system documentation in \/usr\/share\/doc\/ ..&#34; # This step processes the packages which still have missing documentation dpkg --verify --verify-format rpm | awk &#39;\/..5...... \\\/usr\\\/share\\\/doc\/ {print $2}&#39; | sed &#39;s|\/[^\/]*$||&#39; | sort |uniq \\ | xargs dpkg -S | sed &#39;s|, |\\n|g;s|: [^:]*$||&#39; | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y if dpkg --verify --verify-format rpm | awk &#39;\/..5...... \\\/usr\\\/share\\\/doc\/ {exit 1}&#39;; then echo &#34;Documentation has been restored successfully.&#34; rm \/etc\/dpkg\/dpkg.cfg.d\/excludes.dpkg-tmp else echo &#34;There are still files missing from \/usr\/share\/doc\/:&#34; dpkg --verify --verify-format rpm | awk &#39;\/..5...... \\\/usr\\\/share\\\/doc\/ {print &#34; &#34; $2}&#39; echo &#34;You may want to try running this script again or you can remove&#34; echo &#34;\/etc\/dpkg\/dpkg.cfg.d\/excludes.dpkg-tmp and restore the files manually.&#34; fi fi if ! dpkg-query --show --showformat=&#39;${db:Status-Status}\\n&#39; ubuntu-minimal 2&gt; \/dev\/null | grep -q &#39;^installed$&#39;; then echo &#34;Installing ubuntu-minimal package to provide the familiar Ubuntu minimal system...&#34; DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-minimal ubuntu-standard fi if dpkg-query --show --showformat=&#39;${db:Status-Status}\\n&#39; ubuntu-server 2&gt; \/dev\/null | grep -q &#39;^installed$&#39; \\ &amp;&amp; ! dpkg-query --show --showformat=&#39;${db:Status-Status}\\n&#39; landscape-common 2&gt; \/dev\/null | grep -q &#39;^installed$&#39;; then echo &#34;Installing ubuntu-server recommends...&#34; DEBIAN_FRONTEND=noninteractive apt-get install -y landscape-common fi # unminimization succeeded, there is no need to mention it in motd rm -f \/etc\/update-motd.d\/60-unminimize \u5236\u4f5cubuntu\u5b8c\u6574\u7248Docker\u955c\u50cf \u77e5\u9053\u4e0a\u9762\u7684\u547d\u4ee4\u4e4b\u540e\uff0c\u5236\u4f5cDocker\u955c\u50cf\u5c31\u975e\u5e38\u5bb9\u6613\u4e86\u3002\n\u5c06\u4e0b\u9762\u7684\u6587\u4ef6\u4fdd\u5b58\u4e3aDockerfile\nFROM ubuntu:18.04 RUN export DEBIAN_FRONTEND=noninteractive &amp;&amp; \\ bash -c &#39;yes | unminimize&#39; \u7136\u540e\u6267\u884c\u7f16\u8bd1docker\u955c\u50cf\u7684\u64cd\u4f5c\ndocker build . -t ubuntu:18.04-full \u5c31\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u6267\u884c\u5b8c\u6574\u7248\u7684\u955c\u50cf\u4e86\ndocker run -it --rm ubuntu:18.04 bash \u5bf9\u6bd4 \u8fd9\u7bc7\u535a\u5ba2\u4ecb\u7ecd\u7684\u65b9\u6cd5\u76f8\u5bf9\u800c\u8a00\u5c31\u6bd4\u8f83\u7e41\u7410\u4e86\u3002\n\u5236\u4f5cubuntu\u5b8c\u6574\u7248docker\u955c\u50cf(cradle08)\n\u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20200316-full-ubuntu-docker\/","summary":"<h1 id=\"\u5b89\u88c5ubuntu-docker\u5b8c\u6574\u7248\">\u5b89\u88c5ubuntu docker\u5b8c\u6574\u7248<\/h1>\n<p>\u56f0\u6270\u4e86\u5f88\u4e45\u600e\u4e48\u5b89\u88c5ubuntu docker\u7684\u5b8c\u6574\u7248\uff0c\u540e\u6765\u53d1\u73b0\u4ecessh\u767b\u9646\u8fdbdocker\u955c\u50cf\u7684\u65f6\u5019\u6709\u63d0\u793a\uff0c\u53ef\u4ee5\u7528\u4e00\u6761\u547d\u4ee4\u5b8c\u7f8e\u5b89\u88c5ubuntu\u7684\u5b8c\u6574\u7248\u3002<\/p>\n<h2 id=\"\u547d\u4ee4\">\u547d\u4ee4<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">unminimize\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"\u6267\u884c\u6548\u679c\">\u6267\u884c\u6548\u679c<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">\u279c  ~ unminimize\n<\/span><\/span><span class=\"line\"><span class=\"cl\">This system has been minimized by removing packages and content that are\n<\/span><\/span><span class=\"line\"><span class=\"cl\">not required on a system that users <span class=\"k\">do<\/span> not log into.\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">This script restores content and packages that are found on a default\n<\/span><\/span><span class=\"line\"><span class=\"cl\">Ubuntu server system in order to make this system more suitable <span class=\"k\">for<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">interactive use.\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">Reinstallation of packages may fail due to changes to the system\n<\/span><\/span><span class=\"line\"><span class=\"cl\">configuration, the presence of third-party packages, or <span class=\"k\">for<\/span> other\n<\/span><\/span><span class=\"line\"><span class=\"cl\">reasons.\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">This operation may take some time.\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">Would you like to <span class=\"k\">continue<\/span>? \n<\/span><\/span><\/code><\/pre><\/div><p>\u5927\u529f\u544a\u6210\uff01<\/p>","title":"\u5b89\u88c5ubuntu docker\u5b8c\u6574\u7248"},{"content":"SSH\u8bbf\u95ee\u5185\u7f51\/\u5185\u7f51\u7a7f\u900f\u7684\u51e0\u79cd\u60c5\u666f\u8be6\u89e3 @[TOC]\n0x01 \u80cc\u666f \u75ab\u60c5\u671f\u95f4\u8fdc\u7a0b\u529e\u516c\uff0c\u81ea\u7136\u5c11\u4e0d\u4e86\u9700\u8981\u8fde\u63a5\u5230\u516c\u53f8\u5185\u7f51\u7684\u670d\u52a1\u5668\u8dd1\u7a0b\u5e8f\u3002SSH\u662f\u4e00\u79cd\u5e38\u7528\u7684\u8fde\u63a5\u5230\u5185\u7f51\u7684\u65b9\u5f0f\uff0c\u51e0\u4e4e\u80fd\u505a\u5230\u6240\u6709\u8fde\u63a5\u5185\u7f51\u7684\u64cd\u4f5c\u3002\u4e0b\u9762\u4f5c\u8005\u5c06\u5bf9\u51e0\u79cd\u5e38\u7528\u6216\u8005\u4e0d\u5e38\u7528\u7684\u8fde\u63a5\u5230\u5185\u7f51\u7684\u4f7f\u7528\u60c5\u51b5\u505a\u4e00\u4e9b\u793a\u4f8b\u3002\n0x02 \u7f51\u7edc\u62d3\u6251 \u4e0b\u9762\u5c06\u5bf9\u7f51\u7edc\u4e2d\u7684\u51e0\u53f0\u673a\u5668\u7684\u7f51\u7edc\u62d3\u6251\u505a\u8bf4\u660e\u3002\nIP\u5747\u4f5c\u533f\u540d\u5316\u5904\u7406\n\u4e2a\u4eba\u7b14\u8bb0\u672c1 \u4e3b\u673a\u540d\uff1aPC1 \u4f4d\u7f6e\uff1a \u516c\u7f51 IP\uff1a\u4e0d\u91cd\u8981 \u8df3\u677f\u673a \u4e3b\u673a\u540d\uff1aproxy.test.com ssh: \u7aef\u53e3: 5022 \u7528\u6237\u540d: user IP\/\u57df\u540d \u516c\u7f51: proxy.test.com \u5185\u7f51: 192.168.8.10 \u670d\u52a1\u56681 \u4e3b\u673a\u540d: srv1 ssh \u7aef\u53e3: 818 \u7528\u6237\u540d: user IP \u5185\u7f51\uff1a192.168.8.18 0x03 \u57fa\u7840\u77e5\u8bc6 ssh ssh \u7aef\u53e3\u8f6c\u53d1 ssh config\u6587\u4ef6\u914d\u7f6e ssh \u5bc6\u94a5\u8bbe\u7f6e \u4ee3\u7406\u670d\u52a1\u5668 0x04 \u5de5\u5177\u5217\u8868 0x041 \u672c\u5730PC \u5982\u679c\u662fwindows \u5b89\u88c5git-bash\u5e76\u4f7f\u7528\u5b83\u63d0\u4f9b\u7684ssh\u529f\u80fd \u5982\u679c\u662fMacOS\u6216\u8005\u662fLinux \u4f7f\u7528\u672c\u5730\u81ea\u5e26\u7684ssh 0x042 \u4f01\u4e1a\u670d\u52a1\u5668 \u9700\u8981\u914d\u7f6e\u597dSSH\u670d\u52a1\u5668\n0x05 ssh\u7aef\u53e3\u8f6c\u53d1\u7684\u57fa\u672c\u64cd\u4f5c\u4ee5\u53ca\u901a\u8fc7\u4f01\u4e1a\u7f51\u7edc\u8bbf\u95ee\u7f51\u7ad9 0x051 \u9002\u7528\u60c5\u51b5 \u672c\u65b9\u6cd5\u53ef\u4ee5\u9002\u7528\u4e8e\u8bbf\u95ee\n\u4f01\u4e1a\u5185\u90e8\u642d\u5efa\u7684\u7f51\u7ad9 \u5fc5\u987b\u4f01\u4e1aIP\u6388\u6743\u624d\u80fd\u8bbf\u95ee\u7684\u7f51\u7ad9\uff08\u5982\u8bba\u6587\u68c0\u7d22\u7f51\u7ad9\uff09 0x052 \u6b65\u9aa4 1. \u6267\u884cssh\u52a8\u6001\u8f6c\u53d1\u547d\u4ee4 # \u5728PC1\u4e0a\u6267\u884c ssh -D 10824 user@proxy.test.com -p 5022 \u4e0a\u9762\u7684\u547d\u4ee4\u662f\u5728PC1\u672c\u5730\u5f00\u653e\u7aef\u53e310824\uff0c\u8be5\u7aef\u53e3\u4f5c\u4e3a\u4e00\u4e2aSock\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u4f7f\u7528\u6b64\u4ee3\u7406\u53ef\u4ee5\u901a\u8fc7\u4f01\u4e1a\u5185\u7f51\u8bbf\u95ee\u7f51\u7edc\n2. \u6d4f\u89c8\u5668\u914d\u7f6e\u4ee3\u7406 \u5728\u8c37\u6b4cChrome\u6d4f\u89c8\u5668\u4e2d\u914d\u7f6eProxy SwitchyOmega\u3002\n\u6dfb\u52a0\u65b0\u60c5\u666f\u6a21\u5f0f\uff0c\u7c7b\u578b\u4e3a\u4ee3\u7406\u670d\u52a1\u5668\u3002\n\u914d\u7f6e\u4ee3\u7406\u534f\u8bae\u4e3asock4,\u670d\u52a1\u5668\u548c\u7aef\u53e3\u5206\u522b\u4e3alocalhost,10824\n\u73b0\u5728\u5c31\u80fd\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee\u53ea\u6709\u4f01\u4e1a\u5185\u90e8\u624d\u53ef\u8bbf\u95ee\u7684\u7f51\u7ad9\u4e86\u3002\n0x053 \u4f18\u5316 1. \u901f\u5ea6\u4f18\u5316 SSH\u6dfb\u52a0**-C**\u53c2\u6570\u53ef\u4ee5\u5b9e\u73b0\u6570\u636e\u5305\u7684\u538b\u7f29\uff0c\u5bf9\u4e8e\u5927\u91cf\u6570\u636e\u7684\u4f20\u8f93\u4f1a\u63d0\u9ad8\u901f\u5ea6\u3002\nssh -C -D 10824 user@proxy.test.com -p 5022 2. bug\u8c03\u8bd5 \u6dfb\u52a0**-v**\u53c2\u6570\u80fd\u591f\u663e\u793a\u8fde\u63a5\u8fc7\u7a0b\u4e2d\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u51fa\u73b0\u9519\u8bef\u540e\u53ef\u4ee5\u81ea\u884c\u8c03\u8bd5\u3002\nssh -vC -D 10824 user@proxy.test.com -p 5022 3. \u4e0d\u6253\u5f00\u7ec8\u7aef \u6dfb\u52a0**-N**\u53c2\u6570\u53ef\u4ee5\u4e0d\u6253\u5f00\u7ec8\u7aef\u754c\u9762\u3002\nssh -vNC -D 10824 user@proxy.test.com -p 5022 4. \u6dfb\u52a0\u516c\u94a5\u8bbf\u95ee\uff0c\u51cf\u5c11\u5bc6\u7801\u8f93\u5165\uff0c\u5e76\u63d0\u9ad8\u5b89\u5168\u6027 ssh-keygen # \u751f\u6210\u5bc6\u94a5\u5bf9 # \u6dfb\u52a0\u79c1\u94a5\u5230\u670d\u52a1\u5668 ssh-copy-id -i ~\/.ssh\/id_rsa.pub user@proxy.test.com -p 5022 # \u6b64\u65f6\u8fde\u63a5\u53ef\u4ee5\u4e0d\u7528\u5bc6\u7801 ssh -vNC -D 10824 user@proxy.test.com -p 5022 5. \u4fdd\u5b58\u4e3aconfig\uff0c\u51cf\u5c11\u8bb0\u5fc6\u91cf \u5728\u7528\u6237\u76ee\u5f55\u7684.ssh\u4e0b\u521b\u5efaconfig\u6587\u4ef6,\u586b\u5165\u4ee5\u4e0b\u5185\u5bb9\nHost proxy # \u522b\u540d HostName proxy.test.com # \u8fdc\u7a0b\u8df3\u677f\u673a\u7684\u57df\u540d\u6216\u8005IP Port 5022 User user IdentityFile &#34;~\/.ssh\/id_rsa&#34; # \u79c1\u94a5 DynamicForward 10824 # \u52a8\u6001\u8f6c\u53d1 Compression yes # \u538b\u7f29 \u73b0\u5728\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u5373\u53ef\u8bbf\u95ee\nssh -vN proxy 6. \u9632\u6b62\u4e2d\u65ad \u670d\u52a1\u5668\u9ed8\u8ba4\u4f1a\u628a\u4e0d\u6d3b\u52a8\u7684ssh\u65ad\u6389\uff0c\u6211\u4eec\u53ef\u4ee5\u5728config\u6587\u4ef6\u4e2d\u52a0\u5165keepalive\u9009\u9879\u6765\u9632\u6b62\u4e2d\u65ad\nServerAliveInterval 180 ServerAliveCountMax 2 \u8fd9\u4e2a\u914d\u7f6e\u7684\u610f\u601d\u662f\u6bcf180\u79d2\u53d1\u9001\u4e00\u6b21keepalive\u7684\u7a7a\u5305\uff0c\u5982\u679c\u4e24\u6b21\u5931\u8d25\u5c31\u4f1a\u65ad\u6389\u8fde\u63a5\n# \u5b8c\u6574.ssh\/config ServerAliveInterval 180 ServerAliveCountMax 2 Host proxy # \u522b\u540d HostName proxy.test.com # \u8fdc\u7a0b\u8df3\u677f\u673a\u7684\u57df\u540d\u6216\u8005IP Port 5022 User user IdentityFile &#34;~\/.ssh\/id_rsa&#34; # \u79c1\u94a5 DynamicForward 10824 # \u52a8\u6001\u8f6c\u53d1 Compression yes # \u538b\u7f29 7. \u81ea\u52a8\u91cd\u64ad \u53ef\u4ee5\u642d\u914d\u4e0a\u81ea\u52a8\u91cd\u65b0\u8fde\u63a5\u7684\u64cd\u4f5c\uff0c\u6765\u8fbe\u5230PC\u4f11\u7720\u82cf\u9192\u540e\u4e5f\u80fd\u53ca\u65f6\u8fde\u63a5\u7684\u529f\u80fd\u3002\n\u4f7f\u7528while\u5faa\u73af\u6765\u91cd\u65b0\u8fde\u63a5\nwhile :; do ssh -vN proxy ; done 8. \u5236\u4f5c\u5feb\u6377\u65b9\u5f0f(Windows) \u5728\u684c\u9762\u4e0a\u65b0\u5efa\u5feb\u6377\u65b9\u5f0f \u76ee\u6807\u8bbe\u5b9a\u4e3a\n&#34;&lt;\u7edd\u5bf9\u8def\u5f84&gt;\\git-bash.exe&#34; -c &#34;while :; do ssh -vN proxy; done&#34; \u6ce8\u610f\u8bbe\u7f6e\u4e3agit-bash\u7684\u7edd\u5bf9\u8def\u5f84\u3002 2. \u53ef\u4ee5\u62d6\u52a8\u8be5\u5feb\u6377\u65b9\u5f0f\u5230\u4efb\u52a1\u680f 3. \u6216\u8005\u5c06\u5feb\u6377\u65b9\u5f0f\u653e\u5165\u5f00\u59cb\u83dc\u5355\u7684\u542f\u52a8\u6587\u4ef6\u5939\uff0c\u5b9e\u73b0\u5f00\u673a\u81ea\u542f\u3002\n0x06 \u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u5668ssh \u5927\u5bb6\u53ef\u4ee5\u60f3\u5230\u7684\u65b9\u5f0f\u662f\u5148\u8bbf\u95ee\u8df3\u677f\u673a\uff0c\u7136\u540e\u518d\u5728\u8df3\u677f\u673a\u4e0a\u8fdb\u884cssh\u8fde\u63a5\u5230srv1\u3002\u4f46\u662f\u8fd9\u6837\u9700\u8981\u5728\u8df3\u677f\u673aproxy\u4e0a\u653e\u7f6e\u81ea\u5df1\u7684\u79c1\u94a5\uff0c\u4e0d\u5b89\u5168\u3002\n\u4f5c\u8005\u4f7f\u7528\u4e86ssh\u63d0\u4f9b\u7684ssh\u4ee3\u7406\u7684\u529f\u80fd\u3002\nssh -o &#34;ProxyCommand ssh user@proxy.test.com -p 5022 -W %h:%p&#34; user@192.168.8.18 -p 818 -o:\u662fSSH \u9009\u9879\u3002\u672c\u6b65\u9aa4\u4f7f\u7528\u4e86ProxyCommand\u7684\u9009\u9879\uff0c\u5b83\u53ef\u4ee5\u505a\u5230\u901a\u8fc7proxy.test.com\u8fd9\u53f0\u8df3\u677f\u673a\u8bbf\u95eesrv1(192.168.8.18)\u3002\n\u4f18\u5316 \u5728\u4e0a\u4e00\u82820x05\u4e2d\uff0c\u6211\u4eec\u914d\u7f6e\u4e86ssh config\u6587\u4ef6\uff0c\u672c\u6b65\u9aa4\u4e2d\u53ef\u4ee5\u7ee7\u7eed\u7528\u3002\n\u547d\u4ee4\u53ef\u4ee5\u4f18\u5316\u4e3a\uff1a\nssh -o &#34;ProxyCommand ssh proxy -W %h:%p&#34; user@192.168.8.18 -p 818 \u7ee7\u7eed\u4f18\u5316 \u5728ssh config\u4e2d\u52a0\u5165srv1\n# \u52a0\u51650x05\u90e8\u5206\u7684\u5b8c\u6574ssh config Host srv1 HostName 192.168.8.18 User user port 818 IdentityFile &#34;~\/.ssh\/id_rsa&#34; ProxyCommand ssh proxy -W %h:%p # \u8fd9\u4e2a\u662f\u6838\u5fc3 \u73b0\u5728\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u7ec8\u6781\u7b80\u5316\u547d\u4ee4\u8bbf\u95eesrv1\nssh srv1 0x07 \u672c\u5730\u8bbf\u95ee\u4f01\u4e1a\u5185\u90e8\u6570\u636e\u5e93\u7aef\u53e3 \u5047\u8bbesrv1\u4e0a\u9762\u6709\u4e2aredis\u6570\u636e\u5e93\u670d\u52a1\uff0c\u7aef\u53e3\u4e3a6379\uff0c\u53ea\u80fd\u4ecesrv1\u7684\u672c\u5730\u8bbf\u95ee\u3002\n\u73b0\u5728\u672c\u5730\u7684PC1\u673a\u5668\u5728\u6d4b\u8bd5\u7a0b\u5e8f\uff0c\u4e5f\u60f3\u76f4\u63a5\u8bbf\u95ee\u8fd9\u4e2a\u7aef\u53e3\u3002\n\u8fd9\u65f6\u5019\u53ef\u4ee5\u7528\u5230\u672c\u5730\u7aef\u53e3\u8f6c\u53d1\u7684\u529f\u80fd\u3002\u547d\u4ee4\u683c\u5f0f\u4e3a\uff1a\n# \u683c\u5f0f ssh -L &lt;\u672c\u5730ip&gt;:&lt;\u672c\u5730\u7aef\u53e3&gt;:&lt;\u8fdc\u7a0bip&gt;:&lt;\u8fdc\u7a0b\u7aef\u53e3&gt; &lt;\u670d\u52a1\u5668&gt; \u5728\u672c\u60c5\u51b5\u4e0b\u7684\u547d\u4ee4\u4e3a\u3002\nssh -L 6379:6379 srv1 \u8fd9\u65f6\u5019\u8bbf\u95ee127.0.0.1\u76846379\u7aef\u53e3\u5373\u53ef\u8fde\u5230redis\u6570\u636e\u5e93\u3002\n\u4f5c\u8005\u6bd4\u8f83\u559c\u6b22\u6253\u5f00\u8c03\u8bd5\u3001\u538b\u7f29\u548c\u7981\u6b62\u8fde\u5230\u7ec8\u7aef\u3002\nssh -vNCL 6379:6379 srv1 \u6b64\u8f6c\u53d1\u540c\u6837\u53ef\u4ee5\u5199\u5165\u914d\u7f6e\u6587\u4ef6\nHost srv1 HostName 192.168.8.18 User user port 818 IdentityFile &#34;~\/.ssh\/id_rsa&#34; ProxyCommand ssh proxy -W %h:%p # \u8fd9\u4e2a\u662f\u6838\u5fc3 LocalForward 6379 6379 Compression yes 0x071 \u4fdd\u6301\u670d\u52a1\u5668\u540d\u79f0\u4e0d\u53d8 \u5f00\u53d1\u7684\u65f6\u5019\u4f1a\u628a\u670d\u52a1\u5668\u7684\u540d\u79f0\u56fa\u5b9a\u5199\u5230\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u5728\u672c\u5730\u8c03\u8bd5\u7684\u65f6\u5019\u4e3a\u4e86\u6a21\u62df\u670d\u52a1\u5668\u73af\u5883\uff0c\u4e00\u822c\u4e0d\u4f1a\u66f4\u6539\u914d\u7f6e\u6587\u4ef6\u3002\n\u5982\u679c\u8fd8\u60f3\u4ee5 srv1:6379 \u8fde\u63a5\u5230redis\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u6309\u5982\u4e0b\u64cd\u4f5c\u3002\n1. \u4fee\u6539hosts\u6587\u4ef6 \u6dfb\u52a0\u4e0b\u9762\u7684\u4e00\u884c\u5230hosts\u6587\u4ef6\n127.0.8.18 srv1 2. \u4fee\u6539.ssh\/config\u6587\u4ef6 \u628asrv1\u4e0b\u7684LocalForward\u4fee\u6539\u4e3a\nLocalForward 127.0.8.18:6379 6379 3. \u5efa\u7acb\u8fde\u63a5 ssh -vN srv1 \u6b64\u65f6PC1\u672c\u5730\u53ef\u4ee5\u901a\u8fc7srv1:6379\u8fde\u63a5\u5230redis\u6570\u636e\u5e93\u3002\n0x072 \u6269\u5c55\u672c\u5730\u7aef\u53e3\u8f6c\u53d1(\u8fde\u5230\u8fdc\u7a0b\u684c\u9762) \u4f7f\u7528\u672c\u5730\u7aef\u53e3\u8f6c\u53d1\u4e0d\u4ec5\u53ef\u4ee5\u8f6c\u53d1\u5230\u8fdc\u7a0b\u670d\u52a1\u81ea\u5df1\u7684\u7aef\u53e3\uff0c\u4e5f\u53ef\u4ee5\u8f6c\u53d1\u5230\u8be5\u670d\u52a1\u5668\u6240\u80fd\u8fde\u63a5\u7684\u5176\u4ed6\u670d\u52a1\u5668\u7684\u7aef\u53e3\u3002\n\u6bd4\u5982\u8fdc\u7a0b\u516c\u53f8\u5185\u8fd8\u6709\u4e00\u53f0\u5f00\u53d1\u7528\u7684windows\u5de5\u4f5c\u7ad9 WS1(192.168.7.214)\u3002\u4f5c\u8005\u60f3\u901a\u8fc7windows\u7684\u8fdc\u7a0b\u684c\u9762\u670d\u52a1RDP\u8fde\u63a5\u5230WS1\u3002\n\u8fd9\u65f6\u5019\u53ef\u4ee5\u901a\u8fc7srv1\u628aWS1\u76843389\u7aef\u53e3\u8f6c\u53d1\u5230\u672c\u5730\u768413389\u7aef\u53e3\u3002\nssh -vN -L 127.0.7.214:13389:192.168.7.214:3389 srv1 \u6b64\u65f6\u518d\u6253\u5f00windows\u7684\u8fdc\u7a0b\u684c\u9762\u8fde\u63a5(rdp),\u8fde\u63a5\u5230127.0.7.214:13389,\u5373\u53ef\u8fde\u5230\u5185\u7f51\u673a\u5668\u7684\u8fdc\u7a0b\u684c\u9762\u3002\n0x08 \u8ba9\u670d\u52a1\u5668\u80fd\u8bbf\u95ee\u672c\u5730\u6d4b\u8bd5\u73af\u5883\u7684\u6570\u636e\u5e93 \u6709\u65f6\u5019\u672c\u5730\u4e5f\u4f1a\u642d\u5efa\u6d4b\u8bd5\u670d\u52a1\u8ba9\u670d\u52a1\u5668\u8bbf\u95ee\u3002 \u6bd4\u5982\u672c\u5730PC1\u642d\u5efa\u4e86\u4e00\u4e2amysql\u670d\u52a1\u5668\uff0c\u7aef\u53e3\u4e3a3306\u3002 \u670d\u52a1\u5668\u8bbf\u95eePC1\u7684mysql\u670d\u52a1\u9700\u8981\u4f7f\u7528SSH\u7684\u8fdc\u7a0b\u7aef\u53e3\u8f6c\u53d1\u529f\u80fd\u3002\nssh -R &lt;\u8fdc\u7a0bIP&gt;:&lt;\u8fdc\u7a0b\u7aef\u53e3&gt;:&lt;\u672c\u5730IP&gt;:&lt;\u672c\u5730\u7aef\u53e3&gt; &lt;\u670d\u52a1\u5668&gt; \u672c\u793a\u4f8b\u4e2d\u6267\u884c\u7684\u547d\u4ee4\u4e3a\nssh -R 127.0.0.1:3306:3306 srv1 \u5199\u5165ssh\/config\u914d\u7f6e\u6587\u4ef6\u4e2d\nHost srv1 HostName 192.168.8.18 User user port 818 IdentityFile &#34;~\/.ssh\/id_rsa&#34; ProxyCommand ssh proxy -W %h:%p RemoteForward 127.0.0.1:3306 3306 Compression yes \u73b0\u5728\u6267\u884cssh -vN srv1\u5373\u53ef\u5c06\u53d1\u9001\u5230\u8fdc\u7a0b3306\u7aef\u53e3\u7684\u8bf7\u6c42\u8f6c\u53d1\u5230\u672c\u5730\u76843306\u7aef\u53e3\u3002\n\u6ce8\u610f: \u670d\u52a1\u5668\u9ed8\u8ba4\u4e0d\u5141\u8bb8\u8f6c\u53d1\u5f00\u653e\u516c\u5f00\u8bbf\u95ee\u7684\u7aef\u53e3\u3002\u9700\u8981\u5728\u670d\u52a1\u5668\u914d\u7f6e\u6587\u4ef6\u4e2d\u6253\u5f00\u3002\n#edit file \/etc\/ssh\/sshd_config, add the following line GatewayPorts yes 0x09 \u4f7f\u7528VSCode\u8fdc\u7a0b\u7f16\u7a0b\u8c03\u8bd5 VSCode\u63d0\u4f9b\u4e86Remote Development\u63d2\u4ef6,\u53ef\u4ee5\u901a\u8fc7ssh\u8fde\u63a5\u5230\u8fdc\u7a0b\u8fdb\u884c\u5f00\u53d1\uff0c\u8fbe\u5230\u548c\u672c\u5730\u5f00\u53d1\u540c\u6837\u7684\u6548\u7387\u3002 \u6b64\u63d2\u4ef6\u4f7f\u7528\u7528\u6237\u6587\u4ef6\u5939\u4e0b\u7684.ssh\/config\u6587\u4ef6\u4f5c\u4e3assh\u914d\u7f6e\u3002\n\u5177\u4f53\u8bf7\u53c2\u770b\u5b98\u65b9\u4ecb\u7ecd,\u6b64\u5904\u4e0d\u518d\u8d58\u8ff0\u3002\n0x10 \u6587\u4ef6\u4f20\u8f93 \u4f20\u8f93\u6587\u4ef6\u53ef\u4ee5\u4f7f\u7528scp\u547d\u4ee4\u3002 \u5e38\u7528\u547d\u4ee4\u5982\u4e0b\uff1a\n# \u62f7\u8d1d\u5230\u672c\u5730 scp file user@host:\/path\/to\/file # \u62f7\u8d1d\u5230\u8fdc\u7a0b scp user@host:\/path\/to\/file \/local\/path\/to\/file # \u62f7\u8d1d\u591a\u4e2a\u6587\u4ef6\u5230\u8fdc\u7a0b scp file1 file2 user@host:\/path\/to\/directory # \u62f7\u8d1d\u6587\u4ef6\u5939\u5230\u8fdc\u7a0b scp -r \/path\/to\/directory user@host:\/path\/to\/directory \u5176\u4ed6\u53c2\u6570\uff1a\n-r # \u4f20\u8f93\u6587\u4ef6\u5939 -v # \u663e\u793a\u8be6\u60c5 -C # \u538b\u7f29\u4f20\u8f93 -l 800 # limit bandwith with 800 -p # preserving the original attributes of the copied files -q # \u9690\u85cf\u8f93\u51fa \u66f4\u591a\u547d\u4ee4\u53c2\u8003: scp cheat sheet \u548c scp man page\n0x11 \u6620\u5c04\u670d\u52a1\u5668\u6587\u4ef6\u5939 \u4e0a\u9762\u63d0\u5230\u7684\u5bf9\u4e8e\u6d4f\u89c8\u5927\u91cf\u6587\u4ef6\u7684\u65f6\u5019\u8fd8\u662f\u4e0d\u592a\u65b9\u4fbf\uff0c\u56e0\u6b64\u4f5c\u8005\u53c8\u63d0\u5230\u4e86ssh\u6587\u4ef6\u6620\u5c04\u7684\u529f\u80fd\uff0c\u672c\u529f\u80fd\u9700\u8981\u7b2c\u4e09\u65b9\u8f6f\u4ef6\u652f\u6301\u3002\n0x111 MacOSX\/Linux \u5bf9\u4e8e\u672c\u5730\u4e3amacosx\u6216linux\u7684\u7528\u6237: \u6620\u5c04\u670d\u52a1\u5668\u6587\u4ef6\u5939\u53ef\u4ee5\u4f7f\u7528sshfs,\u6b64\u8f6f\u4ef6\u6bd4\u8f83\u6210\u719f,\u64cd\u4f5c\u4e60\u60ef\u4e5f\u4e0essh\u57fa\u672c\u76f8\u540c,\u4e0d\u518d\u8d58\u8ff0\u3002\n0x112 Windows \u5bf9\u4e8ewindows\u7528\u6237,\u53ef\u4ee5\u4f7f\u7528SFTP Drive. \u8bbe\u7f6e\u597d\u670d\u52a1\u5668\u5730\u5740\uff0c\u7528\u6237\u540d\uff0c\u79c1\u94a5\u548c\u6253\u5f00\u7684\u6587\u4ef6\u5939\u5373\u53ef\u3002\n\u4f46\u662f\u5bf9\u4e8e\u8df3\u677f\u673a\u8bbf\u95ee\u65b9\u5f0f\uff0cSFTP Drive\u4e0d\u652f\u6301\u4f7f\u7528\u5bc6\u94a5\u9a8c\u8bc1\u7684ssh\u96a7\u9053\u505a\u4ee3\u7406\u3002\u800c\u4e14\u5b83\u7684\u4ee3\u7406\u662f\u5bf9\u6240\u6709\u8fde\u63a5\u90fd\u542f\u7528\u3002\n\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u6298\u4e2d\u7684\u65b9\u5f0f\uff0c\u5148\u7528\u672c\u5730\u7aef\u53e3\u8f6c\u53d1\u628a\u672c\u5730\u7684\u67d0\u7aef\u53e3\u6620\u5c04\u4e3a\u670d\u52a1\u5668\u7684ssh\u7aef\u53e3\uff0c\u7136\u540e\u5728SFTP Driver\u4e2d\u8bbf\u95ee\u6b64\u672c\u5730\u7aef\u53e3\u3002\nHost proxy HostName proxy.test.com Port 5022 User user IdentityFile &#34;~\/.ssh\/id_rsa&#34; # \u79c1\u94a5 Compression yes # \u538b\u7f29 LocalForward 127.0.8.18:818 192.168.8.18:818 # \u8f6c\u53d1\u8fdc\u7a0bsrv1\u7684ssh\u7aef\u53e3 \u7136\u540e\u518dSFTP Drive\u4e2d\u586b\u5199\u670d\u52a1\u5668\u5730\u5740\u4e3a127.0.8.18\uff0c\u7aef\u53e3\u4e3a818\u3002\n0x12 \u8bbf\u95ee\u540c\u5728\u8fdc\u7a0b\u7684\u540c\u4e8b\u7684\u672c\u5730\u670d\u52a1 \u53e6\u6709\u4e00\u540c\u4e8b\u7535\u8111PC2\u5728\u4ed6\u81ea\u5df1\u5bb6\u5de5\u4f5c\u3002PC2\u4e0a\u5f00\u653e\u4e86\u4e00\u4e2a\u6570\u636e\u5e93\u670d\u52a1\uff0c\u7aef\u53e3\u53f7\u4e3a6379\uff0cPC1\u9700\u8981\u8fde\u63a5\u5230PC2\u7684\u6570\u636e\u5e93\u3002\n\u53ef\u4ee5\u4f7f\u7528\u8df3\u677f\u673a\u4f5c\u4e3a\u4e2d\u8f6c\u3002\n# PC2 \u4e0a\u64cd\u4f5c # \u5c06\u672c\u57306379\u7aef\u53e3\u6620\u5c04\u5230\u8df3\u677f\u673a\u768416379 ssh -R 16379:6379 proxy # PC1 \u4e0a\u64cd\u4f5c # \u5c06\u8df3\u677f\u673a\u768416379\u7aef\u53e3\u6620\u5c04\u5230\u672c\u5730\u76846379 ssh -L 6379:16379 proxy \u66f4\u591a\u4f7f\u7528\u573a\u666f\u6b22\u8fce\u5728\u4e0b\u65b9\u8bc4\u8bba\u6216\u8005\u53d1\u9001\u90ae\u4ef6\u7ed9\u4f5c\u8005\u3002\n\u53c2\u8003 Remote Development (VSCode) sshfs (Arch Wiki) SFTP Drive (Nsoftware) scp cheetsheet scp man page \u5b9e\u6218 SSH \u7aef\u53e3\u8f6c\u53d1 (IBM) SSH Config File \u4f7f\u7528ssh-keygen\u548cssh-copy-id\u4e09\u6b65\u5b9e\u73b0SSH\u65e0\u5bc6\u7801\u767b\u5f55 \u548cssh\u5e38\u7528\u547d\u4ee4 ssh git scm \u6b22\u8fce\u8bc4\u8bba\u4ee5\u53ca\u53d1\u90ae\u4ef6\u548c\u4f5c\u8005\u4ea4\u6d41\u5fc3\u5f97\u3002 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar,\u60a8\u7684\u6253\u8d4f\u662f\u6211\u521b\u4f5c\u7684\u91cd\u8981\u6e90\u6cc9 \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20200314-ssh-to-lan\/","summary":"<h1 id=\"ssh\u8bbf\u95ee\u5185\u7f51\u5185\u7f51\u7a7f\u900f\u7684\u51e0\u79cd\u60c5\u666f\u8be6\u89e3\">SSH\u8bbf\u95ee\u5185\u7f51\/\u5185\u7f51\u7a7f\u900f\u7684\u51e0\u79cd\u60c5\u666f\u8be6\u89e3<\/h1>\n<p>@[TOC]<\/p>\n<h2 id=\"0x01-\u80cc\u666f\">0x01 \u80cc\u666f<\/h2>\n<p>\u75ab\u60c5\u671f\u95f4\u8fdc\u7a0b\u529e\u516c\uff0c\u81ea\u7136\u5c11\u4e0d\u4e86\u9700\u8981\u8fde\u63a5\u5230\u516c\u53f8\u5185\u7f51\u7684\u670d\u52a1\u5668\u8dd1\u7a0b\u5e8f\u3002SSH\u662f\u4e00\u79cd\u5e38\u7528\u7684\u8fde\u63a5\u5230\u5185\u7f51\u7684\u65b9\u5f0f\uff0c\u51e0\u4e4e\u80fd\u505a\u5230\u6240\u6709\u8fde\u63a5\u5185\u7f51\u7684\u64cd\u4f5c\u3002\u4e0b\u9762\u4f5c\u8005\u5c06\u5bf9\u51e0\u79cd\u5e38\u7528\u6216\u8005\u4e0d\u5e38\u7528\u7684\u8fde\u63a5\u5230\u5185\u7f51\u7684\u4f7f\u7528\u60c5\u51b5\u505a\u4e00\u4e9b\u793a\u4f8b\u3002<\/p>\n<h2 id=\"0x02-\u7f51\u7edc\u62d3\u6251\">0x02 \u7f51\u7edc\u62d3\u6251<\/h2>\n<p>\u4e0b\u9762\u5c06\u5bf9\u7f51\u7edc\u4e2d\u7684\u51e0\u53f0\u673a\u5668\u7684\u7f51\u7edc\u62d3\u6251\u505a\u8bf4\u660e\u3002<\/p>\n<blockquote>\n<p>IP\u5747\u4f5c\u533f\u540d\u5316\u5904\u7406<\/p>\n<\/blockquote>\n<ul>\n<li>\u4e2a\u4eba\u7b14\u8bb0\u672c1\n<ul>\n<li>\u4e3b\u673a\u540d\uff1aPC1<\/li>\n<li>\u4f4d\u7f6e\uff1a \u516c\u7f51<\/li>\n<li>IP\uff1a\u4e0d\u91cd\u8981<\/li>\n<\/ul>\n<\/li>\n<li>\u8df3\u677f\u673a\n<ul>\n<li>\u4e3b\u673a\u540d\uff1aproxy.test.com<\/li>\n<li>ssh:\n<ul>\n<li>\u7aef\u53e3: 5022<\/li>\n<li>\u7528\u6237\u540d: user<\/li>\n<\/ul>\n<\/li>\n<li>IP\/\u57df\u540d\n<ul>\n<li>\u516c\u7f51: proxy.test.com<\/li>\n<li>\u5185\u7f51: 192.168.8.10<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u670d\u52a1\u56681\n<ul>\n<li>\u4e3b\u673a\u540d: srv1<\/li>\n<li>ssh\n<ul>\n<li>\u7aef\u53e3: 818<\/li>\n<li>\u7528\u6237\u540d: user<\/li>\n<\/ul>\n<\/li>\n<li>IP\n<ul>\n<li>\u5185\u7f51\uff1a192.168.8.18<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 id=\"0x03-\u57fa\u7840\u77e5\u8bc6\">0x03 \u57fa\u7840\u77e5\u8bc6<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.ssh.com\/ssh\" title=\"ssh\">ssh<\/a>\n<ul>\n<li><a href=\"https:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-cn-sshforward\/index.html\" title=\"\u5b9e\u6218 SSH \u7aef\u53e3\u8f6c\u53d1\">ssh \u7aef\u53e3\u8f6c\u53d1<\/a><\/li>\n<li><a href=\"https:\/\/www.ssh.com\/ssh\/config\" title=\"SSH Config File\">ssh config\u6587\u4ef6\u914d\u7f6e<\/a><\/li>\n<li><a href=\"https:\/\/blog.csdn.net\/alifrank\/article\/details\/48241699\" title=\"\u4f7f\u7528ssh-keygen\u548cssh-copy-id\u4e09\u6b65\u5b9e\u73b0SSH\u65e0\u5bc6\u7801\u767b\u5f55 \u548cssh\u5e38\u7528\u547d\u4ee4\">ssh \u5bc6\u94a5\u8bbe\u7f6e<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\u4ee3\u7406\u670d\u52a1\u5668<\/li>\n<\/ul>\n<h2 id=\"0x04-\u5de5\u5177\u5217\u8868\">0x04 \u5de5\u5177\u5217\u8868<\/h2>\n<h3 id=\"0x041-\u672c\u5730pc\">0x041 \u672c\u5730PC<\/h3>\n<ul>\n<li>\u5982\u679c\u662fwindows\n<ul>\n<li>\u5b89\u88c5<a href=\"https:\/\/git-scm.com\/downloads\" title=\"git-bash\">git-bash<\/a>\u5e76\u4f7f\u7528\u5b83\u63d0\u4f9b\u7684ssh\u529f\u80fd<\/li>\n<\/ul>\n<\/li>\n<li>\u5982\u679c\u662fMacOS\u6216\u8005\u662fLinux\n<ul>\n<li>\u4f7f\u7528\u672c\u5730\u81ea\u5e26\u7684ssh<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3 id=\"0x042-\u4f01\u4e1a\u670d\u52a1\u5668\">0x042 \u4f01\u4e1a\u670d\u52a1\u5668<\/h3>\n<p>\u9700\u8981\u914d\u7f6e\u597dSSH\u670d\u52a1\u5668<\/p>\n<h2 id=\"0x05-ssh\u7aef\u53e3\u8f6c\u53d1\u7684\u57fa\u672c\u64cd\u4f5c\u4ee5\u53ca\u901a\u8fc7\u4f01\u4e1a\u7f51\u7edc\u8bbf\u95ee\u7f51\u7ad9\">0x05 ssh\u7aef\u53e3\u8f6c\u53d1\u7684\u57fa\u672c\u64cd\u4f5c\u4ee5\u53ca\u901a\u8fc7\u4f01\u4e1a\u7f51\u7edc\u8bbf\u95ee\u7f51\u7ad9<\/h2>\n<h3 id=\"0x051-\u9002\u7528\u60c5\u51b5\">0x051 \u9002\u7528\u60c5\u51b5<\/h3>\n<p>\u672c\u65b9\u6cd5\u53ef\u4ee5\u9002\u7528\u4e8e\u8bbf\u95ee<\/p>\n<ul>\n<li>\u4f01\u4e1a\u5185\u90e8\u642d\u5efa\u7684\u7f51\u7ad9<\/li>\n<li>\u5fc5\u987b\u4f01\u4e1aIP\u6388\u6743\u624d\u80fd\u8bbf\u95ee\u7684\u7f51\u7ad9\uff08\u5982\u8bba\u6587\u68c0\u7d22\u7f51\u7ad9\uff09<\/li>\n<\/ul>\n<h3 id=\"0x052-\u6b65\u9aa4\">0x052 \u6b65\u9aa4<\/h3>\n<h4 id=\"1-\u6267\u884cssh\u52a8\u6001\u8f6c\u53d1\u547d\u4ee4\">1. \u6267\u884cssh\u52a8\u6001\u8f6c\u53d1\u547d\u4ee4<\/h4>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># \u5728PC1\u4e0a\u6267\u884c<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">ssh -D <span class=\"m\">10824<\/span> user@proxy.test.com -p <span class=\"m\">5022<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p>\u4e0a\u9762\u7684\u547d\u4ee4\u662f\u5728PC1\u672c\u5730\u5f00\u653e\u7aef\u53e310824\uff0c\u8be5\u7aef\u53e3\u4f5c\u4e3a\u4e00\u4e2aSock\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u4f7f\u7528\u6b64\u4ee3\u7406\u53ef\u4ee5\u901a\u8fc7\u4f01\u4e1a\u5185\u7f51\u8bbf\u95ee\u7f51\u7edc<\/p>","title":"SSH\u8bbf\u95ee\u5185\u7f51\/\u5185\u7f51\u7a7f\u900f\u7684\u51e0\u79cd\u60c5\u666f\u8be6\u89e3"},{"content":"ES\u904d\u5386\u6240\u6709\u641c\u7d22\u7ed3\u679c(Python\u5b9e\u73b0) ES\u7684\u641c\u7d22\u662f\u6709\u6570\u91cf\u9650\u5236\u7684\uff0c\u56e0\u6b64\u5229\u7528\u5b98\u65b9\u63d0\u4f9b\u662fscroll API\u5b9e\u73b0\u4e86\u4e00\u4e2a\u5bf9\u5168\u91cf\u6570\u636e\u5904\u7406\u7684\u51fd\u6570\u3002\ndef travel_es(es,process_func, **kwargs): &#34;&#34;&#34; \u904d\u5386es\u7684\u641c\u7d22\u7ed3\u679c\uff0c\u5e76\u4f7f\u7528process_func\u5904\u7406\u8fd4\u56de\u7684item process_func: function to process item. kwargs: arguments same as elasticsearch search api. &#34;&#34;&#34; kwargs.setdefault(&#34;scroll&#34;,&#34;2m&#34;) kwargs.setdefault(&#34;size&#34;,1000) res = es.search(**kwargs) sid = res[&#39;_scroll_id&#39;] scroll_size = len(res[&#39;hits&#39;][&#39;hits&#39;]) total_size=scroll_size while scroll_size &gt; 0: &#34;Scrolling...&#34; # Before scroll, process current batch of hits process_func(res[&#39;hits&#39;][&#39;hits&#39;]) data = es.scroll(scroll_id=sid, scroll=&#39;4m&#39;) # Update the scroll ID sid = data[&#39;_scroll_id&#39;] # Get the number of results that returned in the last scroll scroll_size = len(data[&#39;hits&#39;][&#39;hits&#39;]) total_size+=scroll_size print(total_size) return scroll_size \u793a\u4f8b\u7528\u6cd5 \u4e0b\u9762\u662f\u628a\u6240\u6709\u7684\u7ed3\u679c\u5b58\u5230item_list\u4e2d\nitem_list=[] def save_to(item): item_list.append(item) # \u4f7f\u7528save_to \u51fd\u6570\u5904\u7406\u7ed3\u679c count=travel_es( es, save_to, index=&#34;reveye_v2&#34;, body={ &#34;query&#34;: { &#34;match_all&#34;: {} } } ) \u53c2\u8003 https:\/\/www.elastic.co\/guide\/cn\/elasticsearch\/guide\/current\/scroll.html \u6587\u7ae0\u5730\u5740 ES\u904d\u5386\u6240\u6709\u641c\u7d22\u7ed3\u679c(Python\u5b9e\u73b0)\n\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20200313-es-get-all-search-result\/","summary":"<h1 id=\"es\u904d\u5386\u6240\u6709\u641c\u7d22\u7ed3\u679cpython\u5b9e\u73b0\">ES\u904d\u5386\u6240\u6709\u641c\u7d22\u7ed3\u679c(Python\u5b9e\u73b0)<\/h1>\n<p>ES\u7684\u641c\u7d22\u662f\u6709\u6570\u91cf\u9650\u5236\u7684\uff0c\u56e0\u6b64\u5229\u7528\u5b98\u65b9\u63d0\u4f9b\u662fscroll API\u5b9e\u73b0\u4e86\u4e00\u4e2a\u5bf9\u5168\u91cf\u6570\u636e\u5904\u7406\u7684\u51fd\u6570\u3002<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-python\" data-lang=\"python\"><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">def<\/span> <span class=\"nf\">travel_es<\/span><span class=\"p\">(<\/span><span class=\"n\">es<\/span><span class=\"p\">,<\/span><span class=\"n\">process_func<\/span><span class=\"p\">,<\/span> <span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">):<\/span> \n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"s2\">&#34;&#34;&#34;\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"s2\">    \u904d\u5386es\u7684\u641c\u7d22\u7ed3\u679c\uff0c\u5e76\u4f7f\u7528process_func\u5904\u7406\u8fd4\u56de\u7684item\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"s2\">    process_func: function to process item. \n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"s2\">    kwargs: arguments same as elasticsearch search api.\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"s2\">    &#34;&#34;&#34;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">setdefault<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;scroll&#34;<\/span><span class=\"p\">,<\/span><span class=\"s2\">&#34;2m&#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">kwargs<\/span><span class=\"o\">.<\/span><span class=\"n\">setdefault<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;size&#34;<\/span><span class=\"p\">,<\/span><span class=\"mi\">1000<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">res<\/span> <span class=\"o\">=<\/span> <span class=\"n\">es<\/span><span class=\"o\">.<\/span><span class=\"n\">search<\/span><span class=\"p\">(<\/span><span class=\"o\">**<\/span><span class=\"n\">kwargs<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    \n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">sid<\/span> <span class=\"o\">=<\/span> <span class=\"n\">res<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;_scroll_id&#39;<\/span><span class=\"p\">]<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">scroll_size<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">res<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;hits&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;hits&#39;<\/span><span class=\"p\">])<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">total_size<\/span><span class=\"o\">=<\/span><span class=\"n\">scroll_size<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">while<\/span> <span class=\"n\">scroll_size<\/span> <span class=\"o\">&gt;<\/span> <span class=\"mi\">0<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"s2\">&#34;Scrolling...&#34;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"c1\"># Before scroll, process current batch of hits<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">process_func<\/span><span class=\"p\">(<\/span><span class=\"n\">res<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;hits&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;hits&#39;<\/span><span class=\"p\">])<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">data<\/span> <span class=\"o\">=<\/span> <span class=\"n\">es<\/span><span class=\"o\">.<\/span><span class=\"n\">scroll<\/span><span class=\"p\">(<\/span><span class=\"n\">scroll_id<\/span><span class=\"o\">=<\/span><span class=\"n\">sid<\/span><span class=\"p\">,<\/span> <span class=\"n\">scroll<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;4m&#39;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"c1\"># Update the scroll ID<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">sid<\/span> <span class=\"o\">=<\/span> <span class=\"n\">data<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;_scroll_id&#39;<\/span><span class=\"p\">]<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"c1\"># Get the number of results that returned in the last scroll<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">scroll_size<\/span> <span class=\"o\">=<\/span> <span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">data<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;hits&#39;<\/span><span class=\"p\">][<\/span><span class=\"s1\">&#39;hits&#39;<\/span><span class=\"p\">])<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">total_size<\/span><span class=\"o\">+=<\/span><span class=\"n\">scroll_size<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"n\">total_size<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">return<\/span> <span class=\"n\">scroll_size<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    \n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"\u793a\u4f8b\u7528\u6cd5\">\u793a\u4f8b\u7528\u6cd5<\/h2>\n<p>\u4e0b\u9762\u662f\u628a\u6240\u6709\u7684\u7ed3\u679c\u5b58\u5230item_list\u4e2d<\/p>","title":"ES\u904d\u5386\u6240\u6709\u641c\u7d22\u7ed3\u679c(Python\u5b9e\u73b0)"},{"content":"\u80cc\u666f \u5f88\u591a\u65f6\u5019\u6211\u4eec\u9700\u8981\u901a\u8fc7SSH\u8fde\u63a5\u670d\u52a1\u5668\u8fdb\u884c\u4e00\u4e9b\u64cd\u4f5c\uff0c\u8d39\u4e86\u597d\u957f\u65f6\u95f4\u8c03\u597d\u4e86\u7a0b\u5e8f\uff0c\u4e00\u987f\u996d\u7684\u529f\u592bSSH\u8d85\u65f6\u4e86(broken pipe)\uff0c\u91cd\u65b0\u8fde\u4e0a\u53bb\u6b63\u5728\u8fd0\u884c\u7684\u7a0b\u5e8f\u4e5f\u90fd\u6ca1\u4e86\uff0c\u4e00\u5207\u53c8\u5f97\u4ece\u5934\u518d\u6765\u3002\u8fd9\u4e2a\u65f6\u5019\u4f60\u5c31\u975e\u5e38\u9700\u8981\u7528\u5230tmux\u4e86\uff0c\u7528tmux\u5728\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u4e00\u4e2a\u4f1a\u8bdd\uff08Session\uff09\uff0c\u5728\u8be5\u4f1a\u8bdd\u4e2d\u8fdb\u884c\u64cd\u4f5c\uff0c\u4f60\u53ef\u4ee5\u968f\u65f6\u968f\u5730\u65ad\u5f00\u548c\u91cd\u65b0\u8fde\u63a5\u4f1a\u8bdd\uff08Session\uff09\uff0c\u5373\u4fbf\u662fSSH\u4e2d\u65ad\u4e86\u4f60\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u5de5\u4f5c\u72b6\u6001\u4e5f\u53ef\u4ee5\u6301\u4e45\u5316\u5730\u4fdd\u5b58\u3002\n\u5b89\u88c5 ubuntu \u64cd\u4f5c\u7cfb\u7edf\nsudo apt-get install tmux # \u540c\u65f6\u5b89\u88c5Oh My Tmux\u7ec4\u4ef6\u5305 cd git clone https:\/\/github.com\/gpakosz\/.tmux.git ln -s -f .tmux\/.tmux.conf cp .tmux\/.tmux.conf.local . \u5feb\u6377\u952e\u548c\u5e38\u7528\u547d\u4ee4 \u521b\u5efa\u548c\u91cd\u65b0\u8fde\u63a5 tmux new -s &lt;session&gt; tmux a -t &lt;session&gt; \u5168\u5c40\u952e Tmux \u5b98\u65b9\u9ed8\u8ba4\u65f6C-b.\n.tmux \u989d\u5916\u6dfb\u52a0\u4e86C-a \u4e0b\u9762\u7528&lt;prefix&gt;\u4ee3\u6307\u793a\u5168\u5c40\u952e\n&lt;prefix&gt; \u7136\u540e:\u53ef\u4ee5\u8f93\u5165\u6307\u4ee4\u3002\n\u4f1a\u8bdd\u64cd\u4f5c(session) \u5feb\u6377\u952e \u64cd\u4f5c \u6307\u4ee4 &lt;preix&gt; s session \u5217\u8868 &lt;preix&gt; d \u9000\u51fa\u5e76\u5728\u540e\u53f0\u6267\u884c &lt;preix&gt; D \u9009\u62e9\u5e76\u9000\u51fa\u6240\u6709\u5176\u4ed6\u7684session &lt;preix&gt; m \u9f20\u6807\u64cd\u4f5c \u7a97\u53e3\u64cd\u4f5c(window) \u5feb\u6377\u952e \u64cd\u4f5c \u6307\u4ee4 &lt;preix&gt; c \u521b\u5efa\u65b0\u7a97\u53e3 &lt;preix&gt; 0...9 \u5207\u6362 &lt;preix&gt; &amp; \u5173\u95ed\u5f53\u524d\u7a97\u53e3 &lt;preix&gt; , \u91cd\u547d\u540d \u9762\u677f\u64cd\u4f5c(Panes) \u5feb\u6377\u952e \u64cd\u4f5c \u6307\u4ee4 &lt;preix&gt; % \u7eb5\u5411\u5206\u5272 &lt;preix&gt; \u201c \u6c34\u5e73\u5206\u5272 &lt;preix&gt; \u2190\u2191\u2193\u2192 \u5207\u6362 \u53c2\u8003 Oh My Tmux \u53c2\u8003: gpakosz\/.tmux(github) \u66f4\u591a\u5feb\u6377\u65b9\u5f0f\u53c2\u8003\uff1aTmux Cheat Sheet &amp; Quick Reference \u6587\u7ae0\u94fe\u63a5 Tmux\u5feb\u901f\u4f7f\u7528 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20200313-tmux-quick\/","summary":"<h1 id=\"\u80cc\u666f\">\u80cc\u666f<\/h1>\n<p>\u5f88\u591a\u65f6\u5019\u6211\u4eec\u9700\u8981\u901a\u8fc7SSH\u8fde\u63a5\u670d\u52a1\u5668\u8fdb\u884c\u4e00\u4e9b\u64cd\u4f5c\uff0c\u8d39\u4e86\u597d\u957f\u65f6\u95f4\u8c03\u597d\u4e86\u7a0b\u5e8f\uff0c\u4e00\u987f\u996d\u7684\u529f\u592bSSH\u8d85\u65f6\u4e86(broken pipe)\uff0c\u91cd\u65b0\u8fde\u4e0a\u53bb\u6b63\u5728\u8fd0\u884c\u7684\u7a0b\u5e8f\u4e5f\u90fd\u6ca1\u4e86\uff0c\u4e00\u5207\u53c8\u5f97\u4ece\u5934\u518d\u6765\u3002\u8fd9\u4e2a\u65f6\u5019\u4f60\u5c31\u975e\u5e38\u9700\u8981\u7528\u5230tmux\u4e86\uff0c\u7528tmux\u5728\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u4e00\u4e2a\u4f1a\u8bdd\uff08Session\uff09\uff0c\u5728\u8be5\u4f1a\u8bdd\u4e2d\u8fdb\u884c\u64cd\u4f5c\uff0c\u4f60\u53ef\u4ee5\u968f\u65f6\u968f\u5730\u65ad\u5f00\u548c\u91cd\u65b0\u8fde\u63a5\u4f1a\u8bdd\uff08Session\uff09\uff0c\u5373\u4fbf\u662fSSH\u4e2d\u65ad\u4e86\u4f60\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684\u5de5\u4f5c\u72b6\u6001\u4e5f\u53ef\u4ee5\u6301\u4e45\u5316\u5730\u4fdd\u5b58\u3002<\/p>\n<h1 id=\"\u5b89\u88c5\">\u5b89\u88c5<\/h1>\n<blockquote>\n<p>ubuntu \u64cd\u4f5c\u7cfb\u7edf<\/p>\n<\/blockquote>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">sudo apt-get install tmux\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># \u540c\u65f6\u5b89\u88c5Oh My Tmux\u7ec4\u4ef6\u5305<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nb\">cd<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">git clone https:\/\/github.com\/gpakosz\/.tmux.git\n<\/span><\/span><span class=\"line\"><span class=\"cl\">ln -s -f .tmux\/.tmux.conf\n<\/span><\/span><span class=\"line\"><span class=\"cl\">cp .tmux\/.tmux.conf.local .\n<\/span><\/span><\/code><\/pre><\/div><h1 id=\"\u5feb\u6377\u952e\u548c\u5e38\u7528\u547d\u4ee4\">\u5feb\u6377\u952e\u548c\u5e38\u7528\u547d\u4ee4<\/h1>\n<h2 id=\"\u521b\u5efa\u548c\u91cd\u65b0\u8fde\u63a5\">\u521b\u5efa\u548c\u91cd\u65b0\u8fde\u63a5<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">tmux new -s &lt;session&gt;\n<\/span><\/span><span class=\"line\"><span class=\"cl\">tmux a -t &lt;session&gt;\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"\u5168\u5c40\u952e\">\u5168\u5c40\u952e<\/h2>\n<p>Tmux \u5b98\u65b9\u9ed8\u8ba4\u65f6<code>C-b<\/code>.<\/p>\n<p>.tmux \u989d\u5916\u6dfb\u52a0\u4e86<code>C-a<\/code>\n\u4e0b\u9762\u7528<code>&lt;prefix&gt;<\/code>\u4ee3\u6307\u793a\u5168\u5c40\u952e<\/p>\n<p><code>&lt;prefix&gt;<\/code> \u7136\u540e<code>:<\/code>\u53ef\u4ee5\u8f93\u5165\u6307\u4ee4\u3002<\/p>\n<h2 id=\"\u4f1a\u8bdd\u64cd\u4f5csession\">\u4f1a\u8bdd\u64cd\u4f5c(session)<\/h2>\n<table>\n  <thead>\n      <tr>\n          <th>\u5feb\u6377\u952e<\/th>\n          <th>\u64cd\u4f5c<\/th>\n          <th>\u6307\u4ee4<\/th>\n      <\/tr>\n  <\/thead>\n  <tbody>\n      <tr>\n          <td><code>&lt;preix&gt; s<\/code><\/td>\n          <td>session \u5217\u8868<\/td>\n          <td><\/td>\n      <\/tr>\n      <tr>\n          <td><code>&lt;preix&gt; d<\/code><\/td>\n          <td>\u9000\u51fa\u5e76\u5728\u540e\u53f0\u6267\u884c<\/td>\n          <td><\/td>\n      <\/tr>\n      <tr>\n          <td><code>&lt;preix&gt; D<\/code><\/td>\n          <td>\u9009\u62e9\u5e76\u9000\u51fa\u6240\u6709\u5176\u4ed6\u7684session<\/td>\n          <td><\/td>\n      <\/tr>\n      <tr>\n          <td><code>&lt;preix&gt; m<\/code><\/td>\n          <td>\u9f20\u6807\u64cd\u4f5c<\/td>\n          <td><\/td>\n      <\/tr>\n  <\/tbody>\n<\/table>\n<h2 id=\"\u7a97\u53e3\u64cd\u4f5cwindow\">\u7a97\u53e3\u64cd\u4f5c(window)<\/h2>\n<table>\n  <thead>\n      <tr>\n          <th>\u5feb\u6377\u952e<\/th>\n          <th>\u64cd\u4f5c<\/th>\n          <th>\u6307\u4ee4<\/th>\n      <\/tr>\n  <\/thead>\n  <tbody>\n      <tr>\n          <td><code>&lt;preix&gt; c<\/code><\/td>\n          <td>\u521b\u5efa\u65b0\u7a97\u53e3<\/td>\n          <td><\/td>\n      <\/tr>\n      <tr>\n          <td><code>&lt;preix&gt; 0...9<\/code><\/td>\n          <td>\u5207\u6362<\/td>\n          <td><\/td>\n      <\/tr>\n      <tr>\n          <td><code>&lt;preix&gt; &amp;<\/code><\/td>\n          <td>\u5173\u95ed\u5f53\u524d\u7a97\u53e3<\/td>\n          <td><\/td>\n      <\/tr>\n      <tr>\n          <td><code>&lt;preix&gt; ,<\/code><\/td>\n          <td>\u91cd\u547d\u540d<\/td>\n          <td><\/td>\n      <\/tr>\n  <\/tbody>\n<\/table>\n<h2 id=\"\u9762\u677f\u64cd\u4f5cpanes\">\u9762\u677f\u64cd\u4f5c(Panes)<\/h2>\n<table>\n  <thead>\n      <tr>\n          <th>\u5feb\u6377\u952e<\/th>\n          <th>\u64cd\u4f5c<\/th>\n          <th>\u6307\u4ee4<\/th>\n      <\/tr>\n  <\/thead>\n  <tbody>\n      <tr>\n          <td><code>&lt;preix&gt; %<\/code><\/td>\n          <td>\u7eb5\u5411\u5206\u5272<\/td>\n          <td><\/td>\n      <\/tr>\n      <tr>\n          <td><code>&lt;preix&gt; \u201c<\/code><\/td>\n          <td>\u6c34\u5e73\u5206\u5272<\/td>\n          <td><\/td>\n      <\/tr>\n      <tr>\n          <td><code>&lt;preix&gt; \u2190\u2191\u2193\u2192<\/code><\/td>\n          <td>\u5207\u6362<\/td>\n          <td><\/td>\n      <\/tr>\n  <\/tbody>\n<\/table>\n<h1 id=\"\u53c2\u8003\">\u53c2\u8003<\/h1>\n<ol>\n<li>Oh My Tmux \u53c2\u8003: <a href=\"https:\/\/github.com\/gpakosz\/.tmux\">gpakosz\/.tmux(github)<\/a><\/li>\n<li>\u66f4\u591a\u5feb\u6377\u65b9\u5f0f\u53c2\u8003\uff1a<a href=\"https:\/\/tmuxcheatsheet.com\/\">Tmux Cheat Sheet &amp; Quick Reference<\/a><\/li>\n<\/ol>\n<h1 id=\"\u6587\u7ae0\u94fe\u63a5\">\u6587\u7ae0\u94fe\u63a5<\/h1>\n<ul>\n<li><a href=\"https:\/\/blog.csdn.net\/still_night\/article\/details\/104832882\">Tmux\u5feb\u901f\u4f7f\u7528<\/a><\/li>\n<\/ul>\n<hr>\n<ul>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"Tmux\u5feb\u901f\u4f7f\u7528"},{"content":" \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20200313-windows-old-flash\/","summary":"<hr>\n<ul>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"windows7\u5b89\u88c5\u4f4e\u7248\u672cFlash"},{"content":"\u80cc\u666f \u867d\u7136Gitee\u4ed3\u5e93\u84ec\u52c3\u53d1\u5c55\uff0c\u8d8b\u52bf\u5f88\u597d\uff0c\u4f46\u662f\u5ba2\u89c2\u6765\u8bb2\uff0c\u548cGithub\u7684\u6613\u7528\u6027\u8fd8\u662f\u6709\u4e00\u5b9a\u5dee\u8ddd\u7684\u3002\n\u5f53\u521d\u7531\u4e8eGithub\u79c1\u6709\u4ed3\u5e93\u6570\u91cf\u7684\u9650\u5236\uff0c\u6240\u4ee5\u628a\u5f88\u591a\u79c1\u6709\u7684\u5c0f\u9879\u76ee\u7684\u4ed3\u5e93\u90fd\u653e\u5230\u4e86gitee\u3002\n\u6700\u8fd1\u968f\u7740Github\u7684\u514d\u8d39\u4ed3\u5e93\u4e0d\u518d\u9650\u5236\u6570\u91cf\uff0c\u6240\u4ee5\u628a\u79c1\u6709\u4ed3\u5e93\u548c\u516c\u6709\u4ed3\u5e93\u90fd\u632a\u5230\u4e00\u8d77\u653e\u5230github\u632a\u4e0a\u4e86\u65e5\u7a0b\u3002\n\u7531\u4e8e\u5efa\u7684\u4ed3\u5e93\u6709\u4e9b\u591a\uff0c\u6240\u4ee5\u624b\u52a8\u9010\u4e2a\u632a\u6bd4\u8f83\u8d39\u65f6\u95f4\uff0c\u800c\u4e14\u5b66\u4e60\u4e00\u4e0bGitHub\u7684API\u64cd\u4f5c\uff0c\u5bf9\u4ee5\u540e\u7684\u5de5\u4f5c\u53ef\u80fd\u4f1a\u6709\u5e2e\u52a9\uff0c\u6240\u4ee5\u6211\u91c7\u53d6\u4e86\u811a\u672c\u7684\u65b9\u5f0f\u5b8c\u6210\u8fd9\u4e2a\u4e8b\u60c5\u3002\n\u4e0b\u9762\u5206\u4eab\u6211\u505a\u8fd9\u4e2a\u4e8b\u60c5\u7684\u51e0\u4e2a\u6b65\u9aa4\u3002\n\u6b65\u9aa4 \u83b7\u53d6\u9879\u76ee\u5217\u8868 \u514b\u9686 github\u521b\u5efa\u9879\u76eeAPI \u4e0a\u4f20 \u5f52\u6863 \u83b7\u53d6Gitee\u9879\u76ee\u5217\u8868\uff1a \u6ca1\u6709\u627e\u5230gitee\u7684API,\u6240\u4ee5\u91c7\u53d6\u624b\u52a8\u6d4f\u89c8\u5668\u89e3\u6790\u7f51\u9875\u7684\u65b9\u5f0f\u83b7\u5f97\u4ed3\u5e93\u5217\u8868\uff0c\u8fd9\u91cc\u4e3b\u8981\u83b7\u5f97\u4e86\u4ed3\u5e93\u540d\u548c\u4ed3\u5e93\u7684\u63cf\u8ff0\u3002\n\u5728gitee\u7f51\u7ad9\u6267\u884cJS\u811a\u672c l=[] $.each($(&#34;#search-projects-ulist div.list-warpper&#34;),function(i,v){ dl=$(&#34;.description&#34;,v); console.log(dl); des=dl.length&gt;0?dl[0].textContent:&#34;&#34;; j={ &#34;path&#34;:v.attributes[&#34;data-path&#34;].value, &#34;des&#34;:des+&#34; https:\/\/gitee.com\/&#34;+v.attributes[&#39;data-path&#39;].value }; l.push(j); }) \u5176\u4e2d\u9664\u4e86l=[],\u9700\u8981\u624b\u52a8\u7ffb\u9875\uff0c\u6bcf\u6b21\u7ffb\u9875\u90fd\u8981\u6267\u884c\u4e00\u6b21\u3002\n\u5f97\u5230\u7684l\u662f\u6240\u6709\u9879\u76ee\u5217\u8868\u3002\nJSON.stringfy(l); \u8f93\u51fa\u6240\u6709\u3002\n\u7136\u540e\u5bfc\u5165\u5230python\u3002 import json j=json.loads(s) l=[] for i,v in enumerate(j): l.append({ &#34;name&#34;:os.path.split(v[&#34;path&#34;])[1], &#34;path&#34;:v[&#34;path&#34;], &#34;des&#34;:v[&#34;des&#34;], }) \u5904\u7406\u540e\u793a\u4f8b [{&#39;name&#39;: &#39;repo1&#39;, &#39;path&#39;: &#39;username\/repo1&#39;, &#39;des&#39;: &#39; https:\/\/gitee.com\/username\/repo1&#39;}, {&#39;name&#39;: &#39;repo2&#39;, &#39;path&#39;: &#39;username\/repo2&#39;, &#39;des&#39;: &#39; https:\/\/gitee.com\/username\/repo2&#39;}] \u514b\u9686\u9879\u76ee \u8fd9\u91cc\u4f7f\u7528python\u8c03\u7528linux \u4e0b git\u5ba2\u6237\u7aef\u5b8c\u6210\nfor i,v in enumerate(l): os.system(f&#34;git clone git@gitee.com:{v[&#39;path&#39;]}.git {v[&#39;name&#39;]}&#34;) \u521b\u5efaGithub\u9879\u76ee\u5217\u8868 \u8fd9\u91cc\u91c7\u7528\u4e86PyGithub\u5e93\u3002\n$ pip install PyGithub \u9700\u8981\u8bbe\u7f6eGithub\u7684token\uff0c\u7533\u8bf7token\u53c2\u770b https:\/\/github.com\/settings\/tokens\nfrom github import Github g = Github(&#34;0a25fe745xxxxxxxxxxxxxxxxxxxxxxx&#34;) # token user=g.get_user() hub_repos=[] repoddl=[repo for repo in user.get_repos()] reponames=[repo.name for repo in repoddl] # \u5f53\u524d\u5df2\u6709\u7684\u9879\u76ee\u5217\u8868 for i,v in enumerate(l): print(v) if v[&#34;name&#34;] in reponames: # \u5982\u679c\u91cd\u540d\uff0c\u5219\u8df3\u8fc7 print(&#34;Exists&#34;) else: des=re.sub(&#34;[\\n\\t\\b]&#34;,&#34;&#34;,v[&#34;des&#34;]) hub_repos.append(user.create_repo(v[&#34;name&#34;],description=des,private=True)) # \u521b\u5efa\uff0c\u5e76\u8bbe\u7f6e\u6743\u9650\u4e3a\u79c1\u6709 print(&#34;created&#34;) \u4e0a\u4f20 \u6240\u6709repo\u7684\u5b57\u5178 \u5148\u5efa\u7acb\u4e00\u4e2a\u6240\u6709repo\u7684\u5b57\u5178\u3002\nrepod={} for repo in user.get_repos(): repod[repo.name]=repo \u8c03\u53d6git \u547d\u4ee4\u5ba2\u6237\u7aef\u8fdb\u884c\u6dfb\u52a0\u6e90\u548cpush\u64cd\u4f5c\u3002 for i,repo in enumerate(l): cmd=f&#34; pushd {repo[&#39;name&#39;]} &amp;&amp; git remote add gh {repod[repo[&#39;name&#39;]].ssh_url} &amp;&amp; git push gh master &amp;&amp; popd &#34; print(cmd) os.system(f&#34;bash -xc &#39;{cmd}&#39; 1&gt;&gt; log.txt 2&gt;&gt;log.txt&#34;) print(f&#34;{repo} done&#34;) \u5bf9\u4e8e\u4e0a\u4f20\u9519\u8bef\u7684\u8fdb\u884c\u8865\u5168 \u4e0a\u4f20\u4e2d\u4f1a\u51fa\u73b0\u4e00\u4e9b\u9879\u76ee\u672a\u80fd\u6210\u529fpush\u3002 \u7528\u4e0b\u9762\u7684\u65b9\u6cd5\u8865\u6f0f\u3002\nfor i,repo in enumerate(l): cmd=f&#34; pushd {repo[&#39;name&#39;]} &amp;&amp; git push gh master &amp;&amp; popd &#34; print(cmd) os.system(f&#34;bash -xc &#39;{cmd}&#39; 1&gt;&gt; log.txt 2&gt;&gt;log.txt&#34;) print(f&#34;{repo} done&#34;) \u5f52\u6863 \u7531\u4e8e\u8fc1\u79fb\u7684\u9879\u76ee\u5747\u4e3a\u8001\u65e7\u9879\u76ee\uff0c\u56e0\u6b64\u5bf9\u5176\u8fdb\u884c\u5f52\u6863\u64cd\u4f5c\u3002\n\u7531\u4e8ePyGithub\u672a\u627e\u5230\u5bf9\u9879\u76ee\u5f52\u6863\u7684\u529f\u80fd\uff0c\u6240\u4ee5\u4f7f\u7528GitHub\u7684\u5b98\u65b9API\u8fdb\u884c\u64cd\u4f5c\u3002\nimport requests from requests.auth import HTTPBasicAuth def archieve(repo): req=requests.patch(url=f&#34;https:\/\/api.github.com\/repos\/m2kar\/{repo}&#34;, json={&#34;archived&#34;:True}, auth=HTTPBasicAuth(&#34;my_user_name&#34;,&#34;0a25fexxxxxxxxxxxxxxxxxxxxxxxxxxxx&#34;) # \u4f7f\u7528\u4e86HTTP\u57fa\u672c\u8ba4\u8bc1 ) try: if req.json()[&#34;archived&#34;]==True: print(f&#34;{repo} Success&#34;) except: print(f&#34;{repo} Fail&#34;) for v in l: archieve(v[&#34;name&#34;]) \u6ce8\u610f\u4f7f\u7528\u4e86HTTPBasicAuth\uff0c\u9700\u8981\u628a\u4ee3\u7801\u4e2d\u7684\u7528\u6237\u540d\u548ctoken\u8fdb\u884c\u66ff\u6362\u3002\n\u53c2\u8003 pyGithub: https:\/\/pygithub.readthedocs.io\/en\/latest\/ Github API: https:\/\/developer.github.com\/v3\/repos\/ \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20191206-transfer-gitee-to-github\/","summary":"<h1 id=\"\u80cc\u666f\">\u80cc\u666f<\/h1>\n<p>\u867d\u7136Gitee\u4ed3\u5e93\u84ec\u52c3\u53d1\u5c55\uff0c\u8d8b\u52bf\u5f88\u597d\uff0c\u4f46\u662f\u5ba2\u89c2\u6765\u8bb2\uff0c\u548cGithub\u7684\u6613\u7528\u6027\u8fd8\u662f\u6709\u4e00\u5b9a\u5dee\u8ddd\u7684\u3002<\/p>\n<p>\u5f53\u521d\u7531\u4e8eGithub\u79c1\u6709\u4ed3\u5e93\u6570\u91cf\u7684\u9650\u5236\uff0c\u6240\u4ee5\u628a\u5f88\u591a\u79c1\u6709\u7684\u5c0f\u9879\u76ee\u7684\u4ed3\u5e93\u90fd\u653e\u5230\u4e86gitee\u3002<\/p>\n<p>\u6700\u8fd1\u968f\u7740Github\u7684\u514d\u8d39\u4ed3\u5e93\u4e0d\u518d\u9650\u5236\u6570\u91cf\uff0c\u6240\u4ee5\u628a\u79c1\u6709\u4ed3\u5e93\u548c\u516c\u6709\u4ed3\u5e93\u90fd\u632a\u5230\u4e00\u8d77\u653e\u5230github\u632a\u4e0a\u4e86\u65e5\u7a0b\u3002<\/p>\n<p>\u7531\u4e8e\u5efa\u7684\u4ed3\u5e93\u6709\u4e9b\u591a\uff0c\u6240\u4ee5\u624b\u52a8\u9010\u4e2a\u632a\u6bd4\u8f83\u8d39\u65f6\u95f4\uff0c\u800c\u4e14\u5b66\u4e60\u4e00\u4e0bGitHub\u7684API\u64cd\u4f5c\uff0c\u5bf9\u4ee5\u540e\u7684\u5de5\u4f5c\u53ef\u80fd\u4f1a\u6709\u5e2e\u52a9\uff0c\u6240\u4ee5\u6211\u91c7\u53d6\u4e86\u811a\u672c\u7684\u65b9\u5f0f\u5b8c\u6210\u8fd9\u4e2a\u4e8b\u60c5\u3002<\/p>\n<p>\u4e0b\u9762\u5206\u4eab\u6211\u505a\u8fd9\u4e2a\u4e8b\u60c5\u7684\u51e0\u4e2a\u6b65\u9aa4\u3002<\/p>\n<h1 id=\"\u6b65\u9aa4\">\u6b65\u9aa4<\/h1>\n<ol>\n<li>\u83b7\u53d6\u9879\u76ee\u5217\u8868<\/li>\n<li>\u514b\u9686<\/li>\n<li>github\u521b\u5efa\u9879\u76eeAPI<\/li>\n<li>\u4e0a\u4f20<\/li>\n<li>\u5f52\u6863<\/li>\n<\/ol>\n<h1 id=\"\u83b7\u53d6gitee\u9879\u76ee\u5217\u8868\">\u83b7\u53d6Gitee\u9879\u76ee\u5217\u8868\uff1a<\/h1>\n<p>\u6ca1\u6709\u627e\u5230gitee\u7684API,\u6240\u4ee5\u91c7\u53d6\u624b\u52a8\u6d4f\u89c8\u5668\u89e3\u6790\u7f51\u9875\u7684\u65b9\u5f0f\u83b7\u5f97\u4ed3\u5e93\u5217\u8868\uff0c\u8fd9\u91cc\u4e3b\u8981\u83b7\u5f97\u4e86\u4ed3\u5e93\u540d\u548c\u4ed3\u5e93\u7684\u63cf\u8ff0\u3002<\/p>\n<h3 id=\"\u5728gitee\u7f51\u7ad9\u6267\u884cjs\u811a\u672c\">\u5728gitee\u7f51\u7ad9\u6267\u884cJS\u811a\u672c<\/h3>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-js\" data-lang=\"js\"><span class=\"line\"><span class=\"cl\"><span class=\"nx\">l<\/span><span class=\"o\">=<\/span><span class=\"p\">[]<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nx\">$<\/span><span class=\"p\">.<\/span><span class=\"nx\">each<\/span><span class=\"p\">(<\/span><span class=\"nx\">$<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;#search-projects-ulist div.list-warpper&#34;<\/span><span class=\"p\">),<\/span><span class=\"kd\">function<\/span><span class=\"p\">(<\/span><span class=\"nx\">i<\/span><span class=\"p\">,<\/span><span class=\"nx\">v<\/span><span class=\"p\">){<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">dl<\/span><span class=\"o\">=<\/span><span class=\"nx\">$<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;.description&#34;<\/span><span class=\"p\">,<\/span><span class=\"nx\">v<\/span><span class=\"p\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">console<\/span><span class=\"p\">.<\/span><span class=\"nx\">log<\/span><span class=\"p\">(<\/span><span class=\"nx\">dl<\/span><span class=\"p\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">des<\/span><span class=\"o\">=<\/span><span class=\"nx\">dl<\/span><span class=\"p\">.<\/span><span class=\"nx\">length<\/span><span class=\"o\">&gt;<\/span><span class=\"mi\">0<\/span><span class=\"o\">?<\/span><span class=\"nx\">dl<\/span><span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">].<\/span><span class=\"nx\">textContent<\/span><span class=\"o\">:<\/span><span class=\"s2\">&#34;&#34;<\/span><span class=\"p\">;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">j<\/span><span class=\"o\">=<\/span><span class=\"p\">{<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"s2\">&#34;path&#34;<\/span><span class=\"o\">:<\/span><span class=\"nx\">v<\/span><span class=\"p\">.<\/span><span class=\"nx\">attributes<\/span><span class=\"p\">[<\/span><span class=\"s2\">&#34;data-path&#34;<\/span><span class=\"p\">].<\/span><span class=\"nx\">value<\/span><span class=\"p\">,<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"s2\">&#34;des&#34;<\/span><span class=\"o\">:<\/span><span class=\"nx\">des<\/span><span class=\"o\">+<\/span><span class=\"s2\">&#34; https:\/\/gitee.com\/&#34;<\/span><span class=\"o\">+<\/span><span class=\"nx\">v<\/span><span class=\"p\">.<\/span><span class=\"nx\">attributes<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;data-path&#39;<\/span><span class=\"p\">].<\/span><span class=\"nx\">value<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"p\">};<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">l<\/span><span class=\"p\">.<\/span><span class=\"nx\">push<\/span><span class=\"p\">(<\/span><span class=\"nx\">j<\/span><span class=\"p\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"p\">})<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p>\u5176\u4e2d\u9664\u4e86<code>l=[]<\/code>,\u9700\u8981\u624b\u52a8\u7ffb\u9875\uff0c\u6bcf\u6b21\u7ffb\u9875\u90fd\u8981\u6267\u884c\u4e00\u6b21\u3002<\/p>\n<p>\u5f97\u5230\u7684<code>l<\/code>\u662f\u6240\u6709\u9879\u76ee\u5217\u8868\u3002<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-js\" data-lang=\"js\"><span class=\"line\"><span class=\"cl\"><span class=\"nx\">JSON<\/span><span class=\"p\">.<\/span><span class=\"nx\">stringfy<\/span><span class=\"p\">(<\/span><span class=\"nx\">l<\/span><span class=\"p\">);<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p>\u8f93\u51fa\u6240\u6709\u3002<\/p>\n<h2 id=\"\u7136\u540e\u5bfc\u5165\u5230python\">\u7136\u540e\u5bfc\u5165\u5230python\u3002<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-python\" data-lang=\"python\"><span class=\"line\"><span class=\"cl\"><span class=\"kn\">import<\/span> <span class=\"nn\">json<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">j<\/span><span class=\"o\">=<\/span><span class=\"n\">json<\/span><span class=\"o\">.<\/span><span class=\"n\">loads<\/span><span class=\"p\">(<\/span><span class=\"n\">s<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">l<\/span><span class=\"o\">=<\/span><span class=\"p\">[]<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">for<\/span> <span class=\"n\">i<\/span><span class=\"p\">,<\/span><span class=\"n\">v<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">enumerate<\/span><span class=\"p\">(<\/span><span class=\"n\">j<\/span><span class=\"p\">):<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">l<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">({<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"s2\">&#34;name&#34;<\/span><span class=\"p\">:<\/span><span class=\"n\">os<\/span><span class=\"o\">.<\/span><span class=\"n\">path<\/span><span class=\"o\">.<\/span><span class=\"n\">split<\/span><span class=\"p\">(<\/span><span class=\"n\">v<\/span><span class=\"p\">[<\/span><span class=\"s2\">&#34;path&#34;<\/span><span class=\"p\">])[<\/span><span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"s2\">&#34;path&#34;<\/span><span class=\"p\">:<\/span><span class=\"n\">v<\/span><span class=\"p\">[<\/span><span class=\"s2\">&#34;path&#34;<\/span><span class=\"p\">],<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"s2\">&#34;des&#34;<\/span><span class=\"p\">:<\/span><span class=\"n\">v<\/span><span class=\"p\">[<\/span><span class=\"s2\">&#34;des&#34;<\/span><span class=\"p\">],<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"p\">})<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    \n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"\u5904\u7406\u540e\u793a\u4f8b\">\u5904\u7406\u540e\u793a\u4f8b<\/h2>\n<pre tabindex=\"0\"><code>[{&#39;name&#39;: &#39;repo1&#39;,\n  &#39;path&#39;: &#39;username\/repo1&#39;,\n  &#39;des&#39;: &#39; https:\/\/gitee.com\/username\/repo1&#39;},\n  {&#39;name&#39;: &#39;repo2&#39;,\n  &#39;path&#39;: &#39;username\/repo2&#39;,\n  &#39;des&#39;: &#39; https:\/\/gitee.com\/username\/repo2&#39;}]\n<\/code><\/pre><h1 id=\"\u514b\u9686\u9879\u76ee\">\u514b\u9686\u9879\u76ee<\/h1>\n<p>\u8fd9\u91cc\u4f7f\u7528python\u8c03\u7528linux \u4e0b git\u5ba2\u6237\u7aef\u5b8c\u6210<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-python\" data-lang=\"python\"><span class=\"line\"><span class=\"cl\"><span class=\"k\">for<\/span> <span class=\"n\">i<\/span><span class=\"p\">,<\/span><span class=\"n\">v<\/span> <span class=\"ow\">in<\/span> <span class=\"nb\">enumerate<\/span><span class=\"p\">(<\/span><span class=\"n\">l<\/span><span class=\"p\">):<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">os<\/span><span class=\"o\">.<\/span><span class=\"n\">system<\/span><span class=\"p\">(<\/span><span class=\"sa\">f<\/span><span class=\"s2\">&#34;git clone git@gitee.com:<\/span><span class=\"si\">{<\/span><span class=\"n\">v<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;path&#39;<\/span><span class=\"p\">]<\/span><span class=\"si\">}<\/span><span class=\"s2\">.git <\/span><span class=\"si\">{<\/span><span class=\"n\">v<\/span><span class=\"p\">[<\/span><span class=\"s1\">&#39;name&#39;<\/span><span class=\"p\">]<\/span><span class=\"si\">}<\/span><span class=\"s2\">&#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><\/code><\/pre><\/div><h1 id=\"\u521b\u5efagithub\u9879\u76ee\u5217\u8868\">\u521b\u5efaGithub\u9879\u76ee\u5217\u8868<\/h1>\n<p>\u8fd9\u91cc\u91c7\u7528\u4e86PyGithub\u5e93\u3002<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">$ pip install PyGithub\n<\/span><\/span><\/code><\/pre><\/div><p>\u9700\u8981\u8bbe\u7f6eGithub\u7684token\uff0c\u7533\u8bf7token\u53c2\u770b <a href=\"https:\/\/github.com\/settings\/tokens\">https:\/\/github.com\/settings\/tokens<\/a><\/p>","title":"\u6279\u91cf\u8fc1\u79fbGitee\u4ed3\u5e93\u5230Github"},{"content":"\u80cc\u666f jupyter notebook\u662f\u4ee5ipython\u4e3a\u5185\u6838\u7684\uff0c\u5728\u7f16\u5199\u7a0b\u5e8f\u7684\u65f6\u5019\uff0c\u7ecf\u5e38\u9047\u5230\u6709\u4e9b\u9ad8IO\u7684\u51fd\u6570\u5728\u540e\u53f0\u8fd0\u884c\u534a\u5929\uff0c\u4f46\u662f\u53c8\u9700\u8981\u5728\u5b83\u8fd0\u884c\u7684\u65f6\u5019\u6267\u884c\u522b\u7684\u4efb\u52a1\uff0c\u56e0\u6b64\u8fd9\u5c31\u7528\u5230\u4e86\u591a\u7ebf\u7a0b\u3002\n\u5176\u5b9eipython \u5df2\u7ecf\u5c01\u88c5\u597d\u4e86\u591a\u7ebf\u7a0b\u5de5\u5177\uff0c\u53ea\u9700\u8981\u8c03\u7528\u5373\u53ef\u6267\u884c\n\u7b80\u5355\u4f7f\u7528 from IPython.lib import backgroundjobs as bg from time import sleep jobs = bg.BackgroundJobManager() def func1(): sleep(1000000) return 1 # \u521b\u5efa\u4efb\u52a1 jobs.new(func1) # \u4efb\u52a1\u72b6\u6001 jobs.status() # Running jobs: # 0 : &lt;function func1 at 0x7fae1b670c80&gt; # \u6267\u884c\u7ed3\u679c result=jobs.result(0) \u5b98\u65b9\u4ee3\u7801 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20191127-user-ipython-create-multithread-job\/","summary":"<h1 id=\"\u80cc\u666f\">\u80cc\u666f<\/h1>\n<p>jupyter notebook\u662f\u4ee5ipython\u4e3a\u5185\u6838\u7684\uff0c\u5728\u7f16\u5199\u7a0b\u5e8f\u7684\u65f6\u5019\uff0c\u7ecf\u5e38\u9047\u5230\u6709\u4e9b\u9ad8IO\u7684\u51fd\u6570\u5728\u540e\u53f0\u8fd0\u884c\u534a\u5929\uff0c\u4f46\u662f\u53c8\u9700\u8981\u5728\u5b83\u8fd0\u884c\u7684\u65f6\u5019\u6267\u884c\u522b\u7684\u4efb\u52a1\uff0c\u56e0\u6b64\u8fd9\u5c31\u7528\u5230\u4e86\u591a\u7ebf\u7a0b\u3002<\/p>\n<p>\u5176\u5b9eipython \u5df2\u7ecf\u5c01\u88c5\u597d\u4e86\u591a\u7ebf\u7a0b\u5de5\u5177\uff0c\u53ea\u9700\u8981\u8c03\u7528\u5373\u53ef\u6267\u884c<\/p>\n<h1 id=\"\u7b80\u5355\u4f7f\u7528\">\u7b80\u5355\u4f7f\u7528<\/h1>\n<pre tabindex=\"0\"><code>\nfrom IPython.lib import backgroundjobs as bg\nfrom time import sleep\n\njobs = bg.BackgroundJobManager()\n\ndef func1():\n  sleep(1000000)\n  return 1\n\n# \u521b\u5efa\u4efb\u52a1\njobs.new(func1)\n\n# \u4efb\u52a1\u72b6\u6001\njobs.status()\n# Running jobs:\n# 0 : &lt;function func1 at 0x7fae1b670c80&gt;\n\n# \u6267\u884c\u7ed3\u679c\nresult=jobs.result(0)\n<\/code><\/pre><h1 id=\"\u5b98\u65b9\u4ee3\u7801\">\u5b98\u65b9\u4ee3\u7801<\/h1>\n<script src=\"https:\/\/gist.github.com\/m2kar\/cd171c13c2d1094316d3cb3cb9a56899.js\"><\/script>\n<hr>\n<ul>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"[\u7f16\u7a0b]ipython\u540e\u53f0\u4efb\u52a1\u591a\u7ebf\u7a0b\u6267\u884c"},{"content":"\u80cc\u666f \u5728C\u8bed\u8a00\u7f16\u5199\u4e2d\uff0c\u7ecf\u5e38\u60f3\u56e0\u4e3a\u8c03\u8bd5\u7684\u539f\u56e0\uff0c\u63d2\u5165\u4e00\u4e9b\u4e34\u65f6\u8f93\u51fa\u7684\u53d8\u91cf\uff0c\u6216\u8005\u6267\u884c\u4e00\u4e9b\u4e0d\u5fc5\u8981\u7684\u6307\u4ee4\u3002\n\u5199\u5b8c\u4e4b\u540e\u9891\u7e41\u6ce8\u91ca\u548c\u53cd\u6ce8\u91ca\u5f88\u8017\u65f6\u95f4\uff0c\u800c\u4e14\u53ef\u80fd\u4f1a\u9020\u6210\u4e0d\u5fc5\u8981\u7684\u9519\u8bef\u3002\n\u56e0\u6b64\u4f5c\u8005\u91c7\u7528\u4e86\u5b8f\u547d\u4ee4\u7684\u65b9\u5f0f\uff0c\u63d2\u5165\u4e00\u4e9b\u8c03\u8bd5\u8f93\u51fa\u3002\n\u4ee3\u7801 \/\/ File: debug.c \/\/ some debug Macro \/\/ #define DEBUG #ifndef DEBUG_PRINT #ifdef DEBUG #define DEBUG_PRINT(fmt, args...) fprintf(stderr, fmt, ## args) #else #define DEBUG_PRINT(fmt, args...) \/* Don&#39;t do anything in release builds *\/ #endif #endif \/\/DEBUG_PRINT #ifndef DEBUG_RUN #ifdef DEBUG #define DEBUG_RUN(args) {args ; } #else #define DEBUG_RUN(args...) #endif #endif \/\/DEBUG_RUN \u4f7f\u7528\u65b9\u5f0f \u5c06\u4e0a\u8ff0\u4ee3\u7801\u52a0\u5165\u5230\u5934\u6587\u4ef6\u4e2d\u3002\nGcc\u7f16\u8bd1\u65f6\u52a0\u5165-DDEBUG\u5b9a\u4e49DEBUG\u5b8f\ngcc -DDEBUG -o .\/a.out \u5bf9\u4e8eDEBUG_PRINT,\u5728\u4ee3\u7801\u4e2d\u50cf\u6b63\u5e38printf\u4e00\u6837\u4f7f\u7528\u3002\n\u5bf9\u4e8eDEBUG_RUN,\u5728\u62ec\u53f7\u4e2d\u7684\u8bed\u53e5\u53ea\u6709\u5728DEBUG\u6a21\u5f0f\u4e0b\u624d\u4f1a\u6267\u884c\u3002\n\/\/File: main.c #include &lt;stdio.h&gt; #include &#34;debug.c&#34; int a=10; DEBUG_PRINT(&#34;%d\\n&#34;,a); char c[]=&#34;123123l123&#34;; DEBUG_RUN( printf(&#34;%s&#34;,c); ) Gis URL: https:\/\/gist.github.com\/m2kar\/6c9acef7a7cbf6540f40f74f5756be35\n\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20191119-c-debug-macro\/","summary":"<h1 id=\"\u80cc\u666f\">\u80cc\u666f<\/h1>\n<p>\u5728C\u8bed\u8a00\u7f16\u5199\u4e2d\uff0c\u7ecf\u5e38\u60f3\u56e0\u4e3a\u8c03\u8bd5\u7684\u539f\u56e0\uff0c\u63d2\u5165\u4e00\u4e9b\u4e34\u65f6\u8f93\u51fa\u7684\u53d8\u91cf\uff0c\u6216\u8005\u6267\u884c\u4e00\u4e9b\u4e0d\u5fc5\u8981\u7684\u6307\u4ee4\u3002<\/p>\n<p>\u5199\u5b8c\u4e4b\u540e\u9891\u7e41\u6ce8\u91ca\u548c\u53cd\u6ce8\u91ca\u5f88\u8017\u65f6\u95f4\uff0c\u800c\u4e14\u53ef\u80fd\u4f1a\u9020\u6210\u4e0d\u5fc5\u8981\u7684\u9519\u8bef\u3002<\/p>\n<p>\u56e0\u6b64\u4f5c\u8005\u91c7\u7528\u4e86\u5b8f\u547d\u4ee4\u7684\u65b9\u5f0f\uff0c\u63d2\u5165\u4e00\u4e9b\u8c03\u8bd5\u8f93\u51fa\u3002<\/p>\n<h1 id=\"\u4ee3\u7801\">\u4ee3\u7801<\/h1>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-c\" data-lang=\"c\"><span class=\"line\"><span class=\"cl\"><span class=\"c1\">\/\/ File: debug.c\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c1\">\/\/ some debug Macro\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"c1\">\/\/ #define DEBUG\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#ifndef DEBUG_PRINT\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#ifdef DEBUG\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#define DEBUG_PRINT(fmt, args...)    fprintf(stderr, fmt, ## args)\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#else\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#define DEBUG_PRINT(fmt, args...)    <\/span><span class=\"cm\">\/* Don&#39;t do anything in release builds *\/<\/span><span class=\"cp\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#endif\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#endif <\/span><span class=\"c1\">\/\/DEBUG_PRINT\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#ifndef DEBUG_RUN\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#ifdef DEBUG\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#define DEBUG_RUN(args)    {args ; }\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#else\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#define DEBUG_RUN(args...) \n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#endif\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#endif <\/span><span class=\"c1\">\/\/DEBUG_RUN\n<\/span><\/span><\/span><\/code><\/pre><\/div><h1 id=\"\u4f7f\u7528\u65b9\u5f0f\">\u4f7f\u7528\u65b9\u5f0f<\/h1>\n<p>\u5c06\u4e0a\u8ff0\u4ee3\u7801\u52a0\u5165\u5230\u5934\u6587\u4ef6\u4e2d\u3002<\/p>\n<p>Gcc\u7f16\u8bd1\u65f6\u52a0\u5165-DDEBUG\u5b9a\u4e49DEBUG\u5b8f<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-shell\" data-lang=\"shell\"><span class=\"line\"><span class=\"cl\">gcc -DDEBUG -o .\/a.out \n<\/span><\/span><\/code><\/pre><\/div><p>\u5bf9\u4e8eDEBUG_PRINT,\u5728\u4ee3\u7801\u4e2d\u50cf\u6b63\u5e38printf\u4e00\u6837\u4f7f\u7528\u3002<\/p>\n<p>\u5bf9\u4e8eDEBUG_RUN,\u5728\u62ec\u53f7\u4e2d\u7684\u8bed\u53e5\u53ea\u6709\u5728DEBUG\u6a21\u5f0f\u4e0b\u624d\u4f1a\u6267\u884c\u3002<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-c\" data-lang=\"c\"><span class=\"line\"><span class=\"cl\"><span class=\"c1\">\/\/File: main.c\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#include<\/span> <span class=\"cpf\">&lt;stdio.h&gt;<\/span><span class=\"cp\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"cp\">#include<\/span> <span class=\"cpf\">&#34;debug.c&#34;<\/span><span class=\"cp\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"kt\">int<\/span> <span class=\"n\">a<\/span><span class=\"o\">=<\/span><span class=\"mi\">10<\/span><span class=\"p\">;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nf\">DEBUG_PRINT<\/span><span class=\"p\">(<\/span><span class=\"s\">&#34;%d<\/span><span class=\"se\">\\n<\/span><span class=\"s\">&#34;<\/span><span class=\"p\">,<\/span><span class=\"n\">a<\/span><span class=\"p\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"kt\">char<\/span> <span class=\"n\">c<\/span><span class=\"p\">[]<\/span><span class=\"o\">=<\/span><span class=\"s\">&#34;123123l123&#34;<\/span><span class=\"p\">;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nf\">DEBUG_RUN<\/span><span class=\"p\">(<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\t<span class=\"nf\">printf<\/span><span class=\"p\">(<\/span><span class=\"s\">&#34;%s&#34;<\/span><span class=\"p\">,<\/span><span class=\"n\">c<\/span><span class=\"p\">);<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"p\">)<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p>Gis URL: <a href=\"https:\/\/gist.github.com\/m2kar\/6c9acef7a7cbf6540f40f74f5756be35\">https:\/\/gist.github.com\/m2kar\/6c9acef7a7cbf6540f40f74f5756be35<\/a><\/p>","title":"C\u8bed\u8a00\u4e2d\u5e38\u7528\u7684\u8c03\u8bd5\u5b8f"},{"content":"\u8bba\u6587\u4e3b\u9898 \u540c\u4e00\u7528\u6237\u5728\u4e0d\u540c\u7f51\u7ad9\u7684\u5bc6\u7801\u76f8\u4f3c\u5ea6\u6a21\u578b\u3002\n\u6458\u8981 \u82f1\u6587 Attackers increasingly use passwords leaked from one website to compromise associated accounts on other websites. Such targeted attacks work because users reuse, or pick similar, passwords for different websites. We recast one of the core technical challenges underlying targeted attacks as the task of modeling similarity of human-chosen passwords. We show how to learn good password similarity models using a compilation of 1.4 billion leaked email, password pairs. Using our trained models of password similarity, we exhibit the most damaging targeted attack to date. Simulations indicate that our attack compromises more than 16% of user accounts in less than a thousand guesses, should one of their other passwords be known to the attacker and despite the use of state-of-the art countermeasures. We show via a case study involving a large university authentication service that the attacks are also effective in practice. We go on to propose the first-ever defense against such targeted attacks, by way of personalized password strength meters (PPSMs). These are password strength meters that can warn users when they are picking passwords that are vulnerable to attacks, including targeted ones that take advantage of the user\u2019s previously compromised passwords. We design and build a PPSM that can be compressed to less than 3 MB, making it easy to deploy in order to accurately estimate the strength of a password against all known guessing attacks.\n\u4e2d\u6587 \u653b\u51fb\u8005\u8d8a\u6765\u8d8a\u591a\u5730\u4f7f\u7528\u4ece\u4e00\u4e2a\u7f51\u7ad9\u6cc4\u6f0f\u7684\u5bc6\u7801\u6765\u7834\u574f\u5176\u4ed6\u7f51\u7ad9\u4e0a\u7684\u5173\u8054\u5e10\u6237\u3002\u4e4b\u6240\u4ee5\u80fd\u591f\u8fdb\u884c\u8fd9\u79cd\u6709\u9488\u5bf9\u6027\u7684\u653b\u51fb\uff0c\u662f\u56e0\u4e3a\u7528\u6237\u5728\u4e0d\u540c\u7684\u7f51\u7ad9\u4e0a\u91cd\u590d\u4f7f\u7528\u6216\u9009\u62e9\u4e86\u76f8\u4f3c\u7684\u5bc6\u7801\u3002\u6211\u4eec\u91cd\u5851\u4e86\u9488\u5bf9\u76ee\u6807\u653b\u51fb\u7684\u6838\u5fc3\u6280\u672f\u6311\u6218\u4e4b\u4e00\uff0c\u5373\u5bf9\u4eba\u4e3a\u9009\u62e9\u7684\u5bc6\u7801\u7684\u76f8\u4f3c\u6027\u8fdb\u884c\u5efa\u6a21\u7684\u4efb\u52a1\u3002\u6211\u4eec\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u752814\u4ebf\u5c01\u6cc4\u6f0f\u7684\u7535\u5b50\u90ae\u4ef6\u548c\u5bc6\u7801\u5bf9\u6765\u5b66\u4e60\u826f\u597d\u7684\u5bc6\u7801\u76f8\u4f3c\u6027\u6a21\u578b\u3002\u4f7f\u7528\u6211\u4eec\u8bad\u7ec3\u6709\u7d20\u7684\u5bc6\u7801\u76f8\u4f3c\u6027\u6a21\u578b\uff0c\u6211\u4eec\u5c55\u793a\u4e86\u8fc4\u4eca\u4e3a\u6b62\u6700\u5177\u7834\u574f\u6027\u7684\u9488\u5bf9\u6027\u653b\u51fb\u3002\u6a21\u62df\u8868\u660e\uff0c\u5373\u4f7f\u4f7f\u7528\u4e86\u6700\u65b0\u7684\u5bf9\u7b56\uff0c\u53ea\u8981\u653b\u51fb\u8005\u77e5\u9053\u4ed6\u4eec\u7684\u5176\u4ed6\u5bc6\u7801\u4e4b\u4e00\uff0c\u6211\u4eec\u7684\u653b\u51fb\u5c31\u4f1a\u5728\u4e0d\u5230\u4e00\u5343\u4e2a\u731c\u6d4b\u4e2d\u7834\u574f\u8d85\u8fc716\uff05\u7684\u7528\u6237\u5e10\u6237\u3002\u6211\u4eec\u901a\u8fc7\u6d89\u53ca\u5927\u578b\u5927\u5b66\u8ba4\u8bc1\u670d\u52a1\u7684\u6848\u4f8b\u7814\u7a76\u8868\u660e\uff0c\u8fd9\u79cd\u653b\u51fb\u5728\u5b9e\u8df5\u4e2d\u4e5f\u662f\u6709\u6548\u7684\u3002\u6211\u4eec\u5c06\u7ee7\u7eed\u901a\u8fc7\u4e2a\u6027\u5316\u5bc6\u7801\u5f3a\u5ea6\u8ba1\uff08PPSM\uff09\u63d0\u51fa\u9488\u5bf9\u8fd9\u79cd\u5b9a\u5411\u653b\u51fb\u7684\u9996\u6b21\u9632\u5fa1\u3002\u8fd9\u4e9b\u662f\u5bc6\u7801\u5f3a\u5ea6\u8ba1\uff0c\u53ef\u4ee5\u5728\u7528\u6237\u9009\u62e9\u5bb9\u6613\u53d7\u5230\u653b\u51fb\u7684\u5bc6\u7801\u65f6\u5411\u7528\u6237\u53d1\u51fa\u8b66\u544a\uff0c\u5305\u62ec\u5229\u7528\u7528\u6237\u5148\u524d\u88ab\u76d7\u7528\u7684\u5bc6\u7801\u7684\u6709\u9488\u5bf9\u6027\u7684\u5bc6\u7801\u3002\u6211\u4eec\u8bbe\u8ba1\u5e76\u6784\u5efa\u4e86\u4e00\u4e2aPPSM\uff0c\u53ef\u4ee5\u5c06\u5176\u538b\u7f29\u5230\u5c0f\u4e8e3 MB\uff0c\u4f7f\u5176\u6613\u4e8e\u90e8\u7f72\uff0c\u4ee5\u4fbf\u9488\u5bf9\u6240\u6709\u5df2\u77e5\u7684\u731c\u6d4b\u653b\u51fb\u51c6\u786e\u4f30\u8ba1\u5bc6\u7801\u7684\u5f3a\u5ea6\u3002\n\u5173\u952e\u5b57 \u660e\u6587\u5bc6\u7801\uff1b\u5bc6\u7801\u5f3a\u5ea6\uff1b\u6df1\u5ea6\u5b66\u4e60\n\u89e3\u51b3\u95ee\u9898 \u7531\u4e8e\u7528\u6237\u5728\u4e0d\u540c\u7f51\u7ad9\u4e4b\u95f4\u7684\u5bc6\u7801\u590d\u7528\u6216\u8005\u5bc6\u7801\u76f8\u4f3c\u5ea6\u9ad8\u7684\u95ee\u9898\uff0c\u653b\u51fb\u8005\u8fdb\u884c\u201c\u649e\u5e93\u201d\u653b\u51fb\u6709\u4e86\u53ef\u4e58\u4e4b\u673a\u3002\u653b\u51fb\u8005\u53ef\u4ee5\u4f7f\u7528\u540c\u4e00\u4e2a\u7528\u6237\u6cc4\u9732\u7684\u7528\u6237\u540d\u548c\u5bf9\u5e94\u7684\u5bc6\u7801\u8fdb\u884c\u649e\u5e93\u653b\u51fb\u3002\u4f5c\u4e3a\u5e94\u5bf9\uff0cNIST\u63a8\u8350\u4f01\u4e1a\u5bf9\u6cc4\u9732\u5bc6\u7801\u6570\u636e\u5e93\u8fdb\u884c\u76d1\u63a7\uff0c\u5982\u679c\u53d1\u73b0\u7528\u6237\u5728\u88ab\u6cc4\u9732\u7684\u7684\u5bc6\u7801\u5217\u8868\u4e2d\uff0c\u5219\u5f3a\u5236\u5176\u66f4\u6539\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002\n\u4f46\u662f\u8f83\u591a\u7528\u6237\u4e5f\u4f1a\u5728\u4e0d\u540c\u7f51\u7ad9\u4e4b\u95f4\u4f7f\u7528\u76f8\u4f3c\u7684\u5bc6\u7801\uff0c\u5feb\u901f\u5224\u65ad\u6570\u636e\u5e93\u4e2d\u662f\u5426\u5b58\u5728\u76f8\u4f3c\u5bc6\u7801\u662f\u4e00\u4e2a\u5f88\u5927\u7684\u95ee\u9898\u3002\n\u65b9\u6cd5 \u5728\u8fd9\u9879\u5de5\u4f5c\u4e2d\uff0c\u6211\u4eec\u5c06\u4ece\u4e86\u89e3\u4eba\u4e3a\u9009\u62e9\u7684\u5bc6\u7801\u4e4b\u95f4\u7684\u76f8\u4f3c\u6027\u7684\u89d2\u5ea6\u7814\u7a76\u51ed\u8bc1\u8c03\u6574\u653b\u51fb\u3002 \u6211\u4eec\u63a2\u7d22\u4f7f\u7528\u73b0\u4ee3\u673a\u5668\u5b66\u4e60\u6280\u672f\u5bf9\u76f8\u4f3c\u6027\u8fdb\u884c\u5efa\u6a21\u7684\u6570\u636e\u9a71\u52a8\u65b9\u6cd5\u3002\n\u8fd9\u6837\u5c31\u4ea7\u751f\u4e86\u4e00\u79cd\u65b0\u7684\u6709\u9488\u5bf9\u6027\u7684\u5bc6\u7801\u731c\u6d4b\u653b\u51fb\uff0c\u5176\u6027\u80fd\u4f18\u4e8e\u4ee5\u524d\u7684\u6240\u6709\u653b\u51fb\uff0c\u4ee5\u53ca\u4e00\u79cd\u65b0\u578b\u7684\u5bc6\u7801\u5f3a\u5ea6\u8ba1\u7684\u8bbe\u8ba1\uff0c\u8be5\u5f3a\u5ea6\u8ba1\u5728\u5f3a\u5ea6\u4f30\u7b97\u4e2d\u5305\u62ec\u4e86\u9488\u5bf9\u76ee\u6807\u653b\u51fb\u7684\u8106\u5f31\u6027\u3002\n\u672c\u6587\u89e3\u51b3\u7684\u95ee\u9898\u5c31\u662f\u5229\u7528\u7528\u6237\u5df2\u7ecf\u6cc4\u9732\u7684\u767b\u5f55\u5bc6\u7801\u6765\u731c\u6d4b\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u7684\u5176\u5b83\u5bc6\u7801\uff0c\u5e76\u4f7f\u7528\u673a\u5668\u5b66\u4e60\u7684\u65b9\u6cd5\u6765\u6784\u5efa\u4e86\u4e00\u4e2a\u5bc6\u7801\u731c\u6d4b\u6a21\u578b\uff0c\u6700\u540e\u5bf9\u8fd9\u79cd\u653b\u51fb\u6a21\u578b\u63d0\u51fa\u4e00\u79cd\u65b0\u7684\u9632\u5fa1\u65b9\u6848\uff1avec-ppsm\u3002\n\u4e3a\u4e86\u8bb0\u5fc6\u65b9\u4fbf\uff0c\u7528\u6237\u5728\u4e0d\u540c\u7f51\u7ad9\u4e4b\u95f4\u91cd\u7528\u5bc6\u7801\uff08\u6216\u8005\u4f7f\u7528\u5bc6\u7801\u7684\u4e00\u4e2a\u7b80\u5355\u7684\u53d8\u4f53\uff09\u7684\u73b0\u8c61\u6bd4\u8f83\u4e25\u91cd\uff0c\u6216\u8005\u5728\u540c\u4e00\u4e2a\u7f51\u7ad9\u4e0a\uff0c\u66f4\u65b0\u5bc6\u7801\u7684\u65f6\u5019\u4e5f\u5f88\u6709\u53ef\u80fd\u662f\u4f7f\u7528\u65e7\u5bc6\u7801\u7684\u4e00\u4e2a\u7b80\u5355\u7684\u53d8\u4f53\uff0c\u56e0\u6b64\uff0c\u4f5c\u8005\u5229\u7528\u8fd9\u4e2a\u7279\u70b9\u6765\u8bbe\u8ba1\u4e00\u4e2a\u5bc6\u7801\u731c\u6d4b\u6a21\u578b\uff0c\u653b\u51fb\u7528\u6237\u7684\u5bc6\u7801\uff0c\u5177\u4f53\u6d41\u7a0b\u5982\u56fe 1 \u6240\u793a\uff1a\n\u4ece\u56fe\u4e2d\u53ef\u4ee5\u770b\u51fa\uff0c\u9996\u5148\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u5efa\u6a21\uff0c\u4e5f\u5c31\u662f\u5229\u7528\u673a\u5668\u5b66\u4e60\u7684\u65b9\u6cd5\u6765\u8bad\u7ec3\u51fa\u4e00\u4e2a\u6a21\u578b\uff0c\u8fd9\u4e2a\u6a21\u578b\u53eb\u505a pass2path \uff0c\u8be5\u6a21\u578b\u53ef\u4ee5\u6839\u636e\u4e00\u4e2a\u7ed9\u5b9a\u7684\u5bc6\u7801\uff0c\u751f\u6210\u4e00\u7cfb\u5217\u8be5\u5bc6\u7801\u7684\u53d8\u4f53\uff0c\u7528\u4e8e\u731c\u6d4b\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u7684\u5176\u5b83\u5bc6\u7801\u3002\u5728\u4f5c\u8005\u7684\u653b\u51fb\u6a21\u578b\u4e2d\uff0c\u4f5c\u8005\u5047\u8bbe\u88ab\u653b\u51fb\u7684\u7528\u6237\u81f3\u5c11\u5df2\u7ecf\u6cc4\u9732\u4e86\u4e00\u4e2a\u5bc6\u7801\uff0c\u6240\u4ee5\u5728\u8fd9\u4e2a\u6a21\u578b\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u5df2\u7ecf\u6cc4\u9732\u7684\u5bc6\u7801\u6765\u751f\u6210\u4e00\u7cfb\u5217\u7684\u53d8\u4f53\u5bc6\u7801\uff0c\u7528\u4e8e\u731c\u6d4b\u3002\n\u7279\u70b9\u4e0e\u4e0d\u8db3 \u4f18\u70b9\uff1a\npass2path \u6a21\u578b\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u90e8\u7f72\u5230\u7f51\u7ad9\u4e0a\uff0c\u5e76\u4e14\u517c\u5bb9\u7f51\u7ad9\u81ea\u8eab\u7684\u5bc6\u7801\u7b56\u7565\uff08\u6bd4\u5982\uff0c\u5fc5\u987b\u8981\u6709\u5927\u5199\u5b57\u6bcd\u3001\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u5b57\u7b26\u7b49\uff09\u3002\n\u9996\u6b21\u628a\u5bc6\u7801\u653b\u51fb\u6a21\u578b\u5e94\u7528\u4e8e\u5b9e\u9645\u73af\u5883\u4e2d\uff08\u5eb7\u5948\u5c14\u5927\u5b66\u7684\u8d26\u6237\u4e2d\uff09\uff0c\u5e76\u7ed9\u51fa\u76f8\u5e94\u7684\u5b9e\u9a8c\u7ed3\u679c\u3002\n\u7f3a\u70b9\uff1a\n\u5bf9\u4e8e\u6ca1\u6709\u6cc4\u9732\u8fc7\u5bc6\u7801\u7684\u7528\u6237\uff0c\u4f5c\u8005\u7684 pass2path \u6a21\u578b\u653b\u51fb\u6210\u529f\u7684\u6982\u7387\u5f88\u4f4e\uff0c\u56e0\u4e3a\u4f5c\u8005\u7684\u6a21\u578b\u662f\u57fa\u4e8e\u7528\u6237\u5df2\u7ecf\u6cc4\u9732\u4e86\u81f3\u5c11\u4e00\u4e2a\u5bc6\u7801\u7684\u8fd9\u79cd\u60c5\u51b5\u3002\n\u5bf9\u4e8e\u5b89\u5168\u7b49\u7ea7\u8f83\u9ad8\u7684\u7f51\u7ad9\uff08\u4f8b\u5982\u94f6\u884c\u76f8\u5173\u7684\u7f51\u7ad9\uff0c\u6700\u591a\u53ea\u5141\u8bb8\u8f93\u51653\u6b21\u5bc6\u7801\uff0c\u8d85\u8fc73\u6b21\u8f93\u5165\u9519\u8bef\u5c31\u9501\u5b9a\u8be5\u8d26\u6237\uff09\uff0c\u8be5\u653b\u51fb\u65b9\u6848\u57fa\u672c\u65e0\u6548\u3002\n\u4f5c\u8005 \u4f5c\u8005\uff1aPal, Bijeeta (1); Daniel, Tal (2); Chatterjee, Rahul (1); Ristenpart, Thomas (1)\n\u673a\u6784\uff1a(1) Cornell Tech; (2) Technion\n\u7f8e\u56fd\u5eb7\u5948\u5c14\u5927\u5b66\u5eb7\u5948\u5c14\u79d1\u6280\u6821\u533a\u3002\n\u8bba\u6587\u51fa\u5904 [1] Pal B, Daniel T, Chatterjee R, Ristenpart T. Beyond credential stuffing: password similarity models using neural networks. 2019 IEEE Symposium on Security and Privacy (SP). San Francisco, CA, USA: IEEE, 2019: 417\u2013434.\n\u5b9e\u9a8c\u53ca\u6548\u679c \u6570\u636e\u5904\u7406 \u4f5c\u8005\u7528\u6765\u8bad\u7ec3\u7684\u539f\u59cb\u6570\u636e\u662f 14 \u4ebf\u6761\u6cc4\u9732\u7684\u201c\u7535\u5b50\u90ae\u4ef6-\u5bc6\u7801\u5bf9\u201d\uff0c\u5728\u8fd9\u5f53\u4e2d\u6709 11 \u4ebf\u4e2a\u552f\u4e00\u7684\u7535\u5b50\u90ae\u4ef6\uff0c4.63 \u4ebf\u4e2a\u552f\u4e00\u7684\u5bc6\u7801\u3002\u8fd9\u4e9b\u6570\u636e\u662f 2017 \u5e74 12 \u6708 5 \u65e5\u4e4b\u524d\u6cc4\u9732\u7684\u6570\u636e\uff0c\u6570\u636e\u7684\u6765\u6e90\u5305\u62ec Linkedin, Myspace, Badoo, Yahoo, Twitter, Zoosk, Neopet \u7b49\u3002\n\u5728\u4f5c\u8005\u7684\u5b9e\u9a8c\u4e2d\uff0c\u8fd9\u4e9b\u6570\u636e\u8fd8\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\uff0c\u8fd8\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u8fc7\u6ee4\u4e0e\u5904\u7406\uff0c\u4e3b\u8981\u5904\u7406\u5305\u62ec\uff1a\n\u53ea\u8981\u5305\u542b 20 \u4e2a\uff08\u6216\u8d85\u8fc7 20 \u4e2a\uff0916 \u8fdb\u5236\u503c\u7684\u5b50\u4e32\u7684\u5bc6\u7801\uff0c\u5219\u4e22\u5f03\uff0c\u56e0\u4e3a\u8fd9\u79cd\u60c5\u51b5\u4e00\u822c\u662f\u5bc6\u7801\u7684\u54c8\u5e0c\u503c\uff0c\u4e0d\u662f\u771f\u6b63\u7684\u5bc6\u7801\u3002\n\u53ea\u8981\u5305\u542b\u975e ASCII \u7801\u5b57\u7b26\u7684\u5bc6\u7801\uff0c\u5219\u4e22\u5f03\u3002\n\u53ea\u8981\u5bc6\u7801\u8d85\u8fc7 30 \u4e2a\u5b57\u7b26\uff0c\u6216\u8005\u5c11\u4e8e 4 \u4e2a\u5b57\u7b26\uff0c\u5219\u4e22\u5f03\u3002\n\u8fd8\u6709\u4e00\u4e9b\u7279\u6b8a\u60c5\u51b5\u3002\n\u5904\u7406\u4e4b\u540e\u7684\u6570\u636e\uff0c\u53ea\u5305\u542b\u4e86 4.604 \u4ebf\u4e2a\u552f\u4e00\u7684\u5bc6\u7801\uff08\u201c\u7535\u5b50\u90ae\u4ef6-\u5bc6\u7801\u5bf9\u201d \u91cd\u590d\u7684\u5c06\u88ab\u5220\u9664\uff09\uff0c\u8fd9\u4e9b\u5bc6\u7801\u7684\u5206\u5e03\u5982\u8868 1 \u6240\u793a\uff1a\n\u4ece\u8868 1 \u4e2d\u53ef\u4ee5\u770b\u51fa\uff0c\u5bc6\u7801\u957f\u5ea6\u5728 6 \u5230 12 \u4e4b\u95f4\u7684\uff0c\u5360\u636e\u603b\u5bc6\u7801 88% \u7684\u6bd4\u4f8b\uff0c\u5e76\u4e14\uff0c\u6709 80% \u7684\u5bc6\u7801\u53ea\u4f7f\u7528\u5c0f\u5199\u5b57\u6bcd\u3002\u53e6\u5916\uff0c\u4f5c\u8005\u8fd8\u53d1\u73b0\u6709 0.9% \u7684\u7528\u6237\u76f4\u63a5\u4f7f\u7528 \u201c123456\u201d \u8fd9\u4e2a\u7b80\u5355\u7684\u5bc6\u7801\u3002\n\u8fd9\u4e9b\u6570\u636e\u88ab\u8fc7\u6ee4\u4e4b\u540e\uff0c\u8fd8\u9700\u8981\u505a\u8fdb\u4e00\u6b65\u5904\u7406\uff0c\u56e0\u4e3a\u4f5c\u8005\u9700\u8981\u8bad\u7ec3\u7684\u6a21\u578b\u5c31\u662f\u7531\u4e00\u5806\u751f\u6210\u89c4\u5219\u7ec4\u6210\uff0c\u800c\u8fd9\u4e9b\u751f\u6210\u89c4\u5219\u662f\u7531\u76f8\u540c\u7528\u6237\u7684\u4e0d\u540c\u5bc6\u7801\u8bad\u7ec3\u800c\u6210\u3002\u76ee\u524d\u8fd9\u4e9b\u8fc7\u6ee4\u4e4b\u540e\u7684\u6570\u636e\u8fd8\u662f\u4e00\u6761\u4e00\u6761\u7684 \u201c\u7535\u5b50\u90ae\u4ef6-\u5bc6\u7801\u5bf9\u201d\uff0c\u56e0\u6b64\uff0c\u4f5c\u8005\u9700\u8981\u77e5\u9053\u8fd9\u4e9b\u6570\u636e\u91cc\u9762\u54ea\u4e9b\u5bc6\u7801\u662f\u5c5e\u4e8e\u540c\u4e00\u4e2a\u7528\u6237\u7684\u3002\u8fd9\u5c31\u9700\u8981\u5408\u5e76\u8fd9\u4e9b \u201c\u7535\u5b50\u90ae\u4ef6-\u5bc6\u7801\u5bf9\u201d\uff0c\u628a\u5c5e\u4e8e\u540c\u4e00\u4e2a\u7528\u6237\u7684\u6240\u6709\u5bc6\u7801\u5408\u5e76\u5230\u4e00\u8d77\u3002\u5408\u5e76\u7684\u89c4\u5219\u6709\u4e09\u79cd\uff1a\nEmail based\uff1a\u628a\u7535\u5b50\u90ae\u4ef6\u76f8\u540c\u7684 \u201c\u7535\u5b50\u90ae\u4ef6-\u5bc6\u7801\u5bf9\u201d \u5408\u5e76\uff0c\u5f62\u6210\u4e00\u4e2a\u7535\u5b50\u90ae\u4ef6\u5bf9\u5e94\u591a\u4e2a\u5bc6\u7801\u7684\u7ec4\u5408\uff0c\u56e0\u4e3a\u4f5c\u8005\u8ba4\u4e3a\u76f8\u540c\u7535\u5b50\u90ae\u4ef6\u7684\u8d26\u6237\u5e94\u8be5\u5c5e\u4e8e\u540c\u4e00\u4e2a\u7528\u6237\u3002\nUsername based\uff1a\u628a\u7535\u5b50\u90ae\u4ef6\u6309 \u201c@\u201d \u7b26\u53f7\u8fdb\u884c\u5206\u5272\uff0c\u524d\u534a\u90e8\u5206\u53eb\u505a Username\uff0c\u4f5c\u8005\u628a Username \u76f8\u540c\u7684 \u201c\u7535\u5b50\u90ae\u4ef6-\u5bc6\u7801\u5bf9\u201d \u5408\u5e76\uff0c\u8ba4\u4e3a Username \u76f8\u540c\u7684\u90ae\u4ef6\u5e94\u8be5\u5c5e\u4e8e\u540c\u4e00\u4e2a\u7528\u6237\uff08\u4f46\u662f\uff0c\u8fd9\u4f1a\u5bfc\u81f4\u9519\u8bef\u7684\u628a\u4e24\u4e2a\u4e0d\u540c\u7684\u7528\u6237\u8fdb\u884c\u5408\u5e76\uff09\u3002\nMixed method\uff1a\u5148\u8fdb\u884c Email based \u5408\u5e76\uff0c\u518d\u8fdb\u884c Username based \u5408\u5e76\uff0c\u4f46\u662f\u5728\u7b2c\u4e8c\u6b65\u7684\u65f6\u5019\uff0c\u8fd8\u8981\u5224\u65ad Username \u76f8\u540c\u7684\u4e24\u7ec4\u5bc6\u7801\u4e2d\u662f\u5426\u5b58\u5728\u5171\u540c\u7684\u5bc6\u7801\uff0c\u5b58\u5728\u6709\u5171\u540c\u7684\u5bc6\u7801\u624d\u5408\u5e76\uff0c\u8ba4\u4e3a\u5b83\u4eec\u90fd\u5c5e\u4e8e\u540c\u4e00\u4e2a\u7528\u6237\uff0c\u5426\u5219\u4e0d\u5408\u5e76\u3002\n\u8fdb\u884c\u5408\u5e76\u5904\u7406\u540e\u7684\u7ed3\u679c\u5982\u8868 2 \u6240\u793a\uff1a\n\u8868\u4e2d\u6700\u540e\u4e09\u5217\u7684 \u201cE\u201d\u3001\u201cU\u201d\u3001\u201cM\u201d \u5206\u522b\u5bf9\u5e94\u4e09\u79cd\u5408\u5e76\u89c4\u5219\u3002\u7b2c\u4e8c\u884c\u8868\u793a\u5408\u5e76\u540e\u7684\u7528\u6237\u6216\u5bc6\u7801\u6570\u91cf\uff0c\u5355\u4f4d\u662f\u767e\u4e07\u4e2a\u3002\u7b2c\u4e09\u884c\u662f\u7edf\u8ba1\u6bcf\u4e2a\u7528\u6237\u6240\u62e5\u6709\u7684\u5bc6\u7801\u6570\u91cf\uff0c\u5355\u4f4d\u662f\u767e\u5206\u6bd4\uff0c\u5012\u6570\u7b2c\u56db\u5217\u7684 \u201c2\u201d \u8868\u793a\u6bcf\u4e2a\u7528\u6237\u62e5\u6709\u4e24\u4e2a\u5bc6\u7801\u7684\u60c5\u51b5\uff0c\u201c3\u201d \u548c \u201c&gt;=4\u201d \u4ee5\u6b64\u7c7b\u63a8\u3002\u7b2c\u56db\u884c\u8868\u793a\u5bc6\u7801\u91cd\u7528\u7387\uff0c\u6309\u7167\u7535\u5b50\u90ae\u4ef6\u8fdb\u884c\u5408\u5e76\u540e\uff0c\u5bc6\u7801\u91cd\u7528\u7387\u4e3a 0\uff0c\u662f\u56e0\u4e3a\u4e4b\u524d\u5df2\u7ecf\u628a \u201c\u7535\u5b50\u90ae\u4ef6-\u5bc6\u7801\u5bf9\u201d \u76f8\u540c\u7684\u6761\u76ee\u5220\u9664\u4e86\u3002\u6700\u540e\u4e00\u884c\u662f\u7f16\u8f91\u8ddd\u79bb\uff0c\u4e5f\u5c31\u662f\u540c\u4e00\u4e2a\u7528\u6237\u7684\u4e0d\u540c\u5bc6\u7801\u4e4b\u95f4\u7684\u8f6c\u6362\u6240\u9700\u8981\u7684\u7684\u6b65\u9aa4\uff0c\u4f8b\u5982\uff0c\u4e24\u4e2a\u5bc6\u7801\uff1a\u201cpassword\u201d\u548c\u201cpassw0rd\u201d\u7684\u7f16\u8f91\u8ddd\u79bb\u4e3a 1\u3002\n\u200b \u4ece\u8868 2 \u4e2d\u7684\u7b2c\u4e09\u884c\u53ef\u4ee5\u770b\u51fa\uff0c\u5f53\u4f7f\u7528 \u201cUsername based\u201d \u7b56\u7565\u5408\u5e76\u6570\u636e\u7684\u65f6\u5019\uff0c\u6bcf\u4e2a\u7528\u6237\u5bf9\u5e94\u7684\u5bc6\u7801\u6570\u91cf\u5206\u5e03\u53d1\u751f\u8f83\u5927\u7684\u53d8\u5316\uff0c\u8fd9\u662f\u7531\u4e8e\u8fd9\u79cd\u7b56\u7565\u9519\u8bef\u7684\u628a\u4e0d\u540c\u7528\u6237\u7684\u5bc6\u7801\u8fdb\u884c\u4e86\u5408\u5e76\u6240\u5bfc\u81f4\u7684\uff0c\u56e0\u6b64\uff0c\u540e\u7eed\u5b9e\u9a8c\u4e0d\u5728\u4f7f\u7528\u8be5\u7ec4\u6570\u636e\u3002\u4e3b\u8981\u5b9e\u9a8c\u90fd\u5728\u57fa\u4e8e \u201cEmail based\u201d \u7b56\u7565\u5408\u5e76\u7684\u7ed3\u679c\u4e0a\u505a\u3002\n\u4f5c\u8005\u628a $$ D^{E}{full} $$ \u5212\u5206\u4e3a 80% \u7684\u8bad\u7ec3\u96c6 $$ D^{E}{tr} $$ \u548c 20% \u7684\u6d4b\u8bd5\u96c6 $$ D^{E}{ts} $$ \u540c\u65f6\uff0c\u4e5f\u628a $$ D^{M}{full} $$ \u8fdb\u884c\u4e86\u540c\u6837\u7684\u5212\u5206\uff0c\u65e2 80% \u7684\u8bad\u7ec3\u96c6 $$ D^{M}{tr} $$ \u548c 20% \u7684\u6d4b\u8bd5\u96c6 $$ D^{M}{ts} $$ \u7531\u4e8e $$ D^{E}{tr} $$ \u548c $$ D^{M}{tr} $$ \u7684\u5bc6\u7801\u6570\u636e\u5206\u5e03\u51e0\u4e4e\u4e00\u81f4\uff0c\u56e0\u6b64\uff0c\u5728\u8bad\u7ec3\u9636\u6bb5\uff0c\u5982\u679c\u6ca1\u6709\u7279\u522b\u8bf4\u660e\uff0c\u9ed8\u8ba4\u90fd\u662f\u7528 $$ D^{E}_{tr} $$ \u6765\u8bad\u7ec3\u3002\n\u5bc6\u7801\u76f8\u4f3c\u5ea6\u751f\u6210\u6a21\u578b\uff08pass2path\uff09 \u751f\u6210\u6a21\u578b\u5c31\u662f\u7528\u4e8e\u751f\u6210\u7ed9\u5b9a\u5bc6\u7801\u7684\u4e00\u7cfb\u5217\u76f8\u4f3c\u7684\u5bc6\u7801\uff08\u6216\u8005\u53eb\u505a\u8be5\u5bc6\u7801\u7684\u53d8\u4f53\uff09\uff0c\u4e3b\u8981\u5de5\u4f5c\u5728\u4e8e\u8bad\u7ec3\u9636\u6bb5\uff0c\u8bad\u7ec3\u8f93\u5165\u7684\u6570\u636e\u5c31\u662f\u4e0a\u8ff0\u5212\u5206\u7684\u8bad\u7ec3\u96c6\uff0c\u8bad\u7ec3\u7684\u7ed3\u679c\u5c31\u662f\u4e00\u4e2a\u7531\u4e00\u7cfb\u5217\u89c4\u5219\u7ec4\u6210\u7684\u6a21\u578b\uff0c\u8fd9\u4e9b\u89c4\u5219\u6765\u6e90\u4e8e\u8bad\u7ec3\u96c6\u4e2d\u7684\u6bcf\u4e00\u4e2a\u7528\u6237\u7684\u4e0d\u540c\u5bc6\u7801\uff0c\u4f8b\u5982\uff0c\u67d0\u4e00\u4e2a\u7528\u6237\u62e5\u67093\u4e2a\u5bc6\u7801\uff0c\u8fd9\u4e9b\u89c4\u5219\u5c31\u662f\u4ece\u4efb\u610f\u4e00\u4e2a\u5bc6\u7801\u8f6c\u6362\u5230\u53e6\u4e00\u4e2a\u5bc6\u7801\u7684\u8fc7\u7a0b\/\u6b65\u9aa4\uff0c\u4e5f\u5c31\u662f\u76f8\u5f53\u4e8e\u7f16\u8f91\u8ddd\u79bb\u7684\u8ba1\u7b97\u8fc7\u7a0b\uff0c\u8fd9\u4e9b\u8fc7\u7a0b\u5305\u62ec\uff1a\n\u63d2\u5165\u4e00\u4e2a\u5b57\u7b26\uff1a\u201cins\u201d\n\u5220\u9664\u4e00\u4e2a\u5b57\u7b26\uff1a\u201cdel\u201d\n\u66ff\u6362\u4e00\u4e2a\u5b57\u7b26\uff1a\u201csub\u201d\n\u4ece\u4e00\u4e2a\u5bc6\u7801\u8f6c\u6362\u5230\u53e6\u4e00\u4e2a\u5bc6\u7801\u5c31\u7531\u8fd9\u4e09\u79cd\u64cd\u4f5c\u5b8c\u6210\uff0c\u5e76\u4e14\u8fd9\u4e2a\u8f6c\u6362\u8fc7\u7a0b\u7ec4\u5408\u8d77\u6765\u53eb\u505a\u4e00\u6b21\u8f6c\u6362\uff1a\u201cTransform\u201d\u3002\u4e24\u4e2a\u5bc6\u7801\u4e4b\u95f4\u7684\u7f16\u8f91\u8ddd\u79bb\u5c31\u662f\u4e00\u6b21\u8f6c\u6362\u6240\u9700\u8981\u6267\u884c\u7684\u6b65\u9aa4\u6570\u91cf\u3002\u6700\u540e\u8bad\u7ec3\u51fa\u6765\u7684\u6a21\u578b\u5927\u7ea6 60MB \u5de6\u53f3\uff0c\u8bad\u7ec3\u65f6\u95f4\u5927\u7ea6\u662f 2 \u5929\uff0c\u8bad\u7ec3\u6240\u4f7f\u7528\u7684\u673a\u5668\u7684\u914d\u7f6e\u4e3a\uff1a Intel Core i9 \u5904\u7406\u5668\u548c GTX 1080 GPU\u3002\n\u9632\u5fa1\u7b56\u7565\uff08vec-ppsm\uff09 \u867d\u7136\u76ee\u524d\u4e3b\u6d41\u7684\u7f51\u7ad9\u4e2d\u5df2\u7ecf\u90e8\u7f72\u4e86\u4e00\u4e9b\u5bc6\u7801\u5f3a\u5ea6\u68c0\u6d4b\u7684\u7cfb\u7edf\uff08\u4f8b\u5982\uff0c\u5728\u4f60\u8f93\u5165\u4e00\u4e2a\u65b0\u7684\u5bc6\u7801\u7684\u65f6\u5019\uff0c\u4e00\u822c\u5728\u5bc6\u7801\u65c1\u8fb9\u4f1a\u663e\u793a\u5f53\u524d\u5bc6\u7801\u7684\u5f3a\u5ea6\uff09\uff0c\u4f46\u662f\uff0c\u8fd9\u4e9b\u68c0\u6d4b\u7cfb\u7edf\u4e00\u822c\u6bd4\u8f83\u7b80\u5355\uff0c\u901a\u5e38\u53ea\u4f1a\u68c0\u6d4b\u5bc6\u7801\u662f\u5426\u6709\u5927\u5199\u5b57\u6bcd\u3001\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u5b57\u7b26\u7b49\u3002\u800c\u7528\u6237\u5728\u66f4\u65b0\u5bc6\u7801\u7684\u65f6\u5019\uff0c\u5f88\u6709\u53ef\u80fd\u53ea\u662f\u4f7f\u7528\u4e00\u4e2a\u5f53\u524d\u5bc6\u7801\u7684\u4e00\u4e2a\u53d8\u4f53\u6765\u66f4\u65b0\u65e7\u5bc6\u7801\uff08\u4f8b\u5982\uff1a\u628a\u65e7\u5bc6\u7801\uff1a\u201cpassword\u201d \u66f4\u65b0\u4e3a\uff1a\u201cpasw0rd\u201d\uff09\uff0c\u8fd9\u79cd\u60c5\u51b5\u5728\u4f5c\u8005\u7684\u653b\u51fb\u6a21\u578b\u4e2d\u662f\u6781\u6613\u88ab\u653b\u51fb\u7684\u3002\u56e0\u6b64\uff0c\u4f5c\u8005\u63d0\u51fa\u4e86\u4e00\u4e2a\u65b0\u7684\u5bc6\u7801\u5f3a\u5ea6\u68c0\u6d4b\u7cfb\u7edf\uff1a vec-ppsm\uff08Personalized Password Strength Meters\uff09\uff0c\u8be5\u7cfb\u7edf\u6839\u636e\u5df2\u7ecf\u6cc4\u9732\u7684\u5bc6\u7801\u6784\u5efa\u4e00\u4e2a\u6a21\u578b\uff0c\u7528\u6765\u8bc4\u4f30\u5f53\u524d\u5bc6\u7801\u7684\u5f3a\u5ea6\uff0c\u6240\u4f7f\u7528\u7684\u6280\u672f\u662f\uff1a\u57fa\u4e8e\u795e\u7ecf\u7f51\u7edc\u7684\u5355\u8bcd\u5d4c\u5165\u6280\u672f\uff08Neural Network-based Word Embedding Techniques\uff09\u3002\nvec-ppsm \u4f7f\u7528 Word Embedding \u6280\u672f\uff0c\u4f5c\u8005\u628a\u5b83\u547d\u540d\u4e3a Password Embeeding\uff0c\u65e2\u628a\u4e00\u4e2a\u5bc6\u7801\u6620\u5c04\u5230\u4e00\u4e2a d \u7ef4\u7684\u5411\u91cf\u7a7a\u95f4\uff08\u6587\u4e2d\u4f7f\u7528\u7684 d=100\uff09\uff0c\u7136\u540e\u4f7f\u7528 FastText \u6a21\u578b \u6765\u5b66\u4e60\u5bc6\u7801\u4e4b\u95f4\u7684\u76f8\u4f3c\u5ea6\uff0c\u8bad\u7ec3\u597d\u7684\u6a21\u578b\u6709 50MB \u5de6\u53f3\u3002\u7531\u4e8e\u8be5\u7cfb\u7edf\u4e00\u822c\u5728\u7528\u6237\u66f4\u65b0\u5bc6\u7801\u3001\u6216\u8005\u6ce8\u518c\u7528\u6237\u8f93\u5165\u65b0\u5bc6\u7801\u7684\u65f6\u5019\u4f7f\u7528\uff0c\u4e00\u822c\u5728\u5ba2\u6237\u7aef\u4f7f\u7528\uff0c\u901a\u5e38\u901a\u8fc7 Java Script \u811a\u672c\u628a\u6a21\u578b\u53d1\u9001\u5230\u5ba2\u6237\u7aef\uff0c\u6240\u4ee5\uff0c 50MB \u7684\u6a21\u578b\u76f8\u5bf9\u8fc7\u5927\uff0c\u9700\u8981\u538b\u7f29\uff08\u4f5c\u8005\u4f7f\u7528 Product Quantization \u6280\u672f\u6765\u538b\u7f29\u6a21\u578b\uff0c\u8be5\u538b\u7f29\u6280\u672f\u7531 Facebook \u7684 Faiss library \u63d0\u4f9b\uff09\uff0c\u538b\u7f29\u5c31\u6d89\u53ca\u5230\u538b\u7f29\u7387\u548c\u6a21\u578b\u7684\u7cbe\u5ea6\u4e4b\u95f4\u7684\u8861\u91cf\u95ee\u9898\uff0c\u5982\u8868 3 \u6240\u793a\uff1a\n\u5982\u8868 3 \u6240\u793a\uff0c\u8868\u4e2d\u7b2c\u4e00\u5217\u4e3a\u538b\u7f29\u7387\u3002\u7ecf\u8fc7\u6743\u8861\u4e4b\u540e\uff0c\u4f5c\u8005\u8ba4\u4e3a\u9009\u62e9\u538b\u7f29\u7387\u4e3a 5 \u7684\u65f6\u5019\u6bd4\u8f83\u5408\u9002\uff0c\u6b64\u65f6\u6a21\u578b\u5927\u5c0f\u4e3a 3MB\uff0c\u9002\u5408\u7f51\u7edc\u4f20\u8f93\uff0c\u7cbe\u5ea6\u635f\u5931\u4e5f\u4e0d\u5927\uff0c\u5728\u53ef\u4ee5\u63a5\u53d7\u7684\u8303\u56f4\u5185\u3002\n\u5b9e\u9a8c\u53ca\u6548\u679c \u5b9e\u9a8c\u73af\u5883\nCPU\uff1aIntel Core i9\n\u5185\u5b58\uff1a Unknown\nOS\uff1a Unknown\nGPU\uff1aGTX 1080\n\u6570\u636e\u96c6\uff1a\n\u6570\u636e\u96c6\u5305\u62ec\u6a21\u62df\u6d4b\u8bd5\u4f7f\u7528\u7684\u4e24\u4e2a\u6d4b\u8bd5\u6570\u636e\u96c6\uff1a D^{E}{ts}D^{M}{ts}\u4ee5\u53ca\u5728\u771f\u5b9e\u73af\u5883\u4e2d\u6d4b\u8bd5\u4f7f\u7528\u7684\u6570\u636e\u96c6\uff1aCornell Accounts\u3002\n\u6a21\u62df\u6d4b\u8bd5 \u6a21\u62df\u6d4b\u8bd5\u4f7f\u7528\u7684\u662f\u4e24\u4e2a\u6d4b\u8bd5\u96c6\u8fdb\u884c\u6d4b\u8bd5\uff0c\u6d4b\u8bd5\u8fc7\u7a0b\u4e2d\u4f7f\u7528\u5230\u4e00\u4e2a\u53c2\u6570 q\uff0c\u8868\u793a\u5bf9\u67d0\u4e2a\u5bc6\u7801\u7684\u731c\u6d4b\u6b21\u6570\uff0cq \u6709\u4e09\u79cd\u9009\u62e9\uff0c\u5206\u522b\u662f\uff1a10\u3001100\u30011000\u3002\u6b64\u5916\uff0c\u4f5c\u8005\u628a\u8fd9\u4e24\u4e2a\u6570\u636e\u96c6\u5206\u522b\u90e8\u7f72\u5230\u4e24\u4e2a\u670d\u52a1\u4e0a\u53bb\uff0c\u5e76\u8bbe\u7f6e\u4e24\u4e2a\u670d\u52a1\u7684\u5c5e\u6027\uff0c $$ D^{E}{ts} $$ \u5bf9\u5e94\u7684\u670d\u52a1\u7684\u5c5e\u6027\u4e3a\uff1a\u201cwithout-repeat\u201d\uff0c\u4e5f\u5c31\u662f\u8be5\u670d\u52a1\u4e2d\u7684\u5bc6\u7801\u4e0d\u5141\u8bb8\u91cd\u590d\uff0c\u800c $$ D^{M}{ts} $$ \u5bf9\u5e94\u7684\u670d\u52a1\u7684\u5c5e\u6027\u4e3a\uff1a\u201cwith-repeat\u201d\uff0c\u4e5f\u5c31\u662f\u8be5\u670d\u52a1\u4e2d\u7684\u5bc6\u7801\u5141\u8bb8\u91cd\u590d\uff0c\u5b9e\u9a8c\u6570\u636e\u5982\u8868 4 \u6240\u793a\uff1a\n\u88684 \u4e0d\u540c\u653b\u51fb\u6a21\u578b\u4e0b\u653b\u51fb\u6210\u529f\u7684\u6982\u7387\n\u4ece\u8868 4 \u4e2d\u53ef\u4ee5\u770b\u51fa\uff0c\u4f5c\u8005\u8bbe\u8ba1\u7684\u6a21\u578b pass2path \u5728\u4e24\u4e2a\u6570\u636e\u96c6\u4e2d\u653b\u51fb\u6210\u529f\u7684\u6982\u7387\u90fd\u662f\u6700\u5927\u7684\uff0c\u5373\u4f7f\u968f\u7740\u53c2\u6570 q \uff08\u4e00\u4e2a\u5bc6\u7801\u88ab\u5141\u8bb8\u653b\u51fb\u7684\u6b21\u6570\uff09 \u7684\u4e0d\u540c\uff0c\u4f5c\u8005\u7684\u6a21\u578b\u6240\u80fd\u8fbe\u5230\u7684\u6548\u679c\u4e5f\u662f\u6700\u4f18\u7684\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u770b\u51fa\u53f3\u8fb9\u8868\u683c\u4e2d\u7684\u767e\u5206\u6bd4\u76f8\u5bf9\u8f83\u5927\uff0c\u8fd9\u662f\u56e0\u4e3a\u53f3\u8fb9\u8868\u683c\u4e2d\u7684\u6570\u636e\u5bf9\u5e94\u7684\u670d\u52a1\u7684\u5c5e\u6027\u88ab\u8bbe\u7f6e\u4e3a\u201cwith-repeat\u201d\uff0c\u5bf9\u7528\u6237\u7684\u5bc6\u7801\u9650\u5236\u6bd4\u8f83\u5bbd\u677e\uff0c\u5141\u8bb8\u7528\u6237\u5bc6\u7801\u91cd\u590d\uff0c\u8fd9\u5c31\u5bfc\u81f4\u4e86\u5f88\u591a\u5bc6\u7801\u662f\u91cd\u590d\u7684\uff0c\u5e76\u4e14\u5f88\u591a\u5bc6\u7801\u548c\u8bad\u7ec3\u96c6\u4e2d\u7684\u5bc6\u7801\u4e00\u6837\uff0c\u56e0\u6b64\uff0c\u653b\u51fb\u6210\u529f\u7684\u6982\u7387\u5927\u5e45\u589e\u52a0\u3002\u800c\u5de6\u8fb9\u8868\u683c\u5bf9\u5e94\u7684\u6570\u636e\u96c6\uff0c\u5728\u5b83\u7684\u670d\u52a1\u4e2d\u662f\u4e0d\u5141\u8bb8\u51fa\u73b0\u91cd\u590d\u5bc6\u7801\u7684\uff0c\u56e0\u6b64\uff0c\u653b\u51fb\u6210\u529f\u7684\u6982\u7387\u76f8\u5bf9\u8f83\u4f4e\u3002\n\u6b64\u5916\uff0c\u4f5c\u8005\u8fd8\u505a\u4e86\u4e00\u4e2a\u5b9e\u9a8c\uff0c\u5c31\u662f\u4ece $$ D^{E}_{ts} $$ \u6570\u636e\u96c6\u4e2d\u968f\u673a\u9009\u53d6\u4e86 10 \u4e07\u4e2a\u7528\u6237\uff0c\u8fd9\u4e9b\u7528\u6237\u90fd\u81f3\u5c11\u6cc4\u9732\u4e86 2 \u4e2a\u5bc6\u7801\u4ee5\u4e0a\uff0c\u4f5c\u8005\u9009\u62e9\u5176\u4e2d\u4e00\u4e2a\u5bc6\u7801\u5f53\u505a\u6cc4\u9732\u7684\u5bc6\u7801\uff0c\u5176\u5b83\u5bc6\u7801\u5f53\u505a\u88ab\u653b\u51fb\u7684\u5bc6\u7801\uff0c\u5206\u522b\u4f7f\u7528 pass2path \u6a21\u578b\u548c Untargeted \u6a21\u578b\uff08Untargeted \u6a21\u578b\u5c31\u662f\u4ece\u8bad\u7ec3\u6570\u636e\u96c6\u4e2d\u628a\u7528\u6237\u5bc6\u7801\u6309\u6d41\u884c\u5ea6\u4ece\u9ad8\u5230\u4f4e\u6392\u5e8f\uff0c\u751f\u6210\u4e00\u4e2a\u5bc6\u7801\u5217\u8868\uff0c\u653b\u51fb\u76ee\u6807\u7684\u65f6\u5019\uff0c\u4ece\u6d41\u884c\u5ea6\u6700\u9ad8\u7684\u5bc6\u7801\u5f00\u59cb\u5c1d\u8bd5\uff0c\u7136\u540e\u9009\u6d41\u884c\u5ea6\u6b21\u9ad8\u7684\u5bc6\u7801\u6765\u5c1d\u8bd5\uff0c\u4ee5\u6b64\u7c7b\u63a8\uff0c\u76f4\u5230\u653b\u51fb\u6210\u529f\uff0c\u6216\u8005\u653b\u51fb\u6b21\u6570\u8fbe\u5230\u8bbe\u5b9a\u503c\u4e3a\u6b62\uff0c\u800c\u4e0d\u7ba1\u88ab\u653b\u51fb\u7684\u76ee\u6807\u662f\u8c01\uff09\u6765\u653b\u51fb\u8fd9\u4e9b\u7528\u6237\u7684\u5bc6\u7801\uff0c\u7ed3\u679c\u5982\u56fe 2 \u6240\u793a\uff1a\n\u5982\u56fe 2 \u6240\u793a\uff0c\u4f5c\u8005\u753b\u4e86\u4e8c\u8005\u7684\u66f2\u7ebf\u56fe\uff0c\u7531\u4e8e\u8ba1\u7b97\u80fd\u529b\u6709\u9650\uff0c\u5f53\u731c\u6d4b\u6b21\u6570 q \u5927\u4e8e 1 \u4e07\u7684\u65f6\u5019\uff0c\u4f5c\u8005\u4e0d\u518d\u8ba1\u7b97 pass2path \u7684\u653b\u51fb\u6210\u529f\u7387\uff0c\u800c\u662f\u6839\u636e\u66f2\u7ebf\u7684\u8d70\u52bf\uff0c\u7528\u865a\u7ebf\u63cf\u7ed8\u4e86\u5b83\u4eec\u7684\u5f62\u72b6\u3002\u4ece\u56fe\u4e2d\u4e5f\u53ef\u770b\u51fa\uff0c\u5f53\u731c\u6d4b\u6b21\u6570\u8f83\u5c0f\u7684\u65f6\u5019\uff08\u5c0f\u4e8e 1 \u4e07\u6b21\uff09\uff0cpass2path \u6a21\u578b\u653b\u51fb\u6210\u529f\u7684\u6982\u7387\u8fdc\u5927\u4e8e Untargeted \u6a21\u578b\uff0c\u4f46\u662f\u968f\u7740\u653b\u51fb\u6b21\u6570\u7684\u4e0d\u65ad\u589e\u5927\uff0c Untargeted \u6a21\u578b\u6700\u7ec8\u4f1a\u8d85\u8fc7 pass2path \u6a21\u578b\u3002\n\u73b0\u5b9e\u73af\u5883\u6d4b\u8bd5\n\u4f5c\u8005\u901a\u8fc7\u548c Cornell \u5927\u5b66\u7684\u4fe1\u606f\u5b89\u5168\u529e\u516c\u5ba4\uff08IT Security Office of Cornell University : ITSO\uff09\u8fdb\u884c\u5408\u4f5c\uff0c\u5bf9\u5eb7\u5948\u5c14\u5927\u5b66\u7684\u7528\u6237\u8d26\u6237\u8fdb\u884c\u5728\u7ebf\u6d4b\u8bd5\uff08\u5305\u62ec\u5b66\u751f\u3001\u6559\u5e08\u3001\u5b66\u6821\u5458\u5de5\u7b49\uff09\uff0c\u9996\u5148\uff0c\u4f5c\u8005\u5c31\u53d1\u73b0\u5eb7\u5948\u5c14\u5927\u5b66\u7684\u7528\u6237\u8d26\u6237\u4e2d\uff0c\u6709 19868 \u4e2a\u7535\u5b50\u90ae\u4ef6\u51fa\u73b0\u5728\u88ab\u6cc4\u9732\u7684\u7528\u6237\u6570\u636e\u4e2d\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u8fd9\u4e9b\u7528\u6237\u81f3\u5c11\u5df2\u7ecf\u6cc4\u9732\u4e86\u4e00\u4e2a\u5bc6\u7801\u3002\u5176\u6b21\uff0c\u5948\u5c14\u5927\u5b66\u81ea\u4ece 2009 \u5e74\u5f00\u59cb\u8bb0\u5f55\u7528\u6237\u7684\u5bc6\u7801\u53d8\u66f4\u60c5\u51b5\uff0c\u53d8\u66f4\u8fc7\u5bc6\u7801\u7684\u8d26\u6237\u6709 15776 \u4e2a\uff0c\u4f5c\u8005\u5bf9\u8fd9 15776 \u4e2a\u8d26\u6237\u8fdb\u884c\u6d4b\u8bd5\u3002\u7531\u4e8e\u5eb7\u5948\u5c14\u5927\u5b66\u5bf9\u7528\u6237\u7684\u5bc6\u7801\u6267\u884c L8C3 \u7b56\u7565\uff0c\u65e2\uff0c\u7528\u6237\u5bc6\u7801\u5fc5\u987b\u5305\u542b 8 \u4e2a\uff08\u6216\u4ee5\u4e0a\uff09\u5b57\u7b26\uff0c\u5e76\u4e14\u5fc5\u987b\u5305\u542b\u5927\u5199\u5b57\u6bcd\u3001\u5c0f\u5199\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u5b57\u7b26\u4e2d\u7684 3 \u7c7b\uff08\u6216\u4ee5\u4e0a\uff09\u5b57\u7b26\u3002\u56e0\u6b64\uff0c\u7528\u6237\u5bc6\u7801\u7684\u5b89\u5168\u6027\u76f8\u5bf9\u8f83\u9ad8\uff0c\u6d4b\u8bd5\u4e2d\u653b\u51fb\u6210\u529f\u7684\u6982\u7387\u4e5f\u4f1a\u7565\u4f4e\u4e8e\u6d4b\u8bd5\u6570\u636e\u96c6\u4e2d\u7684\u7ed3\u679c\uff0c\u6d4b\u8bd5\u7ed3\u679c\u5982\u56fe 3 \u6240\u793a\uff1a\n\u4f5c\u8005\u4f7f\u7528\u4e86\u4e09\u79cd\u6a21\u578b\u8fdb\u884c\u653b\u51fb\uff0c\u4ece\u56fe\u4e2d\u53ef\u4ee5\u770b\u51fa\u57fa\u4e8e\u7ecf\u9a8c\u7684\u65e0\u76ee\u6807\u653b\u51fb\u6a21\u578b\uff08Untargeted-empirical\uff09\u653b\u51fb\u6210\u529f\u7684\u6982\u7387\u975e\u5e38\u4f4e\uff0c\u5f53\u731c\u6d4b\u6b21\u6570 q=1000 \u7684\u65f6\u5019\u624d\u6709 0.1% \u7684\u6210\u529f\u7387\uff0c\u800c\u4f5c\u8005\u7684 pass2path \u6a21\u578b\u653b\u51fb\u6210\u529f\u7684\u6982\u7387\u6700\u9ad8\uff0c\u5f53 q=1000 \u7684\u65f6\u5019\uff0c\u80fd\u591f\u653b\u51fb\u6210\u529f\u7684\u6982\u7387\u8fbe\u5230 8.4%\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u5eb7\u5948\u5c14\u5927\u5b66\u7684\u8d26\u6237\u6709 1374 \u4e2a\u6d3b\u8dc3\u7684\u8d26\u6237\u6613\u53d7\u8fdc\u7a0b\u5bc6\u7801\u731c\u6d4b\u653b\u51fb\u3002\u4f5c\u8005\u628a\u8fd9\u4e9b\u6570\u636e\u63d0\u4ea4\u7ed9 ITSO\uff0c\u5e76\u548c\u4ed6\u4eec\u4e00\u8d77\u4fdd\u62a4\u5eb7\u5948\u5c14\u5927\u5b66\u7684\u8d26\u6237\u4fe1\u606f\u3002\nvec-ppsm \u6d4b\u8bd5 \u4e3a\u4e86\u8bc4\u4f30 vec-ppsm\uff0c\u4f5c\u8005\u9009\u4e86\u5176\u5b83\u7684\u4e00\u4e9b\u5bc6\u7801\u5f3a\u5ea6\u8bc4\u4f30\u5de5\u5177\u8fdb\u884c\u5bf9\u6bd4\uff0c\u4f5c\u8005\u8ba4\u4e3a\uff0c\u4e00\u4e2a\u5bc6\u7801\u5728 1000 \u6b21\u731c\u6d4b\u4e2d\u65e0\u6cd5\u653b\u51fb\u6210\u529f\u7684\u5c31\u88ab\u6807\u5fd7\u4e3a\uff1a\u201cUncracked\u201d\u3002\u4f5c\u8005\u4ece $$ D^{E}_{ts} $$ \u4e2d\u968f\u673a\u62bd\u53d6 10 \u4e07\u4e2a\u7528\u6237\u8fdb\u884c\u6d4b\u8bd5\uff0c\u6d4b\u8bd5\u7ed3\u679c\u5982\u56fe 4 \u6240\u793a\uff1a\n\u56fe4 \u5bc6\u7801\u5f3a\u5ea6\u8bc4\u4f30\n\u56fe\u4e2d\u7b2c\u4e00\u5217\u662f\u5bc6\u7801\u5f3a\u5ea6\u8bc4\u4f30\u5de5\u5177\uff0c vec-ppsm \u662f\u4f5c\u8005\u8bbe\u8ba1\u7684\u6a21\u578b\uff0c\u5e26 compressed \u8868\u793a\u538b\u7f29\u540e\u7684\u6a21\u578b\uff0c\u56fe\u4e2d\u7b2c\u4e8c\u5217\u548c\u7b2c\u4e09\u5217\u8868\u793a\uff1a\u5728\u5404\u4e2a\u5de5\u5177\u8bc4\u4f30\u51fa\u6765\u7684\u7ed3\u679c\u4e2d\uff0c\u8ba4\u4e3a\u4e0d\u5b89\u5168\u7684\u7ed3\u679c\u6240\u5360\u7684\u6bd4\u7387\uff0cq \u8868\u793a\u731c\u6d4b\u6b21\u6570\uff0c\u5f53\u8fd9\u4e2a\u5bc6\u7801\u80fd\u591f\u88ab pass2path \u5728 q \u6b21\u731c\u6d4b\u4e4b\u5185\u731c\u6d4b\u51fa\u6765\u7684\u65f6\u5019\uff0c\u8fd9\u4e2a\u5bc6\u7801\u88ab\u8ba4\u4e3a\u662f\u4e0d\u5b89\u5168\u7684\u3002\u8868\u4e2d\u7684\u7b2c\u56db\u5217\u8868\u793a\uff1a\u5f53 pass2path \u731c\u6d4b 1000 \u4e4b\u540e\uff0c\u4ecd\u7136\u6ca1\u6709\u88ab\u731c\u6d4b\u51fa\u6765\u7684\u6bd4\u7387\u3002\n\u6536\u83b7 \u603b\u5f97\u6765\u8bf4\uff0c\u8fd9\u7bc7\u6587\u7ae0\u5305\u542b\u4e24\u4e2a\u5173\u952e\u90e8\u5206\uff1a\u4e00\u90e8\u5206\u662f\u4f5c\u8005\u63d0\u51fa\u7684 pass2path \u6a21\u578b\uff0c\u8be5\u6a21\u578b\u5bf9\u4e8e\u4e00\u4e2a\u7ed9\u5b9a\u7684\u5bc6\u7801\uff0c\u751f\u6210\u8be5\u5bc6\u7801\u7684\u4e00\u7cfb\u5217\u53d8\u4f53\uff0c\u7528\u4e8e\u731c\u6d4b\u4f7f\u7528\u8fc7\u8be5\u5bc6\u7801\u7684\u7528\u6237\u53ef\u80fd\u4f7f\u7528\u7684\u5176\u5b83\u5bc6\u7801\uff1b\u53e6\u4e00\u90e8\u5206\u662f\u4f5c\u8005\u63d0\u51fa\u7684\u9632\u5fa1\u65b9\u6848 vec-ppsm\uff0c\u8be5\u65b9\u6848\u4e3b\u8981\u9488\u5bf9\u4f5c\u8005\u7684\u8fd9\u79cd\u653b\u51fb\u573a\u666f\uff0c\u5982\u679c\u7528\u6237\u4f7f\u7528\u7684\u5bc6\u7801\u662f\u65e7\u5bc6\u7801\u7684\u4e00\u4e2a\u53d8\u4f53\uff0c\u6216\u8005\u662f\u67d0\u4e00\u4e2a\u5df2\u7ecf\u6cc4\u9732\u7684\u5bc6\u7801\u7684\u4e00\u4e2a\u53d8\u4f53\uff0c\u5219\u8fd9\u4e2a\u9632\u5fa1\u65b9\u6848\u4f1a\u63d0\u793a\u7528\u6237\u5bc6\u7801\u7684\u5b89\u5168\u5f3a\u5ea6\u4f4e\uff0c\u800c\u4e0d\u7ba1\u8fd9\u4e2a\u5bc6\u7801\u6709\u591a\u590d\u6742\uff0c\u56e0\u4e3a pass2path \u53ef\u4ee5\u8f7b\u6613\u7684\u4ece\u5df2\u6709\u5bc6\u7801\u4e2d\u884d\u751f\u51fa\u8be5\u53d8\u4f53\u3002\u6700\u540e\uff0c\u4f5c\u8005\u628a pass2path \u6a21\u578b\u5e94\u7528\u5230\u771f\u5b9e\u7684\u73af\u5883\u4e2d\uff08\u5eb7\u5948\u5c14\u5927\u5b66\u7684\u8d26\u6237\u4e2d\uff09\uff0c\u8fd9\u4e5f\u662f\u4e4b\u524d\u7684\u5de5\u4f5c\u90fd\u6ca1\u6709\u505a\u8fc7\u7684\u3002\u5eb7\u5948\u5c14\u5927\u5b66\u5bf9\u8d26\u6237\u5bc6\u7801\u7684\u8981\u6c42\u5df2\u7ecf\u7b97\u662f\u6bd4\u8f83\u4e25\u683c\u7684\uff08\u5f3a\u5236\u91c7\u7528 L8C3 \u7b56\u7565\uff09\uff0c\u4f46\u662f\u5728\u4f5c\u8005\u7684\u8fd9\u4e2a\u6a21\u578b\u4e2d\uff0c\u5728\u5c0f\u4e8e 1000 \u6b21\u731c\u6d4b\u7684\u60c5\u51b5\u4e0b\uff0c\u53d1\u73b0\u4ed6\u4eec\u7684\u8d26\u6237\u4ecd\u6709 8.4% \u53ef\u4ee5\u88ab\u653b\u7834\u3002\u6700\u540e\uff0c\u76f8\u6bd4\u4e8e\u4e4b\u524d\u7684\u5de5\u4f5c\uff0c\u4f5c\u8005\u7684\u653b\u51fb\u6a21\u578b\u6240\u53d6\u5f97\u7684\u6548\u679c\u6700\u4f18\u3002\n\u8fd9\u7bc7\u6587\u7ae0\u7684\u5207\u5165\u70b9\u5c31\u662f\uff1a\u7528\u6237\u7684\u5bc6\u7801\u592a\u591a\uff0c\u96be\u4e8e\u8bb0\u5fc6\uff0c\u56e0\u6b64\uff0c\u5728\u4e0d\u540c\u7684\u7f51\u7ad9\uff0c\u7528\u6237\u901a\u5e38\u4f1a\u590d\u7528\u5bc6\u7801\uff0c\u6216\u8005\u53ea\u662f\u4f7f\u7528\u5df2\u6709\u5bc6\u7801\u7684\u4e00\u4e2a\u7b80\u5355\u53d8\u4f53\uff0c\u8fd9\u5c31\u4f7f\u5f97\u4f5c\u8005\u7684\u8fd9\u4e2a\u653b\u51fb\u6a21\u578b\u6bd4\u8f83\u6709\u6548\u3002\n\u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u8fd9\u79cd\u9488\u5bf9\u5177\u4f53\u95ee\u9898\u8fdb\u884c\u8bbe\u8ba1\u65b9\u6848\uff0c\u901a\u8fc7\u5b9e\u9a8c\uff0c\u63d0\u51fa\u4e00\u4e2a\u5b9e\u7528\u5316\u5de5\u5177\u7684\u8bba\u6587\uff0c\u633a\u4e0d\u9519\u7684\u3002\n\u6709\u4e2a\u975e\u5e38\u73b0\u5b9e\u7684\u95ee\u9898\uff0c\u7528\u6237\u7684\u8d26\u53f7\u5bc6\u7801\u901a\u5e38\u4e0e\u7528\u6237\u7684\u4e2a\u4eba\u4fe1\u606f\u6709\u5173\uff0c\u5728\u5df2\u7ecf\u77e5\u6653\u7528\u6237\u4e2a\u4eba\u4fe1\u606f\u7684\u60c5\u51b5\u4e0b\uff0c\u5982\u4f55\u5feb\u901f\u7834\u89e3\u5bc6\u7801\uff1f\n\u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206: \u2b50\u2b50\u2b50\u2b50\u2b50\n\u8bc4\u4ef7: \u5206\u6790\u7684\u975e\u5e38\u5168\u9762\u5ba2\u89c2\u3002\n\u53c2\u8003\u8d44\u6599\u53ca\u9644\u4ef6 \u4e0a\u6d77\u4ea4\u901a\u5927\u5b66GoSSIP\u7b14\u8bb0\uff1a https:\/\/loccs.sjtu.edu.cn\/gossip\/blog\/2019\/06\/21\/beyond-credential-stuffing-password-similarity-models-using-neural-networks\/ \u4f5c\u8005\u4e3b\u9875\uff1a https:\/\/www.cs.cornell.edu\/~bijeeta\/ \u8bba\u6587\u5730\u5740\uff1a https:\/\/www.cs.cornell.edu\/~rahul\/papers\/ppsm.pdf \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20191115-beyond-credential-stuffing-_-password-similarity-models-using-neural-networks\/","summary":"<h1 id=\"\u8bba\u6587\u4e3b\u9898\">\u8bba\u6587\u4e3b\u9898<\/h1>\n<p>\u540c\u4e00\u7528\u6237\u5728\u4e0d\u540c\u7f51\u7ad9\u7684\u5bc6\u7801\u76f8\u4f3c\u5ea6\u6a21\u578b\u3002<\/p>\n<h1 id=\"\u6458\u8981\">\u6458\u8981<\/h1>\n<h2 id=\"\u82f1\u6587\">\u82f1\u6587<\/h2>\n<p>Attackers increasingly use passwords leaked from one website to compromise associated accounts on other websites. Such targeted attacks work because users reuse, or pick similar, passwords for different websites. We recast one of the core technical challenges underlying targeted attacks as the task of modeling similarity of human-chosen passwords. We show how to learn good password similarity models using a compilation of 1.4 billion leaked email, password pairs. Using our trained models of password similarity, we exhibit the most damaging targeted attack to date. Simulations indicate that our attack compromises more than 16% of user accounts in less than a thousand guesses, should one of their other passwords be known to the attacker and despite the use of state-of-the art countermeasures. We show via a case study involving a large university authentication service that the attacks are also effective in practice. We go on to propose the first-ever defense against such targeted attacks, by way of personalized password strength meters (PPSMs). These are password strength meters that can warn users when they are picking passwords that are vulnerable to attacks, including targeted ones that take advantage of the user\u2019s previously compromised passwords. We design and build a PPSM that can be compressed to less than 3 MB, making it easy to deploy in order to accurately estimate the strength of a password against all known guessing attacks.<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011Beyond credential stuffing: Password similarity models using neural networks"},{"content":"\u8bba\u6587\u4e3b\u9898 \u5bf9\u4e2d\u6587\u5bc6\u7801\u8fdb\u884c\u5b9e\u8bc1\u5206\u6790\uff0c\u53d1\u73b0\u4e2d\u6587\u5bc6\u7801\u4e2d\u6709\u8da3\u7684\u7ed3\u6784\u548c\u7279\u5f81\uff0c\u63ed\u793a\u4e86\u4e2d\u6587\u5bc6\u7801\u7684\u53cc\u76f8\u5b89\u5168\u6027\uff08Bifacial-security\uff09\u3002\n\u6458\u8981 \u82f1\u6587 Much attention has been paid to passwords chosen by English speaking users, yet only a few studies have examined how non-English speaking users select passwords. In this paper, we perform an extensive, empirical analysis of 73.1 million real-world Chinese web passwords in comparison with 33.2 million English counterparts. We highlight a number of interesting structural and semantic characteristics in Chinese passwords. We further evaluate the security of these passwords by employing two state-of-the-art cracking techniques. In particular, our cracking results reveal the bifacial-security nature of Chinese passwords. They are weaker against online guessing attacks (i.e., when the allowed guess number is small, 1\u223c104) than English passwords. But out of the remaining Chinese passwords, they are stronger against offline guessing attacks (i.e., when the guess number is large, &gt;105) than their English counterparts. This reconciles two conflicting claims about the strength of Chinese passwords made by Bonneau (IEEE S&amp;P'12) and Li et al. (Usenix Security'14 and IEEE TIFS'16). At 107 guesses, the success rate of our improved PCFG-based attack against the Chinese datasets is 33.2%~49.8%, indicating that our attack can crack 92% to 188% more passwords than the state of the art. We also discuss the implications of our findings for password policies, strength meters and cracking.\n\u4e2d\u6587 \u5bf9\u4e8e\u82f1\u8bed\u7528\u6237\u6240\u9009\u62e9\u7684\u5bc6\u7801\u5df2\u7ed9\u4e88\u4e86\u5f88\u591a\u5173\u6ce8\uff0c\u4f46\u53ea\u6709\u5c11\u6570\u7814\u7a76\u7814\u7a76\u4e86\u975e\u82f1\u8bed\u7528\u6237\u5982\u4f55\u9009\u62e9\u5bc6\u7801\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5bf97,310\u4e07\u4e2a\u771f\u5b9e\u4e16\u754c\u7684\u4e2d\u6587Web\u5bc6\u7801\uff08\u4e0e3,320\u4e07\u4e2a\u82f1\u8bed\u76f8\u5bf9\u5e94\u7684\u82f1\u6587\u5bc6\u7801\uff09\u8fdb\u884c\u4e86\u5e7f\u6cdb\u7684\u5b9e\u8bc1\u5206\u6790\u3002\u6211\u4eec\u91cd\u70b9\u4ecb\u7ecd\u4e86\u4e2d\u6587\u5bc6\u7801\u4e2d\u8bb8\u591a\u6709\u8da3\u7684\u7ed3\u6784\u548c\u8bed\u4e49\u7279\u5f81\u3002\u6211\u4eec\u901a\u8fc7\u91c7\u7528\u4e24\u79cd\u6700\u65b0\u7684\u7834\u89e3\u6280\u672f\u6765\u8fdb\u4e00\u6b65\u8bc4\u4f30\u8fd9\u4e9b\u5bc6\u7801\u7684\u5b89\u5168\u6027\u3002\u7279\u522b\u662f\uff0c\u6211\u4eec\u7684\u7834\u89e3\u7ed3\u679c\u63ed\u793a\u4e86\u4e2d\u6587\u5bc6\u7801\u7684\u53cc\u9762\u5b89\u5168\u6027\u3002\u4e0e\u5728\u7ebf\u5bc6\u7801\u653b\u51fb\u76f8\u6bd4\uff0c\u5b83\u4eec\u5bf9\u5728\u7ebf\u731c\u6d4b\u653b\u51fb\u7684\u62b5\u6297\u529b\u8f83\u5f31\uff08\u5373\uff0c\u5f53\u5141\u8bb8\u7684\u731c\u6d4b\u6570\u5b57\u8f83\u5c0f\u65f6\uff0c\u4e3a1\u5230104\uff09\u3002\u4f46\u662f\u5728\u5176\u4f59\u7684\u4e2d\u6587\u5bc6\u7801\u4e2d\uff0c\u5b83\u4eec\u6bd4\u82f1\u6587\u5bf9\u5e94\u7684\u5bc6\u7801\u66f4\u80fd\u62b5\u6297\u79bb\u7ebf\u731c\u6d4b\u653b\u51fb\uff08\u5373\uff0c\u5f53\u731c\u6d4b\u6570\u5b57\u5927\u4e8e105\u65f6\uff09\u3002\u8fd9\u4e0e\u5173\u4e8eBonneau\uff08IEEE S\uff06P'12\uff09\u548cLi\u7b49\u4eba\u7684\u4e2d\u6587\u5bc6\u7801\u5f3a\u5ea6\u7684\u4e24\u4e2a\u77db\u76fe\u8bf4\u6cd5\u76f8\u543b\u5408\u3002 \uff08Usenix Security'14\u548cIEEE TIFS'16\uff09\u3002\u6839\u636e107\u4e2a\u731c\u6d4b\uff0c\u6211\u4eec\u6539\u8fdb\u7684\u57fa\u4e8ePCFG\u7684\u9488\u5bf9\u4e2d\u56fd\u6570\u636e\u96c6\u7684\u653b\u51fb\u7684\u6210\u529f\u7387\u4e3a33.2\uff05\u301c49.8\uff05\uff0c\u8fd9\u8868\u660e\u6211\u4eec\u7684\u653b\u51fb\u53ef\u4ee5\u7834\u89e3\u6bd4\u73b0\u6709\u6280\u672f\u591a92\uff05\u81f3188\uff05\u7684\u5bc6\u7801\u3002\u6211\u4eec\u8fd8\u5c06\u8ba8\u8bba\u6211\u4eec\u7684\u53d1\u73b0\u5bf9\u5bc6\u7801\u7b56\u7565\uff0c\u5f3a\u5ea6\u8ba1\u548c\u7834\u89e3\u7684\u5f71\u54cd\u3002\n\u5173\u952e\u5b57 \u5bc6\u7801\uff1b\u5bc6\u7801\u731c\u89e3\n\u89e3\u51b3\u95ee\u9898 \u73b0\u5b9e\u95ee\u9898 \u6587\u672c\u5bc6\u7801\u662f\u5f53\u4eca\u51e0\u4e4e\u6bcf\u4e2aWeb\u670d\u52a1\u4e2d\u8bbf\u95ee\u63a7\u5236\u7684\u4e3b\u8981\u5f62\u5f0f\u3002\u5c3d\u7ba1\u65e9\u5728\u56db\u5341\u5e74\u524d\u5c31\u5df2\u7ecf\u63ed\u793a\u4e86\u5b83\u4eec\u7684\u5b89\u5168\u9690\u60a3\uff0c\u5e76\u4e14\u81ea\u90a3\u65f6\u4ee5\u6765\u5df2\u63d0\u51fa\u4e86\u5404\u79cd\u66ff\u4ee3\u7684\u8eab\u4efd\u9a8c\u8bc1\u65b9\u6cd5\uff08\u4f8b\u5982\uff0c\u56fe\u5f62\u5bc6\u7801\u548c\u591a\u56e0\u7d20\u8eab\u4efd\u9a8c\u8bc1\uff09\uff0c\u4f46\u5bc6\u7801\u4ecd\u88ab\u5e7f\u6cdb\u4f7f\u7528\u3002\u5176\u4e2d\u4e00\u4e2a\u539f\u56e0\u662f\u5bc6\u7801\u5177\u6709\u8bb8\u591a\u4f18\u70b9\uff0c\u4f8b\u5982\u90e8\u7f72\u6210\u672c\u4f4e\uff0c\u6613\u4e8e\u6062\u590d\u548c\u660e\u663e\u7684\u7b80\u5355\u6027\uff0c\u800c\u5176\u4ed6\u8eab\u4efd\u9a8c\u8bc1\u65b9\u6cd5\u5f80\u5f80\u65e0\u6cd5\u63d0\u4f9b\u8fd9\u4e9b\u4f18\u70b9\u3002\u53e6\u4e00\u4e2a\u539f\u56e0\u5219\u662f\u7531\u4e8e\u8fb9\u9645\u6536\u76ca\uff08marginal gain\uff09\u901a\u5e38\u4e0d\u8db3\u4ee5\u5f25\u8865\u91cd\u5927\u7684\u8fc7\u6e21\u6210\u672c\uff0c\u56e0\u6b64\u7f3a\u4e4f\u6709\u6548\u7684\u5de5\u5177\u6765\u91cf\u5316\u4e0d\u592a\u660e\u663e\u7684\u66ff\u6362\u5bc6\u7801\u6210\u672c\u3002\u6b64\u5916\uff0c\u7528\u6237\u4e5f\u559c\u6b22\u5bc6\u7801\u3002\n\u4e4b\u524d\u7814\u7a76\u7684\u4e0d\u8db3 \u622a\u81f32018\u5e746\u6708\uff0c\u4e2d\u56fd\u67098.02\u4ebf\u7f51\u6c11\uff0c\u5360\u4e16\u754c\u4e92\u8054\u7f51\u4eba\u53e3\u768420\uff05\u4ee5\u4e0a\uff08\u4e5f\u662f\u6700\u5927\u6bd4\u4f8b\uff09\u3002\u4ee5\u4e0b\u5173\u952e\u95ee\u9898\u8fd8\u6ca1\u6709\u4ee4\u4eba\u6ee1\u610f\u7684\u7b54\u6848\uff1a\n\uff081\uff09\u662f\u5426\u5b58\u5728\u533a\u5206\u4e2d\u6587\u5bc6\u7801\u548c\u82f1\u6587\u5bc6\u7801\u7684\u7ed3\u6784\u6216\u8bed\u4e49\u7279\u5f81\uff1f\n\uff082\uff09\u4e2d\u6587\u5bc6\u7801\u5982\u4f55\u5e94\u5bf9\u4e3b\u6d41\u653b\u51fb\uff1f\n\uff083\uff09\u4ed6\u4eec\u662f\u5426\u6bd4\u82f1\u8bed\u5f31\u6216\u5f3a\uff1f\n\u8fd9\u4e9b\u95ee\u9898\u5fc5\u987b\u89e3\u51b3\uff0c\u4ee5\u4fbf\u4e3a\u5b89\u5168\u5de5\u7a0b\u5e08\u548c\u4e2d\u56fd\u7528\u6237\u63d0\u4f9b\u5fc5\u8981\u7684\u5b89\u5168\u6307\u5bfc\u3002\u4f8b\u5982\uff0c\u5982\u679c\u7b2c\u4e00\u4e2a\u95ee\u9898\u7684\u7b54\u6848\u662f\u80af\u5b9a\u7684\uff0c\u5219\u8868\u660e\u5bc6\u7801\u7b56\u7565\uff08\u4f8b\u5982length-8 + 2Class12 RNN-PSMZxcvbn\n\u65b9\u6cd5 \u5b9e\u8bc1\u5206\u6790 \u901a\u8fc7\u9996\u6b21\u5229\u75287310\u4e07\u4e2a\u771f\u5b9e\u7684\u4e2d\u6587\u5bc6\u7801\uff1a\n\uff081\uff09\u5b9a\u91cf\u8bc4\u4f30\u7528\u6237\u5bc6\u7801\u5728\u591a\u5927\u7a0b\u5ea6\u4e0a\u53d7\u5230\u5176\u6bcd\u8bed\u7684\u5f71\u54cd\uff1b\n\uff082\uff09\u7cfb\u7edf\u5730\u63a2\u7d22\u5bc6\u7801\u4e2d\u7684\u5e38\u89c1\u8bed\u4e49\uff08\u4f8b\u5982\u65e5\u671f\uff0c\u540d\u79f0\uff0c\u5730\u70b9\u548c\u7535\u8bdd\u53f7\u7801\uff09\uff1b\n\uff083\uff09\u8868\u660e\uff0c\u5c3d\u7ba1\u8fd9\u4e24\u4e2a\u7528\u6237\u7ec4\u7684\u5bc6\u7801\u662f\u5728\u4e0d\u540c\u7684\u5bc6\u7801\u7b56\u7565\u4e0b\u521b\u5efa\u7684\uff0c\u4f46\u5b83\u4eec\u9075\u5faa\u975e\u5e38\u76f8\u4f3c\u7684Zipf\u9891\u7387\u5206\u5e03\u3002\n\u53cd\u8f6c\u539f\u7406\uff08reversal principle\uff09 \u91c7\u7528\u4e24\u79cd\u6700\u5148\u8fdb\u7684\u5bc6\u7801\u7834\u89e3\u7b97\u6cd5\uff08\u5373\u57fa\u4e8ePCFG\u548c\u57fa\u4e8eMarkov\u7684\u7b97\u6cd5]\uff09\u6765\u8861\u91cf\u4e2d\u6587Web\u5bc6\u7801\u7684\u5f3a\u5ea6\uff0c\u672c\u6587\u8fd8\u6539\u8fdb\u4e86\u57fa\u4e8ePCFG\u7684\u7b97\u6cd5\uff0c\u4ee5\u66f4\u51c6\u786e\u5730\u6355\u83b7\u5177\u6709\u5355\u8c03\u957f\u7ed3\u6784\u7684\u5bc6\u7801\uff08\u4f8b\u5982\u201c 1qa2ws3ed\u201d\uff09\u3002\u201c\u53cd\u8f6c\u539f\u7406\u201d\u5373\u4e2d\u6587\u5bc6\u7801\u7684\u53cc\u76f8\u5b89\u5168\u6027\uff1a\u5f53\u5141\u8bb8\u7684\u731c\u6d4b\u6570\u5b57\u8f83\u5c0f\u65f6\uff0c\u5b83\u4eec\u6bd4\u82f1\u8bed\u5bc6\u7801\u5f31\u5f97\u591a\uff0c\u4f46\u662f\u5f53\u731c\u6d4b\u6570\u5b57\u8f83\u5927\u65f6\uff0c\u8fd9\u79cd\u5173\u7cfb\u5c31\u88ab\u9006\u8f6c\u4e86\u3002\u4ece\u800c\u8c03\u548c\u4ee5\u5f80\u6587\u732e\u4e2d\u7684\u4e92\u76f8\u77db\u76fe\u4e3b\u5f20\u3002\n\u4e2d\u56fd\u7684\u5bc6\u7801\u7279\u70b9 \u6570\u636e\u96c6\u548c\u9053\u5fb7\u8003\u8651 \u672c\u6587\u7684\u5b9e\u8bc1\u5206\u6790\u4f7f\u7528\u4e86\u6765\u81ea\u4e2d\u6587\u7f51\u7ad9\u7684\u516d\u4e2a\u5bc6\u7801\u6570\u636e\u96c6\u548c\u6765\u81ea\u82f1\u6587\u7f51\u7ad9\u7684\u4e09\u4e2a\u5bc6\u7801\u6570\u636e\u96c6\u3002\u603b\u5171\u8fd99\u4e2a\u6570\u636e\u96c6\u5305\u542b1.063\u4ebf\u4e2a\u5b9e\u9645\u5bc6\u7801\u3002\u5982\u4e0b\u8868\u6240\u793a\uff0c\u8fd99\u4e2a\u6570\u636e\u96c6\u5728\u670d\u52a1\uff0c\u8bed\u8a00\uff0c\u6587\u5316\u548c\u89c4\u6a21\u65b9\u9762\u6709\u6240\u4e0d\u540c\u3002\u4ed6\u4eec\u57282009\u5e74\u81f32012\u5e74\u95f4\u906d\u5230\u9ed1\u5ba2\u653b\u51fb\u5e76\u5728\u4e92\u8054\u7f51\u4e0a\u516c\u5f00\u53d1\u5e03\u3002\n\u5c3d\u7ba1\u8fd9\u4e9b\u6587\u732e\u662f\u516c\u5f00\u53ef\u7528\u7684\u5e76\u4e14\u5728\u6587\u732e\u4e2d\u5f97\u5230\u4e86\u5e7f\u6cdb\u4f7f\u7528\uff0c\u4f46\u662f\u8fd9\u4e9b\u6570\u636e\u96c6\u662f\u79c1\u4eba\u6570\u636e\u3002\u56e0\u6b64\u4ec5\u62a5\u544a\u6c47\u603b\u7684\u7edf\u8ba1\u4fe1\u606f\uff0c\u5e76\u5c06\u6bcf\u4e2a\u5355\u72ec\u7684\u5e10\u6237\u89c6\u4e3a\u673a\u5bc6\u4fe1\u606f\uff0c\u4ee5\u4fbf\u5728\u7814\u7a76\u4e2d\u4f7f\u7528\u8be5\u5e10\u6237\u4e0d\u4f1a\u589e\u52a0\u5bf9\u76f8\u5e94\u53d7\u5bb3\u8005\u7684\u98ce\u9669\uff0c\u5373\uff0c\u65e0\u6cd5\u5b66\u4e60\u5230\u4efb\u4f55\u53ef\u8bc6\u522b\u4e2a\u4eba\u8eab\u4efd\u7684\u4fe1\u606f\u3002\u6b64\u5916\uff0c\u8fd9\u4e9b\u6570\u636e\u96c6\u53ef\u80fd\u88ab\u653b\u51fb\u8005\u7528\u4f5c\u7834\u89e3\u5b57\u5178\uff0c\u800c\u672c\u6587\u7684\u4f7f\u7528\u65e2\u6709\u76ca\u4e8e\u5b66\u672f\u754c\u4e86\u89e3\u4e2d\u56fd\u7f51\u6c11\u7684\u5bc6\u7801\u9009\u62e9\uff0c\u4e5f\u6709\u76ca\u4e8e\u5b89\u5168\u7ba1\u7406\u5458\u4fdd\u62a4\u7528\u6237\u5e10\u6237\u3002\u7531\u4e8e\u6570\u636e\u96c6\u90fd\u662f\u516c\u5f00\u53ef\u7528\u7684\uff0c\u56e0\u6b64\u8fd9\u9879\u5de5\u4f5c\u7684\u7ed3\u679c\u662f\u53ef\u91cd\u590d\u7684\u3002\n\u6570\u636e\u6e05\u7406 \u672c\u6587\u6ce8\u610f\u5230\u4e00\u4e9b\u539f\u59cb\u6570\u636e\u96c6\uff08\u4f8b\u5982Rockyou\u548cTianya\uff09\u5305\u542b\u4e0d\u5fc5\u8981\u7684\u6807\u9898\uff0c\u8bf4\u660e\uff0c\u811a\u6ce8\uff0clen&gt; 100\u7684\u5bc6\u7801\u5b57\u7b26\u4e32\u7b49\u3002\u56e0\u6b64\uff0c\u5728\u8fdb\u884c\u4efb\u4f55\u63a2\u7d22\u4e4b\u524d\uff0c\u9996\u5148\u542f\u52a8\u6570\u636e\u6e05\u7406\u3002\u5c06\u4ece\u539f\u59cb\u6570\u636e\u4e2d\u5220\u9664\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u548c\u7528\u6237\u540d\u3002\u8fdb\u4e00\u6b65\u5220\u9664len&gt; 30\u7684\u5b57\u7b26\u4e32\uff0c\u56e0\u4e3a\u5728\u624b\u52a8\u68c0\u67e5\u539f\u59cb\u6570\u636e\u96c6\u4e4b\u540e\uff0c\u53d1\u73b0\u8fd9\u4e9b\u957f\u5b57\u7b26\u4e32\u4f3c\u4e4e\u4e0d\u662f\u7531\u7528\u6237\u751f\u6210\u7684\uff0c\u800c\u662f\u7531\u5bc6\u7801\u7ba1\u7406\u5668\u6216\u4ec5\u662f\u5783\u573e\u4fe1\u606f\u751f\u6210\u7684\u3002\u800c\u4e14\uff0c\u5982\u6b64\u957f\u7684\u5bc6\u7801\u901a\u5e38\u8d85\u51fa\u4e86\u5173\u5fc3\u7834\u89e3\u6548\u7387\u7684\u653b\u51fb\u8005\u7684\u8303\u56f4\u3002\u603b\u4f53\u800c\u8a00\uff0c\u6392\u9664\u7684\u5bc6\u7801\u7684\u6bd4\u4f8b\u53ef\u4ee5\u5ffd\u7565\u4e0d\u8ba1\uff08\u8bf7\u53c2\u9605\u4e0a\u8868\u4e2d\u7684\u6700\u540e\u4e00\u5217\uff09\uff0c\u4f46\u662f\u6b64\u6e05\u7406\u6b65\u9aa4\u7edf\u4e00\u4e86\u7834\u89e3\u7b97\u6cd5\u7684\u8f93\u5165\u5e76\u7b80\u5316\u4e86\u4ee5\u540e\u7684\u6570\u636e\u5904\u7406\u3002\n\u672c\u6587\u53d1\u73b0Tianya\u62167k7k\u5df2\u88ab\u6c61\u67d3\uff1aTianya\u6570\u636e\u96c6\u548c7k7k\u6570\u636e\u96c6\u4e4b\u95f4\u5b58\u5728\u4e0d\u53ef\u5ffd\u7565\u7684\u91cd\u53e0\uff08\u53737k7k\u768440.85\uff05\u548c\u5929\u6daf\u768424.62\uff05\uff09\u3002\u66f4\u5177\u4f53\u5730\u8bf4\u9996\u5148\u611f\u5230\u56f0\u60d1\u7684\u662f\uff0c\u5bc6\u7801\u201c 111222tianya\u201d\u6700\u521d\u5728\u4e24\u4e2a\u6570\u636e\u96c6\u7684\u524d\u5341\u5927\u6700\u5e38\u7528\u5217\u8868\u4e2d\u3002\u901a\u8fc7\u624b\u52a8\u68c0\u67e5\u539f\u59cb\u6570\u636e\u96c6\uff08\u5728\u5220\u9664\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u548c\u7528\u6237\u540d\u4e4b\u524d\uff09\uff0c\u60ca\u8bb6\u5730\u53d1\u73b0\u5927\u7ea6\u6709391\u4e07\u7684\u4e24\u4e2a\u6570\u636e\u96c6\u4e2d\u7684\u8054\u5408\u8d26\u6237\u3002\u6709\u4eba\u5c06\u8fd9\u4e9b\u8054\u540d\u8d26\u6237\u4eceTianya\u590d\u5236\u5230\u4e867k7k\uff0c\u4f46\u6ca1\u6709\u50cf\u4ee5\u524d\u7684\u4e3b\u8981\u7814\u7a76\u4e2d\u5f97\u51fa\u7684\u90a3\u6837\u4ece7k7k\u590d\u5236\u5230\u4e86Tianya\u3002\n\u5bc6\u7801\u7279\u6027 \uff081\uff09\u8bed\u8a00\u4f9d\u8d56\u6027 \u6709\u4e00\u79cd\u8bf4\u6cd5\u5373\u7528\u6237\u751f\u6210\u7684\u5bc6\u7801\u53d7\u5176\u672c\u56fd\u8bed\u8a00\u7684\u5f71\u54cd\u5f88\u5927\uff0c\u4f46\u662f\u8fc4\u4eca\u4e3a\u6b62\u5c1a\u672a\u8fdb\u884c\u5927\u89c4\u6a21\u7684\u5b9a\u91cf\u6d4b\u91cf\u3002\u4e3a\u4e86\u586b\u8865\u8fd9\u4e00\u7a7a\u767d\u9996\u5148\u8bf4\u660e\u4e86\u8fd99\u4e2a\u6570\u636e\u96c6\u7684\u5b57\u7b26\u5206\u5e03\uff0c\u7136\u540e\u6839\u636e\u5b57\u7b26\u5206\u5e03\u7684\u53cd\u8f6c\u6570\uff08\u964d\u5e8f\u6392\u5217\uff09\u6765\u6d4b\u91cf\u5bc6\u7801\u4e0e\u672c\u673a\u8bed\u8a00\u7684\u63a5\u8fd1\u7a0b\u5ea6\u3002\n\u4e0d\u51fa\u6240\u6599\uff0c\u6765\u81ea\u4e0d\u540c\u8bed\u8a00\u7ec4\u7684\u5bc6\u7801\u5177\u6709\u660e\u663e\u4e0d\u540c\u7684\u5b57\u6bcd\u5206\u5e03\uff08\u8bf7\u53c2\u89c1\u4e0b\u56fe\uff09\u3002\u51fa\u4e4e\u610f\u6599\u7684\u662f\uff0c\u5373\u4f7f\u5728\u591a\u79cd\u591a\u6837\u7684Web\u670d\u52a1\u4e2d\u751f\u6210\u548c\u4f7f\u7528\u4e86\u76f8\u540c\u8bed\u8a00\u7ec4\u7684\u5bc6\u7801\uff0c\u5176\u5b57\u6bcd\u5206\u5e03\u4e5f\u975e\u5e38\u76f8\u4f3c\u3002\u8fd9\u8868\u660e\uff0c\u5f53\u7ed9\u5b9a\u5bc6\u7801\u6570\u636e\u96c6\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u67e5\u5176\u5b57\u6bcd\u5206\u5e03\u6765\u5927\u81f4\u786e\u5b9a\u5176\u7528\u6237\u7684\u6bcd\u8bed\u3002\u6240\u6709\u4e2d\u6587\u5bc6\u7801\u7684\u5b57\u6bcd\u5206\u5e03\u6309\u964d\u5e8f\u6392\u5217\uff0c\u662faineohglwuyszxqcdjmbtfrkpv\uff0c\u800c\u6240\u6709\u82f1\u6587\u5bc6\u7801\u7684\u5206\u5e03\u662faeionrlstmcdyhubkgpjvfwzxq\u3002\u867d\u7136\u4e24\u4e2a\u5b57\u6bcd\u4e2d\u7684\u67d0\u4e9b\u5b57\u6bcd\uff08\u4f8b\u5982\uff0c\u201c a\u201d\uff0c\u201c e\u201d\u548c\u201c i\u201d\uff09\u9891\u7e41\u51fa\u73b0\uff0c\u4f46\u662f\u67d0\u4e9b\u5b57\u6bcd\uff08\u4f8b\u5982\uff0c\u201c q\u201d\u548c\u201c r\u201d\uff09\u4ec5\u5728\u4e00\u7ec4\u4e2d\u9891\u7e41\u51fa\u73b0\u3002\u653b\u51fb\u8005\u53ef\u4ee5\u5229\u7528\u8fd9\u4e9b\u4fe1\u606f\u6765\u51cf\u5c11\u641c\u7d22\u7a7a\u95f4\u5e76\u4f18\u5316\u5176\u7834\u89e3\u7b56\u7565\u3002\u8bf7\u6ce8\u610f\uff0c\u6b64\u5904\u6240\u6709\u767e\u5206\u6bd4\u5747\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u3002\n\u5c3d\u7ba1\u7528\u6237\u7684\u5bc6\u7801\u4f1a\u53d7\u5230\u5176\u6bcd\u8bed\u7684\u6781\u5927\u5f71\u54cd\uff0c\u4f46\u901a\u7528\u8bed\u8a00\u7684\u5b57\u6bcd\u9891\u7387\u53ef\u80fd\u4e0e\u5bc6\u7801\u7684\u5b57\u6bcd\u9891\u7387\u6709\u6240\u4e0d\u540c\u3002\u5b83\u4eec\u5728\u591a\u5927\u7a0b\u5ea6\u4e0a\u6709\u6240\u4e0d\u540c\uff1f\u6839\u636e\u4e4b\u524d\u7684\u8457\u4f5c\u5c06\u4e2d\u6587\uff08\u4f8b\u5982\u6587\u5b66\u4f5c\u54c1\uff0c\u62a5\u7eb8\u548c\u5b66\u672f\u8bba\u6587\u7b49\u4e66\u9762\u4e2d\u6587\u6587\u672c\uff09\u8f6c\u6362\u6210\u4e2d\u6587\u62fc\u97f3\u540e\u7684\u5b57\u6bcd\u5206\u5e03\u4e3ainauhegoyszdjmxwqbctlpfrkv\u3002\u8fd9\u8868\u660e\u5728\u4e2d\u6587\u5bc6\u7801\u4e2d\u5f88\u6d41\u884c\u7684\u67d0\u4e9b\u5b57\u6bcd\uff08\u4f8b\u5982\u201c l\u201d\u548c\u201c w\u201d\uff09\u5728\u4e2d\u6587\u4e66\u9762\u6587\u5b57\u4e2d\u7684\u51fa\u73b0\u9891\u7387\u8981\u4f4e\u5f97\u591a\u3002\u53ef\u80fd\u7684\u539f\u56e0\u53ef\u80fd\u662f\uff0c\u201c l\u201d\u548c\u201c w\u201d\u5206\u522b\u662f\u59d3\u6c0fli\u548cwang\uff08\u8fd9\u662f\u4e2d\u56fd\u6392\u540d\u524d2\u4f4d\u7684\u59d3\u6c0f\uff09\u7684\u7b2c\u4e00\u4e2a\u5b57\u6bcd\uff0c\u800c\u6b63\u5982\u663e\u793a\u7684\uff0c\u4e2d\u56fd\u7528\u6237\u559c\u6b22\u4f7f\u7528\u540d\u79f0\u521b\u5efa\u5176\u5bc6\u7801\u3002\n\u82f1\u8bed\u7528\u6237\u7684\u5bc6\u7801\u4e5f\u6709\u7c7b\u4f3c\u7684\u89c2\u5bdf\u7ed3\u679c\u3002\u82f1\u6587\u8bed\u8a00\u7684\u5b57\u6bcd\u5206\u5e03\uff08\u5373etaoinshrdlcumwfgypbvkjxqz\uff09\u6765\u81eawww.cryptograms.org\/letter-frequencies.php\u3002[1] \u4f8b\u5982\uff0c\u201c t\u201d\u5728\u82f1\u8bed\u6587\u672c\u4e2d\u5f88\u5e38\u89c1\uff0c\u4f46\u5728\u82f1\u8bed\u5bc6\u7801\u4e2d\u5e76\u4e0d\u5e38\u89c1\u3002\u4e00\u4e2a\u5408\u7406\u7684\u539f\u56e0\u53ef\u80fd\u662f\uff0c\u201c t\u201d\u7528\u5728\u4e86\u8bf8\u5982the, it, this, that, at, to\u4e4b\u7c7b\u7684\u6d41\u884c\u8bcd\u4e2d\uff0c\u800c\u8fd9\u79cd\u8bcd\u5728\u5bc6\u7801\u4e2d\u5f88\u5c11\u89c1\u3002\n\u4e3a\u4e86\u8fdb\u4e00\u6b65\u63a2\u7d22\u5bc6\u7801\u4e0e\u672c\u571f\u8bed\u8a00\u548c\u5176\u4ed6\u6570\u636e\u96c6\u7684\u5bc6\u7801\u7684\u7d27\u5bc6\u5ea6\uff0c\u6d4b\u91cf\u4e86\u4e24\u4e2a\u5bc6\u7801\u6570\u636e\u96c6\uff08\u4ee5\u53ca\u8bed\u8a00\uff09\u4e4b\u95f4\u5b57\u6bcd\u5206\u5e03\u5e8f\u5217\u7684\u53cd\u8f6c\u6570\uff08\u964d\u5e8f\u6392\u5217\uff09\u3002\u7ed3\u679c\u603b\u7ed3\u5728\u4e0b\u8868\u4e2d\u3002\u201cPinyin_fullname\u201d\u662f\u75312,426,841\u4e2a\u72ec\u7279\u7684\u4e2d\u6587\u5168\u540d\u7ec4\u6210\u7684\u8bcd\u5178\uff08\u4f8b\u5982wanglei\u548czhangwei\uff09\uff0c\u201cPinyin_word\u201d\u662f\u7531127,878\u4e2a\u72ec\u7279\u7684\u4e2d\u6587\u5355\u8bcd\uff08\u5982chang\u548ccheng\uff09\u7ec4\u6210\u7684\u8bcd\u5178\u3002\u8bf7\u6ce8\u610f\uff0c\u5e8f\u5217A\u5230\u5e8f\u5217B\u7684\u53cd\u8f6c\u6570\u7b49\u4e8eB\u5230A\u7684\u53cd\u8f6c\u6570\u3002\u4f8b\u5982\uff0cinauh\u5230aniuh\u7684\u53cd\u8f6c\u6570\u4e3a3\uff0c\u7b49\u4e8eaniuh\u5230inauh\u7684\u53cd\u8f6c\u6570\u3002\n\u5982\u4e0b\u8868\u6240\u793a\uff0c\u6765\u81ea\u540c\u4e00\u8bed\u8a00\u7ec4\u7684\u5bc6\u7801\u4e4b\u95f4\u7684\u5b57\u6bcd\u5206\u5e03\u53cd\u8f6c\u6570\u901a\u5e38\u6bd4\u6765\u81ea\u4e0d\u540c\u8bed\u8a00\u7ec4\u7684\u5bc6\u7801\u7684\u53cd\u8f6c\u6570\u5c0f\u5f97\u591a\u3002\u6b64\u503c\u4e5f\u660e\u663e\u5c0f\u4e8e\u5bc6\u7801\u53ca\u5176\u672c\u56fd\u8bed\u8a00\u4e4b\u95f4\u7684\u5b57\u6bcd\u5206\u5e03\u7684\u503c\uff08\u8bf7\u53c2\u9605\u88682\u4e2d\u7684\u7c97\u4f53\u503c\uff09\u3002\u540e\u8005\u7684\u671f\u671b\u503c\u8f83\u4f4e\u3002\u6240\u6709\u8fd9\u4e9b\u8868\u660e\uff0c\u6765\u81ea\u4e0d\u540c\u8bed\u8a00\u7684\u5bc6\u7801\u5728\u5b57\u6bcd\u5206\u5e03\u4e0a\u672c\u8d28\u4e0a\u5f7c\u6b64\u4e0d\u540c\uff0c\u5e76\u4e14\u5bc6\u7801\u63a5\u8fd1\u5176\u672c\u56fd\u8bed\u8a00\uff0c\u4f46\u533a\u522b\u4ecd\u7136\u5f88\u5927\uff08\u53ef\u6d4b\u91cf\uff09\u3002\n\uff082\uff09\u957f\u5ea6\u5206\u5e03 \u4e0b\u56fe\u63cf\u8ff0\u4e86\u5bc6\u7801\u7684\u957f\u5ea6\u5206\u5e03\u3002\u4e0d\u8bbaWeb\u670d\u52a1\uff0c\u8bed\u8a00\u548c\u6587\u5316\u5dee\u5f02\u5982\u4f55\uff0c\u6bcf\u4e2a\u6570\u636e\u96c6\u7684\u6700\u5e38\u7528\u5bc6\u7801\u957f\u5ea6\u57286\u523010\u4e4b\u95f4\uff0c\u5176\u4e2d6\u52308\u4e3a\u9996\u3002\u4ec5\u957f\u5ea6\u4e3a6\u523010\u7684\u5bc6\u7801\u5c31\u53ef\u4ee5\u5360\u6bcf\u4e2a\u6570\u636e\u96c6\u768475\uff05\u4ee5\u4e0a\uff0c\u5982\u679c\u8003\u8651\u957f\u5ea6\u4e3a5\u523012\u4f4d\u7684\u5bc6\u7801\uff0c\u5219\u8be5\u503c\u5c06\u5347\u81f390\uff05\u3002\u5f88\u5c11\u6709\u7528\u6237\u559c\u6b22\u957f\u5ea6\u8d85\u8fc715\u4e2a\u5b57\u7b26\u7684\u5bc6\u7801\u3002\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u4eba\u4eec\u4f3c\u4e4e\u66f4\u559c\u6b22\u5076\u6570\u957f\u5ea6\u800c\u4e0d\u662f\u5947\u6570\u957f\u5ea6\u3002\u53e6\u4e00\u4e2a\u6709\u8da3\u7684\u53d1\u73b0\u662f\uff0cCSDN\u5728\u5176\u957f\u5ea6\u5206\u5e03\u66f2\u7ebf\u4e2d\u4ec5\u663e\u793a\u4e00\u4e2a\u5cf0\u503c\uff0c\u5e76\u4e14\u5bc6\u7801\u7684\u957f\u5ea6&lt;8\u5c11\u5f97\u591a\uff08\u5373\u4ec52.16\uff05\uff09\u3002\u8fd9\u53ef\u80fd\u662f\u7531\u4e8e\u5bc6\u7801\u7b56\u7565\u8981\u6c42\u6b64\u7ad9\u70b9\u4e0a\u7684\u957f\u5ea6\u4e0d\u80fd\u5c0f\u4e8e8\u3002\n\uff083\uff09\u6700\u53d7\u6b22\u8fce\u7684\u5bc6\u7801 \u4e0b\u8868\u663e\u793a\u4e86\u6765\u81ea\u4e0d\u540c\u670d\u52a1\u7684\u524d10\u4e2a\u6700\u5e38\u89c1\u7684\u5bc6\u7801\u3002\u6240\u6709\u6570\u636e\u96c6\u4e2d\u6700\u5e38\u89c1\u7684\u5bc6\u7801\u662f\u201c 123456\u201d\uff0cCSDN\u662f\u552f\u4e00\u7684\u4f8b\u5916\uff0c\u56e0\u4e3a\u5176\u5bc6\u7801\u7b56\u7565\u8981\u6c42\u5bc6\u7801\u7684\u957f\u5ea6\u4e3a8+\uff08\u89c1\u56fe2\uff09\u3002\u201c111111\u201d\u7d27\u8ddf\u5176\u540e\u3002\u5176\u4ed6\u6d41\u884c\u7684\u4e2d\u6587\u5bc6\u7801\u5305\u62ec\u201c 123123\u201d\uff0c\u201c 123321\u201d\u548c\u201c 123456789\u201d\uff0c\u5b83\u4eec\u5747\u7531\u6570\u5b57\u7ec4\u6210\uff0c\u5e76\u4ee5\u7b80\u5355\u7684\u65b9\u5f0f\uff08\u4f8b\u5982\u91cd\u590d\u548c\u56de\u6587\uff09\u7ec4\u6210\u3002\u7231\u60c5\u8fd8\u5c55\u793a\u4e86\u5176\u795e\u5947\u7684\u529b\u91cf\uff1a\u201c 5201314\u201d\uff0c\u5728\u4e2d\u6587\u4e2d\u5177\u6709\u7c7b\u4f3c\u7684\u201c\u6211\u6c38\u8fdc\u7231\u4f60\u201d\u7684\u53d1\u97f3\uff0c2\u51fa\u73b0\u5728\u56db\u4e2a\u4e2d\u6587\u6570\u636e\u96c6\u7684\u524d\u5341\u540d\u4e2d\u3002\u76f8\u53cd\uff0c\u82f1\u8bed\u6570\u636e\u96c6\u4e2d\u7684\u6d41\u884c\u5b57\u6bcd\u5f80\u5f80\u662f\u6709\u610f\u4e49\u7684\u5b57\u6bcd\u5b57\u7b26\u4e32\uff08\u4f8b\u5982\u201c sunshine\u201d\u548c\u201c letmein\u201d\uff09\u3002\u6c38\u6052\u7684\u7231\u60c5\u4e3b\u9898-\u5766\u7387\u5730\u8bf4\uff0c\u201c iloveyou\u201d\uff0c\u6216\u8005\u4e5f\u8bb8\u662f\u59d4\u5a49\u5730\u8bf4\uff0c\u662f\u201cprincess\u201d\uff0c\u4e5f\u51fa\u73b0\u5728\u82f1\u8bed\u6570\u636e\u96c6\u7684\u524d10\u540d\u5217\u8868\u4e2d\u3002\u7ed3\u679c\u8bc1\u5b9e\u4e86\u8bf4\u6cd5\u201c\u65e9\u5728\u7f51\u7edc\u51fa\u73b0\u4e4b\u521d\uff0c\u6700\u6d41\u884c\u7684\u5bc6\u7801\u662f12345\u3002\u4eca\u5929\uff0c\u5b83\u867d\u7136\u957f\u4e86\u4e00\u4f4d\uff0c\u4f46\u66f4\u4e0d\u5b89\u5168\uff1a123456\u3002\u201d\n\uff084\uff09\u5bc6\u7801\u4e2d\u7684\u8bed\u4e49 \u4e0b\u8868\u663e\u793a\u4e86\u5bc6\u7801\u4e2d\u5404\u79cd\u8bed\u4e49\u6a21\u5f0f\u7684\u666e\u904d\u6027\u3002\u8bb8\u591a\u8bf4\u82f1\u8bed\u7684\u7528\u6237\u503e\u5411\u4e8e\u4f7f\u7528\u539f\u59cb\u7684\u82f1\u8bed\u5355\u8bcd\u4f5c\u4e3a\u5176\u5bc6\u7801\u6784\u5efa\u5757\uff1a25.88\uff05\uff0c\u5c065\u4e2a\u5b57\u6bcd\u4ee5\u4e0a\u7684\u5355\u8bcd\u63d2\u5165\u5176\u5bc6\u7801\u3002\u4f7f\u75285\u4e2a\u5b57\u6bcd\u4ee5\u4e0a\u7684\u5355\u8bcd\u7684\u5bc6\u7801\u5360\u4f7f\u75285\u4e2a\u5b57\u6bcd\u4ee5\u4e0a\u7684\u5b50\u5b57\u7b26\u4e32\u7684\u5bc6\u7801\u603b\u6570\u7684\u4e09\u5206\u4e4b\u4e00\u4ee5\u4e0a\u3002\u76f8\u6bd4\u4e4b\u4e0b\uff0c\u9009\u62e9\u4e2d\u6587\u5355\u8bcd\u6784\u5efa\u5bc6\u7801\u7684\u4e2d\u56fd\u7528\u6237\u8f83\u5c11\uff082.41\uff05\uff09\uff0c\u4f46\u4ed6\u4eec\u66f4\u559c\u6b22\u62fc\u97f3\u540d\u79f0\uff0811.50\uff05\uff09\uff0c\u5c24\u5176\u662f\u5168\u540d\u3002\n\u7279\u522b\u662f\u5728\u6240\u6709\u5305\u542b5\u4e2a\u5b57\u6bcd\u4ee5\u4e0a\u7684\u5b50\u5b57\u7b26\u4e32\u7684\u4e2d\u6587\u5bc6\u7801\u4e2d\uff0822.42\uff05\uff09\uff0c\u4e00\u534a\u4ee5\u4e0a\uff0811.24\uff05\uff09\u5305\u542b5\u4e2a\u5b57\u6bcd\u4ee5\u4e0a\u7684\u62fc\u97f3\u5168\u540d\u3002\u4e5f\u67094.10\uff05\u7684\u82f1\u6587\u5bc6\u7801\u5305\u542b5\u4e2a\u5b57\u6bcd\u4ee5\u4e0a\u7684\u5168\u62fc\u97f3\u540d\u79f0\u3002\u4e00\u4e2a\u5408\u7406\u7684\u89e3\u91ca\u662f\uff0c\u8bb8\u591a\u4e2d\u56fd\u7528\u6237\u5df2\u7ecf\u5728\u8fd9\u4e9b\u82f1\u8bed\u7ad9\u70b9\u4e2d\u521b\u5efa\u4e86\u5e10\u6237\u3002\u4f8b\u5982\uff0c\u6d41\u884c\u7684\u4e2d\u6587\u62fc\u97f3\u540d\u79f0\u201c zhangwei\u201d\u51fa\u73b0\u5728Rockyou\u548cYahoo\u4e2d\u3002\u8fd8\u6ce8\u610f\u5230\u82f1\u8bed\u540d\u79f0\u4e5f\u5e7f\u6cdb\u7528\u4e8e\u82f1\u8bed\u5bc6\u7801\u4e2d\uff0c\u4f46\u662f\u5168\u540d\u4e0d\u5982\u59d3\u6c0f\u548c\u540d\u5b57\u6d41\u884c\u3002\n\u5e73\u5747\u670916.99\uff05\u7684\u4e2d\u56fd\u7528\u6237\u5728\u5bc6\u7801\u4e2d\u63d2\u5165\u4e00\u4e2a\u516d\u4f4d\u6570\u7684\u65e5\u671f\u3002\u8fdb\u4e00\u6b65\u8003\u8651\u5230\u7528\u6237\u559c\u6b22\u5c06\u81ea\u5df1\u7684\u4fe1\u606f\u5305\u542b\u5728\u5bc6\u7801\u4e2d\uff0c\u8fd9\u6837\u7684\u65e5\u671f\u5f88\u53ef\u80fd\u662f\u7528\u6237\u7684\u751f\u65e5\u3002\u6b64\u5916\uff0c\u7ea6\u670930.89\uff05\u7684\u4e2d\u6587\u7528\u6237\u4f7f\u75284\u4f4d\u6570\u5b57\u4ee5\u4e0a\u7684\u65e5\u671f\u6765\u521b\u5efa\u5bc6\u7801\uff0c\u8fd9\u6bd4\u82f1\u8bed\u7528\u6237\u9ad8\u51fa3.59\u500d\uff08\u53738.61\uff05\uff09\u3002\u53e6\u5916\uff0c\u670913.49\uff05\u7684\u4e2d\u56fd\u7528\u6237\u5728\u5bc6\u7801\u4e2d\u8f93\u5165\u56db\u4f4d\u6570\u7684\u5e74\u4efd\uff0c\u8fd9\u6bd4\u8bf4\u82f1\u8bed\u7684\u7528\u6237\uff083.80\uff05\uff09\u9ad83.55\u500d\u3002\u6ce8\u610f\u5230\u53ef\u80fd\u6709\u4e00\u4e9b\u9ad8\u4f30\uff0c\u56e0\u4e3a\u6ca1\u6709\u529e\u6cd5\u660e\u786e\u533a\u5206\u67d0\u4e9b\u6570\u5b57\u5e8f\u5217\u662f\u5426\u4e3a\u65e5\u671f\uff0c\u4f8b\u5982010101\u548c520520\u3002\u8fd9\u4e24\u4e2a\u5e8f\u5217\u53ef\u80fd\u662f\u65e5\u671f\uff0c\u4f46\u5b83\u4eec\u4e5f\u53ef\u80fd\u5177\u6709\u5176\u4ed6\u8bed\u4e49\u542b\u4e49\uff08\u4f8b\u5982520520\u542c\u8d77\u6765\u50cf\u201c\u6211\u7231\u4f60\uff0c\u6211\u7231\u4f60\u201d\uff09\u3002\u5982\u7a0d\u540e\u6240\u8ff0\u5df2\u7ecf\u8bbe\u8ba1\u51fa\u89e3\u51b3\u6b64\u95ee\u9898\u7684\u5408\u7406\u65b9\u6cd5\u3002\u603b\u4e4b\uff0c\u65e5\u671f\u5728\u4e2d\u56fd\u7528\u6237\u7684\u5bc6\u7801\u4e2d\u8d77\u7740\u81f3\u5173\u91cd\u8981\u7684\u4f5c\u7528\u3002\n\u4e3b\u8981\u6ce8\u610f\u5bc6\u7801\u957f\u5ea64\u30016\u548c8\u4f4d\u6570\u5b57\uff0c\u56e0\u4e3a\uff1a\n1\uff09\u957f\u5ea64\u548c6\u662f\u897f\u65b9\u548c\u4e9a\u6d32\u4f7f\u7528\u6700\u5e7f\u6cdb\u7684PIN\u7801\u7684\u957f\u5ea6\uff1b\n2\uff096\u548c8\u662f\u4e24\u4e2a\u6700\u5e38\u89c1\u7684\u5bc6\u7801\u957f\u5ea6\u3002\n\u6709\u8da3\u7684\u662f\uff0c\u67092.91\uff05\u7684\u4e2d\u56fd\u7528\u6237\u5f88\u53ef\u80fd\u4f7f\u7528\u517611\u4f4d\u6570\u5b57\u7684\u624b\u673a\u53f7\u7801\u4f5c\u4e3a\u5bc6\u7801\uff0c\u5360\u6240\u6709\u5bc6\u7801\u768439.59\uff05\uff0c\u5176\u5b50\u5b57\u7b26\u4e32\u8d85\u8fc711\u4f4d\u3002\u5e73\u5747\u800c\u8a00\uff0c\u4e2d\u6587\u5bc6\u7801\u768412.39\uff05\u957f\u4e8e11\u3002\u56e0\u6b64\uff0c\u5982\u679c\u653b\u51fb\u8005\u53ef\u4ee5\u786e\u5b9a\uff08\u4f8b\u5982\uff0c\u901a\u8fc7\u80a9\u7aa5\uff09\u53d7\u5bb3\u8005\u4f7f\u7528\u4e86\u957f\u5bc6\u7801\uff0c\u5219\u5979\u6210\u529f\u7684\u53ef\u80fd\u6027\u5f88\u9ad8\uff0c\u4e3a23.48\uff05\uff08= 2.91\uff05\/12.39\uff05\uff09\uff0c\u53ea\u9700\u5c1d\u8bd5\u53d7\u5bb3\u8005\u768411\u4f4d\u6570\u624b\u673a\u53f7\u7801\u5373\u53ef\u3002\u8fd9\u63ed\u793a\u4e86\u9488\u5bf9\u957f\u4e2d\u6587\u5bc6\u7801\u7684\u5b9e\u7528\u653b\u51fb\u7b56\u7565\u3002\n\u8bf7\u6ce8\u610f\uff0c\u5728\u786e\u5b9a\u6587\u672c\/\u6570\u5b57\u5e8f\u5217\u662f\u5426\u5c5e\u4e8e\u7279\u5b9a\u8bcd\u5178\u65f6\u5b58\u5728\u4e00\u4e9b\u4e0d\u53ef\u907f\u514d\u7684\u6b67\u4e49\uff0c\u800c\u8fd9\u4e9b\u6b67\u4e49\u7684\u4e0d\u6b63\u786e\u89e3\u6790\u4f1a\u5bfc\u81f4\u8fc7\u9ad8\u6216\u8fc7\u4f4e\u7684\u4f30\u8ba1\u3002\u8fd9\u91cc\u4ee5\u201c YYMMDD\u201d\u4e3a\u4f8b\u3002\u4f8b\u5982\uff0c111111\u548c520521\u90fd\u5c5e\u4e8e\u201c YYMMDD\u201d\uff0c\u5e76\u4e14\u975e\u5e38\u53d7\u6b22\u8fce\u3002\u4f46\u662f\uff0c\u7528\u6237\u9009\u62e9\u5b83\u4eec\u7684\u53ef\u80fd\u6027\u5f88\u53ef\u80fd\u4ec5\u662f\u56e0\u4e3a\u5b83\u4eec\u662f\u6613\u4e8e\u8bb0\u5fc6\u7684\u91cd\u590d\u6570\u5b57\u6216\u6709\u610f\u4e49\u7684\u5b57\u7b26\u4e32\uff0c\u5e76\u5c06\u5b83\u4eec\u89c6\u4e3a\u65e5\u671f\u4f1a\u5bfc\u81f4\u9ad8\u4f30\u3002\u7136\u800c\uff0c\u5b83\u4eec\u786e\u5b9e\u53ef\u4ee5\u662f\u65e5\u671f\uff08\u4f8b\u5982\uff0c111111\u4ee3\u8868\u201c 2011\u5e7411\u670811\u65e5\u201d\uff0c\u800c520131\u4ee3\u8868\u201c 1952\u5e741\u670831\u65e5\u201d\uff09\uff0c\u5e76\u4e14\u5c06\u5b83\u4eec\u5b8c\u5168\u6392\u9664\u5728\u201c YYMMDD\u201d\u4e4b\u5916\u4f1a\u5bfc\u81f4\u65e5\u671f\u88ab\u4f4e\u4f30\u3002\n\u56e0\u6b64\uff0c\u5047\u8bbe\u7528\u6237\u751f\u65e5\u662f\u968f\u673a\u5206\u5e03\u7684\uff0c\u5e76\u4e14\u5c06\u8fd9\u4e9b\u65e5\u671f\u7684\u671f\u671b\u503c\uff08\u7531E\u8868\u793a\uff09\u800c\u4e0d\u662f\u96f6\u5206\u914d\u7ed9\u8fd9\u4e9b\u5f02\u5e38\u65e5\u671f\u7684\u51fa\u73b0\u9891\u7387\u3002\u5728\u5b57\u5178\u201c YYMMDD\u201d\u4e2d\u624b\u52a8\u8bc6\u522b\u51fa17\u4e2a\u5f02\u5e38\u65e5\u671f\uff0c\u8fd9\u4e9b\u65e5\u671f\u6700\u521d\u7684\u9891\u7387\u5927\u4e8e10E\uff0c\u5e76\u51fa\u73b0\u5728\u516d\u4e2a\u4e2d\u6587\u6570\u636e\u96c6\u7684\u6bcf\u4e2a\u524d1000\u4e2a\u5217\u8868\u4e2d\u3002\u8fd9\u6837\uff0c\u53ef\u4ee5\u5f88\u5927\u7a0b\u5ea6\u4e0a\u89e3\u51b3\u6b67\u4e49\u3002\u540c\u6837\u5904\u7406\u201c MMDD\u201d\u4e2d\u768416\u4e2a\u5f02\u5e38\u9879\u3002\n\u4e2d\u6587Web\u5bc6\u7801\u7684\u5f3a\u5ea6 \u73b0\u5728\uff0c\u4f7f\u7528\u4e24\u79cd\u6700\u5148\u8fdb\u7684\u5bc6\u7801\u653b\u51fb\u7b97\u6cd5\uff08\u5373\u57fa\u4e8ePCFG\u548c\u57fa\u4e8eMarkov\uff09\u6765\u8bc4\u4f30\u4e2d\u6587Web\u5bc6\u7801\u7684\u5f3a\u5ea6\uff0c \u5b9e\u9645\u4e0a\u53ef\u4ee5\u5229\u7528\u4f8b\u5982\u65e5\u671f\u548c\u62fc\u97f3\u540d\u79f0\u6765\u8fdb\u884c\u5bc6\u7801\u731c\u6d4b\n1\u3001\u57fa\u4e8ePCFG\u7684\u653b\u51fb \u57fa\u4e8ePCFG\u7684\u6a21\u578b\u662f\u6700\u65b0\u7684\u7834\u89e3\u6a21\u578b\u4e4b\u4e00\u3002\u9996\u5148\uff0c\u5b83\u5c06\u8bad\u7ec3\u96c6\u4e2d\u7684\u6240\u6709\u5bc6\u7801\u5212\u5206\u4e3a\u76f8\u4f3c\u5b57\u7b26\u5e8f\u5217\u7684\u6bb5\uff0c\u5e76\u83b7\u5f97\u76f8\u5e94\u7684\u57fa\u672c\u7ed3\u6784\u53ca\u5176\u76f8\u5173\u7684\u51fa\u73b0\u6982\u7387\u3002\u4f8b\u5982\uff0c\u5c06\u201c wanglei @ 123\u201d\u5212\u5206\u4e3aL\u6bb5\u201c wanglei\u201d\uff0cS\u6bb5\u201c @\u201d\u548cD\u6bb5\u201c 123\u201d\uff0c\u4ece\u800c\u5f97\u5230\u57fa\u7840\u7ed3\u6784L7S1D3\u3002L7S1D3\u7684\u6982\u7387\u662f(#of L7S1D3)\/(#of base structures)\u3002\u6b64\u7c7b\u4fe1\u606f\u7528\u4e8e\u751f\u6210\u6982\u7387\u4e0a\u4e0b\u6587\u65e0\u5173\u6587\u6cd5\u3002\n\u7136\u540e\uff0c\u4eba\u4eec\u53ef\u4ee5\u4ee5\u6982\u7387\u9012\u51cf\u7684\u987a\u5e8f\u5f97\u51fa\u5bc6\u7801\u731c\u6d4b\u3002\u6bcf\u4e2a\u731c\u6d4b\u7684\u6982\u7387\u662f\u5176\u63a8\u5bfc\u8fc7\u7a0b\u4e2d\u6240\u4f7f\u7528\u7684\u7ed3\u679c\u7684\u6982\u7387\u7684\u4e58\u79ef\u3002\u4f8b\u5982\uff0c\u5c06\u201c liwei@123\u201d\u7684\u6982\u7387\u8ba1\u7b97\u4e3aP\uff08\u201c liwei@123\u201d\uff09\uff1d P\uff08L5S1D3\uff09\u00b7P\uff08L5\u2192liwei\uff09\u00b7P\uff08S1\u2192@\uff09\u00b7P\uff08D3\u2192123\uff09\u3002D\u548cS\u6bb5\u7684\u6982\u7387\u662f\u901a\u8fc7\u8ba1\u7b97\u4ece\u8bad\u7ec3\u96c6\u4e2d\u5b66\u4e60\u7684\uff0c\u800cL\u6bb5\u5219\u662f\u901a\u8fc7\u4ece\u8bad\u7ec3\u96c6\u4e2d\u5b66\u4e60\u6216\u4f7f\u7528\u5916\u90e8\u8f93\u5165\u8bcd\u5178\u6765\u5904\u7406\u7684\u3002\u672c\u6587\u901a\u8fc7\u76f4\u63a5\u4ece\u8bad\u7ec3\u96c6\u4e2d\u5b66\u4e60\u6765\u5b9e\u4f8b\u5316\u5bc6\u7801\u731c\u6d4b\u7684PCFG L\u6bb5\u3002\n\u6309\u8bed\u8a00\u5c069\u4e2a\u6570\u636e\u96c6\u5206\u4e3a\u4e24\u7ec4\u3002\u5bf9\u4e8e\u4e2d\u6587\u6d4b\u8bd5\u96c6\uff0c\u4eceDuowan\u6570\u636e\u96c6\u4e2d\u968f\u673a\u9009\u62e91M\u5bc6\u7801\u4f5c\u4e3a\u8bad\u7ec3\u96c6\uff08\u7528\u201c Duowan_1M\u201d\u8868\u793a\uff09\u3002\u539f\u56e0\u662f\uff1a\u5728\u6570\u636e\u96c6\u201cAll Chinese PWs\u201d\u4e2d\uff0cDuowan\u7684\u53cd\u8f6c\u6570\u6700\u5c11\uff0c\u5e76\u4e14\u53ef\u80fd\u6700\u597d\u5730\u8868\u793a\u901a\u7528\u7684\u4e2d\u6587Web\u5bc6\u7801\u3002\u540c\u6837\uff0c\u5bf9\u4e8e\u82f1\u8bed\u6d4b\u8bd5\u96c6\uff0c\u4eceRockyou\u4e2d\u9009\u62e91M\u5bc6\u7801\u4f5c\u4e3a\u8bad\u7ec3\u96c6\u3002\u7531\u4e8e\u4ec5\u4f7f\u7528\u4e86Duowan\u548cRockyou\u7684\u4e00\u90e8\u5206\uff0c\u56e0\u6b64\u5c06\u5176\u4f59\u7684\u5bc6\u7801\u548c\u5176\u4ed67\u4e2a\u6570\u636e\u96c6\u7528\u4f5c\u6d4b\u8bd5\u96c6\u3002\u4e0b\u56fe\uff08a\uff09\u548c\uff08b\uff09\u5206\u522b\u663e\u793a\u4e86\u5bf9\u4e2d\u6587\u7ec4\u548c\u82f1\u6587\u7ec4\u7684\u653b\u51fb\u7ed3\u679c\u3002\n**\u53cc\u76f8\u5b89\u5168\u3002**\u5f53\u5141\u8bb8\u7684\u731c\u6d4b\u6570\u5b57\uff08\u5373\u641c\u7d22\u7a7a\u95f4\u5927\u5c0f\uff09\u5c0f\u4e8e\u7ea63,000\u65f6\uff0c\u4e2d\u6587\u5bc6\u7801\u901a\u5e38\u6bd4\u540c\u4e00\u670d\u52a1\u7684\u82f1\u6587\u5bc6\u7801\u5f31\uff08\u4f8b\u5982\uff0cTianya\u4e0eRock you\uff0cDodonew\u4e0eYahoo\u548cCSDN\u4e0ePhpbb\uff09\u3002\u4f8b\u5982\uff0c\u6309100\u4e2a\u731c\u6d4b\uff0c\u5bf9Tianya\uff0cDodonew\u548cCSDN\u7684\u6210\u529f\u7387\u5206\u522b\u4e3a10.2\uff05\uff0c4.3\uff05\u548c9.7\uff05\uff0c\u800c\u82f1\u8bed\u6c34\u5e73\u5206\u522b\u4e3a4.6\uff05\uff0c1.9\uff05\u548c3.7\uff05\u3002\u4f46\u662f\uff0c\u5f53\u641c\u7d22\u7a7a\u95f4\u5927\u5c0f\u5927\u4e8e10,000\u65f6\uff0c\u4e2d\u6587Web\u5bc6\u7801\u901a\u5e38\u6bd4\u82f1\u6587\u5bc6\u7801\u5f3a\u5f97\u591a\u3002\u4f8b\u5982\uff0c\u57281000\u4e07\u4e2a\u731c\u6d4b\u4e2d\uff0c\u5bf9Tianya\uff0cDodonew\u548cCSDN\u7684\u6210\u529f\u7387\u5206\u522b\u4e3a37.5\uff05\uff0c28.8\uff05\u548c29.9\uff05\uff0c\u800c\u82f1\u8bed\u6c34\u5e73\u5206\u522b\u4e3a49.7\uff05\uff0c39.0\uff05\u548c41.4\uff05\u3002\u5f53\u731c\u6d4b\u6570\u8fdb\u4e00\u6b65\u589e\u52a0\u65f6\uff0c\u5f3a\u5ea6\u5dee\u8ddd\u5c06\u66f4\u5927\u3002\u8fd9\u63ed\u793a\u4e86\u4e00\u79cd\u9006\u8f6c\u539f\u7406\uff0c\u5373\u4e2d\u6587\u5bc6\u7801\u7684\u53cc\u76f8\u5b89\u5168\u6027\uff1a\u4e0e\u82f1\u6587\u5bc6\u7801\u76f8\u6bd4\uff0c\u5b83\u4eec\u66f4\u5bb9\u6613\u53d7\u5230\u5728\u7ebf\u731c\u6d4b\u653b\u51fb\uff08\u5373\uff0c\u5f53\u5141\u8bb8\u7684\u731c\u6d4b\u6570\u8f83\u5c0f\u65f6\uff09\uff1b\u4f46\u662f\uff0c\u5728\u5269\u4e0b\u7684\u4e2d\u6587\u5bc6\u7801\u4e2d\uff0c\u5b83\u4eec\u66f4\u5b89\u5168\u5730\u9632\u6b62\u4e86\u79bb\u7ebf\u731c\u6d4b\u3002\u8fd9\u79cd\u53cc\u9762\u5b89\u5168\u6027\u5f88\u5927\u7a0b\u5ea6\u4e0a\u662f\u7531\u4e8e\u57fa\u4e8e\u6570\u5b57\u7684\u5bc6\u7801\u7684\u53cc\u9762\u5bc6\u5ea6\u6027\u8d28\uff1a\u57fa\u4e8e\u6700\u9ad8\u6570\u5b57\u7684\u5bc6\u7801\u66f4\u52a0\u8d8b\u540c\uff0c\u800c\u6570\u5b57\u901a\u5e38\u6bd4\u5b57\u6bcd\u66f4\u5177\u968f\u673a\u6027\uff08\u4e14\u53d1\u6563\u6027\uff09\u3002\n2\u3001\u57fa\u4e8e\u9a6c\u5c14\u53ef\u592b\u7684\u653b\u51fb \u4e3a\u4e86\u663e\u793a\u4e86\u5173\u4e8e\u53e3\u4ee4\u5b89\u5168\u6027\u7684\u7ed3\u679c\u7684\u9c81\u68d2\u6027\uff0c\u8fd8\u5bf9\u57fa\u4e8e\u9a6c\u5c14\u53ef\u592b\u7684\u653b\u51fb\u8fdb\u884c\u4e86\u8fdb\u4e00\u6b65\u7684\u7814\u7a76\u3002\n\u4e3a\u4e86\u4f7f\u5b9e\u9a8c\u5c3d\u53ef\u80fd\u91cd\u73b0\uff0c\u73b0\u5728\u8fdb\u884c\u8be6\u7ec6\u8bbe\u7f6e\u3002\u8003\u8651\u4e86\u4e24\u79cd\u5e73\u6ed1\u6280\u672f\uff08\u5373Laplace\u5e73\u6ed1\u548cGood-Turing\u5e73\u6ed1\uff09\u6765\u5904\u7406\u6570\u636e\u7a00\u758f\u6027\u95ee\u9898\uff0c\u4ee5\u53ca\u4e24\u79cd\u5f52\u4e00\u5316\u6280\u672f\uff08\u5373\u57fa\u4e8e\u5206\u5e03\u548c\u57fa\u4e8e\u7ed3\u675f\u7b26\u53f7\u7684\u65b9\u6cd5\uff09\u6765\u5904\u7406\u5bc6\u7801\u957f\u5ea6\u5206\u5e03\u4e0d\u5e73\u8861\u95ee\u9898\u3002\u8fd9\u5728\u4e0b\u8868\u4e2d\u5e26\u6765\u4e86\u56db\u79cd\u653b\u51fb\u60c5\u5f62\u3002\u5728\u6bcf\u79cd\u60c5\u5f62\u4e0b\uff0c\u8003\u8651\u4e09\u79cd\u7c7b\u578b\u7684\u9a6c\u5c14\u53ef\u592b\u9636\uff08\u53735\u9636\uff0c4\u9636\u548c3\u9636\uff09\u6765\u7814\u7a76\u54ea\u79cd\u987a\u5e8f\u8868\u73b0\u6700\u4f73\u3002\n\u4e94\u4e2a\u573a\u666f\u7684\u5b9e\u9a8c\u7ed3\u679c\u975e\u5e38\u76f8\u4f3c\u3002\u8fd9\u91cc\u4e3b\u8981\u663e\u793a\u4e0b\u56fe\u4e2d\u65b9\u68481\u7684\u653b\u51fb\u7ed3\u679c\uff0c\u800c\u65b9\u68482\u548c5\u7684\u5b9e\u9a8c\u7ed3\u679c\u7531\u4e8e\u7a7a\u95f4\u9650\u5236\u800c\u88ab\u7701\u7565\u3002\n\u53ef\u4ee5\u770b\u5230\uff0c\u5bf9\u4e8e\u4e2d\u6587\u548c\u82f1\u6587\u6d4b\u8bd5\u96c6\uff1a\uff081\uff09\u5728\u8f83\u5927\u7684\u731c\u6d4b\uff08\u5373&gt; 2 * 106\uff09\u4e0b\uff0c\u56db\u9636\u9a6c\u5c14\u53ef\u592b\u94fe\u663e\u7136\u6bd4\u5176\u4ed6\u4e24\u4e2a\u9636\u66f4\u597d\uff0c\u800c\u5728\u8f83\u5c0f\u7684\u731c\u6d4b\u4e0b\uff08 \u5373&lt;106\uff09\u9636\u6570\u8d8a\u5927\uff0c\u6027\u80fd\u5c06\u8d8a\u597d\uff1b\uff082\uff09\u5728\u8f83\u5c0f\u7684\u731c\u6d4b\u4e0b\uff0cLaplace\u548cGT Smoothing\u5728\u6027\u80fd\u4e0a\u51e0\u4e4e\u6ca1\u6709\u5dee\u5f02\uff0c\u800c\u968f\u7740\u731c\u6d4b\u6570\u7684\u589e\u52a0\uff0cLaplace Smoothing\u7684\u4f18\u52bf\u53d8\u5f97\u66f4\u5927\uff1b\uff083\uff09\u7ed3\u675f\u7b26\u5f52\u4e00\u5316\u603b\u662f\u6bd4\u57fa\u4e8e\u5206\u5e03\u7684\u65b9\u6cd5\u66f4\u597d\uff0c\u800c\u5c0f\u7684\u731c\u6d4b\u5b83\u7684\u4f18\u52bf\u5c06\u66f4\u52a0\u660e\u663e\u3002\u4ee5\u524d\u7684\u4e3b\u8981\u7814\u7a76\u5c1a\u672a\u62a5\u9053\u8fc7\u8fd9\u79cd\u89c2\u5bdf\u3002\u8fd9\u8868\u660e\uff1a1\uff09\u5927\u4f53\u4e0a\u4ee54\u9636\uff0c\u62c9\u666e\u62c9\u65af\u5e73\u6ed1\u548c\u672b\u7aef\u7b26\u53f7\u5f52\u4e00\u5316\uff08\u89c1\u56fe6\uff08b\uff09\u548c6\uff08e\uff09\uff09\u8fdb\u884c\u7684\u653b\u51fb\u6548\u679c\u6700\u4f73\uff1b\u548c2\uff09\u7a0d\u4f5c\u731c\u6d4b\uff0c\u504f\u72315\u9636\uff0c\u62c9\u666e\u62c9\u65af\u5e73\u6ed1\u548c\u672b\u7aef\u7b26\u53f7\u5f52\u4e00\u5316\u7684\u653b\u51fb\uff08\u89c1\u56fe6\uff08a\uff09\u548c6\uff08d\uff09\uff09\u8868\u73b0\u6700\u4f73\u3002\n\u7ed3\u679c\u8868\u660e\uff0cPCFG\u653b\u51fb\u4e2d\u53d1\u73b0\u7684\u53cc\u76f8\u5b89\u5168\u6027\u4e5f\u9002\u7528\u4e8e\u6240\u6709\u9a6c\u5c14\u53ef\u592b\u653b\u51fb\u3002\u4f8b\u5982\uff0c\u5728\u57fa\u4e8e4\u9636\u9a6c\u5c14\u53ef\u592b\u94fe\u7684\u5b9e\u9a8c\u4e2d\uff08\u53c2\u89c1\u4e0b\u56fe\uff08b\uff09\u548c\uff08e\uff09\uff09\u5f53\u731c\u6d4b\u6570\u5b57\u4f4e\u4e8e7000\u5de6\u53f3\u65f6\uff0c\u4e2d\u6587Web\u5bc6\u7801\u901a\u5e38\u5f88\u591a \u6bd4\u4ed6\u4eec\u7684\u82f1\u8bed\u5f31\u3002\u4f8b\u5982\uff0c\u63091000\u4e2a\u731c\u6d4b\uff0c\u5bf9Tianya\uff0cDodonew\u548cCSDN\u7684\u6210\u529f\u7387\u5206\u522b\u4e3a11.8\uff05\uff0c6.3\uff05\u548c11.6\uff05\uff0c\u800c\u82f1\u8bed\u540c\u884c\uff08\u5373Rockyou\uff0cYahoo\u548cPhpbb\uff09\u5206\u522b\u4ec5\u4e3a8.1\uff05\uff0c4.3\uff05\u548c7.1\u3002\uff05\u3002\u4f46\u662f\u5f53\u5141\u8bb8\u7684\u731c\u6d4b\u6570\u5b57\u8d85\u8fc7104\u65f6\uff0c\u4e2d\u6587Web\u5bc6\u7801\u901a\u5e38\u6bd4\u82f1\u6587\u5bc6\u7801\u5f3a\u3002\u4f8b\u5982\uff0c\u6839\u636e106\u4e2a\u731c\u6d4b\uff0c\u5bf9Tianya\uff0cDodonew\u548cCSDN\u7684\u6210\u529f\u7387\u5206\u522b\u4e3a38.2\uff05\uff0c20.4\uff05\u548c25.4\uff05\uff0c\u800c\u4ed6\u4eec\u7684\u82f1\u8bed\u6c34\u5e73\u5206\u522b\u4e3a38.6\uff05\uff0c24.8\uff05\u548c32.3\uff05\u3002\n\u5f71\u54cd \u201c\u53cc\u76f8\u5b89\u5168\u6027\u201d\u7684\u53d1\u73b0\u8868\u660e\uff0c\u4e2d\u56fd\u5bc6\u7801\u66f4\u5bb9\u6613\u53d7\u5230\u5728\u7ebf\u731c\u6d4b\u653b\u51fb\u3002\u8fd9\u662f\u56e0\u4e3a\u6700\u53d7\u6b22\u8fce\u7684\u4e2d\u6587\u5bc6\u7801\u6bd4\u8f83\u96c6\u4e2d\u3002\u56e0\u6b64\u4e00\u4e2a\u7279\u6b8a\u7684\u9ed1\u540d\u5355\u5305\u62ec\u4e00\u4e2a\u4e2d\u7b49\u6570\u91cf\u7684\u6700\u5e38\u89c1\u7684\u4e2d\u6587\u5bc6\u7801\uff08\u4f8b\u598210K\u523020K\uff09\uff0c\u5bf9\u4e8e\u4e2d\u6587\u7ad9\u70b9\u62b5\u5fa1\u5728\u7ebf\u731c\u6d4b\u975e\u5e38\u6709\u5e2e\u52a9\u3002\u53ef\u4ee5\u4ece\u5404\u79cd\u6cc4\u6f0f\u7684\u4e2d\u56fd\u6570\u636e\u96c6\u4e2d\u83b7\u77e5\u8fd9\u6837\u7684\u9ed1\u540d\u5355\uff08http:\/\/t.cn\/RG88tvF\uff09\u3002\u843d\u5165\u8be5\u5217\u8868\u7684\u4efb\u4f55\u5bc6\u7801\u5c06\u88ab\u89c6\u4e3a\u5f31\u5bc6\u7801\u3002\u4f46\u662f\uff0c\u4f17\u6240\u5468\u77e5\uff0c\u5982\u679c\u67d0\u4e9b\u6d41\u884c\u5bc6\u7801\uff08\u4f8b\u5982woaini1314\uff09\u88ab\u7981\u6b62\uff0c\u5219\u4f1a\u51fa\u73b0\u65b0\u7684\u6d41\u884c\u5bc6\u7801\uff08\u4f8b\u5982w0aini1314\uff09\u3002\u8fd9\u4e9b\u65b0\u7684\u6d41\u884c\u5bc6\u7801\u53ef\u80fd\u4e0d\u5728\u9759\u6001\u9ed1\u540d\u5355\u4e2d\uff0c\u5e76\u4e14\u96be\u4ee5\u68c0\u6d4b\u3002\u56e0\u6b64\u4ec5\u5bc6\u7801\u521b\u5efa\u7b56\u7565\uff08\u4f8b\u5982\uff0c\u957f\u5ea6\u548c\u9ed1\u540d\u5355\u89c4\u5219\uff09\u5c31\u8db3\u4ee5\u9632\u6b62\u8fd9\u79cd\u5f31\u5bc6\u7801\u3002\u9700\u8981\u4e00\u79cd\u6df1\u5ea6\u9632\u5fa1\u65b9\u6cd5\uff1a\u53ea\u8981\u6709\u53ef\u80fd\uff0c\u9664\u4e86\u5bc6\u7801\u521b\u5efa\u7b56\u7565\u5916\uff0c\u5b89\u5168\u6027\u81f3\u5173\u91cd\u8981\u7684\u670d\u52a1\u8fd8\u53ef\u4ee5\u8fdb\u4e00\u6b65\u4f7f\u7528\u5bc6\u7801\u5f3a\u5ea6\u8868\uff08\u4f8b\u5982\uff0cfuzzyPSM\u548cZxcvbn\uff09\u6765\u68c0\u6d4b\u548c\u9632\u6b62\u5f31\u5bc6\u7801\u3002\n\u7279\u70b9\u4e0e\u4e0d\u8db3 \u8fd9\u7bc7\u6587\u7ae0\u662f\u4e00\u7bc7\u5206\u6790\u7c7b\u578b\u7684\u6587\u7ae0\uff0c\u6ca1\u63d0\u51fa\u65b0\u7684\u65b9\u6cd5\uff0c\u4f46\u662f\u5206\u6790\u7684\u89d2\u5ea6\u5f88\u5168\u9762\u3002\n\u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u8fd9\u79cd\u5b89\u5168\u6027\u8bc4\u6d4b\u7684\u6587\u7ae0\u4e5f\u53ef\u4ee5\u8003\u8651\u3002\n\u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206: \u2b50\u2b50\u2b50\u2b50\u2b50\n\u8bc4\u4ef7: \u5206\u6790\u7684\u5f88\u5168\u9762\u3002\u6709\u5f88\u5927\u4ef7\u503c\u3002\n\u4f5c\u8005 \u4f5c\u8005\u662f\u6765\u81ea\u5317\u4eac\u5927\u5b66\u7684Ding Wang\u548cPing Wang\u3002\u53e6\u5916\u8fd8\u6709\u6b66\u6c49\u5927\u5b66\u7684Debiao He\u4ee5\u53ca\u6765\u81ea\u5f17\u5409\u5c3c\u4e9a\u5927\u5b66\u7684Yuan Tian\u3002\n\u6c6a\u5b9a\u662f\u6765\u81ea\u5317\u4eac\u5927\u5b66\u7535\u5b50\u5de5\u7a0b\u4e0e\u8ba1\u7b97\u673a\u79d1\u5b66\u5b66\u9662\u7684\u535a\u58eb\u540e\u3002\n\u4e3b\u9875\uff1ahttp:\/\/wangdingg.weebly.com\/\n\u505a\u4e86\u5f88\u591a\u5bc6\u7801\u5f3a\u5ea6\u9a8c\u8bc1\u3001\u5bc6\u7801\u7834\u89e3\u3001\u8ba4\u8bc1\u76f8\u5173\u7684\u5de5\u4f5c\uff0c\u6210\u679c\u53d1\u5728USENIX,CCS,NDSS\u4e0a\uff0c\u6210\u679c\u6ee1\u6ee1\u3002\n\u8bba\u6587\u51fa\u5904 [1] Wang D, Wang P, He D, Tian Y. Birthday, name and bifacial-security: understanding passwords of chinese web users. 28th USENIX Security Symposium (USENIX Security 19). Santa Clara, CA: USENIX Association, 2019: 1537\u20131555.\n\u53c2\u8003\u8d44\u6599\u53ca\u9644\u4ef6 \u672c\u7b14\u8bb0\u8f6c\u8f7d\u81ea https:\/\/mp.weixin.qq.com\/s\/Xywl2gJbonvosW-Gm10MjQ \uff0c\u4fb5\u5220\n\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20191024-birthday-name-and-bifacial-security-understanding-passwords-of-chinese-web-users\/","summary":"<h1 id=\"\u8bba\u6587\u4e3b\u9898\">\u8bba\u6587\u4e3b\u9898<\/h1>\n<p>\u5bf9\u4e2d\u6587\u5bc6\u7801\u8fdb\u884c\u5b9e\u8bc1\u5206\u6790\uff0c\u53d1\u73b0\u4e2d\u6587\u5bc6\u7801\u4e2d\u6709\u8da3\u7684\u7ed3\u6784\u548c\u7279\u5f81\uff0c\u63ed\u793a\u4e86\u4e2d\u6587\u5bc6\u7801\u7684\u53cc\u76f8\u5b89\u5168\u6027\uff08Bifacial-security\uff09\u3002<\/p>\n<h1 id=\"\u6458\u8981\">\u6458\u8981<\/h1>\n<h2 id=\"\u82f1\u6587\">\u82f1\u6587<\/h2>\n<p>Much attention has been paid to passwords chosen by English speaking users, yet only a few studies have examined how non-English speaking users select passwords. In this paper, we perform an extensive, empirical analysis of 73.1 million real-world Chinese web passwords in comparison with 33.2 million English counterparts. We highlight a number of interesting structural and semantic characteristics in Chinese passwords. We further evaluate the security of these passwords by employing two state-of-the-art cracking techniques. In particular, our cracking results reveal the bifacial-security nature of Chinese passwords. They are weaker against online guessing attacks (i.e., when the allowed guess number is small, 1\u223c104) than English passwords. But out of the remaining Chinese passwords, they are stronger against offline guessing attacks (i.e., when the guess number is large, &gt;105) than their English counterparts. This reconciles two conflicting claims about the strength of Chinese passwords made by Bonneau (IEEE S&amp;P'12) and Li et al. (Usenix Security'14 and IEEE TIFS'16). At 107 guesses, the success rate of our improved PCFG-based attack against the Chinese datasets is 33.2%~49.8%, indicating that our attack can crack 92% to 188% more passwords than the state of the art. We also discuss the implications of our findings for password policies, strength meters and cracking.<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011Birthday, Name and Bifacial-security Understanding Passwords of Chinese Web Users"},{"content":"\u8bba\u6587\u4e3b\u9898 \u4f7f\u7528RCFG+LSTM\u548c\u5bf9\u6297\u751f\u6210\u7f51\u7edc\u731c\u89e3\u5bc6\u7801\u3002\n\u6458\u8981 \u82f1\u6587 Password has become today&rsquo;s dominant method of authentication in social network. While the brute-force attack methods, such as HashCat and John the Ripper, are unpractical, the research then switches to the password guess. The state-of-the-art approaches, such as Markov Model and probabilistic context-free grammars(PCFG), are all based on statistical probability. These approaches have a low matching rate. The methods on neural network have been proved more accurate and practical for password guessing than traditional methods. However, a raw neural network model is not qualified for cross-sites attack since each data set has its own features. This paper proposes a general deep learning model for password guessing, called GENPass. GENPass can learn features from several data sets and ensure the output wordlist high accuracy in different data sets by using adversarial generation. The password generator of GENPass is PCFG+LSTM(PL), where LSTM is a kind of Recurrent Neural Network. We combine neural network with PCFG because we found people were used to set their passwords with meaningful strings. Compared with LSTM, PL increased the matching rate by 16%-30% in the cross-sites tests when learning from a single dataset. GENPass uses several PL models to learn datasets and generate passwords. The result shows that the matching rate of GENPass is 20% higher than that of simply mixing those datasets in the cross-sites test.\n\u4e2d\u6587 \u5bc6\u7801\u5df2\u6210\u4e3a\u5f53\u4eca\u793e\u4ea4\u7f51\u7edc\u4e2d\u4e3b\u8981\u7684\u8eab\u4efd\u9a8c\u8bc1\u65b9\u6cd5\u3002\u5c3d\u7ba1\u8bf8\u5982HashCat\u548cJohn Ripper\u4e4b\u7c7b\u7684\u5f3a\u529b\u653b\u51fb\u65b9\u6cd5\u4e0d\u5207\u5b9e\u9645\uff0c\u4f46\u968f\u540e\u7684\u7814\u7a76\u8f6c\u5411\u4e86\u5bc6\u7801\u731c\u6d4b\u3002\u6700\u5148\u8fdb\u7684\u65b9\u6cd5\uff0c\u4f8b\u5982\u9a6c\u5c14\u53ef\u592b\u6a21\u578b\u548c\u6982\u7387\u4e0a\u4e0b\u6587\u65e0\u5173\u6587\u6cd5\uff08PCFG\uff09\uff0c\u90fd\u57fa\u4e8e\u7edf\u8ba1\u6982\u7387\u3002\u8fd9\u4e9b\u65b9\u6cd5\u7684\u5339\u914d\u7387\u4f4e\u3002\u4e8b\u5b9e\u8bc1\u660e\uff0c\u4e0e\u4f20\u7edf\u65b9\u6cd5\u76f8\u6bd4\uff0c\u795e\u7ecf\u7f51\u7edc\u65b9\u6cd5\u5728\u5bc6\u7801\u731c\u6d4b\u65b9\u9762\u66f4\u4e3a\u51c6\u786e\u548c\u5b9e\u7528\u3002\u4f46\u662f\uff0c\u539f\u59cb\u795e\u7ecf\u7f51\u7edc\u6a21\u578b\u4e0d\u9002\u5408\u8fdb\u884c\u8de8\u7ad9\u70b9\u653b\u51fb\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u6570\u636e\u96c6\u90fd\u6709\u5176\u81ea\u8eab\u7684\u529f\u80fd\u3002\u672c\u6587\u63d0\u51fa\u4e86\u4e00\u79cd\u7528\u4e8e\u5bc6\u7801\u731c\u6d4b\u7684\u901a\u7528\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\uff0c\u79f0\u4e3aGENPass\u3002 GENPass\u53ef\u4ee5\u4ece\u591a\u4e2a\u6570\u636e\u96c6\u4e2d\u5b66\u4e60\u7279\u5f81\uff0c\u5e76\u901a\u8fc7\u5bf9\u6297\u751f\u6210\u6765\u786e\u4fdd\u4e0d\u540c\u6570\u636e\u96c6\u4e2d\u8f93\u51fa\u5355\u8bcd\u5217\u8868\u7684\u51c6\u786e\u6027\u3002 GENPass\u7684\u5bc6\u7801\u751f\u6210\u5668\u662fPCFG + LSTM\uff08PL\uff09\uff0c\u5176\u4e2dLSTM\u662f\u4e00\u79cd\u9012\u5f52\u795e\u7ecf\u7f51\u7edc\u3002\u6211\u4eec\u5c06\u795e\u7ecf\u7f51\u7edc\u4e0ePCFG\u7ed3\u5408\u5728\u4e00\u8d77\uff0c\u56e0\u4e3a\u6211\u4eec\u53d1\u73b0\u4eba\u4eec\u4e60\u60ef\u4e8e\u4f7f\u7528\u6709\u610f\u4e49\u7684\u5b57\u7b26\u4e32\u8bbe\u7f6e\u5bc6\u7801\u3002\u4e0eLSTM\u76f8\u6bd4\uff0c\u4ece\u5355\u4e2a\u6570\u636e\u96c6\u5b66\u4e60\u65f6\uff0cPL\u5728\u8de8\u7ad9\u70b9\u6d4b\u8bd5\u4e2d\u7684\u5339\u914d\u7387\u63d0\u9ad8\u4e8616\uff05-30\uff05\u3002 GENPass\u4f7f\u7528\u51e0\u79cdPL\u6a21\u578b\u6765\u5b66\u4e60\u6570\u636e\u96c6\u5e76\u751f\u6210\u5bc6\u7801\u3002\u7ed3\u679c\u8868\u660e\uff0cGENPass\u7684\u5339\u914d\u7387\u6bd4\u5728\u8de8\u7ad9\u70b9\u6d4b\u8bd5\u4e2d\u7b80\u5355\u5730\u6df7\u5408\u8fd9\u4e9b\u6570\u636e\u96c6\u7684\u5339\u914d\u7387\u9ad820\uff05\u3002\n\u5173\u952e\u5b57 \u5bc6\u7801\u751f\u6210\uff1b\u5bc6\u7801\u731c\u89e3\uff1b\u5bf9\u6297\u751f\u6210\u7f51\u7edc\uff1bPCFG\n\u89e3\u51b3\u95ee\u9898 \u73b0\u5b9e\u95ee\u9898 \u5bc6\u7801\u662f\u4e3b\u8981\u7684\u8eab\u4efd\u9a8c\u8bc1\u65b9\u6cd5\u4e4b\u4e00\uff0c\u5bc6\u7801\u7834\u89e3\u662f\u5b89\u5168\u9886\u57df\u7684\u8001\u751f\u5e38\u8c08\u7684\u95ee\u9898\u3002\n\u4e4b\u524d\u7814\u7a76\u7684\u4e0d\u8db3 \u4f20\u7edf\u66b4\u529b\u7834\u89e3\u5de5\u5177 \u66b4\u529b\u7834\u89e3\u5de5\u5177\uff0c\u5982HashCat\u548cJohn Ripper\u4e4b\u7c7b\u7684\u5e76\u4e0d\u662f\u5f88\u6709\u6548\u679c\uff0c\u6240\u4ee5\u968f\u540e\u7684\u7814\u7a76\u8f6c\u5411\u4e86\u5bc6\u7801\u731c\u6d4b\u3002HashCat\u548cJohn Ripper\u751f\u6210\u4e00\u4e2a\u6709\u9650\u7684\u5bc6\u7801\u5217\u8868\uff0c\u8fdc\u8fdc\u4e0d\u591f\u7834\u89e3\u7528\u6237\u7684\u5bc6\u7801\u3002\n\u7edf\u8ba1\u6982\u7387\u65b9\u6cd5 \u5f53\u524d\u6700\u5148\u8fdb\u7684\u65b9\u6cd5\uff0c\u4f8b\u5982\u9a6c\u5c14\u53ef\u592b\u6a21\u578b\u548c\u6982\u7387\u4e0a\u4e0b\u6587\u65e0\u5173\u6587\u6cd5\uff08PCFG\uff09\uff0c\u90fd\u57fa\u4e8e\u7edf\u8ba1\u6982\u7387\u3002\u8fd9\u4e9b\u65b9\u6cd5\u7684\u5339\u914d\u7387\u4f4e\uff0c\u800c\u4e14\u8017\u65f6\u591a\u3002\n\u795e\u7ecf\u7f51\u7edc \u4e8b\u5b9e\u8bc1\u660e\uff0c\u4e0e\u4f20\u7edf\u65b9\u6cd5\u76f8\u6bd4\uff0c\u795e\u7ecf\u7f51\u7edc\u65b9\u6cd5\u5728\u5bc6\u7801\u731c\u6d4b\u65b9\u9762\u66f4\u4e3a\u51c6\u786e\u548c\u5b9e\u7528\u3002\n[8] Melicher W, Ur B, Segreti S M, et al., Fast, lean and accurate: Modeling password guessability using neural networks. Proceedings of USENIX Security. 2016.\n\u4f46\u662f\uff0c\u539f\u59cb\u795e\u7ecf\u7f51\u7edc\u6a21\u578b\u4e0d\u9002\u5408\u8fdb\u884c\u8de8\u7ad9\u70b9\u653b\u51fb\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u6570\u636e\u96c6\u90fd\u6709\u5176\u81ea\u8eab\u7684\u529f\u80fd\u3002\n\u65b9\u6cd5 \u672c\u6587\u63d0\u51fa\u4e86\u4e00\u79cd\u7528\u4e8e\u5bc6\u7801\u731c\u6d4b\u7684\u901a\u7528\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\uff0c\u79f0\u4e3aGENPass\u3002 GENPass\u53ef\u4ee5\u4ece\u591a\u4e2a\u6570\u636e\u96c6\u4e2d\u5b66\u4e60\u7279\u5f81\uff0c\u5e76\u901a\u8fc7\u5bf9\u6297\u751f\u6210\u6765\u786e\u4fdd\u4e0d\u540c\u6570\u636e\u96c6\u4e2d\u8f93\u51fa\u5355\u8bcd\u5217\u8868\u7684\u51c6\u786e\u6027\u3002 GENPass\u7684\u5bc6\u7801\u751f\u6210\u5668\u662fPCFG + LSTM\uff08PL\uff09\uff0c\u5176\u4e2dLSTM\u662f\u4e00\u79cd\u9012\u5f52\u795e\u7ecf\u7f51\u7edc\u3002\u6211\u4eec\u5c06\u795e\u7ecf\u7f51\u7edc\u4e0ePCFG\u7ed3\u5408\u5728\u4e00\u8d77\uff0c\u56e0\u4e3a\u6211\u4eec\u53d1\u73b0\u4eba\u4eec\u4e60\u60ef\u4e8e\u4f7f\u7528\u6709\u610f\u4e49\u7684\u5b57\u7b26\u4e32\u8bbe\u7f6e\u5bc6\u7801\u3002\n1. PCFG+LSTM PCFG\u4f7f\u7528\u4e86\u6a21\u677f\u548c\u5355\u5143\u7684\u6982\u5ff5\u3002\u5982\u201cpassword123\u201d\u53ef\u4ee5\u88ab\u5207\u5206\u4e3a\u4e24\u4e2a\u5355\u5143\u5206\u522b\u4e3aL8\u548cD3\uff0c\u5bf9\u5e94\u201cpassword\u201d\u548c\u201c123\u201d\uff0c\u5bc6\u7801\u662f\u6709\u5355\u5143\u6309\u7167\u6a21\u677f\u7ec4\u5408\u8d77\u6765\u7684\u3002\u8fd9\u79cd\u5206\u5272\u65b9\u5f0f\u5e26\u6765\u4e86\u5f88\u5927\u7684\u51c6\u786e\u6027\u3002\n\u6570\u636e\u9884\u5904\u7406\uff1a \u4e00\u4e2a\u5bc6\u7801\u662f\u4e00\u4e2a\u5f88\u591a\u5355\u5143\u7684\u7ec4\u6210\u5e8f\u5217\uff0c\u5982\n\u5982\u4e0b\u8868\u6240\u793a\uff0c\u603b\u5171\u6709\u56db\u79cd\u7c7b\u578b\uff1a\u5206\u522b\u4e3a\u5b57\u6bcdL\uff0c\u6570\u5b57D\uff0c\u7279\u6b8a\u7b26\u53f7S\u548c\u6362\u884c\u7b26\\n\u3002\u5982 \u2018$Password123\u2019 \u53ef\u88ab\u8868\u793a\u4e3a S1 L8 N3 \u2018\u2216n\u2019\u3002\n\u751f\u6210\u6a21\u677f\u5e8f\u5217 \u901a\u8fc7LSTM\u8fdb\u884c\u5e8f\u5217\u7684\u9884\u6d4b\uff0c\u751f\u6210\u4e0b\u4e2a\u5355\u5143\u3002\n\u731c\u6d4b\u5bc6\u7801 \u5c06\u5355\u5143\u8fd8\u539f\u56de\u5bc6\u7801\u5b57\u7b26\u3002\n\u5982\u5c06L4\u8fd8\u539f\u4e3a\u201cever\u201d\uff0c\u201clove\u201d\u2026\n\u6743\u91cd\u9009\u62e9 \u7531\u4e8e\u5b9e\u9a8c\u8bc1\u660e\uff0c\u6bcf\u6b21\u90fd\u9009\u62e9\u9ad8\u6743\u91cd\u7684\u6570\u636e\uff0c\u4f1a\u51fa\u73b0\u5927\u91cf\u91cd\u590d\uff0c\u56e0\u6b64\u4f5c\u8005\u8bbe\u8ba1\u4e86\u4e00\u4e2a\u968f\u673a\u9009\u62e9\u7b97\u6cd5\u3002\u65b9\u6cd5\u6bd4\u8f83\u7b80\u5355\uff0c\u6839\u636e\u5019\u9009\u5bc6\u7801\u5b57\u7b26\u7684\u9891\u6570\uff0c\u8bbe\u7f6e\u4e00\u4e2a\u76f8\u5e94\u957f\u5ea6\u7684\u533a\u95f4\uff0c\u5c06\u8fd9\u4e9b\u533a\u95f4\u9996\u5c3e\u76f8\u8fde\u62fc\u63a5\u5230\u4e00\u8d77\uff0c\u518d\u5728\u6574\u4e2a\u5927\u7684\u533a\u95f4\u4e2d\u968f\u673a\u9009\u62e9\u4e00\u4e2a\u6570\u3002\n\u4e3e\u4f8b\u8bf4\u660e\uff1a\u5bf9L4\u7684\u4e09\u4e2a\u5019\u9009\u548c\u9891\u7387&mdash;[\u2018abcd\u2019:4,\u2018love\u2019:3,\u2018life\u2019:5]\uff0c\u5219abcd\u4e3a[0:4)\u533a\u95f4\uff0clove\u662f[4,7)\u533a\u95f4\uff0clife\u662f[7,12)\u533a\u95f4\u3002\u5728[0,12)\u4e2d\u968f\u673a\u9009\u4e2a\u6570\u5b57\uff0c\u843d\u5230\u54ea\u4e2a\u533a\u95f4\u5c31\u9009\u54ea\u4e2a\u3002\n2. GENPass \u7531\u4e8e\u5bf9\u4e0d\u540c\u7684\u6570\u636e\u96c6\u7684\u6743\u91cd\uff0c\u4f1a\u6709\u4e0d\u540c\u7684\u89c4\u5219\u548c\u957f\u5ea6\uff0c\u76f8\u5e94\u4f1a\u6709\u5f88\u591a\u4e2a\u9884\u6d4b\u6a21\u578b\uff0c\u56e0\u6b64\u4f5c\u8005\u8bbe\u8ba1\u4e86GENPass\uff0c\u53ef\u4ee5\u4ece\u4e0d\u540c\u7684\u751f\u6210\u6a21\u578b\u8fdb\u884c\u9009\u62e9\u3002\n\u4ece\u4e0d\u540c\u7684\u6570\u636e\u96c6\u8bad\u7ec3\u51fa\u6765\u4e0d\u540c\u7684\u6a21\u578b\uff0c\u4e5f\u5c31\u662f\u4e0a\u56fe\u5de6\u4fa7\u4ece1-n\u7684PL\u6a21\u578b\uff0c\u7136\u540e\u8fdb\u884c\u6743\u91cd\u9009\u62e9\uff0c\u7136\u540e\u518d\u901a\u8fc7\u5206\u7c7b\u5668\u533a\u5206\u751f\u6210\u7684\u8fd9\u4e2a\u5bc6\u7801\u662f\u7531\u54ea\u4e2a\u6a21\u578b\u751f\u6210\u7684\u3002\u8fd9\u4e2a\u5bc6\u7801\u5e94\u8be5\u662f\u4e0d\u5bb9\u6613\u88ab\u5206\u7c7b\u5668\u5206\u7c7b\u51fa\u7684\u5bc6\u7801\uff0c\u4e5f\u5c31\u662f\u53ef\u80fd\u5b58\u5728\u4e8e\u4efb\u610f\u7684\u5206\u7c7b\u5668\u4e2d\u3002\n\u7279\u70b9\u4e0e\u4e0d\u8db3 \u4f18\u52bf \u80fd\u6709\u6548\u5bf9\u591a\u4e2a\u7f51\u7ad9\u8fdb\u884c\u7ec4\u5408\u3002\n\u4e0d\u8db3 \u4e0d\u80fd\u5bf9\u591a\u79cd\u8bed\u8a00\u8fdb\u884c\u6709\u6548\u7ed3\u5408\u3002\n\u4f5c\u8005 \u8be5\u8bba\u6587\u4e3a\u4e0a\u6d77\u4ea4\u901a\u5927\u5b66\u7f51\u7edc\u5b89\u5168\u5b66\u9662\u4e0a\u6d77\u5e02\u4fe1\u606f\u5b89\u5168\u7efc\u5408\u7ba1\u7406\u6280\u672f\u91cd\u70b9\u5b9e\u9a8c\u5ba4\u548c\u9a6c\u91cc\u5170\u5927\u5b66\u8ba1\u7b97\u673a\u79d1\u5b66\u4e0e\u7535\u6c14\u5de5\u7a0b\u7cfb\u7684\u5408\u4f5c\u4ea7\u51fa\u3002\u6838\u5fc3\u6210\u5458\u6765\u81ea\u4e0a\u6d77\u4ea4\u5927\u3002\n\u8bba\u6587\u51fa\u5904 [1]Liu Y, Xia Z, Yi P, Yao Y, Xie T, Wang W, Zhu T. GENPass: a general deep learning model for password guessing with pcfg rules and adversarial generation. 2018 IEEE International Conference on Communications, ICC 2018, May 20, 2018 - May 24, 2018. Institute of Electrical and Electronics Engineers Inc., 2018, 2018-May: Cisco; et al.; Huawei; National Instruments; Qualcomm; Sprint.\n\u5b9e\u9a8c\u53ca\u6548\u679c \u5b9e\u9a8c\u8bc1\u660eGENPass\u7684\u5339\u914d\u7387\u6bd4\u7b80\u5355\u628a\u8fd9\u4e9b\u751f\u6210\u7684\u6570\u636e\u96c6\u7684\u6570\u636e\u6df7\u5408\u5230\u4e00\u8d77\u9ad820%\u3002\n\u5b9e\u9a8c\u4f7f\u7528TensorFlow\u642d\u5efa\u6a21\u578b\uff0c\u4ece\u56db\u4e2a\u7f51\u7ad9Myspace, phpBB, RockYou \u548cLinkedIn\u91c7\u96c6\u6570\u636e\u3002\n\u5b9e\u9a8c\u4e3b\u8981\u662f\u5bf9PCFG\u548cLSTM\u5bf9\u4e0d\u540c\u6570\u636e\u96c6\u7684\u505a\u51fa\u5bf9\u6bd4\u3002\n\u4ece\u4e0b\u56fe\u53ef\u4ee5\u770b\u51fa\uff0c\u76f8\u5bf9\u800c\u8a00PL\u6bd4LSTM\u66f4\u52a0\u6709\u6548\u3002\n\u6536\u83b7 \u8fd9\u79cd\u201c\u5206\u8bcd\u201d\u65b9\u5f0f\uff0c\u5982L4D3S2\uff0c\u6bd4\u5b57\u7b26\u7ea7\u522b\u66f4\u52a0\u6709\u6548\u3002\nPCFG+LSTM\u7684\u7ed3\u5408\u65b9\u5f0f\u3002\n\u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u7ed3\u5408\u8fd9\u79cd\u5206\u8bcd\u6a21\u5f0f\u3002\n\u6587\u4e2d\u63d0\u5230\u4e86\u4f7f\u7528\u8fc1\u79fb\u5b66\u4e60\u6a21\u578b\u89e3\u51b3\u6570\u636e\u96c6\u7f3a\u5931\u7684\u95ee\u9898\u3002\u53ef\u4ee5\u8003\u8651\uff0c\u53ef\u4ee5\u7528\u6765\u89e3\u51b3\u4e0d\u540c\u56fd\u5bb6\u6570\u636e\u96c6\u7684\u5dee\u5f02\u3002\n\u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206: \u2b50\u2b50\u2b50\u2b50\n\u8bc4\u4ef7:\u4ece\u6b64\u6587\u7684\u9605\u8bfb\uff0c\u5bf9\u5bc6\u7801\u731c\u89e3\u7684\u7814\u7a76\u6709\u7740\u66f4\u6df1\u4e00\u6b65\u7684\u8ba4\u8bc6\uff0c\u542f\u53d1\u4e86\u5f88\u591a\u601d\u8def\u3002\u4f46\u6587\u7ae0\u7684\u5b9e\u9a8c\u505a\u7684\u4e0d\u591f\u5145\u5206\uff0c\u6ca1\u6709\u548c\u5176\u4ed6\u65b9\u6cd5\u505a\u5bf9\u6bd4\u3002\u65b9\u6cd5\u6ca1\u6709\u6838\u5fc3\u521b\u65b0\u3002\n\u53c2\u8003\u8d44\u6599\u53ca\u9644\u4ef6 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20191018-genpass\/","summary":"<h1 id=\"\u8bba\u6587\u4e3b\u9898\">\u8bba\u6587\u4e3b\u9898<\/h1>\n<p>\u4f7f\u7528RCFG+LSTM\u548c\u5bf9\u6297\u751f\u6210\u7f51\u7edc\u731c\u89e3\u5bc6\u7801\u3002<\/p>\n<h1 id=\"\u6458\u8981\">\u6458\u8981<\/h1>\n<h2 id=\"\u82f1\u6587\">\u82f1\u6587<\/h2>\n<p>Password has become today&rsquo;s dominant method of authentication in social network. While the brute-force attack methods, such as HashCat and John the Ripper, are unpractical, the research then switches to the password guess. The state-of-the-art approaches, such as Markov Model and probabilistic context-free grammars(PCFG), are all based on statistical probability. These approaches have a low matching rate. The methods on neural network have been proved more accurate and practical for password guessing than traditional methods. However, a raw neural network model is not qualified for cross-sites attack since each data set has its own features. This paper proposes a general deep learning model for password guessing, called GENPass. GENPass can learn features from several data sets and ensure the output wordlist high accuracy in different data sets by using adversarial generation. The password generator of GENPass is PCFG+LSTM(PL), where LSTM is a kind of Recurrent Neural Network. We combine neural network with PCFG because we found people were used to set their passwords with meaningful strings. Compared with LSTM, PL increased the matching rate by 16%-30% in the cross-sites tests when learning from a single dataset. GENPass uses several PL models to learn datasets and generate passwords. The result shows that the matching rate of GENPass is 20% higher than that of simply mixing those datasets in the cross-sites test.<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011GENPass: A general deep learning model for password guessing with PCFG rules and adversarial generation"},{"content":"\u8bba\u6587\u4e3b\u9898 \u4f7f\u7528\u5bf9\u6297\u795e\u7ecf\u7f51\u7edc\u7684\u65b9\u5f0f\u8fdb\u884c\u5bc6\u7801\u751f\u6210\u548c\u5bc6\u7801\u731c\u89e3\u3002\n\u6458\u8981 \u4e2d\u6587 \u6700\u5148\u8fdb\u7684\u5bc6\u7801\u731c\u6d4b\u5de5\u5177\uff0c\u4f8b\u5982HashCat\u548cRipper John\uff0c\u4f7f\u7528\u6237\u80fd\u591f\u6bcf\u79d2\u68c0\u67e5\u6570\u5341\u4ebf\u4e2a\u5bc6\u7801\u4ee5\u9632\u5bc6\u7801\u54c8\u5e0c\u3002\u9664\u4e86\u6267\u884c\u7b80\u5355\u7684\u5b57\u5178\u653b\u51fb\u5916\uff0c\u8fd9\u4e9b\u5de5\u5177\u8fd8\u53ef\u4ee5\u4f7f\u7528\u5bc6\u7801\u751f\u6210\u89c4\u5219\u6765\u6269\u5c55\u5bc6\u7801\u8bcd\u5178\uff0c\u4f8b\u5982\u5355\u8bcd\u7684\u4e32\u8054\uff08\u4f8b\u5982\u201c password123456\u201d\uff09\u548c\u8f7b\u58f0\u8bf4\u8bdd\uff08\u4f8b\u5982\u201c password\u201d\u53d8\u4e3a\u201c p4s5w0rd\u201d\uff09\u3002\u5c3d\u7ba1\u8fd9\u4e9b\u89c4\u5219\u5728\u5b9e\u8df5\u4e2d\u6548\u679c\u5f88\u597d\uff0c\u4f46\u662f\u5c06\u5176\u6269\u5c55\u4ee5\u6a21\u62df\u66f4\u591a\u5bc6\u7801\u662f\u4e00\u9879\u8270\u5de8\u7684\u4efb\u52a1\uff0c\u9700\u8981\u4e13\u4e1a\u77e5\u8bc6\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86PassGAN\uff0c\u8fd9\u662f\u4e00\u79cd\u65b0\u9896\u7684\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u4ee5\u7406\u8bba\u4e3a\u57fa\u7840\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u53d6\u4ee3\u4e86\u4eba\u4e3a\u751f\u6210\u7684\u5bc6\u7801\u89c4\u5219\u3002 PassGAN\u4e0d\u518d\u4f9d\u8d56\u4eba\u5de5\u5bc6\u7801\u5206\u6790\uff0c\u800c\u662f\u4f7f\u7528Genversative Adversarial Network\uff08GAN\uff09\u6765\u4ece\u5b9e\u9645\u5bc6\u7801\u6cc4\u6f0f\u4e2d\u81ea\u52a8\u5b66\u4e60\u771f\u5b9e\u5bc6\u7801\u7684\u5206\u5e03\uff0c\u5e76\u751f\u6210\u9ad8\u8d28\u91cf\u7684\u5bc6\u7801\u731c\u6d4b\u3002\u6211\u4eec\u7684\u5b9e\u9a8c\u8868\u660e\uff0c\u8fd9\u79cd\u65b9\u6cd5\u975e\u5e38\u6709\u524d\u9014\u3002\u5f53\u6211\u4eec\u5728\u4e24\u4e2a\u5927\u578b\u5bc6\u7801\u6570\u636e\u96c6\u4e0a\u8bc4\u4f30PassGAN\u65f6\uff0c\u6211\u4eec\u80fd\u591f\u8d85\u8d8a\u57fa\u4e8e\u89c4\u5219\u548c\u6700\u5148\u8fdb\u7684\u673a\u5668\u5b66\u4e60\u5bc6\u7801\u731c\u6d4b\u5de5\u5177\u3002\u4f46\u662f\uff0c\u4e0e\u5176\u4ed6\u5de5\u5177\u76f8\u6bd4\uff0cPassGAN\u5728\u6ca1\u6709\u4efb\u4f55\u5148\u9a8c\u5bc6\u7801\u77e5\u8bc6\u6216\u901a\u7528\u5bc6\u7801\u7ed3\u6784\u7684\u60c5\u51b5\u4e0b\u83b7\u5f97\u4e86\u6b64\u7ed3\u679c\u3002\u53e6\u5916\uff0c\u5f53\u6211\u4eec\u5c06PassGAN\u7684\u8f93\u51fa\u4e0eHashCat\u7684\u8f93\u51fa\u7ec4\u5408\u5728\u4e00\u8d77\u65f6\uff0c\u4e0e\u4ec5\u4f7f\u7528HashCat\u7684\u60c5\u51b5\u76f8\u6bd4\uff0c\u6211\u4eec\u80fd\u591f\u5339\u914d\u591a51\uff05-73\uff05\u7684\u5bc6\u7801\u3002\u8fd9\u662f\u5f88\u4e86\u4e0d\u8d77\u7684\uff0c\u56e0\u4e3a\u5b83\u8868\u660ePassGAN\u53ef\u4ee5\u81ea\u4e3b\u63d0\u53d6\u5927\u91cf\u5f53\u524d\u6700\u65b0\u89c4\u5219\u65e0\u6cd5\u7f16\u7801\u7684\u5bc6\u7801\u5c5e\u6027\u3002\n\u82f1\u6587 State-of-the-art password guessing tools, such as HashCat and John the Ripper, enable users to check billions of passwords per second against password hashes. In addition to performing straightforward dictionary attacks, these tools can expand password dictionaries using password generation rules, such as concatenation of words (e.g., &ldquo;password123456&rdquo;) and leet speak (e.g., &ldquo;password&rdquo; becomes &ldquo;p4s5w0rd&rdquo;). Although these rules work well in practice, expanding them to model further passwords is a laborious task that requires specialized expertise. To address this issue, in this paper we introduce PassGAN, a novel approach that replaces human-generated password rules with theory-grounded machine learning algorithms. Instead of relying on manual password analysis, PassGAN uses a Generative Adversarial Network (GAN) to autonomously learn the distribution of real passwords from actual password leaks, and to generate high-quality password guesses. Our experiments show that this approach is very promising. When we evaluated PassGAN on two large password datasets, we were able to surpass rule-based and state-of-the-art machine learning password guessing tools. However, in contrast with the other tools, PassGAN achieved this result without any a-priori knowledge on passwords or common password structures. Additionally, when we combined the output of PassGAN with the output of HashCat, we were able to match 51%-73% more passwords than with HashCat alone. This is remarkable, because it shows that PassGAN can autonomously extract a considerable number of password properties that current state-of-the art rules do not encode.\n\u5173\u952e\u5b57 \u5bc6\u7801\u731c\u89e3\uff0c\u5bc6\u7801\u751f\u6210\uff0c\u5bf9\u6297\u751f\u6210\u7f51\u7edc\n\u89e3\u51b3\u95ee\u9898 \u73b0\u5b9e\u95ee\u9898 \u5bc6\u7801\u731c\u89e3\u95ee\u9898\uff0c\u7531\u4e8e\u5bc6\u7801\u731c\u89e3\u975e\u5e38\u7b80\u5355\u4e14\u5b9e\u7528\uff0c\u56e0\u6b64\u88ab\u5e7f\u6cdb\u5e94\u7528\u3002\n\u4e4b\u524d\u7814\u7a76\u7684\u4e0d\u8db3 \u5bc6\u7801\u731c\u89e3\u5de5\u5177\uff0c\u5982HashCat\u548cJoin The Ripper\uff0c\u53ef\u4ee5\u7ed3\u5408\u7ed9\u5b9a\u7684\u5173\u952e\u8bcd\uff0c\u8fdb\u884c\u7ed9\u5b9a\u7684\u542f\u53d1\u5f0f\u7684\u5bc6\u7801\u53d8\u5f62\u3002\u4f46\u8fd9\u4e9b\u89c4\u5219\u662f\u57fa\u4e8e\u5bf9\u7528\u6237\u5bc6\u7801\u7684\u4e3b\u89c2\u731c\u6d4b\uff0c\u800c\u4e0d\u662f\u4f9d\u636e\u5927\u91cf\u7684\u5bc6\u7801\u6570\u636e\u96c6\u6765\u8fdb\u884c\u5bc6\u7801\u7684\u731c\u6d4b\u3002\u800c\u4e14\u6dfb\u52a0\u65b0\u7684\u89c4\u5219\u4f9d\u8d56\u5927\u91cf\u7684\u6d4b\u8bd5\uff0c\u56e0\u6b64\u5176\u53ef\u9760\u6027\u5f88\u53d7\u9650\u5236\u3002 \u5bc6\u7801\u731c\u89e3\u9898\u662f\u4e00\u4e2a\u975e\u5e38\u4f20\u7edf\u7684\u95ee\u9898\uff0c\u6700\u5f00\u59cb\u662f\u66b4\u529b\u7834\u89e3\u3002\u7136\u540e\u57282005\u5e74\u7684\u65f6\u5019\uff0cNarayanan\u7b49\u4eba\u628a\u9a6c\u5c14\u53ef\u592b\u6a21\u578b\u5f15\u5165\u5230\u5bc6\u7801\u731c\u89e3\u4e2d\u3002\u4f46\u662f\u8fd9\u65f6\u5019\u8fd8\u53ea\u662f\u4f7f\u7528\u4eba\u5de5\u751f\u6210\u7684\u56fa\u5b9a\u5bc6\u7801\u89c4\u5219\u3002Weir\u7b49\u4eba\u5bf9\u8fd9\u79cd\u65b9\u6cd5\u8fdb\u884c\u4e86\u6539\u8fdb\uff0c\u4ed6\u5f15\u5165\u4e86\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\uff08Probabilistic Context-Free Grammars, PCFGs\uff09\u3002 2006\u5e74\u7684\u65f6\u5019Ciaramella\u628a\u795e\u7ecf\u7f51\u7edc\u5f15\u5165\u5230\u5bc6\u7801\u731c\u89e3\u9886\u57df\u4e2d\u3002 \u6700\u8fd1\uff0cMelicher[1]\u7684FLA\u4f7f\u7528\u4e86RNN\u7684\u65b9\u6cd5\u8fdb\u884c\u5bc6\u7801\u7684\u751f\u6210\u548c\u731c\u89e3\uff0c\u4f46\u662f\u5e94\u7528\u7684\u76ee\u6807\u4e3a\u5bc6\u7801\u5f3a\u5ea6\u7684\u9a8c\u8bc1\u3002Melicher\u76ee\u6807\u4e3a\u5b9e\u73b0\u5c3d\u53ef\u80fd\u5feb\u7684\u5bc6\u7801\u5f3a\u5ea6\u7684\u9a8c\u8bc1\uff0c\u540c\u65f6\u4f7f\u6a21\u578b\u5c3d\u53ef\u80fd\u7cbe\u7b80\u3002\u6a21\u578b\u538b\u7f29\u5230\u5728\u672c\u5730JavaScript\u4ee3\u7801\u53ef\u4ee5\u5b9e\u73b0\u3002\n\u65b9\u6cd5 \u4f7f\u7528\u5bf9\u6297\u751f\u6210\u7f51\u7edc\u8fdb\u884c\u5bc6\u7801\u7684\u751f\u6210\u3002\n\u7279\u70b9\u4e0e\u4e0d\u8db3 \u7279\u70b9 \u4f7f\u7528\u5bf9\u6297\u751f\u6210\u7f51\u7edc\u8fdb\u884c\u9ad8\u8d28\u91cf\u7684\u5bc6\u7801\u751f\u6210\uff0c\u5339\u914d\u7387\u975e\u5e38\u9ad8 \u80fd\u548c\u6700\u5148\u8fdb\u7684\u5bc6\u7801\u751f\u6210\u89c4\u5219\u7ade\u4e89 \u5bc6\u7801\u751f\u6210\u5e76\u4e0d\u5c40\u9650\u4e8e\u5bc6\u7801\u7684\u5c0f\u7684\u5b50\u96c6 \u6027\u80fd\u8868\u73b0\u548c\u53e6\u5916\u4e00\u7bc7USENix\u7684\u8bba\u6587\u6027\u80fd\u76f8\u5f53\u3002 \u300aFast, Lean, and Accurate: Modeling Password Guessability Using Neural Networks\u300b \u548cHashCat\u7ed3\u5408\u540e\uff0c\u80fd\u751f\u621053%-73%\u591a\u7684\u5bc6\u7801\u3002 \u4e0d\u9700\u8981\u5148\u9a8c\u77e5\u8bc6 \u4e0d\u8db3 \u4e0d\u80fd\u7ed3\u5408\u5148\u9a8c\u77e5\u8bc6 \u4f5c\u8005 \u4e00\u4f5c\u7684\u7814\u7a76\u65b9\u5411\u4e3a\u5b89\u5168\u548c\u6df1\u5ea6\u5b66\u4e60\u3002\n\u8fd8\u6709\u4e2ayoutube\u7684\u4f5c\u8005\u4ecb\u7ecd\u4e86PassGan\u8fd9\u4e00\u6210\u679c\u3002\nhttps:\/\/www.youtube.com\/watch?v=b92sTdRRwvs\n\u8bba\u6587\u51fa\u5904 [1] Hitaj B, Gasti P, Ateniese G, Perez-Cruz F. PassGAN: a deep learning approach for password guessing. arXiv:1709.00440 [cs, stat], 2017.\n\u5b9e\u9a8c\u53ca\u6548\u679c \u4f7f\u7528\u7684\u6a21\u578b\u4e3aImproved training of Wasserstein GANs (IWGAN)\u3002\n\u751f\u6210\u7f51\u7edc\u548c\u5224\u522b\u7f51\u7edc\u5982\u4e0b\u56fe\u6240\u793a\u3002\n\u4f7f\u7528\u7684\u6570\u636e\u96c6\u4e3aRockYou\u548cLinkedIn\u3002\n\u6548\u679c\uff1a\nPassGan\u751f\u6210\u7684\u552f\u4e00\u5bc6\u7801\u7684\u6570\u91cf\u4ee5\u53ca\u5728\u6d4b\u8bd5\u96c6\u4e2d\u7684\u5339\u914d\u5ea6\u3002\n\u53ef\u4ee5\u770b\u5230\u5728\u8bad\u7ec3\u96c6\u4e2d\u6ca1\u6709\uff0c\u4f46\u662f\u5728\u6d4b\u8bd5\u96c6\u4e2d\u5305\u542b\u7684\u6837\u672c\u6570\u91cf\u8fbe\u5230\u4e8634%\u3002\n\u8fd9\u662f\u5728RockYou \u8bad\u7ec3\u96c6\u4e2d\u6700\u5e38\u89c1\u5bc6\u7801\uff0c\u4ee5\u53ca\u5206\u522b\u4f7f\u7528FLA\u548cPassGan\u751f\u6210\u7684\u6700\u5e38\u89c1\u7684\u5bc6\u7801\u7684\u9891\u7387\u5bf9\u6bd4\u3002\n\u6536\u83b7 \u4f7f\u7528\u5bf9\u6297\u795e\u7ecf\u7f51\u7edc\u8fdb\u884c\u5bc6\u7801\u7684\u751f\u6210\u3002\n\u8bba\u6587\u4e2d\u5bf9\u4e8e\u5bc6\u7801\u751f\u6210\u7684\u8bc4\u4ef7\u6807\u51c6\u6709\uff1a\u8f93\u51fa\u7684\u5206\u5e03\u7a7a\u95f4\uff1b\u4e0e\u6d4b\u8bd5\u96c6\u7684\u5339\u914d\u5ea6\uff1b\u5728\u4e0e\u5176\u4ed6\u540c\u5c45\u8fbe\u5230\u76f8\u540c\u6027\u80fd\u65f6\uff0c\u9700\u8981\u751f\u6210\u7684\u5bc6\u7801\u6570\u76ee\uff1b\u751f\u6210\u7684\u9ad8\u9891\u5bc6\u7801\u7684\u5206\u5e03\u3002\nFLA\u662f\u53e6\u4e00\u4e2a\u4f7f\u7528\u6df1\u5ea6\u5b66\u4e60\u8fdb\u884c\u5bc6\u7801\u751f\u6210\u7684\u5de5\u5177\uff0c\u4e5f\u662f\u672c\u6587\u7684\u4e3b\u8981Benchmark\u4e4b\u4e00\u3002\n\u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u53ef\u4ee5\u4f7f\u7528\u8bad\u7ec3\u540e\u7684\u5224\u522b\u7f51\u7edc\u8fdb\u884c\u5bc6\u7801\u7684\u5224\u65ad\u3002\u5728HTTP\u7684\u62a5\u6587\u4e2d\u8fdb\u884c\u5bc6\u7801\u7684\u8bc6\u522b\u3002\n\u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206: \u2b50\u2b50\u2b50\u2b50\n\u8bc4\u4ef7: \u60f3\u6cd5\u4e0d\u9519\uff0c\u4f46\u662f\u6548\u679c\u4e0d\u662f\u90a3\u4e48\u7406\u60f3\u3002\u4f46\u662f\u80fd\u591f\u89e3\u51b3\u7279\u5b9a\u573a\u666f\u4e0b\u7684\u95ee\u9898\u3002 \u5728\u7406\u8bba\u63a8\u5bfc\u4e0a\u6709\u4e00\u5b9a\u6b20\u7f3a\u3002\n\u53c2\u8003\u8d44\u6599\u53ca\u9644\u4ef6 [1]\tMelicher W, Ur B, Segreti SM, Komanduri S, Bauer L, Christin N, Cranor LF. Fast, lean, and accurate: modeling password guessability using neural networks. 25th USENIX Security Symposium (USENIX Security 16). Austin, TX: USENIX Association, 2016: 175\u2013191.\n[2] https:\/\/www.youtube.com\/watch?v=b92sTdRRwvs\n[3] https:\/\/github.com\/brannondorsey\/PassGAN\n[4] https:\/\/github.com\/d4ichi\/PassGAN\n\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20191012-passgan\/","summary":"<h1 id=\"\u8bba\u6587\u4e3b\u9898\">\u8bba\u6587\u4e3b\u9898<\/h1>\n<p>\u4f7f\u7528\u5bf9\u6297\u795e\u7ecf\u7f51\u7edc\u7684\u65b9\u5f0f\u8fdb\u884c\u5bc6\u7801\u751f\u6210\u548c\u5bc6\u7801\u731c\u89e3\u3002<\/p>\n<h1 id=\"\u6458\u8981\">\u6458\u8981<\/h1>\n<h2 id=\"\u4e2d\u6587\">\u4e2d\u6587<\/h2>\n<p>\u6700\u5148\u8fdb\u7684\u5bc6\u7801\u731c\u6d4b\u5de5\u5177\uff0c\u4f8b\u5982HashCat\u548cRipper John\uff0c\u4f7f\u7528\u6237\u80fd\u591f\u6bcf\u79d2\u68c0\u67e5\u6570\u5341\u4ebf\u4e2a\u5bc6\u7801\u4ee5\u9632\u5bc6\u7801\u54c8\u5e0c\u3002\u9664\u4e86\u6267\u884c\u7b80\u5355\u7684\u5b57\u5178\u653b\u51fb\u5916\uff0c\u8fd9\u4e9b\u5de5\u5177\u8fd8\u53ef\u4ee5\u4f7f\u7528\u5bc6\u7801\u751f\u6210\u89c4\u5219\u6765\u6269\u5c55\u5bc6\u7801\u8bcd\u5178\uff0c\u4f8b\u5982\u5355\u8bcd\u7684\u4e32\u8054\uff08\u4f8b\u5982\u201c password123456\u201d\uff09\u548c\u8f7b\u58f0\u8bf4\u8bdd\uff08\u4f8b\u5982\u201c password\u201d\u53d8\u4e3a\u201c p4s5w0rd\u201d\uff09\u3002\u5c3d\u7ba1\u8fd9\u4e9b\u89c4\u5219\u5728\u5b9e\u8df5\u4e2d\u6548\u679c\u5f88\u597d\uff0c\u4f46\u662f\u5c06\u5176\u6269\u5c55\u4ee5\u6a21\u62df\u66f4\u591a\u5bc6\u7801\u662f\u4e00\u9879\u8270\u5de8\u7684\u4efb\u52a1\uff0c\u9700\u8981\u4e13\u4e1a\u77e5\u8bc6\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86PassGAN\uff0c\u8fd9\u662f\u4e00\u79cd\u65b0\u9896\u7684\u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u4ee5\u7406\u8bba\u4e3a\u57fa\u7840\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u53d6\u4ee3\u4e86\u4eba\u4e3a\u751f\u6210\u7684\u5bc6\u7801\u89c4\u5219\u3002 PassGAN\u4e0d\u518d\u4f9d\u8d56\u4eba\u5de5\u5bc6\u7801\u5206\u6790\uff0c\u800c\u662f\u4f7f\u7528Genversative Adversarial Network\uff08GAN\uff09\u6765\u4ece\u5b9e\u9645\u5bc6\u7801\u6cc4\u6f0f\u4e2d\u81ea\u52a8\u5b66\u4e60\u771f\u5b9e\u5bc6\u7801\u7684\u5206\u5e03\uff0c\u5e76\u751f\u6210\u9ad8\u8d28\u91cf\u7684\u5bc6\u7801\u731c\u6d4b\u3002\u6211\u4eec\u7684\u5b9e\u9a8c\u8868\u660e\uff0c\u8fd9\u79cd\u65b9\u6cd5\u975e\u5e38\u6709\u524d\u9014\u3002\u5f53\u6211\u4eec\u5728\u4e24\u4e2a\u5927\u578b\u5bc6\u7801\u6570\u636e\u96c6\u4e0a\u8bc4\u4f30PassGAN\u65f6\uff0c\u6211\u4eec\u80fd\u591f\u8d85\u8d8a\u57fa\u4e8e\u89c4\u5219\u548c\u6700\u5148\u8fdb\u7684\u673a\u5668\u5b66\u4e60\u5bc6\u7801\u731c\u6d4b\u5de5\u5177\u3002\u4f46\u662f\uff0c\u4e0e\u5176\u4ed6\u5de5\u5177\u76f8\u6bd4\uff0cPassGAN\u5728\u6ca1\u6709\u4efb\u4f55\u5148\u9a8c\u5bc6\u7801\u77e5\u8bc6\u6216\u901a\u7528\u5bc6\u7801\u7ed3\u6784\u7684\u60c5\u51b5\u4e0b\u83b7\u5f97\u4e86\u6b64\u7ed3\u679c\u3002\u53e6\u5916\uff0c\u5f53\u6211\u4eec\u5c06PassGAN\u7684\u8f93\u51fa\u4e0eHashCat\u7684\u8f93\u51fa\u7ec4\u5408\u5728\u4e00\u8d77\u65f6\uff0c\u4e0e\u4ec5\u4f7f\u7528HashCat\u7684\u60c5\u51b5\u76f8\u6bd4\uff0c\u6211\u4eec\u80fd\u591f\u5339\u914d\u591a51\uff05-73\uff05\u7684\u5bc6\u7801\u3002\u8fd9\u662f\u5f88\u4e86\u4e0d\u8d77\u7684\uff0c\u56e0\u4e3a\u5b83\u8868\u660ePassGAN\u53ef\u4ee5\u81ea\u4e3b\u63d0\u53d6\u5927\u91cf\u5f53\u524d\u6700\u65b0\u89c4\u5219\u65e0\u6cd5\u7f16\u7801\u7684\u5bc6\u7801\u5c5e\u6027\u3002<\/p>\n<h2 id=\"\u82f1\u6587\">\u82f1\u6587<\/h2>\n<p>State-of-the-art password guessing tools, such as HashCat and John the Ripper, enable users to check billions of passwords per second against password hashes. In addition to performing straightforward dictionary attacks, these tools can expand password dictionaries using password generation rules, such as concatenation of words (e.g., &ldquo;password123456&rdquo;) and leet speak (e.g., &ldquo;password&rdquo; becomes &ldquo;p4s5w0rd&rdquo;). Although these rules work well in practice, expanding them to model further passwords is a laborious task that requires specialized expertise. To address this issue, in this paper we introduce PassGAN, a novel approach that replaces human-generated password rules with theory-grounded machine learning algorithms. Instead of relying on manual password analysis, PassGAN uses a Generative Adversarial Network (GAN) to autonomously learn the distribution of real passwords from actual password leaks, and to generate high-quality password guesses. Our experiments show that this approach is very promising. When we evaluated PassGAN on two large password datasets, we were able to surpass rule-based and state-of-the-art machine learning password guessing tools. However, in contrast with the other tools, PassGAN achieved this result without any a-priori knowledge on passwords or common password structures. Additionally, when we combined the output of PassGAN with the output of HashCat, we were able to match 51%-73% more passwords than with HashCat alone. This is remarkable, because it shows that PassGAN can autonomously extract a considerable number of password properties that current state-of-the art rules do not encode.<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011PassGAN: A Deep Learning Approach for Password Guessing"},{"content":"\u6982\u89c8 \u6458\u8981 Home-based IoT devices have a bleak reputation regarding their security practices. On the surface, the insecurities of IoT devices seem to be caused by integration problems that may be addressed by simple measures, but this work finds that to be a naive assumption. The truth is, IoT deployments, at their core, utilize traditional compute systems, such as embedded, mobile, and network. These components have many unexplored challenges such as the effect of over-privileged mobile applications on embedded devices. Our work proposes a methodology that researchers and practitioners could employ to analyze security properties for home-based IoT devices. We systematize the literature for home-based IoT using this methodology in order to understand attack techniques, mitigations, and stakeholders. Further, we evaluate 45 devices to augment the systematized literature in order to identify neglected research areas. To make this analysis transparent and easier to adapt by the community, we provide a public portal to share our evaluation data and invite the community to contribute their independent findings.\n\u57fa\u4e8e\u5bb6\u5ead\u7684\u7269\u8054\u7f51\u8bbe\u5907\u5728\u5176\u5b89\u5168\u5b9e\u8df5\u65b9\u9762\u60e8\u4e0d\u5fcd\u7779\u3002\u4ece\u8868\u9762\u4e0a\u770b\uff0c\u7269\u8054\u7f51\u8bbe\u5907\u7684\u4e0d\u5b89\u5168\u6027\u4f3c\u4e4e\u662f\u7531\u96c6\u6210\u95ee\u9898\u5f15\u8d77\u7684\uff0c\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u65b9\u6cd5\u89e3\u51b3\u3002\u4f46\u8fd9\u9879\u5de5\u4f5c\u53d1\u73b0\u8fd9\u662f\u975e\u5e38\u6d45\u663e\u7684\u8ba4\u8bc6\u3002\u4e8b\u5b9e\u662f\uff0c\u7269\u8054\u7f51\u90e8\u7f72\u7684\u6838\u5fc3\u662f\u5229\u7528\u4f20\u7edf\u7684\u8ba1\u7b97\u7cfb\u7edf\uff0c\u4f8b\u5982\u5d4c\u5165\u5f0f\uff0c\u79fb\u52a8\u548c\u7f51\u7edc\u3002\u8fd9\u4e9b\u7ec4\u4ef6\u5177\u6709\u8bb8\u591a\u672a\u7a33\u5b9a\u7684\u5c1d\u8bd5\uff0c\u4f8b\u5982\uff0c\u8fc7\u4e8e\u7279\u6743\u7684\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u5bf9\u5d4c\u5165\u5f0f\u8bbe\u5907\u7684\u5f71\u54cd\u3002\u6211\u4eec\u7684\u5de5\u4f5c\u63d0\u51fa\u4e86\u4e00\u79cd\u65b9\u6cd5\uff0c\u7814\u7a76\u4eba\u5458\u548c\u4ece\u4e1a\u4eba\u5458\u53ef\u4ee5\u91c7\u7528\u8be5\u65b9\u6cd5\u6765\u5206\u6790\u57fa\u4e8e\u5bb6\u5ead\u7684\u7269\u8054\u7f51\u8bbe\u5907\u7684\u5b89\u5168\u5c5e\u6027\u3002\u6211\u4eec\u4f7f\u7528\u6b64\u65b9\u6cd5\u5c06\u57fa\u4e8e\u5bb6\u5ead\u7684\u7269\u8054\u7f51\u7684\u53c2\u8003\u8d44\u6599\u7cfb\u7edf\u5316\uff0c\u4ee5\u4e86\u89e3\u653b\u51fb\u6280\u672f\uff0c\u7f13\u89e3\u63aa\u65bd\u548c\u5229\u76ca\u76f8\u5173\u65b9\u3002\u6b64\u5916\uff0c\u6211\u4eec\u8bc4\u4f30\u4e8645\u4e2a\u8bbe\u5907\u4ee5\u6269\u5145\u7cfb\u7edf\u5316\u7684\u53c2\u8003\u8d44\u6599\uff0c\u4ee5\u8bc6\u522b\u88ab\u5ffd\u89c6\u7684\u7814\u7a76\u9886\u57df\u3002\u4e3a\u4e86\u4f7f\u6b64\u5206\u6790\u900f\u660e\u5e76\u6613\u4e8e\u793e\u533a\u9002\u5e94\uff0c\u6211\u4eec\u63d0\u4f9b\u4e86\u4e00\u4e2a\u516c\u5171\u95e8\u6237\u7f51\u7ad9\u6765\u5171\u4eab\u6211\u4eec\u7684\u8bc4\u4f30\u6570\u636e\uff0c\u5e76\u9080\u8bf7\u793e\u533a\u8d21\u732e\u5176\u72ec\u7acb\u7684\u53d1\u73b0\u3002\n\u5173\u952e\u8bcd \u7cfb\u7edf\u5b89\u5168 \u7269\u8054\u7f51 \u5f15\u7528\u683c\u5f0f Omar Alrawi, Chaz Lever, Manos Antonakakis, Fabian Monrose; SoK: Security Evaluation of Home-Based IoT Deployments, IEEE S&amp;P (Oakland), May 2019.\n\u4f5c\u8005 Omar Alrawi, Chaz Lever, Manos Antonakakis, Fabian Monrose\n\u5176\u4e2d\u4e00\u4f5cOmar Alrawi\u7684\u4e3b\u9875\u4e3a\uff1a https:\/\/alrawi.github.io\/\n\u4f5c\u8005\u6765\u81ea\u7f8e\u56fd\u4f50\u6cbb\u4e9a\u7406\u5de5\u5b66\u9662\uff0c\u5bfc\u5e08\u4e3a\tManos Antonakakis\u3002\n\u5bfc\u5e08\u7814\u7a76\u65b9\u5411\u4e3a\u8ba1\u7b97\u673a\u548c\u7f51\u7edc\u5b89\u5168\uff0c\u5f02\u5e38\u68c0\u6d4b\uff0c\u6570\u636e\u6316\u6398\u548c\u653b\u51fb\u6eaf\u6e90\u3002\u5bfc\u5e08\u4e3b\u9875\u4e3a\uff1a https:\/\/sites.google.com\/site\/antonakakis\/pubs\u3002 \u53d1\u8868\u4e86\u5f88\u591a\u5b89\u5168\u76f8\u5173\u7684\u9876\u4f1a\u8bba\u6587\u3002\n\u7b14\u8bb0 \u8bba\u6587\u4e3b\u9898 \u4f7f\u7528\u56fe\u548c\u7ec4\u5408\u7684\u65b9\u6cd5\u8bc4\u4f30\u5bb6\u5ead\u7269\u8054\u7f51\u7684\u5b89\u5168\u6027\n\u5f85\u89e3\u51b3\u95ee\u9898 \u7269\u8054\u7f51\u5b89\u5168\u6027\u592a\u5dee\u3002 \u7531\u4e8e\u7f51\u7edc\u7cfb\u7edf\u590d\u6742\u6027\u642d\u5efa\u5b89\u5168\u7269\u8054\u7f51\u5e76\u4e0d\u7b80\u5355\u3002 \u4f9b\u7ed9\u9762\u592a\u5e7f\u3002 \u89e3\u51b3\u65b9\u6848 \u4f7f\u7528\u57fa\u4e8e\u7269\u8054\u7f51\u7ec4\u4ef6\u7684\u6846\u67b6\uff0c\u63a2\u7d22\u8bbe\u5907\u3001\u8f6f\u4ef6\u3001\u4e91\u7aef\u548c\u7f51\u7edc\u7ec8\u7aef\u4e4b\u95f4\u7684\u8054\u7cfb\uff0c\u53e6\u5916\u8fd8\u6709\u6307\u7eb9\u7ec4\u4ef6\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u7406\u89e3\u7f51\u7edc\u4e2d\u7684\u884c\u4e3a\u3002\u6784\u5efa\u4e86\u4e00\u4e2a\u56fe\u7ed3\u6784\u8868\u793a\u7269\u8054\u7f51\u4e2d\u7684\u5404\u4e2a\u7ec4\u6210\u6210\u5206\u3002\n\u6548\u679c \u4f5c\u8005\u5bf945\u6b3e\u70ed\u95e8\u7684\u8bbe\u5907\u8fdb\u884c\u5206\u6790\u3002\n\u5b9e\u9a8c\u8bbe\u5907:\n\u8bbe\u5907\u5206\u6790\u60c5\u51b5:\n\u601d\u8003 \u6536\u83b7 \u4f7f\u7528\u56fe\u7684\u601d\u60f3\uff0c\u5bf9\u5bb6\u7528\u7269\u8054\u7f51\u73af\u5883\u4e0b\u7684\u7269\u8054\u7f51\u8bbe\u5907\u8fdb\u884c\u7efc\u5408\u6027\u5168\u9762\u7684\u5206\u6790\u3002\n\u4e0d\u8db3\u4e4b\u5904 \u56fe\u53ea\u662f\u4f5c\u4e3a\u5173\u8054\u548c\u601d\u60f3\uff0c\u6ca1\u6709\u771f\u6b63\u5e94\u7528\u5230\u56fe\u3002\n\u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206 \u6ee1\u52065 \u2b50\u2b50\u2b50\u2b50\u2b50\n\u8bc4\u4ef7 \u8bba\u6587\u5bf9\u4e8e\u8bbe\u5907\u7684\u5206\u6790\u975e\u5e38\u5168\u9762\u548c\u5230\u4f4d\u3002\n\u53c2\u8003\u8d44\u6599\u53ca\u9644\u4ef6 \u4f5c\u8005\u5b98\u7f51\uff1ahttps:\/\/alrawi.github.io\/\n\u5176\u4ed6\u53c2\u8003\u8d44\u6599\nslides-long slides-short website VIDEO: One min Preview VIDEO: Conf. Presentation \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20191011-security-evaluation-of-home-based-iot-deployments\/","summary":"<h1 id=\"\u6982\u89c8\">\u6982\u89c8<\/h1>\n<h2 id=\"\u6458\u8981\">\u6458\u8981<\/h2>\n<p>Home-based IoT devices have a bleak reputation regarding their security practices. On the surface, the insecurities of IoT devices seem to be caused by integration problems that may be addressed by simple measures, but this work finds that to be a naive assumption. The truth is, IoT deployments, at their core, utilize traditional compute systems, such as embedded, mobile, and network. These components have many unexplored challenges such as the effect of over-privileged mobile applications on embedded devices. Our work proposes a methodology that researchers and practitioners could employ to analyze security properties for home-based IoT devices. We systematize the literature for home-based IoT using this methodology in order to understand attack techniques, mitigations, and stakeholders. Further, we evaluate 45 devices to augment the systematized literature in order to identify neglected research areas. To make this analysis transparent and easier to adapt by the community, we provide a public portal to share our evaluation data and invite the community to contribute their independent findings.<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011SoK: Security Evaluation of Home-Based IoT Deployments"},{"content":"\u8521\u9ad8\u5385\u9ad8\u7b49\u6570\u5b66\u8bfe\u7a0b\u6559\u6750pdf\n\u4ecb\u7ecd \u8521\u9ad8\u5385\uff0c\u4efb\u5929\u6d25\u5927\u5b66\u6570\u5b66\u7cfb\u6559\u6388\u3002\u4ed6\u5728\u5b66\u751f\u4e2d\u5177\u6709\u5f88\u9ad8\u7684\u5a01\u671b\uff0c\u5728\u89c6\u9891\u6559\u5b66\u4e2d\uff0c\u8521\u8001\u5e08\u7ec6\u81f4\u7684\u8bb2\u89e3\u4ee5\u53ca\u8ba4\u771f\u8d1f\u8d23\u7684\u6001\u5ea6\uff0c\u5f88\u8ba9\u540c\u5b66\u4eec\u611f\u52a8,\u7f51\u4e0a\u53ef\u4ee5\u4e0b\u8f7d\u5230\u8521\u9ad8\u5385\u9ad8\u7b49\u6570\u5b66\u89c6\u9891\u3001\u6559\u5b66\u8f6f\u4ef6\u7b49\u3002\u8521\u8001\u5e08\u4e00\u4e1d\u4e0d\u82df\u7684\u677f\u4e66\u8ba9\u4eba\u5f88\u662f\u94a6\u4f69\u3002\n\u9002\u5408\u57fa\u7840\u8584\u5f31\u7684\u540c\u5b66\u8ba4\u8ba4\u771f\u771f\u4ed4\u7ec6\u7684\u628a\u9ad8\u6570\u5b66\u4e60\u4e00\u904d\u3002\n\u9644\u4ef6\u5185\u5bb9 \u9644\u4ef6\u4e2d\u5305\u62ec\n\u9ad8\u7b49\u6570\u5b66\u4e0a\u518c.pdf \u9ad8\u7b49\u6570\u5b66\u8bd5\u9898\u7cbe\u9009\u4e0e\u89e3\u7b54.pdf \u9ad8\u7b49\u6570\u5b66\u4e0b\u518c.pdf \u4e0b\u8f7d\u5730\u5740 \u8521\u9ad8\u5385\u9ad8\u7b49\u6570\u5b66.zip\n\u5907\u7528\u5730\u5740\n\u89c6\u9891\u89c2\u770b\u5730\u5740 \u9ad8\u7b49\u6570\u5b66 \u8521\u9ad8\u5385 \u4e0a\u518c \u9ad8\u7b49\u6570\u5b66 \u8521\u9ad8\u5385 \u4e0b\u518c \u4e0a\u518c\u76ee\u5f55 \u4e0b\u518c\u76ee\u5f55 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190929-caigaoting-mathematics\/","summary":"<p>\u8521\u9ad8\u5385\u9ad8\u7b49\u6570\u5b66\u8bfe\u7a0b\u6559\u6750pdf<\/p>\n<h2 id=\"\u4ecb\u7ecd\">\u4ecb\u7ecd<\/h2>\n<p><strong>\u8521\u9ad8\u5385<\/strong>\uff0c\u4efb\u5929\u6d25\u5927\u5b66\u6570\u5b66\u7cfb\u6559\u6388\u3002\u4ed6\u5728\u5b66\u751f\u4e2d\u5177\u6709\u5f88\u9ad8\u7684\u5a01\u671b\uff0c\u5728\u89c6\u9891\u6559\u5b66\u4e2d\uff0c\u8521\u8001\u5e08\u7ec6\u81f4\u7684\u8bb2\u89e3\u4ee5\u53ca\u8ba4\u771f\u8d1f\u8d23\u7684\u6001\u5ea6\uff0c\u5f88\u8ba9\u540c\u5b66\u4eec\u611f\u52a8,\u7f51\u4e0a\u53ef\u4ee5\u4e0b\u8f7d\u5230\u8521\u9ad8\u5385\u9ad8\u7b49\u6570\u5b66\u89c6\u9891\u3001\u6559\u5b66\u8f6f\u4ef6\u7b49\u3002\u8521\u8001\u5e08\u4e00\u4e1d\u4e0d\u82df\u7684\u677f\u4e66\u8ba9\u4eba\u5f88\u662f\u94a6\u4f69\u3002<\/p>\n<p>\u9002\u5408\u57fa\u7840\u8584\u5f31\u7684\u540c\u5b66\u8ba4\u8ba4\u771f\u771f\u4ed4\u7ec6\u7684\u628a\u9ad8\u6570\u5b66\u4e60\u4e00\u904d\u3002<\/p>\n<h2 id=\"\u9644\u4ef6\u5185\u5bb9\">\u9644\u4ef6\u5185\u5bb9<\/h2>\n<p>\u9644\u4ef6\u4e2d\u5305\u62ec<\/p>\n<ul>\n<li>\u9ad8\u7b49\u6570\u5b66\u4e0a\u518c.pdf<\/li>\n<li>\u9ad8\u7b49\u6570\u5b66\u8bd5\u9898\u7cbe\u9009\u4e0e\u89e3\u7b54.pdf<\/li>\n<li>\u9ad8\u7b49\u6570\u5b66\u4e0b\u518c.pdf<\/li>\n<\/ul>\n<h2 id=\"\u4e0b\u8f7d\u5730\u5740\">\u4e0b\u8f7d\u5730\u5740<\/h2>\n<p><a href=\"http:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/annex\/%E8%94%A1%E9%AB%98%E5%8E%85%E9%AB%98%E6%95%B0%E6%95%99%E6%9D%90.zip\">\u8521\u9ad8\u5385\u9ad8\u7b49\u6570\u5b66.zip<\/a><\/p>\n<p><a href=\"https:\/\/download.csdn.net\/download\/still_night\/9821338\">\u5907\u7528\u5730\u5740<\/a><\/p>\n<h2 id=\"\u89c6\u9891\u89c2\u770b\u5730\u5740\">\u89c6\u9891\u89c2\u770b\u5730\u5740<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.bilibili.com\/video\/av17759189\">\u9ad8\u7b49\u6570\u5b66 \u8521\u9ad8\u5385 \u4e0a\u518c<\/a><\/li>\n<li><a href=\"https:\/\/www.bilibili.com\/video\/av9989150\/\">\u9ad8\u7b49\u6570\u5b66 \u8521\u9ad8\u5385 \u4e0b\u518c<\/a><\/li>\n<\/ul>\n<h2 id=\"\u4e0a\u518c\u76ee\u5f55\">\u4e0a\u518c\u76ee\u5f55<\/h2>\n<p><img alt=\"\u4e0a\u518c\u76ee\u5f551\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20190929140031.png\"><\/p>\n<p><img alt=\"\u4e0a\u518c\u76ee\u5f552\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20190929140106.png\"><\/p>\n<p><img alt=\"\u4e0a\u518c\u76ee\u5f553\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20190929140115.png\"><\/p>\n<p><img alt=\"\u4e0a\u518c\u76ee\u5f554\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20190929140124.png\"><\/p>\n<p><img alt=\"\u4e0a\u518c\u76ee\u5f555\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20190929140131.png\"><\/p>\n<h2 id=\"\u4e0b\u518c\u76ee\u5f55\">\u4e0b\u518c\u76ee\u5f55<\/h2>\n<p><img alt=\"\u4e0b\u518c\u76ee\u5f551\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20190929135629.png\"><\/p>\n<p><img alt=\"\u4e0b\u518c\u76ee\u5f552\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20190929135705.png\"><\/p>\n<p><img alt=\"\u4e0b\u518c\u76ee\u5f553\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20190929135748.png\"><\/p>\n<p><img alt=\"\u4e0b\u518c\u76ee\u5f554\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20190929135807.png\"><\/p>\n<p><img alt=\"\u4e0b\u518c\u76ee\u5f555\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/20190929135832.png\"><\/p>\n<hr>\n<ul>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"\u8521\u9ad8\u5385\u9ad8\u7b49\u6570\u5b66\u8bfe\u7a0b\u6559\u6750pdf"},{"content":"","permalink":"https:\/\/m2kar.cn\/posts\/20190923-passcrack\/","summary":"","title":"Index"},{"content":"\u4ecb\u7ecd \u4eca\u5929\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u7684\u662f\u4e00\u6b3e\u540d\u53ebGitGot\u7684\u534a\u81ea\u52a8\u4fe1\u606f\u6536\u96c6\u5de5\u5177\uff0c\u5728GitGot\u7684\u5e2e\u52a9\u4e0b\uff0c\u5e7f\u5927\u7814\u7a76\u4eba\u5458\u53ef\u4ee5\u8f7b\u677e\u4eceGitHub\u516c\u5f00\u6570\u636e\u4e2d\u641c\u7d22\u654f\u611f\u4fe1\u606f\u3002\n# \u5b89\u88c5\u8fd0\u884c \u73af\u5883: Kali Linux + docker\n\u5b89\u88c5 \u8fd0\u884cgitgot-docker.sh\u6587\u4ef6\u6765\u6784\u5efaGitGot Docker\u955c\u50cf\uff0c\u5e76\u6267\u884cDocker\u5316\u7684GitGot\u7248\u672c\u5de5\u5177\u3002\u8fd0\u884c\u4e4b\u540e\uff0cgitgot-docker.sh\u6587\u4ef6\u5c06\u4f1a\u5728\u4e3b\u673a\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\u4e0b\u521b\u5efa\u5e76\u52a0\u8f7dlogs\u548cstates\u76ee\u5f55\u3002\u5982\u679cgitgot-docker.sh\u6587\u4ef6\u662f\u76f4\u63a5\u4eceGitGot\u9879\u76ee\u76ee\u5f55\u4e0b\u8fd0\u884c\u7684\u8bdd\uff0c\u5b83\u5c06\u4f1a\u66f4\u65b0Docker\u5bb9\u5668\uff1a\n.\/gitgot-docker.sh \u8bbe\u7f6etoken \u7531\u4e8eGitHub\u4f1a\u9650\u5236\u8bbf\u95ee\u9891\u7387\uff0c\u56e0\u6b64\u6211\u4eec\u8fd8\u9700\u8981\u4e00\u4e2a\u4ee4\u724c\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u521b\u5efa\u4e00\u4e2a\u65e0\u6743\u9650\/\u65e0\u8303\u56f4\u7684GitHub API\u4ee4\u724c\uff1a\u3010\u4f20\u9001\u95e8\u3011\uff0c\u8fd9\u4e2a\u4ee4\u724c\u53ef\u4ee5\u76f4\u63a5\u62ff\u6765\u8bbf\u95ee\u516c\u5171GitHub\u5e93\u3002Gitgot.py\u6587\u4ef6\u7684\u9876\u90e8\u9700\u8981\u6dfb\u52a0\u4e0b\u5217\u4ee3\u7801\uff1a\nACCESS_TOKEN= &#34;&lt;NO-PERMISSION-GITHUB-TOKEN-HERE&gt;&#34; \u5de5\u5177\u4f7f\u7528 \u4f7f\u7528\u9ed8\u8ba4\u6b63\u5219\u5f0f\u5217\u8868\u548c\u65e5\u5fd7\u6587\u4ef6\u5730\u5740(\/logs\/.log)\u67e5\u8be2\u5b57\u7b26\u4e32\u201dexample.com\u201d .\/gitgot.py -q example.com \u5c1d\u8bd5\u4e86\u4e00\u4e0b iscas.ac.cn\n.\/gitgot.py -q iscas.ac.cn \u641c\u7d22\u5230\u4e86\u4e00\u4e9b\u624b\u673a\u53f7,\u90ae\u7bb1,\u59d3\u540d\u8fd9\u6837\u7684\u654f\u611f\u4fe1\u606f\n\u53d1\u73b0\u5f88\u591a\u673a\u5668\u5b66\u4e60\u7684\u6076\u610f\u90ae\u4ef6\u5206\u7c7b\u6570\u636e\u96c6\u4e2d\u7adf\u7136\u5305\u542b\u5f88\u591a\u7684\u8f83\u4e3a\u654f\u611f\u7684\u90ae\u7bb1\u548c\u57df\u540d\u4fe1\u606f\n\u53ef\u4ee5\u4f7f\u7528\u4ea4\u4e92\u547d\u4ee4\u8bbe\u7f6e\u662f\u5426\u663e\u793a\u5185\u5bb9\u3002\u5982\u679c\u8bbe\u7f6e\u662f\u5426\u5ffd\u7565\u76f8\u4f3c\u5185\u5bb9\uff0c\u5219\u4f1a\u6839\u636e\u76f8\u4f3c\u5ea6\u5224\u65ad\u662f\u5426\u5ffd\u7565\u3002\n\u8fd8\u6709\u8fd9\u79cd\u6781\u5ea6\u654f\u611f\u7684\u4fe1\u606f\u3002\n\u8fd9\u662fPHP\u7684password_hash\u51fd\u6570\u751f\u6210\u7684\u5bc6\u7801\u3002\nhttps:\/\/moodle.org\/mod\/forum\/discuss.php?d=315092&parent=1262609\nhttps:\/\/www.php.net\/password_hash\n\u53c2\u8003 [Github] GitGot https:\/\/github.com\/BishopFox\/GitGot\nGitGot\uff1a\u4e00\u6b3e\u53ef\u4eceGitHub\u516c\u5f00\u6570\u636e\u4e2d\u641c\u7d22\u654f\u611f\u4fe1\u606f\u7684\u534a\u81ea\u52a8\u5316\u5feb\u901f\u641c\u7d22\u5de5\u5177 https:\/\/www.freebuf.com\/sectool\/212124.html\n\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190920-gitgot\/","summary":"<h1 id=\"\u4ecb\u7ecd\">\u4ecb\u7ecd<\/h1>\n<p>\u4eca\u5929\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u7684\u662f\u4e00\u6b3e\u540d\u53ebGitGot\u7684\u534a\u81ea\u52a8\u4fe1\u606f\u6536\u96c6\u5de5\u5177\uff0c\u5728GitGot\u7684\u5e2e\u52a9\u4e0b\uff0c\u5e7f\u5927\u7814\u7a76\u4eba\u5458\u53ef\u4ee5\u8f7b\u677e\u4eceGitHub\u516c\u5f00\u6570\u636e\u4e2d\u641c\u7d22\u654f\u611f\u4fe1\u606f\u3002<\/p>\n<h1 id=\"-\u5b89\u88c5\u8fd0\u884c\"># \u5b89\u88c5\u8fd0\u884c<\/h1>\n<p><strong>\u73af\u5883<\/strong>: Kali Linux + docker<\/p>\n<h2 id=\"\u5b89\u88c5\">\u5b89\u88c5<\/h2>\n<p>\u8fd0\u884cgitgot-docker.sh\u6587\u4ef6\u6765\u6784\u5efaGitGot Docker\u955c\u50cf\uff0c\u5e76\u6267\u884cDocker\u5316\u7684GitGot\u7248\u672c\u5de5\u5177\u3002\u8fd0\u884c\u4e4b\u540e\uff0cgitgot-docker.sh\u6587\u4ef6\u5c06\u4f1a\u5728\u4e3b\u673a\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\u4e0b\u521b\u5efa\u5e76\u52a0\u8f7dlogs\u548cstates\u76ee\u5f55\u3002\u5982\u679cgitgot-docker.sh\u6587\u4ef6\u662f\u76f4\u63a5\u4eceGitGot\u9879\u76ee\u76ee\u5f55\u4e0b\u8fd0\u884c\u7684\u8bdd\uff0c\u5b83\u5c06\u4f1a\u66f4\u65b0Docker\u5bb9\u5668\uff1a<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">.\/gitgot-docker.sh\n<\/span><\/span><\/code><\/pre><\/div><h3 id=\"\u8bbe\u7f6etoken\">\u8bbe\u7f6etoken<\/h3>\n<p>\u7531\u4e8eGitHub\u4f1a\u9650\u5236\u8bbf\u95ee\u9891\u7387\uff0c\u56e0\u6b64\u6211\u4eec\u8fd8\u9700\u8981\u4e00\u4e2a\u4ee4\u724c\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u521b\u5efa\u4e00\u4e2a\u65e0\u6743\u9650\/\u65e0\u8303\u56f4\u7684GitHub API\u4ee4\u724c\uff1a\u3010<a href=\"https:\/\/github.com\/settings\/tokens\">\u4f20\u9001\u95e8<\/a>\u3011\uff0c\u8fd9\u4e2a\u4ee4\u724c\u53ef\u4ee5\u76f4\u63a5\u62ff\u6765\u8bbf\u95ee\u516c\u5171GitHub\u5e93\u3002Gitgot.py\u6587\u4ef6\u7684\u9876\u90e8\u9700\u8981\u6dfb\u52a0\u4e0b\u5217\u4ee3\u7801\uff1a<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-python\" data-lang=\"python\"><span class=\"line\"><span class=\"cl\"><span class=\"n\">ACCESS_TOKEN<\/span><span class=\"o\">=<\/span> <span class=\"s2\">&#34;&lt;NO-PERMISSION-GITHUB-TOKEN-HERE&gt;&#34;<\/span>\n<\/span><\/span><\/code><\/pre><\/div><p><img alt=\"1568962383377\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568962383377.png\"><\/p>\n<h2 id=\"\u5de5\u5177\u4f7f\u7528\">\u5de5\u5177\u4f7f\u7528<\/h2>\n<ul>\n<li>\u4f7f\u7528\u9ed8\u8ba4\u6b63\u5219\u5f0f\u5217\u8868\u548c\u65e5\u5fd7\u6587\u4ef6\u5730\u5740(\/logs\/<query>.log)\u67e5\u8be2\u5b57\u7b26\u4e32\u201dexample.com\u201d<\/li>\n<\/ul>\n<pre tabindex=\"0\"><code>.\/gitgot.py -q example.com\n<\/code><\/pre><p>\u5c1d\u8bd5\u4e86\u4e00\u4e0b iscas.ac.cn<\/p>\n<pre tabindex=\"0\"><code>.\/gitgot.py -q iscas.ac.cn\n<\/code><\/pre><p>\u641c\u7d22\u5230\u4e86\u4e00\u4e9b\u624b\u673a\u53f7,\u90ae\u7bb1,\u59d3\u540d\u8fd9\u6837\u7684\u654f\u611f\u4fe1\u606f<\/p>\n<p><img alt=\"1568963130665\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568963130665.png\"><\/p>\n<p>\u53d1\u73b0\u5f88\u591a\u673a\u5668\u5b66\u4e60\u7684\u6076\u610f\u90ae\u4ef6\u5206\u7c7b\u6570\u636e\u96c6\u4e2d\u7adf\u7136\u5305\u542b\u5f88\u591a\u7684\u8f83\u4e3a\u654f\u611f\u7684\u90ae\u7bb1\u548c\u57df\u540d\u4fe1\u606f<\/p>\n<p><img alt=\"1568963695626\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568963695626.png\"><\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528\u4ea4\u4e92\u547d\u4ee4\u8bbe\u7f6e\u662f\u5426\u663e\u793a\u5185\u5bb9\u3002\u5982\u679c\u8bbe\u7f6e\u662f\u5426\u5ffd\u7565\u76f8\u4f3c\u5185\u5bb9\uff0c\u5219\u4f1a\u6839\u636e\u76f8\u4f3c\u5ea6\u5224\u65ad\u662f\u5426\u5ffd\u7565\u3002<\/p>\n<p><img alt=\"1568963367464\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568963367464.png\"><\/p>\n<p>\u8fd8\u6709\u8fd9\u79cd\u6781\u5ea6\u654f\u611f\u7684\u4fe1\u606f\u3002<\/p>\n<p><img alt=\"1568963974671\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568963974671.png\"><\/p>\n<p>\u8fd9\u662fPHP\u7684password_hash\u51fd\u6570\u751f\u6210\u7684\u5bc6\u7801\u3002<\/p>\n<p><a href=\"https:\/\/moodle.org\/mod\/forum\/discuss.php?d=315092&amp;parent=1262609\">https:\/\/moodle.org\/mod\/forum\/discuss.php?d=315092&parent=1262609<\/a><\/p>\n<p><a href=\"https:\/\/www.php.net\/password_hash\">https:\/\/www.php.net\/password_hash<\/a><\/p>\n<h1 id=\"\u53c2\u8003\">\u53c2\u8003<\/h1>\n<ol>\n<li>\n<p>[Github] GitGot <a href=\"https:\/\/github.com\/BishopFox\/GitGot\">https:\/\/github.com\/BishopFox\/GitGot<\/a><\/p>\n<\/li>\n<li>\n<p>GitGot\uff1a\u4e00\u6b3e\u53ef\u4eceGitHub\u516c\u5f00\u6570\u636e\u4e2d\u641c\u7d22\u654f\u611f\u4fe1\u606f\u7684\u534a\u81ea\u52a8\u5316\u5feb\u901f\u641c\u7d22\u5de5\u5177 <a href=\"https:\/\/www.freebuf.com\/sectool\/212124.html\">https:\/\/www.freebuf.com\/sectool\/212124.html<\/a><\/p>\n<\/li>\n<\/ol>\n<hr>\n<ul>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"[\u5de5\u5177]GitGot\uff1a\u4e00\u6b3e\u53ef\u4eceGitHub\u516c\u5f00\u6570\u636e\u4e2d\u641c\u7d22\u654f\u611f\u4fe1\u606f\u7684\u534a\u81ea\u52a8\u5316\u5feb\u901f\u641c\u7d22\u5de5\u5177"},{"content":"\u4ecb\u7ecd Emagnet\u662f\u4e00\u6b3e\u975e\u5e38\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u5176\u4e3b\u8981\u76ee\u7684\u662f\u4ecepastebin\u4e0a\u4f20\u7684\u6cc4\u6f0f\u6570\u636e\u5e93\u4e2d\u6355\u83b7\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u548c\u5bc6\u7801\u3002\u5f53\u5bc6\u7801\u5728pastebin.com\u4e0a\u4e0d\u5728\u5217\u8868\u4e2d\u65f6\uff0c\u51e0\u4e4e\u4e0d\u53ef\u80fd\u627e\u5230\u6cc4\u9732\u7684\u5bc6\u7801\u3002\u4ed6\u4eec\u5df2\u88abpastebin\u7684\u6280\u672f\u4eba\u5458\u5220\u9664\uff0c\u6216\u4ec5\u4ec5\u53ea\u6709\u4e2a\u522b\u4eba\u4e0a\u4f20\u3002\u8bf4\u5b9e\u8bdd\uff0c\u8fd9\u6bd4\u5728\u5927\u6d77\u4e2d\u635e\u9488\u8981\u5bb9\u6613\uff0c\u7136\u540e\u4f7f\u7528\u6211\u4eec\u60f3\u8981\u6536\u96c6\u7684\u6570\u636e\u5728pastebin\u4e0a\u67e5\u627e\u8fc7\u65f6\u7684\u4e0a\u4f20\u5185\u5bb9\u3002\n# \u5b89\u88c5\u8fd0\u884c \u73af\u5883: Kali Linux\ngit clone https:\/\/github.com\/wuseman\/emagnet cd emagnet chmod +x emagnet* .\/emagnet --emagnet \u8fd0\u884c\u5931\u8d25,\u63d0\u793aIP\u88ab\u9501\n\u53d1\u73b0\u90ae\u7bb1 .\/emagnet -e \u540e\u53f0\u8fd0\u884c docker \u8fd0\u884c FROM &#34;ubuntu:18.04&#34; MAINTAINER &#34;M2kar&lt;m2kar.cn@gmail.com&gt;&#34; ARG EMAGNET_VERSION=3.4 RUN apt update \\ &amp;&amp; apt-get install -y --no-install-recommends \\ inetutils-ping \\ wget \\ curl \\ screen \\ ca-certificates \\ &amp;&amp; rm -rf \/var\/lib\/apt\/lists\/* RUN curl https:\/\/codeload.github.com\/wuseman\/EMAGNET\/tar.gz\/${EMAGNET_VERSION} &gt; \/tmp\/emagnet.tar.gz \\ &amp;&amp; tar -xzv -f \/tmp\/emagnet.tar.gz -C \/ \\ &amp;&amp; ln -s \/EMAGNET-${EMAGNET_VERSION} \/EMAGNET WORKDIR \/EMAGNET CMD [&#34;\/EMAGNET\/emagnet&#34;,&#34;--emagnet&#34;] TODO \u76ee\u524d\u8fd8\u6ca1\u6709\u51fa\u6765\u7684\u7ed3\u679c \u53c2\u8003 [Github] EMAGNET https:\/\/github.com\/wuseman\/EMAGNET EMAGNET\uff1a\u4ecePastebin\u4e0a\u4f20\u7684\u6cc4\u6f0f\u6570\u636e\u5e93\u4e2d\u6355\u83b7\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u548c\u5bc6\u7801 https:\/\/www.freebuf.com\/sectool\/213048.html \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190920-emagnet\/","summary":"<h1 id=\"\u4ecb\u7ecd\">\u4ecb\u7ecd<\/h1>\n<p>Emagnet\u662f\u4e00\u6b3e\u975e\u5e38\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u5176\u4e3b\u8981\u76ee\u7684\u662f\u4ecepastebin\u4e0a\u4f20\u7684\u6cc4\u6f0f\u6570\u636e\u5e93\u4e2d\u6355\u83b7\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u548c\u5bc6\u7801\u3002\u5f53\u5bc6\u7801\u5728pastebin.com\u4e0a\u4e0d\u5728\u5217\u8868\u4e2d\u65f6\uff0c\u51e0\u4e4e\u4e0d\u53ef\u80fd\u627e\u5230\u6cc4\u9732\u7684\u5bc6\u7801\u3002\u4ed6\u4eec\u5df2\u88abpastebin\u7684\u6280\u672f\u4eba\u5458\u5220\u9664\uff0c\u6216\u4ec5\u4ec5\u53ea\u6709\u4e2a\u522b\u4eba\u4e0a\u4f20\u3002\u8bf4\u5b9e\u8bdd\uff0c\u8fd9\u6bd4\u5728\u5927\u6d77\u4e2d\u635e\u9488\u8981\u5bb9\u6613\uff0c\u7136\u540e\u4f7f\u7528\u6211\u4eec\u60f3\u8981\u6536\u96c6\u7684\u6570\u636e\u5728pastebin\u4e0a\u67e5\u627e\u8fc7\u65f6\u7684\u4e0a\u4f20\u5185\u5bb9\u3002<\/p>\n<h1 id=\"-\u5b89\u88c5\u8fd0\u884c\"># \u5b89\u88c5\u8fd0\u884c<\/h1>\n<p><strong>\u73af\u5883<\/strong>: Kali Linux<\/p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">git clone https:\/\/github.com\/wuseman\/emagnet\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nb\">cd<\/span> emagnet\n<\/span><\/span><span class=\"line\"><span class=\"cl\">chmod +x emagnet*\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">.\/emagnet --emagnet\n<\/span><\/span><\/code><\/pre><\/div><p><img alt=\"1568950222186\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568950222186.png\"><\/p>\n<p>\u8fd0\u884c\u5931\u8d25,\u63d0\u793aIP\u88ab\u9501<\/p>\n<h2 id=\"\u53d1\u73b0\u90ae\u7bb1\">\u53d1\u73b0\u90ae\u7bb1<\/h2>\n<pre tabindex=\"0\"><code>.\/emagnet -e\n<\/code><\/pre><h2 id=\"\u540e\u53f0\u8fd0\u884c\">\u540e\u53f0\u8fd0\u884c<\/h2>\n<p><img alt=\"1568960925457\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568960925457.png\"><\/p>\n<h2 id=\"docker-\u8fd0\u884c\">docker \u8fd0\u884c<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-dockerfile\" data-lang=\"dockerfile\"><span class=\"line\"><span class=\"cl\"><span class=\"k\">FROM<\/span><span class=\"w\"> <\/span><span class=\"s\">&#34;ubuntu:18.04<\/span><span class=\"s2\">&#34;<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">MAINTAINER<\/span><span class=\"w\"> <\/span><span class=\"s\">&#34;M2kar&lt;m2kar.cn@gmail.com<\/span>&gt;<span class=\"s2\">&#34;<\/span><span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">ARG<\/span> <span class=\"nv\">EMAGNET_VERSION<\/span><span class=\"o\">=<\/span><span class=\"m\">3<\/span>.4<span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">RUN<\/span> apt update <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"o\">&amp;&amp;<\/span> apt-get install -y --no-install-recommends <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">        inetutils-ping <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">        wget <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">        curl <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">        screen <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">        ca-certificates <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"o\">&amp;&amp;<\/span> rm -rf \/var\/lib\/apt\/lists\/*<span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">RUN<\/span> curl https:\/\/codeload.github.com\/wuseman\/EMAGNET\/tar.gz\/<span class=\"si\">${<\/span><span class=\"nv\">EMAGNET_VERSION<\/span><span class=\"si\">}<\/span> &gt; \/tmp\/emagnet.tar.gz <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"o\">&amp;&amp;<\/span> tar -xzv -f \/tmp\/emagnet.tar.gz -C \/ <span class=\"se\">\\\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"o\">&amp;&amp;<\/span> ln -s \/EMAGNET-<span class=\"si\">${<\/span><span class=\"nv\">EMAGNET_VERSION<\/span><span class=\"si\">}<\/span> \/EMAGNET<span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\">WORKDIR  \/EMAGNET<span class=\"err\">\n<\/span><\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">CMD<\/span> <span class=\"p\">[<\/span><span class=\"s2\">&#34;\/EMAGNET\/emagnet&#34;<\/span><span class=\"p\">,<\/span><span class=\"s2\">&#34;--emagnet&#34;<\/span><span class=\"p\">]<\/span><span class=\"err\">\n<\/span><\/span><\/span><\/code><\/pre><\/div><h1 id=\"todo-\u76ee\u524d\u8fd8\u6ca1\u6709\u51fa\u6765\u7684\u7ed3\u679c\">TODO \u76ee\u524d\u8fd8\u6ca1\u6709\u51fa\u6765\u7684\u7ed3\u679c<\/h1>\n<h1 id=\"\u53c2\u8003\">\u53c2\u8003<\/h1>\n<ol>\n<li>[Github] EMAGNET <a href=\"https:\/\/github.com\/wuseman\/EMAGNET\">https:\/\/github.com\/wuseman\/EMAGNET<\/a><\/li>\n<li>EMAGNET\uff1a\u4ecePastebin\u4e0a\u4f20\u7684\u6cc4\u6f0f\u6570\u636e\u5e93\u4e2d\u6355\u83b7\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u548c\u5bc6\u7801 <a href=\"https:\/\/www.freebuf.com\/sectool\/213048.html\">https:\/\/www.freebuf.com\/sectool\/213048.html<\/a><\/li>\n<\/ol>\n<hr>\n<ul>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"[\u5de5\u5177]EMAGNET\uff1a\u4ecePastebin\u4e0a\u4f20\u7684\u6cc4\u6f0f\u6570\u636e\u5e93\u4e2d\u6355\u83b7\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u548c\u5bc6\u7801"},{"content":"sci-hub\uff1a\u4e00\u4e2a\u795e\u5947\u7684\u514d\u8d39\u4e0b\u8f7d\u6587\u732e\u7684\u7f51\u7ad9\uff08\u4f7f\u7528\u6280\u5de7\uff09 \u8f6c\u8f7d\u81ea https:\/\/zhuanlan.zhihu.com\/p\/24299207\uff0c\u4fb5\u5220\u3002\n2019.9.14\u66f4\u65b0\uff0c\u8bf7\u7528\u4e0b\u97622\u4e2a\u7f51\u7ad9\uff1a\nhttp:\/\/sci-hub.se\/ http:\/\/www.sci-hub.tw http:\/\/sci-hub.wang\/ \u4e0b\u9762\u8fd9\u4e2a\u7f51\u7ad9\u4f1a\u66f4\u65b0sci-hub\u7684\u6700\u65b0\u7f51\u5740\uff1asci-hub\u5b98\u7f51\u4e0b\u9762\u8fd9\u4e2a\u7f51\u7ad9\u4f1a\u66f4\u65b0sci-hub\u7684\u6700\u65b0\u7f51\u5740\uff1a\nSCI-Hub\u79d1\u7814\u8bba\u6587\u5168\u6587\u4e0b\u8f7d\u7ad9\u53ef\u7528\u7f51\u5740\u94fe\u63a5\uff08\u81ea\u52a8\u68c0\u6d4b\uff0c\u5b9e\u65f6\u66f4\u65b0\uff09 - YoviSun\u5e94\u7528\u5c0f\u5de5\u5177tool.yovisun.com\n-&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;-\n2017.12.16\u66f4\u65b0\uff0c\u62b1\u6b49\u4e0b\u9762\u4e09\u4e2a\u7f51\u5740\u7528\u4e0d\u4e86\u4e86\u3002\u8bf7\u7528\u4ee5\u4e0b\u51e0\u4e2a\uff1a\nhttp:\/\/www.sci-hub.tw\/\nhttp:\/\/www.sci-hub.tv\/\nhttp:\/\/www.sci-hub.la\/\nhttp:\/\/www.sci-hub.mm\/\nhttp:\/\/www.sci-hub.is\/\nhttp:\/\/www.sci-hub.ws\/\nhttp:\/\/www.sci-hub.hk\/\nhttp:\/\/www.sci-hub.cn\/\nhttp:\/\/www.sci-hub.sci-hub.tw\/\nhttp:\/\/www.sci-hub.sci-hub.mn\/\nhttp:\/\/www.sci-hub.sci-hub.hk\/\nhttp:\/\/www.sci-hub.org.cn\/\n\u4e0b\u9762\u5728\u7f51\u5740\u4e0a\u52a0http:\/\/sci-hub.cc\u7684\u65b9\u6cd5\uff0c\u76ee\u524d\u53ef\u4ee5\u6539\u6210\u52a0http:\/\/sci-hub.tw\uff0c\u8fd9\u6837\u8fd8\u662f\u53ef\u4ee5\u7528\u7684\u3002\n\u5982\u679c\u4f60\u4f7f\u7528www.sci-hub.org.cn\u8fd9\u4e2a\u7f51\u7ad9\uff0csci-hub\u548c\u8c37\u6b4c\u8054\u5408\u8d77\u6765\u7684\u641c\u7d22\u5f15\u64ce\uff0c\u68c0\u7d22\u7684\u7ed3\u679c\u70b9\u51fb\u5168\u6587\u4e0b\u8f7d\uff0c\u4f1a\u51fa\u73b0\u610f\u60f3\u4e0d\u5230\u7684\u7ed3\u679c\u3002\n\u51fa\u73b0\u7684\u7ed3\u679c\u4f1a\u7ed9\u51fa\u5f71\u54cd\u56e0\u5b50\u548c\u4e2d\u79d1\u9662JCR\u5206\u533a\uff0c\u53f3\u4fa7\u51e0\u4e2a\u6309\u94ae\u5c1d\u8bd5\u4e00\u4e0b\uff0c\u5f88\u591a\u662f\u53ef\u4ee5\u4e00\u952e\u4e0b\u8f7d\u7684\u3002\n-&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&ndash;\n\u5bf9\u4e8e\u79d1\u7814\u6c11\u5de5\u4eec\uff0c\u80af\u5b9a\u5f88\u591a\u4eba\u63a5\u89e6\u8fc7sci-hub\u8fd9\u4e2a\u7f51\u7ad9\uff0c\u4e00\u4e2a\u5f88\u795e\u5947\u7684\u514d\u8d39\u4e0b\u8f7d\u6587\u732e\u7684\u7f51\u7ad9\u3002\u76ee\u524d\u7684\u7f51\u5740\u662f\u8fd9\u51e0\u4e2a\u3002\nhttp:\/\/www.sci-hub.tw\/\nhttp:\/\/www.sci-hub.se\/\nhttp:\/\/www.sci-hub.shop\/\nsci-hub\u7684\u4e3b\u9875\u957f\u8fd9\u6837\nsci-hub\u7684\u5b97\u65e8\u662f\u79fb\u9664\u79d1\u7814\u9053\u8def\u4e0a\u7684\u6240\u6709\u969c\u788d\u3002\n\u800c\u5bf9\u4e8e\u5f88\u591a\u51fa\u5165\u79d1\u7814\u6df1\u5751\u7684\u6c11\u5de5\u6765\u8bf4\uff0c\u6700\u5927\u7684\u963b\u788d\u662f\uff0c\u6211\u4e0b\u4e0d\u5230\u6211\u60f3\u770b\u7684\u6587\u732e\uff0c\u56e0\u4e3a\u6211\u4eec\u5b66\u6821\u6ca1\u4e70\u6570\u636e\u5e93\uff0c\u6ca1\u6709\u6743\u9650\u3002\u6587\u732e\u4f20\u9012\u5440\uff0c\u592a\u6162\uff0c\u4e5f\u5f88\u8d35\uff0c\u8fd8\u5f88\u8d39\u65f6\u95f4\u3002\u90a3\u76f4\u63a5\u8d2d\u4e70\u8fd9\u4e2a\u6570\u636e\u5e93\u554a\uff0c\u6216\u8005\u4e70\u4f60\u9700\u8981\u7684\u5355\u7bc7\u6587\u732e\u554a\u3002\n\u771f\u662f\u4e70\u4e0d\u8d77\u554a\uff01\n\u8fd9\u4e9b\u6587\u732e\u5e38\u5e38\u4e00\u7bc7\u6587\u732e\u51e0\u5341\u7f8e\u5143\u51e0\u5341\u6b27\u554a\uff0c\u7b49\u4f60\u6bd5\u4e1a\u5f15\u7528\u7684\u51e0\u767e\u7bc7\u6587\u732e\u91cc\u9762\u90a3\u4e48\u4e9b\u4e0d\u80fd\u4e0b\u8f7d\u7684\u4e70\u4e0b\u6765\u53ef\u80fd\u4e0a\u5343\u6b27\u554a\u3002\u66f4\u4f55\u51b5\u6709\u4e9b\u6587\u732e\u4f60\u8981\u6ce8\u518c\u4e00\u4e2a\u8d26\u53f7\u624d\u884c\u3002\u8c01\u6ca1\u4e8b\u513f\u4e0b\u7bc7\u6587\u732e\u53bb\u6ce8\u518c\u4e2a\u8d26\u53f7\u554a\uff01\n\u800c\uff0csci-hub\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002\u8fd9\u4e9b\u4e0b\u8f7d\u4e0d\u4e86\u7684\u6587\u732esci-hub\u57fa\u672c\u53ef\u4ee5\u89e3\u51b390%\u3002\u5047\u8bbe\u6211\u5e73\u65f6\u6587\u732e\u670920%\u4e0b\u8f7d\u4e0d\u4e86\u3002\u73b0\u5728sci-hub\u80fd\u89e3\u51b3\u5176\u4e2d\u768490%\uff0c\u90a3\u5c31\u53ea\u5269\u4e0b20%*10%=2%\u7684\u6211\u9700\u8981\u7684\u6587\u732e\u65e0\u6cd5\u4e0b\u8f7d\u4e86\u3002\u662f\u4e0d\u662f\u5f88\u5f00\u5fc3\u3002\nsci-hub\u7684\u521b\u59cb\u4eba\u662f\u54c8\u8428\u514b\u65af\u5766\u7684\u4e00\u4e2a\u5973\u7814\u7a76\u751f\uff0c\u82e6\u4e8e\u81ea\u5df1\u592a\u7a77\u4e0b\u4e0d\u8d77\u8bba\u6587\uff0c\u4e00\u8a00\u4e0d\u5408\u81ea\u5df1\u5199\u4e86\u4e00\u4e2a\u7f51\u7ad9\uff0c\u4f9b\u5168\u7403\u79d1\u7814\u5de5\u4f5c\u8005\u4e0b\u8f7d\u8bba\u6587\u3002\u5230\u73b0\u5728\u6709800\u4e07\u7684\u7528\u6237\uff0c3700\u4e07\u7684\u8bbf\u95ee\uff0c7000\u591a\u4e07\u6b21\u7684\u4e0b\u8f7d\u3002\u6309\u716710\u7f8e\u5143\u4e00\u6b21\u4e0b\u8f7d\u8ba1\u7b97\uff0c\u4ed6\u4e3a\u79d1\u7814\u5de5\u4f5c\u8005\u8282\u7701\u4e867\u4ebf\u7f8e\u5143\u3002\n\u4f7f\u7528sci-hub\u6709\u4e24\u79cd\u9014\u5f84\u4e09\u4e2a\u65b9\u6cd5\u3002\n\u7b2c\u4e00\u79cd\u9014\u5f84\u662f\u4e0a\u8ff0\u4e09\u4e2a\u7f51\u5740\u8fdb\u5165hub\u8fd9\u4e2a\u7f51\u7ad9\uff0c\u65b9\u6cd5\u4e00\u662f\u627e\u5230\u4f60\u8981\u4e0b\u8f7d\u7684\u6587\u732e\u7684pdf\u4e0b\u8f7d\u9875\u9762\u7f51\u5740\uff0c\u590d\u5236\u5e76\u7c98\u8d34\u5230hub\u7684\u641c\u7d22\u6846\u4e2d\uff0c\u5373\u53ef\u4e0b\u8f7d\uff1b\u65b9\u6cd5\u4e8c\u662f\u590d\u5236\u8be5\u6587\u732e\u7684doi\u7c98\u8d34\u5230hub\u641c\u7d22\u6846\u4e2d\uff0c\u5373\u53ef\u4e0b\u8f7d\uff1b\n\u7b2c\u4e8c\u79cd\u9014\u5f84\u662f\uff0c\u4e0d\u8fdb\u5165hub\u8fd9\u4e2a\u7f51\u7ad9\u3002\u4f7f\u7528Google\u5b66\u672f\u6216\u8005\u767e\u5ea6\u5b66\u672f\u7b49\u68c0\u7d22\u6587\u732e\u5229\u5668\u627e\u5230\u6587\u732e\u4e0b\u8f7d\u9875\u9762\uff0c\u5728\u9875\u9762\u7684\u7f51\u5740\u91cc\u8fdb\u884c\u4fee\u6539\u3002\u4fee\u6539\u65b9\u6cd5\u662f\uff0c\u8be5\u6587\u732e\u7f51\u5740\u7684\u4e3b\u7f51\u7ad9\u540e\u9762\u52a0\u4e0a.http:\/\/sci-hub.tw .sci-hub.se 2\u4e2a\u4e2d\u4efb\u610f\u4e00\u4e2a\u3002\u7136\u540e\u56de\u8f66\uff0c\u4f60\u4f1a\u53d1\u73b0\uff0c\u6ca1\u6709\u6743\u9650\u7684\u6587\u732e\u9a6c\u4e0a\u5c31\u4f1a\u51fa\u6765pdf\u754c\u9762\u53d8\u6210\u53ef\u4ee5\u4e0b\u8f7d\u3002\n\u4f8b\u5982\u4e0b\u9762\u8fd9\u4e2a\u4f8b\u5b50:\nLake Qinghai, China: closed-basin like levels and the oxygen isotope record for ostracoda since the latest Pleistocene\u8fd9\u4e2a\u7f51\u5740\uff0c\u8fd9\u7bc7\u8bba\u6587\u662f\u9700\u8981purchase\u7684\u3002\u4f46\u662f\u5728.com\u540e\u9762\u52a0\u4e0a.sci-hub.tw(Science, health and medical journals, full text articles and books..sci-hub.tw\/science\/article\/pii\/003101829190041O)\u7acb\u523b\u5c31\u53d8\u6210\u4e86\u53ef\u4e0b\u8f7d\u72b6\u6001\u3002\n\u6b22\u8fce\u5927\u5bb6\u56f4\u89c2\u4e13\u680f\u4e2d\u7684\u8fd9\u4e00\u7bc7\u6587\u7ae0\u3010\u6587\u732e\u68c0\u7d22\u3011\u706b\u72d0\u548c\u8c37\u6b4c\u6d4f\u89c8\u5668\u91cc\u7684sci-hub\u63d2\u4ef6\n\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190920-scihub\/","summary":"<h1 id=\"sci-hub\u4e00\u4e2a\u795e\u5947\u7684\u514d\u8d39\u4e0b\u8f7d\u6587\u732e\u7684\u7f51\u7ad9\u4f7f\u7528\u6280\u5de7\">sci-hub\uff1a\u4e00\u4e2a\u795e\u5947\u7684\u514d\u8d39\u4e0b\u8f7d\u6587\u732e\u7684\u7f51\u7ad9\uff08\u4f7f\u7528\u6280\u5de7\uff09<\/h1>\n<p><strong>\u8f6c\u8f7d\u81ea <a href=\"https:\/\/zhuanlan.zhihu.com\/p\/24299207\">https:\/\/zhuanlan.zhihu.com\/p\/24299207<\/a>\uff0c\u4fb5\u5220\u3002<\/strong><\/p>\n<p>2019.9.14\u66f4\u65b0\uff0c\u8bf7\u7528\u4e0b\u97622\u4e2a\u7f51\u7ad9\uff1a<\/p>\n<ul>\n<li><a href=\"http:\/\/sci-hub.se\/\">http:\/\/sci-hub.se\/<\/a><\/li>\n<li><a href=\"http:\/\/www.sci-hub.tw\">http:\/\/www.sci-hub.tw<\/a><\/li>\n<li><a href=\"http:\/\/sci-hub.wang\/\">http:\/\/sci-hub.wang\/<\/a><\/li>\n<\/ul>\n<p>\u4e0b\u9762\u8fd9\u4e2a\u7f51\u7ad9\u4f1a\u66f4\u65b0sci-hub\u7684\u6700\u65b0\u7f51\u5740\uff1a<a href=\"http:\/\/sci-hub.wang\/\">sci-hub\u5b98\u7f51<\/a>\u4e0b\u9762\u8fd9\u4e2a\u7f51\u7ad9\u4f1a\u66f4\u65b0sci-hub\u7684\u6700\u65b0\u7f51\u5740\uff1a<\/p>\n<p><a href=\"http:\/\/tool.yovisun.com\/scihub\/\">SCI-Hub\u79d1\u7814\u8bba\u6587\u5168\u6587\u4e0b\u8f7d\u7ad9\u53ef\u7528\u7f51\u5740\u94fe\u63a5\uff08\u81ea\u52a8\u68c0\u6d4b\uff0c\u5b9e\u65f6\u66f4\u65b0\uff09 - YoviSun\u5e94\u7528\u5c0f\u5de5\u5177tool.yovisun.com<\/a><\/p>\n<p>-&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;-<\/p>\n<p>2017.12.16\u66f4\u65b0\uff0c\u62b1\u6b49\u4e0b\u9762\u4e09\u4e2a\u7f51\u5740\u7528\u4e0d\u4e86\u4e86\u3002\u8bf7\u7528\u4ee5\u4e0b\u51e0\u4e2a\uff1a<\/p>\n<p><a href=\"http:\/\/www.sci-hub.tw\/\">http:\/\/www.sci-hub.tw\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.tv\/\">http:\/\/www.sci-hub.tv\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.la\/\">http:\/\/www.sci-hub.la\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.mm\/\">http:\/\/www.sci-hub.mm\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.is\/\">http:\/\/www.sci-hub.is\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.ws\/\">http:\/\/www.sci-hub.ws\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.hk\/\">http:\/\/www.sci-hub.hk\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.cn\/\">http:\/\/www.sci-hub.cn\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.sci-hub.tw\/\">http:\/\/www.sci-hub.sci-hub.tw\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.sci-hub.mn\/\">http:\/\/www.sci-hub.sci-hub.mn\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.sci-hub.hk\/\">http:\/\/www.sci-hub.sci-hub.hk\/<\/a><\/p>\n<p><a href=\"http:\/\/www.sci-hub.org.cn\/\">http:\/\/www.sci-hub.org.cn\/<\/a><\/p>\n<p>\u4e0b\u9762\u5728\u7f51\u5740\u4e0a\u52a0<a href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/sci-hub.cc\">http:\/\/sci-hub.cc<\/a>\u7684\u65b9\u6cd5\uff0c\u76ee\u524d\u53ef\u4ee5\u6539\u6210\u52a0<a href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/sci-hub.tw\">http:\/\/sci-hub.tw<\/a>\uff0c\u8fd9\u6837\u8fd8\u662f\u53ef\u4ee5\u7528\u7684\u3002<\/p>\n<p><img alt=\"img\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/v2-eee237643cb814d3c5e118c3a27ae68c_hd.jpg\">\u5982\u679c\u4f60\u4f7f\u7528www.sci-hub.org.cn\u8fd9\u4e2a\u7f51\u7ad9\uff0csci-hub\u548c\u8c37\u6b4c\u8054\u5408\u8d77\u6765\u7684\u641c\u7d22\u5f15\u64ce\uff0c\u68c0\u7d22\u7684\u7ed3\u679c\u70b9\u51fb\u5168\u6587\u4e0b\u8f7d\uff0c\u4f1a\u51fa\u73b0\u610f\u60f3\u4e0d\u5230\u7684\u7ed3\u679c\u3002<\/p>\n<p><img alt=\"img\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/v2-e0a758ec7e1650ee37909c1e558f4d41_hd.jpg\"><\/p>\n<p>\u51fa\u73b0\u7684\u7ed3\u679c\u4f1a\u7ed9\u51fa\u5f71\u54cd\u56e0\u5b50\u548c\u4e2d\u79d1\u9662JCR\u5206\u533a\uff0c\u53f3\u4fa7\u51e0\u4e2a\u6309\u94ae\u5c1d\u8bd5\u4e00\u4e0b\uff0c\u5f88\u591a\u662f\u53ef\u4ee5\u4e00\u952e\u4e0b\u8f7d\u7684\u3002<\/p>\n<p>-&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&ndash;<\/p>\n<p>\u5bf9\u4e8e\u79d1\u7814\u6c11\u5de5\u4eec\uff0c\u80af\u5b9a\u5f88\u591a\u4eba\u63a5\u89e6\u8fc7sci-hub\u8fd9\u4e2a\u7f51\u7ad9\uff0c\u4e00\u4e2a\u5f88\u795e\u5947\u7684\u514d\u8d39\u4e0b\u8f7d\u6587\u732e\u7684\u7f51\u7ad9\u3002\u76ee\u524d\u7684\u7f51\u5740\u662f\u8fd9\u51e0\u4e2a\u3002<\/p>\n<p><a href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/www.sci-hub.cc\/\">http:\/\/www.sci-hub.tw\/<\/a><\/p>\n<p><a href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/www.sci-hub.bz\/\">http:\/\/www.sci-hub.se\/<\/a><\/p>\n<p><a href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/www.sci-hub.ac\/\">http:\/\/www.sci-hub.shop\/<\/a><\/p>\n<p>sci-hub\u7684\u4e3b\u9875\u957f\u8fd9\u6837<\/p>\n<p><img alt=\"img\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/v2-b7809fb09be8946371b5dd63efe1cd82_hd.jpg\"><\/p>\n<p>sci-hub\u7684\u5b97\u65e8\u662f\u79fb\u9664\u79d1\u7814\u9053\u8def\u4e0a\u7684\u6240\u6709\u969c\u788d\u3002<\/p>\n<p>\u800c\u5bf9\u4e8e\u5f88\u591a\u51fa\u5165\u79d1\u7814\u6df1\u5751\u7684\u6c11\u5de5\u6765\u8bf4\uff0c\u6700\u5927\u7684\u963b\u788d\u662f\uff0c\u6211\u4e0b\u4e0d\u5230\u6211\u60f3\u770b\u7684\u6587\u732e\uff0c\u56e0\u4e3a\u6211\u4eec\u5b66\u6821\u6ca1\u4e70\u6570\u636e\u5e93\uff0c\u6ca1\u6709\u6743\u9650\u3002\u6587\u732e\u4f20\u9012\u5440\uff0c\u592a\u6162\uff0c\u4e5f\u5f88\u8d35\uff0c\u8fd8\u5f88\u8d39\u65f6\u95f4\u3002\u90a3\u76f4\u63a5\u8d2d\u4e70\u8fd9\u4e2a\u6570\u636e\u5e93\u554a\uff0c\u6216\u8005\u4e70\u4f60\u9700\u8981\u7684\u5355\u7bc7\u6587\u732e\u554a\u3002<\/p>\n<p>\u771f\u662f\u4e70\u4e0d\u8d77\u554a\uff01<\/p>\n<p>\u8fd9\u4e9b\u6587\u732e\u5e38\u5e38\u4e00\u7bc7\u6587\u732e\u51e0\u5341\u7f8e\u5143\u51e0\u5341\u6b27\u554a\uff0c\u7b49\u4f60\u6bd5\u4e1a\u5f15\u7528\u7684\u51e0\u767e\u7bc7\u6587\u732e\u91cc\u9762\u90a3\u4e48\u4e9b\u4e0d\u80fd\u4e0b\u8f7d\u7684\u4e70\u4e0b\u6765\u53ef\u80fd\u4e0a\u5343\u6b27\u554a\u3002\u66f4\u4f55\u51b5\u6709\u4e9b\u6587\u732e\u4f60\u8981\u6ce8\u518c\u4e00\u4e2a\u8d26\u53f7\u624d\u884c\u3002\u8c01\u6ca1\u4e8b\u513f\u4e0b\u7bc7\u6587\u732e\u53bb\u6ce8\u518c\u4e2a\u8d26\u53f7\u554a\uff01<\/p>\n<p>\u800c\uff0csci-hub\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002\u8fd9\u4e9b\u4e0b\u8f7d\u4e0d\u4e86\u7684\u6587\u732esci-hub\u57fa\u672c\u53ef\u4ee5\u89e3\u51b390%\u3002\u5047\u8bbe\u6211\u5e73\u65f6\u6587\u732e\u670920%\u4e0b\u8f7d\u4e0d\u4e86\u3002\u73b0\u5728sci-hub\u80fd\u89e3\u51b3\u5176\u4e2d\u768490%\uff0c\u90a3\u5c31\u53ea\u5269\u4e0b20%*10%=2%\u7684\u6211\u9700\u8981\u7684\u6587\u732e\u65e0\u6cd5\u4e0b\u8f7d\u4e86\u3002\u662f\u4e0d\u662f\u5f88\u5f00\u5fc3\u3002<\/p>\n<p><img alt=\"img\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/v2-3c558d5abd6601aaf6605cb7616a1c8c_hd.jpg\"><\/p>\n<p><img alt=\"img\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/v2-0461e7d8c50566c4c3386e01375ed469_hd.jpg\"><\/p>\n<p>sci-hub\u7684\u521b\u59cb\u4eba\u662f\u54c8\u8428\u514b\u65af\u5766\u7684\u4e00\u4e2a\u5973\u7814\u7a76\u751f\uff0c\u82e6\u4e8e\u81ea\u5df1\u592a\u7a77\u4e0b\u4e0d\u8d77\u8bba\u6587\uff0c\u4e00\u8a00\u4e0d\u5408\u81ea\u5df1\u5199\u4e86\u4e00\u4e2a\u7f51\u7ad9\uff0c\u4f9b\u5168\u7403\u79d1\u7814\u5de5\u4f5c\u8005\u4e0b\u8f7d\u8bba\u6587\u3002\u5230\u73b0\u5728\u6709800\u4e07\u7684\u7528\u6237\uff0c3700\u4e07\u7684\u8bbf\u95ee\uff0c7000\u591a\u4e07\u6b21\u7684\u4e0b\u8f7d\u3002\u6309\u716710\u7f8e\u5143\u4e00\u6b21\u4e0b\u8f7d\u8ba1\u7b97\uff0c\u4ed6\u4e3a\u79d1\u7814\u5de5\u4f5c\u8005\u8282\u7701\u4e867\u4ebf\u7f8e\u5143\u3002<\/p>\n<p><img alt=\"img\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/v2-3eecee1c6eca1ab154cbe13032054230_hd.jpg\"><\/p>\n<p>\u4f7f\u7528sci-hub\u6709\u4e24\u79cd\u9014\u5f84\u4e09\u4e2a\u65b9\u6cd5\u3002<\/p>\n<p>\u7b2c\u4e00\u79cd\u9014\u5f84\u662f\u4e0a\u8ff0\u4e09\u4e2a\u7f51\u5740\u8fdb\u5165hub\u8fd9\u4e2a\u7f51\u7ad9\uff0c\u65b9\u6cd5\u4e00\u662f\u627e\u5230\u4f60\u8981\u4e0b\u8f7d\u7684\u6587\u732e\u7684pdf\u4e0b\u8f7d\u9875\u9762\u7f51\u5740\uff0c\u590d\u5236\u5e76\u7c98\u8d34\u5230hub\u7684\u641c\u7d22\u6846\u4e2d\uff0c\u5373\u53ef\u4e0b\u8f7d\uff1b\u65b9\u6cd5\u4e8c\u662f\u590d\u5236\u8be5\u6587\u732e\u7684doi\u7c98\u8d34\u5230hub\u641c\u7d22\u6846\u4e2d\uff0c\u5373\u53ef\u4e0b\u8f7d\uff1b<\/p>\n<p>\u7b2c\u4e8c\u79cd\u9014\u5f84\u662f\uff0c\u4e0d\u8fdb\u5165hub\u8fd9\u4e2a\u7f51\u7ad9\u3002\u4f7f\u7528Google\u5b66\u672f\u6216\u8005\u767e\u5ea6\u5b66\u672f\u7b49\u68c0\u7d22\u6587\u732e\u5229\u5668\u627e\u5230\u6587\u732e\u4e0b\u8f7d\u9875\u9762\uff0c\u5728\u9875\u9762\u7684\u7f51\u5740\u91cc\u8fdb\u884c\u4fee\u6539\u3002\u4fee\u6539\u65b9\u6cd5\u662f\uff0c\u8be5\u6587\u732e\u7f51\u5740\u7684\u4e3b\u7f51\u7ad9\u540e\u9762\u52a0\u4e0a.<a href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/sci-hub.tw\">http:\/\/sci-hub.tw<\/a> .sci-hub.se 2\u4e2a\u4e2d\u4efb\u610f\u4e00\u4e2a\u3002\u7136\u540e\u56de\u8f66\uff0c\u4f60\u4f1a\u53d1\u73b0\uff0c\u6ca1\u6709\u6743\u9650\u7684\u6587\u732e\u9a6c\u4e0a\u5c31\u4f1a\u51fa\u6765pdf\u754c\u9762\u53d8\u6210\u53ef\u4ee5\u4e0b\u8f7d\u3002<\/p>\n<p>\u4f8b\u5982\u4e0b\u9762\u8fd9\u4e2a\u4f8b\u5b50:<\/p>\n<p><img alt=\"img\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/v2-c26ffece733ef4d0761c5d5e48bb381d_hd.jpg\"><\/p>\n<p><a href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/www.sciencedirect.com\/science\/article\/pii\/003101829190041O\">Lake Qinghai, China: closed-basin like levels and the oxygen isotope record for ostracoda since the latest Pleistocene<\/a>\u8fd9\u4e2a\u7f51\u5740\uff0c\u8fd9\u7bc7\u8bba\u6587\u662f\u9700\u8981purchase\u7684\u3002\u4f46\u662f\u5728.com\u540e\u9762\u52a0\u4e0a.sci-hub.tw(<a href=\"https:\/\/link.zhihu.com\/?target=http%3A\/\/www.sciencedirect.com\/\">Science, health and medical journals, full text articles and books.<\/a>.sci-hub.tw\/science\/article\/pii\/003101829190041O)\u7acb\u523b\u5c31\u53d8\u6210\u4e86\u53ef\u4e0b\u8f7d\u72b6\u6001\u3002<\/p>","title":"\u3010\u5de5\u5177\u3011sci-hub\uff1a\u4e00\u4e2a\u795e\u5947\u7684\u514d\u8d39\u4e0b\u8f7d\u6587\u732e\u7684\u7f51\u7ad9"},{"content":"\u5feb\u624b\u8003\u8bd5\u9047\u5230\u4e86\u51e0\u4e2a\u7b14\u8bd5\u9898\u76ee\uff0c\u5148\u8bb0\u4e00\u4e0b\uff0c\u6709\u4e9b\u9898\u5f97\u91cd\u65b0\u505a\n\u53e5\u5b50\u9006\u5e8f \u5b57\u7b26\u4e32\u8ddd\u79bb \u8d28\u6570\u5206\u89e3 \u6570\u72ec\u6b63\u786e\u6027\u68c0\u6d4b \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190917-kuaishou-code-exam\/","summary":"<p>\u5feb\u624b\u8003\u8bd5\u9047\u5230\u4e86\u51e0\u4e2a\u7b14\u8bd5\u9898\u76ee\uff0c\u5148\u8bb0\u4e00\u4e0b\uff0c\u6709\u4e9b\u9898\u5f97\u91cd\u65b0\u505a<\/p>\n<h1 id=\"\u53e5\u5b50\u9006\u5e8f\">\u53e5\u5b50\u9006\u5e8f<\/h1>\n<script src=\"https:\/\/gist.github.com\/m2kar\/315bdfb0581678d2f4159a6f7913b017.js\"><\/script>\n<h1 id=\"\u5b57\u7b26\u4e32\u8ddd\u79bb\">\u5b57\u7b26\u4e32\u8ddd\u79bb<\/h1>\n<script src=\"https:\/\/gist.github.com\/m2kar\/859f28d4a86c6dbe39e20411966a0842.js\"><\/script>\n<h1 id=\"\u8d28\u6570\u5206\u89e3\">\u8d28\u6570\u5206\u89e3<\/h1>\n<script src=\"https:\/\/gist.github.com\/m2kar\/a9e20dd2301ceb8f7330001aba6a4823.js\"><\/script>\n<h1 id=\"\u6570\u72ec\u6b63\u786e\u6027\u68c0\u6d4b\">\u6570\u72ec\u6b63\u786e\u6027\u68c0\u6d4b<\/h1>\n<script src=\"https:\/\/gist.github.com\/m2kar\/5cd5fb94a254feb278ffc3d0702ad3da.js\"><\/script>\n<hr>\n<ul>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"\u5feb\u624b\u7b14\u8bd5\u9898\u76ee"},{"content":"\u7f8e\u56e2\u8003\u8bd5\u9047\u5230\u4e86\u51e0\u4e2a\u7b14\u8bd5\u9898\u76ee\uff0c\u5148\u8bb0\u4e00\u4e0b\uff0c\u6709\u4e9b\u9898\u5f97\u91cd\u65b0\u505a\n\u9ed1\u5ba2\u5165\u4fb5\u70b9\u5b9a\u4f4d \u9898\u76ee\u63cf\u8ff0 \u5b9e\u73b0 \u5206\u4e3a\u4e24\u6bb5\u6267\u884c\uff1a\n\u5206\u522b\u5c06\u6a21\u57571-12\uff0c\u6a21\u57571-24\uff0c\u6a21\u57571-48\uff0c&hellip; \u6a21\u57571-144\uff0c\u6a21\u57571-150\u8f93\u5165\u5230\u7b2c\u4e00\u6b3e\u68c0\u6d4b\u7a0b\u5e8f\u4e2d\uff0c\u5f53\u68c0\u6d4b\u7a0b\u5e8f\u8f93\u51fa\u4e3aTrue\u65f6\uff0c\u8fdb\u884c\u4e0b\u4e00\u6b65\u68c0\u6d4b\u3002\u5047\u8bbe\u6b64\u65f6\u8f93\u5165\u7684\u7a0b\u5e8f\u4e3a$1-12*(x)$\n\u5c06\u6a21\u5757 $$1-12*(x-1),1-[12*(x-1)+1],1-[12*(x-1)+2],&hellip;,1-[12*(x-1)+11],1-12*(x)$$\n\u5206\u522b\u8f93\u5165\u5230\u68c0\u6d4b\u7a0b\u5e8f\uff0c\u68c0\u6d4b\u51fa\u5219\u4e3a\u88ab\u5165\u4fb5\u7684\u7a0b\u5e8f\n\u4f46\u662f\u8fd9\u79cd\u5b9e\u73b0\u65b9\u5f0f\u5b58\u5728\u95ee\u9898\uff0c\u8fd9\u91cc\u662f\u5047\u8bbe\u5e73\u5747\u5206\u5272\uff0c\u4f46\u53ef\u4ee5\u4e0d\u5e73\u5747\u5206\u5272\uff0c\u8fd9\u65f6\u5019\u7684\u65b9\u7a0b\u5982\u4f55\u5217\uff1f\n\u91cd\u590d\u5b50\u5e8f\u5217 \u9898\u76ee\u63cf\u8ff0\uff1a \u8f93\u5165\u4e24\u4e2a\n\u8f93\u5165\u6574\u6570\u5e8f\u5217A\u548cB,\u8f93\u51fa\u540c\u65f6\u5728A\uff0cB\u4e2d\u51fa\u73b0\u7684\u6700\u957f\u5b50\u5e8f\u5217\u7684\u957f\u5ea6\u3002\u6ce8\u610f\uff0c\u5b50\u5e8f\u5217\u7531\u539f\u5e8f\u5217\u4e2d\u7684\u8fde\u7eed\u5143\u7d20\u6784\u6210\u3002\n\u8f93\u5165 \u7b2c\u4e00\u884c\u4e00\u4e2a\u6570n\uff0c\u8868\u793a\u5e8f\u5217A\u7684\u957f\u5ea6 \u7b2c\u4e8c\u884cn\u4e2a\u6570\uff0c\u8868\u793a\u5e8f\u5217A \u7b2c\u4e09\u884c\u4e00\u4e2a\u6570m\uff0c\u8868\u793a\u5e8f\u5217B\u7684\u957f\u5ea6 \u7b2c\u56db\u884cm\u4e2a\u6570\uff0c\u8868\u793a\u5e8f\u5217B \uff081&lt;=n,m&lt;=1000) \u8f93\u51fa \u8f93\u51fa\u7ed3\u679c \u6837\u4f8b\u8f93\u5165 5 1 2 3 2 1 5 3 2 1 4 7 \u6837\u4f8b\u8f93\u51fa 3 \u63d0\u793a \u5373\u6700\u957f\u91cd\u590d\u5b50\u5e8f\u5217\u4e3a[3,2,1] \u7ed9\u4e86\u793a\u4f8b\u4ee3\u7801\uff0c\u5305\u62ec\u8f93\u5165\u90e8\u5206\n\u5b9e\u73b0 def findMaxSubListLen( A, B): n1 = len(A) n2 = len(B) dp = [[0 for _ in range(n2+1)] for _ in range(n1+1)] for i in range(1,n1+1): for j in range(1,n2+1): if A[i-1] == B[j-1]: dp[i][j] = dp[i-1][j-1] + 1 return max([max(row) for row in dp]) \u7f8e\u56e2\u9001\u9910\u5206\u7bb1\u95ee\u9898 \u68cb\u624b\u62ff\u51fa\u88c5\u6709\u8d27\u7269\u7684\u4fdd\u6e29\u7bb1\n\u5b9e\u73b0 python n=int(input()) sa=input() a=[int(s) for s in sa.split()] sb=input() b=[int(s) for s in sb.split()] s=sum(a) d=list(zip(b,a)) d.sort(key=lambda x:x[0],reverse=True) s0=0 i=0 while s0&lt;s: s0+=d[i][0] i+=1 x1=i x2=0 while i&lt;n: x2+=d[i][1] i+=1 print(x1,x2) go \/* \u7f8e\u56e2\u9001\u9910 \u68cb\u624b\u62ff\u51fa\u88c5\u6709\u8d27\u7269\u7684\u4fdd\u6e29\u7bb1 *\/ package main import ( &#34;fmt&#34; &#34;sort&#34; ) type Box struct { a int b int } type Boxs []Box func (bs Boxs) Len() int { return len(bs) } func (bs Boxs) Less(i, j int) bool { if bs[i].b == bs[j].b { return bs[i].a &lt; bs[j].a } return bs[i].b &lt; bs[j].b } func (bs Boxs) Swap(i, j int) { bs[i].a, bs[j].a = bs[j].a, bs[i].a bs[i].b, bs[j].b = bs[j].b, bs[i].b } func main() { var n int fmt.Scanf(&#34;%d&#34;, &amp;n) fmt.Println(n) bs := make(Boxs, n) s := 0 for i := 0; i &lt; n; i++ { fmt.Scanf(&#34;%d&#34;, &amp;bs[i].a) s += bs[i].a \/\/ fmt.Println(a[i]) } for i := 0; i &lt; n; i++ { fmt.Scanf(&#34;%d&#34;, &amp;bs[i].b) } sort.Sort(bs) s0 := 0 x1 := 0 for i := n - 1; i &gt;= 0; i-- { fmt.Println(i, x1, s0, bs[i].b) if s0 &lt; s { s0 += bs[i].b x1 += 1 } else { break } } x2 := 0 for i := 0; i &lt; x1; i++ { x2 += bs[i].a fmt.Println(i, bs[i].a) } fmt.Println(x1, x2) } \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190912-meituan-code-exam\/","summary":"<p>\u7f8e\u56e2\u8003\u8bd5\u9047\u5230\u4e86\u51e0\u4e2a\u7b14\u8bd5\u9898\u76ee\uff0c\u5148\u8bb0\u4e00\u4e0b\uff0c\u6709\u4e9b\u9898\u5f97\u91cd\u65b0\u505a<\/p>\n<h1 id=\"\u9ed1\u5ba2\u5165\u4fb5\u70b9\u5b9a\u4f4d\">\u9ed1\u5ba2\u5165\u4fb5\u70b9\u5b9a\u4f4d<\/h1>\n<h2 id=\"\u9898\u76ee\u63cf\u8ff0\">\u9898\u76ee\u63cf\u8ff0<\/h2>\n<p><img alt=\"\u9ed1\u5ba2\u5165\u4fb5\u70b9\u5b9a\u4f4d\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/%E9%BB%91%E5%AE%A2%E5%85%A5%E4%BE%B5%E7%82%B9%E5%AE%9A%E4%BD%8D.png\"><\/p>\n<h2 id=\"\u5b9e\u73b0\">\u5b9e\u73b0<\/h2>\n<p>\u5206\u4e3a\u4e24\u6bb5\u6267\u884c\uff1a<\/p>\n<ol>\n<li>\n<p>\u5206\u522b\u5c06\u6a21\u57571-12\uff0c\u6a21\u57571-24\uff0c\u6a21\u57571-48\uff0c&hellip; \u6a21\u57571-144\uff0c\u6a21\u57571-150\u8f93\u5165\u5230\u7b2c\u4e00\u6b3e\u68c0\u6d4b\u7a0b\u5e8f\u4e2d\uff0c\u5f53\u68c0\u6d4b\u7a0b\u5e8f\u8f93\u51fa\u4e3aTrue\u65f6\uff0c\u8fdb\u884c\u4e0b\u4e00\u6b65\u68c0\u6d4b\u3002\u5047\u8bbe\u6b64\u65f6\u8f93\u5165\u7684\u7a0b\u5e8f\u4e3a$1-12*(x)$<\/p>\n<\/li>\n<li>\n<p>\u5c06\u6a21\u5757\n$$1-12*(x-1),1-[12*(x-1)+1],1-[12*(x-1)+2],&hellip;,1-[12*(x-1)+11],1-12*(x)$$<\/p>\n<\/li>\n<\/ol>\n<p>\u5206\u522b\u8f93\u5165\u5230\u68c0\u6d4b\u7a0b\u5e8f\uff0c\u68c0\u6d4b\u51fa\u5219\u4e3a\u88ab\u5165\u4fb5\u7684\u7a0b\u5e8f<\/p>\n<blockquote>\n<p>\u4f46\u662f\u8fd9\u79cd\u5b9e\u73b0\u65b9\u5f0f\u5b58\u5728\u95ee\u9898\uff0c\u8fd9\u91cc\u662f\u5047\u8bbe\u5e73\u5747\u5206\u5272\uff0c\u4f46\u53ef\u4ee5\u4e0d\u5e73\u5747\u5206\u5272\uff0c\u8fd9\u65f6\u5019\u7684\u65b9\u7a0b\u5982\u4f55\u5217\uff1f<\/p>\n<\/blockquote>\n<h1 id=\"\u91cd\u590d\u5b50\u5e8f\u5217\">\u91cd\u590d\u5b50\u5e8f\u5217<\/h1>\n<h2 id=\"\u9898\u76ee\u63cf\u8ff0-1\">\u9898\u76ee\u63cf\u8ff0\uff1a<\/h2>\n<p>\u8f93\u5165\u4e24\u4e2a<\/p>\n<p>\u8f93\u5165\u6574\u6570\u5e8f\u5217A\u548cB,\u8f93\u51fa\u540c\u65f6\u5728A\uff0cB\u4e2d\u51fa\u73b0\u7684\u6700\u957f\u5b50\u5e8f\u5217\u7684\u957f\u5ea6\u3002\u6ce8\u610f\uff0c\u5b50\u5e8f\u5217\u7531\u539f\u5e8f\u5217\u4e2d\u7684\u8fde\u7eed\u5143\u7d20\u6784\u6210\u3002<\/p>\n<h3 id=\"\u8f93\u5165\">\u8f93\u5165<\/h3>\n<pre tabindex=\"0\"><code>\u7b2c\u4e00\u884c\u4e00\u4e2a\u6570n\uff0c\u8868\u793a\u5e8f\u5217A\u7684\u957f\u5ea6\n\u7b2c\u4e8c\u884cn\u4e2a\u6570\uff0c\u8868\u793a\u5e8f\u5217A\n\u7b2c\u4e09\u884c\u4e00\u4e2a\u6570m\uff0c\u8868\u793a\u5e8f\u5217B\u7684\u957f\u5ea6\n\u7b2c\u56db\u884cm\u4e2a\u6570\uff0c\u8868\u793a\u5e8f\u5217B\n\uff081&lt;=n,m&lt;=1000)\n<\/code><\/pre><h3 id=\"\u8f93\u51fa\">\u8f93\u51fa<\/h3>\n<pre tabindex=\"0\"><code>\u8f93\u51fa\u7ed3\u679c\n<\/code><\/pre><h3 id=\"\u6837\u4f8b\u8f93\u5165\">\u6837\u4f8b\u8f93\u5165<\/h3>\n<pre tabindex=\"0\"><code>5\n1 2 3 2 1\n5\n3 2 1 4 7\n<\/code><\/pre><h3 id=\"\u6837\u4f8b\u8f93\u51fa\">\u6837\u4f8b\u8f93\u51fa<\/h3>\n<pre tabindex=\"0\"><code>3\n<\/code><\/pre><h3 id=\"\u63d0\u793a\">\u63d0\u793a<\/h3>\n<pre tabindex=\"0\"><code>\u5373\u6700\u957f\u91cd\u590d\u5b50\u5e8f\u5217\u4e3a[3,2,1]\n<\/code><\/pre><p>\u7ed9\u4e86\u793a\u4f8b\u4ee3\u7801\uff0c\u5305\u62ec\u8f93\u5165\u90e8\u5206<\/p>\n<h2 id=\"\u5b9e\u73b0-1\">\u5b9e\u73b0<\/h2>\n<pre tabindex=\"0\"><code>def findMaxSubListLen( A, B):\n    n1 = len(A)\n    n2 = len(B)\n    dp = [[0 for _ in range(n2+1)] for _ in range(n1+1)]\n    \n    for i in range(1,n1+1):\n        for j in range(1,n2+1):\n            if A[i-1] == B[j-1]:\n                dp[i][j] = dp[i-1][j-1] + 1\n    return max([max(row) for row in dp])\n<\/code><\/pre><h1 id=\"\u7f8e\u56e2\u9001\u9910\u5206\u7bb1\u95ee\u9898\">\u7f8e\u56e2\u9001\u9910\u5206\u7bb1\u95ee\u9898<\/h1>\n<p>\u68cb\u624b\u62ff\u51fa\u88c5\u6709\u8d27\u7269\u7684\u4fdd\u6e29\u7bb1<\/p>","title":"\u7f8e\u56e2\u70b9\u8bc4\u7684\u51e0\u9053\u7b14\u8bd5\u9898"},{"content":"\u534e\u4e3a\u8003\u8bd5\u9047\u5230\u4e86\u51e0\u4e2a\u7b14\u8bd5\u9898\u76ee\uff0c\u5148\u8bb0\u4e00\u4e0b\uff0c\u6709\u4e9b\u9898\u5f97\u91cd\u65b0\u505a\u3001\n\u7b14\u8bd5\u4fe1\u606f\u8bd5\u5377\u540d\u79f0\uff1a\u3010\u534e\u4e3a2019\u5e74\u6821\u56ed\u62db\u8058\u30112019-9-11 \u8f6f\u4ef6\u9898 \u8003\u8bd5\u65f6\u95f4\uff1a(\u5317\u4eac\u65f6\u95f4,UTC+08:00)09-11 19:00:00 &ndash; 21:10:00 \u8003\u8bd5\u65f6\u957f\uff1a120\u5206\u949f \u8003\u8bd5\u5730\u5740\uff1ahttps:\/\/exam.nowcoder.com\/cts\/17045150\/summary?xxxxxxxxxxxx\uff08\u8003\u8bd5\u5730\u5740\u4e3a\u4f60\u7684\u79c1\u4eba\u4e13\u5c5e\u5730\u5740\uff0c\u8bf7\u52ff\u8f6c\u53d1\u3002\u5982\u65e0\u6cd5\u76f4\u63a5\u6253\u5f00\uff0c\u8bf7\u62f7\u8d1d\u5b8c\u6574\u94fe\u63a5\u5e76\u7c98\u8d34\u81f3\u6d4f\u89c8\u5668\u5730\u5740\u680f\uff09 \u786c\u4ef6\u6a21\u62df\u8bd5\u5377\u94fe\u63a5\uff1ahttps:\/\/www.nowcoder.com\/cts\/9540163\/summary \u8f6f\u4ef6\u6a21\u62df\u8bd5\u5377\u94fe\u63a5\uff1ahttps:\/\/www.nowcoder.com\/cts\/9540156\/summary \u6ce8\uff1a\u53ef\u63d0\u524d\u8fdb\u5165\u6a21\u62df\u8bd5\u5377\u94fe\u63a5\u719f\u6089\u9898\u578b\u548c\u8003\u8bd5\u73af\u5883\uff0c\u65b9\u4fbf\u60a8\u66f4\u987a\u5229\u901a\u8fc7\u8003\u8bd5\u3002\n\u6570\u8f74\u76f8\u90bb\u70b9\u95ee\u9898 \u9898\u76ee\u63cf\u8ff0 s\n\u89e3\u7b54 s=input() A=[] B=[] R=0 area=&#34;&#34; s=s.replace(&#34;{&#34;,&#34;&#34;).replace(&#34;}&#34;,&#34;&#34;).replace(&#34;=&#34;,&#34;,&#34;) for x in s.split(&#34;,&#34;): if x in &#34;ABR&#34;: area=x elif x in &#34;={}&#34;: pass else: if area==&#34;A&#34;: A.append(int(x)) elif area==&#34;B&#34;: B.append(int(x)) elif area==&#34;R&#34;: R=int(x) else: raise ValueError i=0 j=0 na=len(A) nb=len(B) sj=0 while i&lt;na: while sj&lt;nb and A[i]&gt;B[sj] : sj+=1 if sj&gt;=nb: break j=sj while j&lt;nb and B[j]-A[i]&lt;=R : print(&#34;(%s,%s)&#34;%(A[i],B[j]),end=&#34;&#34;) j+=1 if j==sj: print(&#34;(%s,%s)&#34;%(A[i],B[j]),end=&#34;&#34;) i+=1 print() \u5b57\u7b26\u4e32\u5012\u5e8f\u6392\u5217\u95ee\u9898 \u9898\u76ee\u63cf\u8ff0 \u89e3\u7b54 import string CHR=string.digits+string.ascii_letters s=input() l=[] n=len(s) i=0 while i&lt;n: if s[i] in CHR: l.append(&#34;&#34;) while i&lt;n and (s[i] in CHR or s[i]==&#34;-&#34;): if s[i]==&#34;-&#34;: if not(i+1&lt;n and s[i+1] in CHR): break l[-1]+=s[i] i+=1 else: i+=1 print(&#34; &#34;.join(l[::-1]),end=&#34; &#34;) \u822a\u73ed\u7ebf\u8def\u95ee\u9898 \u9898\u76ee\u63cf\u8ff0 \u89e3\u7b54 N=int(input()) old={} for _ in range(N): fid,sid,name=input().split(&#39;,&#39;) old[(fid,sid)]=name new={} M=int(input()) names={} for _ in range(M): ofid,osid,nfid,nsid=input().split(&#39;,&#39;) ofs=(ofid,osid) nfs=(nfid,nsid) name=old.pop(ofs,) if names.get(name,(&#34;&#34;,&#34;&#34;))[0]==nfid: new.pop(names[name],) new[(nfid,nsid)]=name names[name]=(nfid,nsid) for fs,name in old.items(): if not (fs in new or names.get(name,(&#34;&#34;,&#34;&#34;))[0]==nfid) : new[fs]=old[fs] l=sorted(list(new.items()),key=lambda x: x[0]) for fs,name in l: print(&#34;%s,%s,%s&#34;%(fs[0],fs[1],name)) \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190912-huawei-code-exam\/","summary":"<p>\u534e\u4e3a\u8003\u8bd5\u9047\u5230\u4e86\u51e0\u4e2a\u7b14\u8bd5\u9898\u76ee\uff0c\u5148\u8bb0\u4e00\u4e0b\uff0c\u6709\u4e9b\u9898\u5f97\u91cd\u65b0\u505a\u3001<\/p>\n<blockquote>\n<p>\u7b14\u8bd5\u4fe1\u606f\u8bd5\u5377\u540d\u79f0\uff1a\u3010\u534e\u4e3a2019\u5e74\u6821\u56ed\u62db\u8058\u30112019-9-11 \u8f6f\u4ef6\u9898\n\u8003\u8bd5\u65f6\u95f4\uff1a(\u5317\u4eac\u65f6\u95f4,UTC+08:00)09-11 19:00:00 &ndash; 21:10:00\n\u8003\u8bd5\u65f6\u957f\uff1a120\u5206\u949f\n\u8003\u8bd5\u5730\u5740\uff1ahttps:\/\/exam.nowcoder.com\/cts\/17045150\/summary?xxxxxxxxxxxx\uff08\u8003\u8bd5\u5730\u5740\u4e3a\u4f60\u7684\u79c1\u4eba\u4e13\u5c5e\u5730\u5740\uff0c\u8bf7\u52ff\u8f6c\u53d1\u3002\u5982\u65e0\u6cd5\u76f4\u63a5\u6253\u5f00\uff0c\u8bf7\u62f7\u8d1d\u5b8c\u6574\u94fe\u63a5\u5e76\u7c98\u8d34\u81f3\u6d4f\u89c8\u5668\u5730\u5740\u680f\uff09\n\u786c\u4ef6\u6a21\u62df\u8bd5\u5377\u94fe\u63a5\uff1ahttps:\/\/www.nowcoder.com\/cts\/9540163\/summary\n\u8f6f\u4ef6\u6a21\u62df\u8bd5\u5377\u94fe\u63a5\uff1ahttps:\/\/www.nowcoder.com\/cts\/9540156\/summary\n\u6ce8\uff1a\u53ef\u63d0\u524d\u8fdb\u5165\u6a21\u62df\u8bd5\u5377\u94fe\u63a5\u719f\u6089\u9898\u578b\u548c\u8003\u8bd5\u73af\u5883\uff0c\u65b9\u4fbf\u60a8\u66f4\u987a\u5229\u901a\u8fc7\u8003\u8bd5\u3002<\/p>\n<p><img alt=\"1568223500508\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568223500508.png\"><\/p>\n<\/blockquote>\n<h1 id=\"\u6570\u8f74\u76f8\u90bb\u70b9\u95ee\u9898\">\u6570\u8f74\u76f8\u90bb\u70b9\u95ee\u9898<\/h1>\n<h2 id=\"\u9898\u76ee\u63cf\u8ff0\">\u9898\u76ee\u63cf\u8ff0<\/h2>\n<p>s<\/p>\n<p><img alt=\"1568223716592\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568223716592.png\"><\/p>\n<p><img alt=\"1568223741218\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568223741218.png\"><\/p>\n<p><img alt=\"1568223775864\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568223775864.png\"><\/p>\n<h2 id=\"\u89e3\u7b54\">\u89e3\u7b54<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-python\" data-lang=\"python\"><span class=\"line\"><span class=\"cl\"><span class=\"n\">s<\/span><span class=\"o\">=<\/span><span class=\"nb\">input<\/span><span class=\"p\">()<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">A<\/span><span class=\"o\">=<\/span><span class=\"p\">[]<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">B<\/span><span class=\"o\">=<\/span><span class=\"p\">[]<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">R<\/span><span class=\"o\">=<\/span><span class=\"mi\">0<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">area<\/span><span class=\"o\">=<\/span><span class=\"s2\">&#34;&#34;<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">s<\/span><span class=\"o\">=<\/span><span class=\"n\">s<\/span><span class=\"o\">.<\/span><span class=\"n\">replace<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;{&#34;<\/span><span class=\"p\">,<\/span><span class=\"s2\">&#34;&#34;<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">replace<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;}&#34;<\/span><span class=\"p\">,<\/span><span class=\"s2\">&#34;&#34;<\/span><span class=\"p\">)<\/span><span class=\"o\">.<\/span><span class=\"n\">replace<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;=&#34;<\/span><span class=\"p\">,<\/span><span class=\"s2\">&#34;,&#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">for<\/span> <span class=\"n\">x<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">s<\/span><span class=\"o\">.<\/span><span class=\"n\">split<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;,&#34;<\/span><span class=\"p\">):<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">if<\/span> <span class=\"n\">x<\/span> <span class=\"ow\">in<\/span> <span class=\"s2\">&#34;ABR&#34;<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">area<\/span><span class=\"o\">=<\/span><span class=\"n\">x<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">elif<\/span> <span class=\"n\">x<\/span> <span class=\"ow\">in<\/span> <span class=\"s2\">&#34;=<\/span><span class=\"si\">{}<\/span><span class=\"s2\">&#34;<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"k\">pass<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"k\">if<\/span> <span class=\"n\">area<\/span><span class=\"o\">==<\/span><span class=\"s2\">&#34;A&#34;<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">            <span class=\"n\">A<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"nb\">int<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">))<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"k\">elif<\/span> <span class=\"n\">area<\/span><span class=\"o\">==<\/span><span class=\"s2\">&#34;B&#34;<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">            <span class=\"n\">B<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"nb\">int<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">))<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"k\">elif<\/span> <span class=\"n\">area<\/span><span class=\"o\">==<\/span><span class=\"s2\">&#34;R&#34;<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">            <span class=\"n\">R<\/span><span class=\"o\">=<\/span><span class=\"nb\">int<\/span><span class=\"p\">(<\/span><span class=\"n\">x<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">            <span class=\"k\">raise<\/span> <span class=\"ne\">ValueError<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">i<\/span><span class=\"o\">=<\/span><span class=\"mi\">0<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">j<\/span><span class=\"o\">=<\/span><span class=\"mi\">0<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">na<\/span><span class=\"o\">=<\/span><span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">A<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">nb<\/span><span class=\"o\">=<\/span><span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">B<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">sj<\/span><span class=\"o\">=<\/span><span class=\"mi\">0<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">while<\/span> <span class=\"n\">i<\/span><span class=\"o\">&lt;<\/span><span class=\"n\">na<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">while<\/span> <span class=\"n\">sj<\/span><span class=\"o\">&lt;<\/span><span class=\"n\">nb<\/span> <span class=\"ow\">and<\/span> <span class=\"n\">A<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">]<\/span><span class=\"o\">&gt;<\/span><span class=\"n\">B<\/span><span class=\"p\">[<\/span><span class=\"n\">sj<\/span><span class=\"p\">]<\/span> <span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">sj<\/span><span class=\"o\">+=<\/span><span class=\"mi\">1<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">if<\/span> <span class=\"n\">sj<\/span><span class=\"o\">&gt;=<\/span><span class=\"n\">nb<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"k\">break<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">j<\/span><span class=\"o\">=<\/span><span class=\"n\">sj<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">while<\/span> <span class=\"n\">j<\/span><span class=\"o\">&lt;<\/span><span class=\"n\">nb<\/span> <span class=\"ow\">and<\/span> <span class=\"n\">B<\/span><span class=\"p\">[<\/span><span class=\"n\">j<\/span><span class=\"p\">]<\/span><span class=\"o\">-<\/span><span class=\"n\">A<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">]<\/span><span class=\"o\">&lt;=<\/span><span class=\"n\">R<\/span> <span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;(<\/span><span class=\"si\">%s<\/span><span class=\"s2\">,<\/span><span class=\"si\">%s<\/span><span class=\"s2\">)&#34;<\/span><span class=\"o\">%<\/span><span class=\"p\">(<\/span><span class=\"n\">A<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">],<\/span><span class=\"n\">B<\/span><span class=\"p\">[<\/span><span class=\"n\">j<\/span><span class=\"p\">]),<\/span><span class=\"n\">end<\/span><span class=\"o\">=<\/span><span class=\"s2\">&#34;&#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">j<\/span><span class=\"o\">+=<\/span><span class=\"mi\">1<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">if<\/span> <span class=\"n\">j<\/span><span class=\"o\">==<\/span><span class=\"n\">sj<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;(<\/span><span class=\"si\">%s<\/span><span class=\"s2\">,<\/span><span class=\"si\">%s<\/span><span class=\"s2\">)&#34;<\/span><span class=\"o\">%<\/span><span class=\"p\">(<\/span><span class=\"n\">A<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">],<\/span><span class=\"n\">B<\/span><span class=\"p\">[<\/span><span class=\"n\">j<\/span><span class=\"p\">]),<\/span><span class=\"n\">end<\/span><span class=\"o\">=<\/span><span class=\"s2\">&#34;&#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">i<\/span><span class=\"o\">+=<\/span><span class=\"mi\">1<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nb\">print<\/span><span class=\"p\">()<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        \n<\/span><\/span><span class=\"line\"><span class=\"cl\">    \n<\/span><\/span><span class=\"line\"><span class=\"cl\">    \n<\/span><\/span><\/code><\/pre><\/div><h1 id=\"\u5b57\u7b26\u4e32\u5012\u5e8f\u6392\u5217\u95ee\u9898\">\u5b57\u7b26\u4e32\u5012\u5e8f\u6392\u5217\u95ee\u9898<\/h1>\n<h2 id=\"\u9898\u76ee\u63cf\u8ff0-1\">\u9898\u76ee\u63cf\u8ff0<\/h2>\n<p><img alt=\"1568223787906\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568223787906.png\"><\/p>\n<p><img alt=\"1568223801491\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568223801491.png\"><\/p>\n<p><img alt=\"1568223816084\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568223816084.png\"><\/p>\n<h2 id=\"\u89e3\u7b54-1\">\u89e3\u7b54<\/h2>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-python\" data-lang=\"python\"><span class=\"line\"><span class=\"cl\"><span class=\"kn\">import<\/span> <span class=\"nn\">string<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">CHR<\/span><span class=\"o\">=<\/span><span class=\"n\">string<\/span><span class=\"o\">.<\/span><span class=\"n\">digits<\/span><span class=\"o\">+<\/span><span class=\"n\">string<\/span><span class=\"o\">.<\/span><span class=\"n\">ascii_letters<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">s<\/span><span class=\"o\">=<\/span><span class=\"nb\">input<\/span><span class=\"p\">()<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">l<\/span><span class=\"o\">=<\/span><span class=\"p\">[]<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">n<\/span><span class=\"o\">=<\/span><span class=\"nb\">len<\/span><span class=\"p\">(<\/span><span class=\"n\">s<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">i<\/span><span class=\"o\">=<\/span><span class=\"mi\">0<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">while<\/span> <span class=\"n\">i<\/span><span class=\"o\">&lt;<\/span><span class=\"n\">n<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">if<\/span> <span class=\"n\">s<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">]<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">CHR<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">l<\/span><span class=\"o\">.<\/span><span class=\"n\">append<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;&#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"k\">while<\/span> <span class=\"n\">i<\/span><span class=\"o\">&lt;<\/span><span class=\"n\">n<\/span> <span class=\"ow\">and<\/span> <span class=\"p\">(<\/span><span class=\"n\">s<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">]<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">CHR<\/span> <span class=\"ow\">or<\/span> <span class=\"n\">s<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">]<\/span><span class=\"o\">==<\/span><span class=\"s2\">&#34;-&#34;<\/span><span class=\"p\">):<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">            <span class=\"k\">if<\/span> <span class=\"n\">s<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">]<\/span><span class=\"o\">==<\/span><span class=\"s2\">&#34;-&#34;<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">                <span class=\"k\">if<\/span> <span class=\"ow\">not<\/span><span class=\"p\">(<\/span><span class=\"n\">i<\/span><span class=\"o\">+<\/span><span class=\"mi\">1<\/span><span class=\"o\">&lt;<\/span><span class=\"n\">n<\/span> <span class=\"ow\">and<\/span> <span class=\"n\">s<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"o\">+<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">CHR<\/span><span class=\"p\">):<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">                    <span class=\"k\">break<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">            <span class=\"n\">l<\/span><span class=\"p\">[<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]<\/span><span class=\"o\">+=<\/span><span class=\"n\">s<\/span><span class=\"p\">[<\/span><span class=\"n\">i<\/span><span class=\"p\">]<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">            <span class=\"n\">i<\/span><span class=\"o\">+=<\/span><span class=\"mi\">1<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">else<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">i<\/span><span class=\"o\">+=<\/span><span class=\"mi\">1<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"nb\">print<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34; &#34;<\/span><span class=\"o\">.<\/span><span class=\"n\">join<\/span><span class=\"p\">(<\/span><span class=\"n\">l<\/span><span class=\"p\">[::<\/span><span class=\"o\">-<\/span><span class=\"mi\">1<\/span><span class=\"p\">]),<\/span><span class=\"n\">end<\/span><span class=\"o\">=<\/span><span class=\"s2\">&#34; &#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><\/code><\/pre><\/div><h1 id=\"\u822a\u73ed\u7ebf\u8def\u95ee\u9898\">\u822a\u73ed\u7ebf\u8def\u95ee\u9898<\/h1>\n<h2 id=\"\u9898\u76ee\u63cf\u8ff0-2\">\u9898\u76ee\u63cf\u8ff0<\/h2>\n<p><img alt=\"1568223832820\" loading=\"lazy\" src=\"https:\/\/cdn.jsdelivr.net\/gh\/m2kar\/bucket\/img\/1568223832820.png\"><\/p>","title":"\u534e\u4e3a\u7684\u51e0\u9053\u7b14\u8bd5\u9898"},{"content":"","permalink":"https:\/\/m2kar.cn\/posts\/20190910-android-autotest-with-solopi\/","summary":"","title":"\u4f7f\u7528solopi\u505a\u5b89\u5353\u81ea\u52a8\u6d4b\u8bd5"},{"content":"\u5b57\u8282\u8df3\u52a8\u8003\u8bd5\u9047\u5230\u4e86\u51e0\u4e2a\u7b14\u8bd5\u9898\u76ee\uff0c\u5148\u8bb0\u4e00\u4e0b\uff0c\u6709\u4e9b\u9898\u5f97\u91cd\u65b0\u505a\n\u673a\u5668\u4eba\u5411\u524d\u770b \u6570\u5b57\u4e8c\u4e49\u6027\u89e3\u7801 \u4e09\u53ea\u6c34\u6876\u5012\u6c34\u95ee\u9898 \u6570\u5b57\u65b9\u5757\u95ee\u9898 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190908-bytedance-code-exam\/","summary":"<p>\u5b57\u8282\u8df3\u52a8\u8003\u8bd5\u9047\u5230\u4e86\u51e0\u4e2a\u7b14\u8bd5\u9898\u76ee\uff0c\u5148\u8bb0\u4e00\u4e0b\uff0c\u6709\u4e9b\u9898\u5f97\u91cd\u65b0\u505a<\/p>\n<h1 id=\"\u673a\u5668\u4eba\u5411\u524d\u770b\">\u673a\u5668\u4eba\u5411\u524d\u770b<\/h1>\n<script src=\"https:\/\/gist.github.com\/m2kar\/13a2290bb0157f76dd1ee1d0d2a641c0.js\"><\/script>\n<h1 id=\"\u6570\u5b57\u4e8c\u4e49\u6027\u89e3\u7801\">\u6570\u5b57\u4e8c\u4e49\u6027\u89e3\u7801<\/h1>\n<script src=\"https:\/\/gist.github.com\/m2kar\/4aabf092e6e7ba0fb75eef598018c912.js\"><\/script>\n<h1 id=\"\u4e09\u53ea\u6c34\u6876\u5012\u6c34\u95ee\u9898\">\u4e09\u53ea\u6c34\u6876\u5012\u6c34\u95ee\u9898<\/h1>\n<script src=\"https:\/\/gist.github.com\/m2kar\/2ad4e7a438b793b2137446728edd2fb8.js\"><\/script>\n<h1 id=\"\u6570\u5b57\u65b9\u5757\u95ee\u9898\">\u6570\u5b57\u65b9\u5757\u95ee\u9898<\/h1>\n<script src=\"https:\/\/gist.github.com\/m2kar\/be518605be69eee36dccfc30e44c5e31.js\"><\/script>\n<hr>\n<ul>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"\u5b57\u8282\u8df3\u52a8\u7684\u51e0\u9053\u7b14\u8bd5\u9898"},{"content":"\u8f6c\u81eahttps:\/\/download.csdn.net\/download\/yesterday_sky\/11065808\n\u683c\u5f0f\u8bf4\u660e \u8f6f\u4ef6\u5b66\u62a5\u7684csl\u6587\u732e\u683c\u5f0f\uff0c\u53ef\u7528\u4e8ezotero\u6216\u5176\u4ed6\u652f\u6301csl\u6587\u732e\u683c\u5f0f\u7684\u8f6f\u4ef6\u3002\u6ce8\u610f\uff0c\u8fd9\u4e2acsl\u6587\u732e\u683c\u5f0f\u4f7f\u7528\u7684\u662fus\u82f1\u6587\u7f16\u7801\uff0c\u8fd9\u6837\u82f1\u6587\u6587\u732e\u7684\u4f5c\u8005\u591a\u4f593\u4e2a\u65f6\u663e\u793a\u7684\u65f6et al\u800c\u4e0d\u662f\u4e2d\u6587\u7684\u201c\u7b49\u201d\u5b57\u3002\u4f46\u4e2d\u6587\u6587\u732e\u7684\u201c\u7b49\u201d\u5b57\u4e5f\u4f1a\u53d8\u6210et al\uff0c\u8fd9\u662fcsl\u65e0\u6cd5\u907f\u514d\u7684\u95ee\u9898\u3002\u9002\u7528\u4e8e\u82f1\u6587\u6587\u732e\u6bd4\u8f83\u591a\u7684\u4f5c\u8005\u4f7f\u7528\u3002\n\u683c\u5f0f\u9884\u89c8 \u5728Zotero\u7684\u4f7f\u7528\u65b9\u5f0f \u6253\u5f00\u9996\u9009\u9879 \u6dfb\u52a0\u5f15\u7528\u683c\u5f0f \u4e0b\u8f7d\u5730\u5740 journal-of-software.csl\nhttps:\/\/gist.github.com\/m2kar\/eb9033ab8a721d57e45429e375081c74\n\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190905-jos-csl\/","summary":"","title":"\u8f6f\u4ef6\u5b66\u62a5zotero\u6587\u732e\u683c\u5f0f"},{"content":"SafeHidden: An Efficient and Secure Information \u6982\u89c8 \u6458\u8981 \u4e2d\u6587\uff08\u7ffb\u8bd1\uff09 \u5728\u4f17\u591a\u4ee3\u7801\u91cd\u7528\u653b\u51fb\u7684\u9632\u5fa1\u624b\u6bb5\u4e2d\uff0c\u4fe1\u606f\u9690\u85cf(Information Hiding,IH)\u7531\u4e8e\u5176\u6709\u6548\u6027\u548c\u9ad8\u6027\u80fd\uff0c\u6210\u4e3a\u9632\u5fa1\u624b\u6bb5\u7684\u4e00\u4e2a\u91cd\u8981\u7ec4\u6210\u6a21\u5757,\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5982\u4ee3\u7801\u6307\u9488\u5b8c\u6574\u6027(CPI)\uff0c\u63a7\u5236\u6d41\u5b8c\u6574\u6027(CFI)\u548c\u7ec6\u7c92\u5ea6\u7684\u4ee3\u7801\u91cd\u968f\u673a\u5316\u3002\u5b83\u4f7f\u7528\u968f\u673a\u5316\u5b9e\u73b0\u6709\u6982\u7387\u7684\u9690\u85cf\u7cfb\u7edf\u7684\u5173\u952e\u5185\u5b58\u533a\u57df\uff0c\u4e5f\u6210\u4e3a\u5b89\u5168\u533a\u3002\u8be5\u533a\u57df\u4e0d\u80fd\u88ab\u4efb\u4f55\u6307\u9488\u76f4\u63a5\u8bbf\u95ee\uff0c\u53ef\u4ee5\u963b\u6b62\u653b\u51fb\u8005\u7684\u653b\u51fb\u884c\u4e3a\u3002\u8fd9\u4e9b\u9632\u5fa1\u624b\u6bb5\u4f7f\u7528\u5b89\u5168\u533a\u6765\u4fdd\u62a4\u975e\u5e38\u91cd\u8981\u7684\u6570\u636e\uff0c\u5982\u8df3\u8f6c\u76ee\u6807\u548c\u968f\u673a\u5316\u7684\u5bc6\u7801\u3002\u7136\u800c\uff0c\u6700\u8fd1\u7684\u7814\u7a76\u8868\u660eIH\u5728\u5f88\u591a\u653b\u51fb\u624b\u6bb5\u4e0b\u4e0d\u518d\u5b89\u5168\u3002 \u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u63d0\u51fa\u4e00\u79cd\u65b0\u7684IH\u6280\u672f\uff0c\u79f0\u4e4b\u4e3aSafeHidden\u3002 \u5b83\u80fd\u6301\u7eed\u91cd\u968f\u673a\u5316\u5b89\u5168\u533a\u7684\u4f4d\u7f6e\uff0c\u7ec4\u7ec7\u653b\u51fb\u8005\u63a2\u7d22\u548c\u63a8\u7406\u5185\u5b58\u5e03\u5c40\u6765\u5bfb\u627e\u5b89\u5168\u533a\u7684\u4f4d\u7f6e\u3002\u672c\u6587\u63d0\u51fa\u4e00\u79cd\u65b0\u7684\u7ebf\u7a0b\u79c1\u6709\u7684\u5185\u5b58\u673a\u5236\uff0c\u8be5\u673a\u5236\u53ef\u4ee5\u8ba9\u7ebf\u7a0b\u672c\u5730\u7684\u5b89\u5168\u533a\u5b64\u7acb\u5316\uff0c\u907f\u514d\u653b\u51fb\u8005\u901a\u8fc7\u968f\u673a\u71b5\u51cf\u5c11\u53d1\u8d77\u653b\u51fb\u3002\u5b83\u4e5f\u53ef\u4ee5\u5728TLB\uff08\u9875\u8868\uff09\u7f3a\u5931\u540e\u968f\u673a\u5316\u5b89\u5168\u533a\uff0c\u6765\u907f\u514d\u653b\u51fb\u8005\u4f7f\u7528\u57fa\u4e8ecache\u4fa7\u4fe1\u9053\u63a8\u7406\u5b89\u5168\u533a\u7684\u4f4d\u7f6e\u3002\u73b0\u6709\u7684\u57fa\u4e8e\u4fe1\u606f\u9690\u85cf\u7684\u9632\u5fa1\u65b9\u6cd5\u65e0\u9700\u4fee\u6539\u4e5f\u80fd\u4f7f\u7528SafeHidden\u6280\u672f\u3002\u5b9e\u9a8c\u8868\u660eSafeHidden\u4e0d\u4ec5\u53ef\u4ee5\u6709\u6548\u907f\u514d\u5df2\u6709\u7684\u653b\u51fb\u624b\u6bb5\uff0c\u5e76\u4e14\u5e26\u6765\u7684\u6027\u80fd\u635f\u8017\u4e5f\u6781\u5c0f\u3002\n\u82f1\u6587 Information hiding (IH) is an important building block for many defenses against code reuse attacks, such as code-pointer integrity (CPI), control-flow integrity (CFI) and fine-grained code (re-)randomization, because of its effectiveness and performance. It employs randomization to probabilistically &lsquo;&lsquo;hide&rsquo;&rsquo; sensitive memory areas, called safe areas, from attackers and ensures their addresses are not leaked by any pointers directly. These defenses used safe areas to protect their critical data, such as jump targets and randomization secrets. However, recent works have shown that IH is vulnerable to various attacks.\nIn this paper, we propose a new IH technique called SafeHidden. It continuously re-randomizes the locations of safe areas and thus prevents the attackers from probing and inferring the memory layout to find its location. A new thread-private memory mechanism is proposed to isolate the thread-local safe areas and prevent adversaries from reducing the randomization entropy. It also randomizes the safe areas after the TLB misses to prevent attackers from inferring the address of safe areas using cache side-channels. Existing IH-based defenses can utilize SafeHidden directly without any change. Our experiments show that SafeHidden not only prevents existing attacks effectively but also incurs low performance overhead.\n\u5173\u952e\u8bcd \u7cfb\u7edf\u5b89\u5168\uff1b\u4fe1\u606f\u9690\u85cf\uff1b\u5b89\u5168\u533a\uff1b\u5730\u5740\u7a7a\u95f4\u5e03\u5c40\u968f\u673a\u5316(ASLR)\n\u51fa\u5904 USENix Security 2019, \u8d6b\u8d6b\u6709\u540d\u7684\u5b89\u5168\u9876\u7ea7\u5b66\u672f\u4f1a\u8bae\n\u5f15\u7528\u683c\u5f0f [1] Wang Z, Wu C, Zhang Y, Tang B, Yew P-C, Xie M, Lai Y, Kang Y, Cheng Y, Shi Z. SafeHidden: an efficient and secure information hiding technique using re-randomization. 28th USENIX Security Symposium (USENIX Security 19). Santa Clara, CA: USENIX Association, 2019: 1239\u20131256.\nURL: https:\/\/www.usenix.org\/conference\/usenixsecurity19\/presentation\/wang\n\u4f5c\u8005 Zhe Wang and Chenggang Wu, State Key Laboratory of Computer Architecture, Institute of Computing Technology, Chinese Academy of Sciences, University of Chinese Academy of Sciences; Yinqian Zhang, The Ohio State University; Bowen Tang, State Key Laboratory of Computer Architecture, Institute of Computing Technology, Chinese Academy of Sciences, University of Chinese Academy of Sciences; Pen-Chung Yew, University of Minnesota at Twin-Cities; Mengyao Xie, Yuanming Lai, and Yan Kang, State Key Laboratory of Computer Architecture, Institute of Computing Technology, Chinese Academy of Sciences, University of Chinese Academy of Sciences; Yueqiang Cheng, Baidu USA; Zhiping Shi, The Capital Normal University\n\u4e00\u4f5c\u4e3aZhe Wang\uff0c\u5176\u5bfc\u5e08\u6b66\u6210\u5c97\u4e3a\u4e8c\u4f5c\uff0c\u6765\u81ea\u4e2d\u79d1\u9662\u8ba1\u7b97\u6240\u56fd\u5bb6\u8ba1\u7b97\u673a\u4f53\u7cfb\u7ed3\u6784\u91cd\u70b9\u5b9e\u9a8c\u5ba4\u3002\n\u4e09\u4f5c\u5f20\u6bb7\u4e7e\u6765\u81ea\u4fc4\u4ea5\u4fc4\u5dde\u7acb\u5927\u5b66\uff0c\u66fe\u6709\u5e78\u5728InfoSec\u542c\u8fc7\u4ed6\u5bf9\u4e8e\u5b89\u5168\u65b9\u9762\u8bba\u6587\u53d1\u8868\u7684\u7ecf\u9a8c\uff0c\u5176\u5b9e\u9a8c\u5ba4\u548c\u624b\u4e0b\u7684\u535a\u58eb\u751f\u53d1\u8868\u4e86\u5f88\u591a\u7684\u5b89\u5168\u9876\u4f1a\u8bba\u6587\u3002\n\u7b14\u8bb0 \u8bba\u6587\u4e3b\u9898 \u4e00\u79cd\u65b0\u578b\u7684\u5185\u5b58\u5730\u5740\u968f\u673a\u5316\u7684\u589e\u5f3a\u65b9\u6848SafeHidden\uff0c\u53ef\u4ee5\u89e3\u51b3\u5185\u5b58\u5730\u5740\u968f\u673a\u5316\uff08ASLR\uff09\u7684\u4e0d\u5b89\u5168\u95ee\u9898\u3002\n\u5f85\u89e3\u51b3\u95ee\u9898 \u5148\u6765\u4ecb\u7ecd\u4e0b\u5185\u5b58\u5730\u5740\u968f\u673a\u5316\u6280\u672f,\u8fd9\u4e2a\u6280\u672f\uff0c\u53ef\u4ee5\u770b\u4e00\u4e0b\u8fd9\u4e2aASLR\u3002\u4e00\u4e9b\u653b\u51fb\uff0c\u6bd4\u5982return-oriented programming (ROP)\u4e4b\u7c7b\u7684\u4ee3\u7801\u590d\u7528\u653b\u51fb\uff0c\u4f1a\u8bd5\u56fe\u5f97\u5230\u88ab\u653b\u51fb\u8005\u7684\u5185\u5b58\u5e03\u5c40\u4fe1\u606f\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u77e5\u9053\u4ee3\u7801\u6216\u8005\u6570\u636e\u653e\u5728\u54ea\u91cc\uff0c\u6765\u5b9a\u4f4d\u5e76\u8fdb\u884c\u653b\u51fb\u3002\u6bd4\u5982\u53ef\u4ee5\u627e\u5230ROP\u91cc\u9762\u7684gadget\u3002\u800cASLR\u8ba9\u8fd9\u4e9b\u5185\u5b58\u533a\u57df\u968f\u673a\u5206\u5e03\uff0c\u6765\u63d0\u9ad8\u653b\u51fb\u8005\u6210\u529f\u96be\u5ea6\uff0c\u8ba9\u4ed6\u4eec\u53ea\u80fd\u901a\u8fc7\u731c\u731c\u731c\u6765\u8fdb\u884c\u4e0d\u65ad\u8bd5\u9519\u7684\u653b\u51fb(\u7406\u60f3\u72b6\u51b5\u4e0b)\u3002\u4e0b\u56fe\u4e3e\u4e86\u4e2a\u4f8b\u5b50\u3002\n\u4f46\u662fASLR\u5df2\u7ecf\u4e0d\u518d\u5b89\u5168\uff0c\u6709\u591a\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5bf9\u5b83\u53d1\u8d77\u653b\u51fb\u3002\u5982\uff1a\n\u653b\u51fb\u65b9\u5f0f CROP Attack[NDSS 16]: \u4f7f\u7528\u9519\u8bef\u5904\u7406\u673a\u5236\u7ed5\u8fc7\u8bfb\u53d6\u5b89\u5168\u533a\u7684crash\u3002 \u514b\u9686\u63a2\u6d4b\u653b\u51fb[S&amp;P 14]: \u901a\u8fc7\u63a2\u6d4b\u5b50\u8fdb\u7a0b\u6765\u907f\u514d\u8ba9\u7236\u8fdb\u7a0bcrash\u3002 \u4e0d\u65ad\u514b\u9686\u5b89\u5168\u533a[Secruity 16]: \u4e0d\u65ad\u5206\u53d1\u7ebf\u7a0b\u7684\u5b89\u5168\u533a\uff0c\u901a\u8fc7\u4e0d\u65ad\u5f00\u542f\u65b0\u7ebf\u7a0b\u3002 \u901a\u8fc7\u586b\u8865\u5185\u5b58\u533a\u7a7a\u767d[Security 16]: \u4e0d\u65ad\u5206\u53d1\u5185\u5b58\u5360\u6ee1\u672a\u6620\u5c04\u7684\u533a\u57df\u3002 \u5bf9\u9875\u8868\u8fdb\u884c\u653b\u51fb \u4e4b\u524d\u65b9\u6848\u4e0d\u8db3 \u653b\u51fb\u6a21\u578b \u5047\u8bbe\u8fd9\u79cd\u57fa\u4e8e\u4fe1\u606f\u9690\u85cf\u7684\u65b9\u5f0f\u80fd\u591f\u6709\u6548\u4fdd\u62a4\u4e00\u4e2a\u5305\u542b\u6f0f\u6d1e\u7684\u7a0b\u5e8f\uff0c\u4f7f\u5176\u907f\u514d\u4ee3\u7801\u91cd\u7528\u653b\u51fb\uff08\u5982web\u670d\u52a1\u5668\u6216\u6d4f\u89c8\u5668\uff09\u3002 \u8fd9\u79cd\u57fa\u4e8e\u4fe1\u606f\u9690\u85cf\u7684\u9632\u5fa1\u6ca1\u6709\u6f0f\u6d1e\u3002 \u653b\u51fb\u8005\u7684\u80fd\u529b \u8bfb\u5199\u4efb\u610f\u5185\u5b58\u4f4d\u7f6e \u5206\u914d\u548c\u91ca\u653e\u4efb\u610f\u5185\u5b58\u533a\u57df \u521b\u5efa\u4efb\u610f\u6570\u91cf\u7684\u8fdb\u7a0b \u653b\u51fb\u7c7b\u578b \u6536\u96c6\u5185\u5b58\u5e03\u5c40\u4fe1\u606f\u4ee5\u5e2e\u52a9\u627e\u5230\u5b89\u5168\u533a\u57df \u521b\u5efa\u63a2\u6d4b\u673a\u4f1a\u800c\u4e0d\u4f1a\u4f7f\u7cfb\u7edf\u5d29\u6e83 \u51cf\u5c11\u968f\u673a\u5b89\u5168\u533a\u57df\u4f4d\u7f6e\u7684\u71b5 \u4f7f\u7528\u7f13\u5b58\u4fa7\u901a\u9053\u76d1\u63a7\u9875\u8868\u8bbf\u95ee\u6a21\u5f0f \u89e3\u51b3\u65b9\u6848 \u4f7f\u7528SafeHidden\u6765\u963b\u6b62\u8fd9\u4e9b\u653b\u51fb\u65b9\u5f0f\u3002 \u4fee\u6539\u53ef\u80fd\u6cc4\u6f0f\u4f4d\u7f6e\u7684\u6240\u6709\u7c7b\u578b\u7684\u63a2\u9488 \u5728\u68c0\u6d4b\u5230\u53ef\u7591\u63a2\u9488\u65f6\u968f\u673a\u5316\u5b89\u5168\u533a\u57df \u9694\u79bb\u7ebf\u7a0b\u672c\u5730\u5b89\u5168\u533a\u57df \u68c0\u6d4b\u5230\u975e\u6cd5\u63a2\u6d4b\u65f6\u5f15\u53d1\u5b89\u5168\u8b66\u62a5 \u5bf9\u4e8e\u653b\u51fb\u7c7b\u578b1 \u653b\u51fb\u7c7b\u578b1\u662f\u6536\u96c6\u5185\u5b58\u5e03\u5c40\u4fe1\u606f\u4ee5\u5e2e\u52a9\u627e\u5230\u5b89\u5168\u533a\u57df\u3002\n\u5bf9\u4e8e\u653b\u51fb\u7c7b\u578b2 \u653b\u51fb\u7c7b\u578b2\u662f\u521b\u5efa\u63a2\u6d4b\u673a\u4f1a\u800c\u4e0d\u4f1a\u4f7f\u7cfb\u7edf\u5d29\u6e83\u3002\n\u5bf9\u4e8e\u653b\u51fb\u7c7b\u578b3 \u653b\u51fb\u7c7b\u578b3\u662f\u51cf\u5c11\u968f\u673a\u5b89\u5168\u533a\u57df\u4f4d\u7f6e\u7684\u71b5\u3002\nSafeHidden\u53ef\u4ee5\u9632\u6b62\u672a\u6620\u5c04\u533a\u57df\u7684\u65e0\u9650\u7f29\u5c0f\u5b89\u5168\u533a\u57df\u4e0d\u53d7\u9650\u5236\u5730\u589e\u957f\u3002\n\u6620\u5c04\u533a\u57df\u7684\u6700\u5927\u5927\u5c0f\u8bbe\u7f6e\u4e3a64 TB\u3002 \u4f7f\u7528\u7ebf\u7a0b\u4e13\u7528\u5185\u5b58\u673a\u5236\u9694\u79bb\u7ebf\u7a0b\u672c\u5730\u5b89\u5168\u533a\u57df\u3002 \u4e0d\u4f1a\u51cf\u5c11\u71b5\u3002 \u4f7f\u7528\u786c\u4ef6\u8f85\u52a9\u865a\u62df\u5316\u6280\u672f \u6bcf\u4e2a\u7ebf\u7a0b\u5c06\u88ab\u5206\u914d\u4e00\u4e2a\u7ebf\u7a0b\u4e13\u7528EPT\uff08\u6269\u5c55\u9875\u8868\uff09 \u5bf9\u4e8e\u653b\u51fb\u7c7b\u578b4 \u653b\u51fb\u7c7b\u578b4\u4f7f\u7528\u7f13\u5b58\u4fa7\u901a\u9053\u76d1\u63a7\u9875\u8868\u8bbf\u95ee\u6a21\u5f0f\u3002\n\u5b83\u9700\u8981\u6570\u767e\u4e2aPrime + Probe\u6216Evict + Time\u6d4b\u8bd5\u3002\nPTE\u7684\u5730\u5740\u5bf9\u5e94\u4e8e\u6b64\u4e5f\u662f\u5fc5\u8981\u7684\u5185\u5b58\u533a\u57df\u4e0d\u4f1a\u6539\u53d8\u3002\n\u8fd9\u4e9bPTE\u6620\u5c04\u7684\u7f13\u5b58\u6761\u76ee\u4e0d\u4f1a\u66f4\u6539\u3002\nSafeHidden\u8fd8\u76d1\u63a7\u5bf9\u53ef\u80fd\u7684\u7531\u653b\u51fb\u8005\u6545\u610f\u89e6\u53d1\u7684\u5bf9\u5b89\u5168\u533a\u57df\u7684\u5408\u6cd5\u8bbf\u95ee\u3002\n\u4e00\u65e6\u68c0\u6d4b\u5230\u8fd9\u6837\u7684\u5408\u6cd5\u8bbf\u95ee\uff0c\u5b89\u5168\u9690\u85cf\u5c06\u968f\u673a\u5316\u5b89\u5168\u533a\u57df\u7684\u4f4d\u7f6e\u3002\n\u5bf9\u9875\u8868\u7f13\u5b58\u4fa7\u901a\u9053\u653b\u51fb\u7684\u5173\u952e\u6b65\u9aa4\u662f\u5f3a\u5236\u9875\u8868\u884c\u8d70\u3002\n\u5c06TLB miss\u8f6c\u4e3a\u9875\u9519\u8bef \u8bbe\u7f6e\u4fdd\u7559\u4f4d\u540e\uff0c\u5c06\u5728\u9875\u8868\u884c\u8d70\u671f\u95f4\u89e6\u53d1\u9875\u9762\u9519\u8bef\u5f02\u5e38\u3002 \u8bbe\u7f6e\u4fdd\u7559\u4f4d\u540e\uff0c\u5c06\u5728\u9875\u8868\u884c\u8d70\u671f\u95f4\u89e6\u53d1\u9875\u9762\u9519\u8bef\u5f02\u5e38\u3002 \u5f53TLB\u672a\u547d\u4e2d\u65f6\uff0c\u5b83\u5c06\u88ab\u6355\u83b7\u5230pf\u5904\u7406\u7a0b\u5e8f\u4e2d\u3002 \u9875\u8868\u9519\u8bef\u5904\u7406\u5668\u7684\u6d41\u7a0b\u56fe \u7cfb\u7edf\u6574\u4f53\u8bbe\u8ba1 \u6548\u679c \u5b9e\u9a8c\u73af\u5883 X86_64\/Linux SafeHidden\u4fdd\u62a4\u4e24\u4e2a\u4f7f\u7528IH\u7684\u9632\u5fa1\u3002 \u5f71\u5b50\u5806\u6808\u548cO-CFI\u3002 \uff05gs\u6307\u5411\u5b89\u5168\u533a\u57df \u8bc4\u5206\u6807\u51c6 CPU\u5bc6\u96c6\u578b\u57fa\u51c6\u6d4b\u8bd5\uff1aSPEC CPU2006\u548c\u591a\u7ebf\u7a0bParsec-2.1\u3002 \u7f51\u7edcI\/O\uff1a\u591a\u4e2a\u8fdb\u7a0bNginx\u548c\u591a\u7ebf\u7a0bApache\u3002 \u78c1\u76d8I\/O\uff1aBonnie ++\u57fa\u51c6\u6d4b\u8bd5\u5de5\u5177 \u6027\u80fd\u8bc4\u4ef7 CPU\u5bc6\u96c6\u578b\u57fa\u51c6\u6d4b\u8bd5 SPEC CPU2006 benchmark with ref input Incurred 2.75% and 2.76% when protecting O-CFI and Shadow Stack. Multi-threaded Parsec-2.1 benchmark with native input Incurred 5.78% and 6.44% when protecting O-CFI and Shadow Stack. \u5728\u7f51\u7edcI\/O\u548c\u78c1\u76d8I\/O\u4e5f\u90fd\u4ea7\u751f\u4e86\u4e00\u5b9a\u7684\u6027\u80fd\u635f\u8017\uff0c\u4f46\u90fd\u4e0d\u8d85\u8fc715%\n\u601d\u8003 \u6536\u83b7 SafeHidden\u63d0\u51fa\u4e86\u9488\u5bf9\u6240\u6709\u5df2\u77e5\u653b\u51fb\u7684\u57fa\u4e8e\u91cd\u65b0\u968f\u673a\u5316\u7684IH\u6280\u672f\u3002 SafeHidden\u5f15\u5165\u4e86\u7ebf\u7a0b\u4e13\u7528\u5185\u5b58\u7684\u4f7f\u7528\u6765\u9694\u79bb\u7ebf\u7a0b\u672c\u5730\u5b89\u5168\u533a\u57df\u3002 \u5b83\u8bbe\u8ba1\u4e86\u4e00\u79cd\u68c0\u6d4bTLB\u672a\u547d\u4e2d\u7684\u65b0\u6280\u672f\u3002 \u4e0d\u8db3\u4e4b\u5904 \u6709\u51e0\u70b9\u7591\u95ee\uff0c\u8fd9\u7bc7\u8bba\u6587\u7684\u6838\u5fc3\u601d\u60f3\u662f\u589e\u52a0\u91cd\u968f\u673a\u5316\uff0c\u6240\u4ee5\u76d1\u63a7\u4e86\u5f88\u591a\u4e2a\u70b9\uff0c\u591a\u589e\u52a0\u4e86\u5f88\u591a\u7684\u968f\u673a\u5316\u7684\u4e1c\u897f\uff0c\u6bd4\u5982\u5728\u76d1\u63a7\u5230\u7a0b\u5e8f\u8fdb\u884c\u975e\u6b63\u5e38\u7684\u5185\u5b58\u8bfb\u5199\uff0c\u76d1\u63a7\u5230\u9875\u8868\u5f02\u5e38\u65f6\uff0c\u770b\u8d77\u6765\u5e76\u6ca1\u6709\u7279\u522b\u5927\u7684\u521b\u65b0\u70b9\u3002\n\u53ef\u6269\u5c55\u7ed3\u5408\u7684\u70b9 \u8be5\u8bba\u6587\u5bf9\u4e8e\u8ba1\u7b97\u673a\u4f53\u7cfb\u673a\u6784\u5e95\u5c42\u7684\u8ba4\u8bc6\uff0c\u503c\u5f97\u5b66\u4e60\u3002\n\u5728PPT\u5236\u4f5c\u4e0a\uff0c\u65e2\u8981\u7b80\u5355\u660e\u4e86\uff0c\u8fd8\u53ef\u4ee5\u751f\u52a8\u4e00\u4e9b\uff0c\u8fd9\u4e2a\u4e0a\u52a0\u4e86\u4e00\u4e9b\u732b\u6349\u8001\u9f20\u7684\u56fe\uff0c\u5f88\u597d\u3002\n\u8bba\u6587\u8bc4\u4ef7 \u8bc4\u5206 \u6ee1\u52065\n\u2b50\u2b50\u2b50\u2b50\n\u8bc4\u4ef7 \u7ed94\u661f\u662f\u7531\u4e8e\u672c\u8bba\u6587\u548c\u6211\u5f53\u524d\u7684\u5de5\u4f5c\u53ef\u7ed3\u5408\u6027\u4e0d\u5927\uff0c\u8be5\u8bba\u6587\u5bf9\u8ba1\u7b97\u673a\u4f53\u7cfb\u7ed3\u6784\u5e95\u5c42\u6709\u7740\u5f88\u6df1\u523b\u7684\u4e86\u89e3\u3002\u6b64\u8bba\u6587\u7684\u4f5c\u8005\u6765\u81ea\u4e2d\u79d1\u9662\u8ba1\u7b97\u6240\u8ba1\u7b97\u673a\u4f53\u7cfb\u7ed3\u6784\u56fd\u5bb6\u91cd\u70b9\u5b9e\u9a8c\u5ba4\uff0c\u8be5\u5b9e\u9a8c\u5ba4\u5bf9\u4e8e\u8ba1\u7b97\u673a\u5e95\u5c42\u7684\u5b9e\u73b0\u6709\u7740\u5341\u5206\u6df1\u523b\u7684\u4e86\u89e3\uff0c\u6240\u4ee5\u80fd\u591f\u5199\u51fa\u8fd9\u6837\u7684\u8bba\u6587\u3002\u672c\u4eba\u624d\u758f\u5b66\u6d45\uff0c\u5bf9\u4e8e\u8ba1\u7b97\u673a\u4f53\u7cfb\u7ed3\u6784\u5e95\u5c42\u7684\u4e1c\u897f\u5e76\u6ca1\u6709\u8fd9\u4e48\u6df1\u523b\u7684\u4f53\u4f1a\uff0c\u6240\u4ee5\u53ea\u662f\u80fd\u770b\u51fa\u6765\u672c\u8bba\u6587\u597d\uff0c\u4f46\u662f\u5bf9\u4e8e\u5b83\u6700\u5927\u4f18\u52bf\u5e76\u6ca1\u6709\u592a\u6df1\u611f\u609f\u3002\n\u53c2\u8003 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190905-safehidden\/","summary":"<h1 id=\"safehidden-an-efficient-and-secure-information\">SafeHidden: An Efficient and Secure Information<\/h1>\n<h1 id=\"\u6982\u89c8\">\u6982\u89c8<\/h1>\n<h2 id=\"\u6458\u8981\">\u6458\u8981<\/h2>\n<h3 id=\"\u4e2d\u6587\u7ffb\u8bd1\">\u4e2d\u6587\uff08\u7ffb\u8bd1\uff09<\/h3>\n<p>\u5728\u4f17\u591a\u4ee3\u7801\u91cd\u7528\u653b\u51fb\u7684\u9632\u5fa1\u624b\u6bb5\u4e2d\uff0c\u4fe1\u606f\u9690\u85cf(Information Hiding,IH)\u7531\u4e8e\u5176\u6709\u6548\u6027\u548c\u9ad8\u6027\u80fd\uff0c\u6210\u4e3a\u9632\u5fa1\u624b\u6bb5\u7684\u4e00\u4e2a\u91cd\u8981\u7ec4\u6210\u6a21\u5757,\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5982\u4ee3\u7801\u6307\u9488\u5b8c\u6574\u6027(CPI)\uff0c\u63a7\u5236\u6d41\u5b8c\u6574\u6027(CFI)\u548c\u7ec6\u7c92\u5ea6\u7684\u4ee3\u7801\u91cd\u968f\u673a\u5316\u3002\u5b83\u4f7f\u7528\u968f\u673a\u5316\u5b9e\u73b0\u6709\u6982\u7387\u7684\u9690\u85cf\u7cfb\u7edf\u7684\u5173\u952e\u5185\u5b58\u533a\u57df\uff0c\u4e5f\u6210\u4e3a\u5b89\u5168\u533a\u3002\u8be5\u533a\u57df\u4e0d\u80fd\u88ab\u4efb\u4f55\u6307\u9488\u76f4\u63a5\u8bbf\u95ee\uff0c\u53ef\u4ee5\u963b\u6b62\u653b\u51fb\u8005\u7684\u653b\u51fb\u884c\u4e3a\u3002\u8fd9\u4e9b\u9632\u5fa1\u624b\u6bb5\u4f7f\u7528\u5b89\u5168\u533a\u6765\u4fdd\u62a4\u975e\u5e38\u91cd\u8981\u7684\u6570\u636e\uff0c\u5982\u8df3\u8f6c\u76ee\u6807\u548c\u968f\u673a\u5316\u7684\u5bc6\u7801\u3002\u7136\u800c\uff0c\u6700\u8fd1\u7684\u7814\u7a76\u8868\u660eIH\u5728\u5f88\u591a\u653b\u51fb\u624b\u6bb5\u4e0b\u4e0d\u518d\u5b89\u5168\u3002\n\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u63d0\u51fa\u4e00\u79cd\u65b0\u7684IH\u6280\u672f\uff0c\u79f0\u4e4b\u4e3aSafeHidden\u3002 \u5b83\u80fd\u6301\u7eed\u91cd\u968f\u673a\u5316\u5b89\u5168\u533a\u7684\u4f4d\u7f6e\uff0c\u7ec4\u7ec7\u653b\u51fb\u8005\u63a2\u7d22\u548c\u63a8\u7406\u5185\u5b58\u5e03\u5c40\u6765\u5bfb\u627e\u5b89\u5168\u533a\u7684\u4f4d\u7f6e\u3002\u672c\u6587\u63d0\u51fa\u4e00\u79cd\u65b0\u7684\u7ebf\u7a0b\u79c1\u6709\u7684\u5185\u5b58\u673a\u5236\uff0c\u8be5\u673a\u5236\u53ef\u4ee5\u8ba9\u7ebf\u7a0b\u672c\u5730\u7684\u5b89\u5168\u533a\u5b64\u7acb\u5316\uff0c\u907f\u514d\u653b\u51fb\u8005\u901a\u8fc7\u968f\u673a\u71b5\u51cf\u5c11\u53d1\u8d77\u653b\u51fb\u3002\u5b83\u4e5f\u53ef\u4ee5\u5728TLB\uff08\u9875\u8868\uff09\u7f3a\u5931\u540e\u968f\u673a\u5316\u5b89\u5168\u533a\uff0c\u6765\u907f\u514d\u653b\u51fb\u8005\u4f7f\u7528\u57fa\u4e8ecache\u4fa7\u4fe1\u9053\u63a8\u7406\u5b89\u5168\u533a\u7684\u4f4d\u7f6e\u3002\u73b0\u6709\u7684\u57fa\u4e8e\u4fe1\u606f\u9690\u85cf\u7684\u9632\u5fa1\u65b9\u6cd5\u65e0\u9700\u4fee\u6539\u4e5f\u80fd\u4f7f\u7528SafeHidden\u6280\u672f\u3002\u5b9e\u9a8c\u8868\u660eSafeHidden\u4e0d\u4ec5\u53ef\u4ee5\u6709\u6548\u907f\u514d\u5df2\u6709\u7684\u653b\u51fb\u624b\u6bb5\uff0c\u5e76\u4e14\u5e26\u6765\u7684\u6027\u80fd\u635f\u8017\u4e5f\u6781\u5c0f\u3002<\/p>\n<h3 id=\"\u82f1\u6587\">\u82f1\u6587<\/h3>\n<p>Information hiding (IH) is an important building block for many defenses against code reuse attacks, such as code-pointer integrity (CPI), control-flow integrity (CFI) and fine-grained code (re-)randomization, because of its effectiveness and performance. It employs randomization to probabilistically &lsquo;&lsquo;hide&rsquo;&rsquo; sensitive memory areas, called safe areas, from attackers and ensures their addresses are not leaked by any pointers directly. These defenses used safe areas to protect their critical data, such as jump targets and randomization secrets. However, recent works have shown that IH is vulnerable to various attacks.<\/p>","title":"\u3010\u8bba\u6587\u7b14\u8bb0\u3011SafeHidden: An Efficient and Secure Information Hiding Technique Using Re-randomization"},{"content":"\u9700\u6c42\u63cf\u8ff0 Hugo\u662f\u4e00\u4e2a\u9759\u6001\u7f51\u7ad9\u751f\u6210\u5de5\u5177\uff0c\u5982\u679c\u6bcf\u6b21\u90fd\u8981\u624b\u52a8\u7f16\u8bd1\u7136\u540e\u4e0a\u4f20\u7740\u5b9e\u9ebb\u70e6\uff0c\u5982\u679c\u80fd\u6bcf\u6b21\u7f16\u8f91\u5b8c\u63d0\u4ea4\u4e4b\u540e\u4f7f\u7528\u81ea\u52a8\u5316\u8fd0\u7ef4\u81ea\u52a8\u751f\u6210\u5bf9\u5e94\u7684\u7f51\u7ad9\uff0c\u5219\u56de\u975e\u5e38\u65b9\u4fbf\u3002\ntravis\u5219\u63d0\u4f9b\u4e86\u8fd9\u6837\u4e00\u4e2a\u81ea\u52a8\u5316\u8fd0\u7ef4\u7684\u529f\u80fd\uff0c\u800c\u4e14\u5bf9github\u7684\u5f00\u6e90\u5de5\u7a0b\u662f\u514d\u8d39\u7684\uff0c\u548cGitHub\u80fd\u8f83\u597d\u7684\u96c6\u6210\u3002\n\u4f7f\u7528travis\u914d\u7f6e\u81ea\u52a8\u5316\u90e8\u7f72\u9700\u8981\u5982\u4e0b\u51e0\u6b65\uff1a\n\u6b65\u9aa4\u8bf4\u660e \u5efa\u7acbhugo \u9879\u76ee\u5206\u652f blog\u5206\u652f\u4e2d\u914d\u7f6e.travis.yml \u7533\u8bf7github key \u5728travis\u4e0a\u914d\u7f6e \u4e0b\u9762\u5f00\u59cb\u8be6\u7ec6\u53d9\u8ff0\u3002\n\u5efa\u7acbhugo \u9879\u76ee\u5206\u652f hugo new site blog cd blog git init git remote add origin git@github.com:m2kar\/m2kar.github.io.git git checkout -b blog git add . git commit -m &#34;first commit&#34; git push -u origin blog \u7136\u540e\u5728github\u7684\u9879\u76ee\u8bbe\u7f6e\u4e2d\u628ablog\u8bbe\u7f6e\u4e3a\u4e3b\u5206\u652f\u3002\n\u5176\u4ed6\u7ec6\u8282\u53ef\u4ee5\u53c2\u8003: https:\/\/mogeko.me\/2018\/018\/ \u4e0d\u518d\u8d58\u8ff0\u3002\nblog\u5206\u652f\u4e2d\u914d\u7f6e.travis.yml language: go branches: only: - blog # \u8bbe\u7f6e\u81ea\u52a8\u5316\u90e8\u7f72\u7684\u6e90\u7801\u5206\u652f - 2-travis-auto-depoly # test for travis # cache this directory cache: directories: - themes # - public #- themes \u4e3b\u9898\u6ca1\u6709\u66f4\u6539\u65f6\u53ef\u4ee5\u7f13\u5b58 before_install: - export TZ=&#39;Asia\/Shanghai&#39; # \u8bbe\u7f6e\u65f6\u533a #- npm install -g hexo #- npm install -g hexo-cli # \u5b89\u88c5\u4f9d\u8d56\u7ec4\u4ef6 install: - wget https:\/\/github.com\/gohugoio\/hugo\/releases\/download\/v0.51\/hugo_0.51_Linux-64bit.tar.gz - tar -xzvf hugo_0.51_Linux-64bit.tar.gz - chmod +x hugo - export PATH=$PATH:$PWD - hugo version #- git clone -b ${TRAVIS_BRANCH} --recursive https:\/\/github.com\/m2kar.github.io.git #- cd m2kar.github.io - git log -p -2 | cat - commit_msg=$(git log -n1 --pretty=format:&#34;%s&#34;) - git clone --recursive -b master https:\/\/${GH_APIKEY}@github.com\/m2kar\/m2kar.github.io.git public - rm -rf public\/* script: - hugo -t even - cp CNAME public\/ - pushd public - git add . - git commit -m &#34;auto depoly ${commit_msg} &#34; - git push - echo &#34;depoly done&#34; \u53c2\u89c1\uff1a https:\/\/github.com\/m2kar\/m2kar.github.io\/blob\/blog\/.travis.yml\n\u7533\u8bf7github key \u5728 https:\/\/github.com\/settings\/tokens \u7533\u8bf7\u4e00\u4e2atoken,\u5e76\u6388\u4e88\u8bbf\u95eepublic_repo\u7684\u6743\u9650\uff0c\u8bb0\u5f55\u4e0b\u6765\u8fd9\u4e2atoken\u3002\n\u5728travis\u4e0a\u914d\u7f6e \u8bbf\u95ee https:\/\/travis-ci.org \u6fc0\u6d3b &lt;\u7528\u6237\u540d&gt;.github.io \u8fd9\u4e2a\u9879\u76ee\u3002 \u5728setting\u4e2d\u6253\u5f00&quot;Build pushed branches&quot;\u8fd9\u4e2a\u5f00\u5173 \u5728setting\u4e2d\u6dfb\u52a0\u540d\u4e3a&quot;GH_APIKEY&quot;\u7684\u73af\u5883\u53d8\u91cf,\u628a\u521a\u624d\u7533\u8bf7\u7684token\u586b\u8fdb\u53bb\uff0cBranch\u9009\u62e9blog\u5206\u652f\u3002 \u914d\u7f6e\u5b8c\u6210\u3002\n\u5728Linux\/Mac\u4e0a\u90e8\u7f72docker\u5b9e\u73b0hugo \u5728\u672c\u5730\u8fdb\u884c\u6d4b\u8bd5\u7684\u65f6\u5019\uff0c\u4e5f\u9700\u8981\u5b89\u88c5hugo\u7a0b\u5e8f\u3002\ndocker\u662f\u4e2a\u975e\u5e38\u65b9\u4fbf\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u65b9\u4fbf\u8fdb\u884c\u5404\u79cd\u7a0b\u5e8f\u7684\u90e8\u7f72\u5b89\u88c5\u3002\njguyomard\/hugo-builder \u63d0\u4f9b\u4e86\u4e00\u4e2a\u5c01\u88c5\u5b8c\u597d\u7684hugo\u5de5\u5177\u3002\n\u751f\u6210\u7f51\u7ad9 docker run --rm -it -v $PWD:\/src -u ${UID}:hugo jguyomard\/hugo-builder hugo \u542f\u52a8hugo\u670d\u52a1\u5668\u5e76\u6620\u5c04\u52301313\u7aef\u53e3 docker run --rm -it -v $PWD:\/src -u ${UID}:hugo -p 1313:1313 jguyomard\/hugo-builder hugo server --bind 0.0.0.0 \u4f7f\u7528alias\u65b9\u4fbf\u8c03\u7528 \u628a\u4e0b\u9762\u4e24\u884c\u653e\u5230.zshrc\u6587\u4ef6\u4e2d\nalias hugo=&#34;docker run --rm -it -v $PWD:\/src -u ${UID}:hugo jguyomard\/hugo-builder hugo&#34; alias hugo-server=&#34;docker run --rm -it -v $PWD:\/src -u ${UID}:hugo -p 1313:1313 jguyomard\/hugo-builder hugo server --bind 0.0.0.0&#34; \u6267\u884csource ~\/.zshrc\n\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190821-deploy-use-travis-ci\/","summary":"","title":"\u4f7f\u7528Travis-CI\u90e8\u7f72Hugo\uff0c\u5b9e\u73b0\u81ea\u52a8\u5316\u90e8\u7f72"},{"content":"\u6b22\u8fce\u6765\u5230\u65b0\u535a\u5ba2 m2kar.github.io \u6b22\u8fce\u6765\u5230\u65b0\u535a\u5ba2 m2kar.github.io\n\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20190815-new-bolg\/","summary":"<h2 id=\"\u6b22\u8fce\u6765\u5230\u65b0\u535a\u5ba2-m2kargithubio\">\u6b22\u8fce\u6765\u5230\u65b0\u535a\u5ba2 m2kar.github.io<\/h2>\n<p>\u6b22\u8fce\u6765\u5230\u65b0\u535a\u5ba2 m2kar.github.io<\/p>\n<hr>\n<ul>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"[Life] \u6b22\u8fce"},{"content":"\u80cc\u666f \u672c\u9898\u76ee\u60f3\u5b9e\u73b0\u9012\u5f52\u89e3\u538b\u5e76\u5bf9\u538b\u7f29\u5305\u5185\u7684\u6570\u5b57\u6c42\u548c\u3002 \u672c\u9898\u76ee\u6765\u81ea\u4e2d\u56fd\u79d1\u5b66\u9662\u5927\u5b66\uff0c\u7b97\u6cd5\u6982\u8bba\u8bfe\u540e\u4f5c\u4e1a02 \u6e90\u6587\u4ef6 \u3002\nExercise (2). \u5b9a\u4e49\u6587\u4ef6xx.tar.gz \u7684\u4ea7\u751f\u65b9\u5f0f\u5982\u4e0b\uff1a\n\u4ee5xx \u4e3a\u6587\u4ef6\u540d\u7684\u6587\u4ef6\u901a\u8fc7tar \u548cgzip \u6253\u5305\u538b\u7f29\u4ea7\u751f\uff0c\u8be5\u6587\u4ef6\u4e2d\u4ee5\u5b57\u7b26\u4e32\u7684\u65b9\u5f0f\u8bb0\u5f55 \u4e86\u4e00\u4e2a\u975e\u8d1f\u6574\u6570\uff1b \u6216\u8005\u4ee5xx \u4e3a\u540d\u7684\u76ee\u5f55\u901a\u8fc7tar \u548cgzip \u6253\u5305\u538b\u7f29\u4ea7\u751f\uff0c\u8be5\u76ee\u5f55\u4e2d\u5305\u542b\u82e5\u5e72xx.tar.gz\u3002 \u5176\u4e2d\uff0cx 2 [0, 9]\u3002\n\u73b0\u7ed9\u5b9a\u4e00\u4e2a\u6839\u636e\u4e0a\u8ff0\u5b9a\u4e49\u751f\u6210\u7684\u6587\u4ef600.tar.gz (\u8be5\u6587\u4ef6\u4ece\u8bfe\u7a0b\u7f51\u7ad9 \u4e0b\u8f7d)\uff0c\u8bf7\u786e\u5b9a\u5176\u4e2d\u5305\u542b\u7684\u4ee5xx \u4e3a\u6587\u4ef6\u540d\u7684\u6587\u4ef6\u4e2a\u6570\u4ee5\u53ca\u8fd9\u4e9b\u6587\u4ef6\u4e2d\u6240\u8bb0\u5f55\u7684\u975e\u8d1f\u6574\u6570\u4e4b\u548c\u3002 00.tar.gz \u4e0b\u8f7d\u94fe\u63a5\uff1ahttps:\/\/download.csdn.net\/download\/still_night\/10820211\n\u4ee3\u7801\u5b9e\u73b0\uff08Python\uff09 import os,tarfile def unpack_path_file(pathname): archive = tarfile.open(pathname, &#39;r:gz&#39;) path=os.path.split(os.path.abspath(pathname))[0] f,n=0,0 # \u8bbe\u7f6e\u6587\u4ef6\u6570\u548c\u52a0\u548c\u4e3a0 for tarinfo in archive: archive.extract(tarinfo, path) # \u89e3\u538b\u538b\u7f29\u6587\u4ef6\u4e2d\u7684\u4e00\u4e2a\u6587\u4ef6 name=tarinfo.name # \u89e3\u538b\u7684\u6587\u4ef6\u540d tfname=os.path.join(path,tarinfo.name) # \u89e3\u538b\u540e\u7684\u6587\u4ef6\u8def\u5f84 if tarinfo.isfile(): # \u5982\u679c\u662f\u6587\u4ef6 \u5b58\u5728\u5f85\u89e3\u538b\u6587\u4ef6\u662f.\u7684\u60c5\u51b5 \u8868\u793a\u5f53\u524d\u538b\u7f29\u6587\u4ef6 if tarinfo.name.rfind(&#34;.tar.gz&#34;)!=-1: # \u5982\u679c\u4e5f\u662f\u538b\u7f29\u6587\u4ef6\uff0c\u5219\u9012\u5f52\u89e3\u538b\u5b83 f1,n1=unpack_path_file(tfname) f+=f1 n+=n1 # \u628a\u8c03\u7528\u51fd\u6570\u7684\u6587\u4ef6\u6570\u91cf\u548c\u6570\u5b57\u548c\u52a0\u4e0a\u6765 else: # \u5982\u679c\u4e0d\u662f\u538b\u7f29\u6587\u4ef6\uff0c\u5219\u662f\u6570\u636e\u6587\u4ef6\uff0c\u91cc\u9762\u542b\u6709\u975e\u8d1f\u6574\u6570 f+=1 # \u6587\u4ef6\u6570\u91cf\u52a01 with open(tfname) as fp: # \u8bfb\u51fa\u6765\u8fd9\u4e2a\u975e\u8d1f\u6574\u6570\u5e76\u52a0\u5230n\u4e0a n+=int(fp.read()) archive.close() # \u5173\u95ed\u8fd9\u4e2a\u538b\u7f29\u6587\u4ef6 return f,n # \u8fd4\u56de\u7ed9\u4e0a\u4e00\u7ea7\u6587\u4ef6\u6570\u91cf\u548c\u52a0\u548c # \u8c03\u7528\u51fd\u6570\u5f00\u59cb\u89e3\u538b unpack_path_file(&#34;00.tar.gz&#34;) \u7ed3\u679c \u6587\u4ef6\u6570\uff1a3170 \u52a0\u548c\uff1a15752491 \u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002 \u4f5c\u8005: m2kar \u6253\u8d4f\u94fe\u63a5: \u6b22\u8fce\u6253\u8d4fm2kar \u90ae\u7bb1: m2kar.cn#gmail.com \u4e3b\u9875: m2kar.cn Github: github.com\/m2kar CSDN: M2kar\u7684\u4e13\u680f ","permalink":"https:\/\/m2kar.cn\/posts\/20181124-recur-decompress\/","summary":"<h1 id=\"\u80cc\u666f\">\u80cc\u666f<\/h1>\n<p>\u672c\u9898\u76ee\u60f3\u5b9e\u73b0\u9012\u5f52\u89e3\u538b\u5e76\u5bf9\u538b\u7f29\u5305\u5185\u7684\u6570\u5b57\u6c42\u548c\u3002\n\u672c\u9898\u76ee\u6765\u81ea\u4e2d\u56fd\u79d1\u5b66\u9662\u5927\u5b66\uff0c\u7b97\u6cd5\u6982\u8bba\u8bfe\u540e\u4f5c\u4e1a02 \u6e90\u6587\u4ef6 \u3002<\/p>\n<h1 id=\"exercise-2\">Exercise (2).<\/h1>\n<p>\u5b9a\u4e49\u6587\u4ef6xx.tar.gz \u7684\u4ea7\u751f\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\u4ee5xx \u4e3a\u6587\u4ef6\u540d\u7684\u6587\u4ef6\u901a\u8fc7tar \u548cgzip \u6253\u5305\u538b\u7f29\u4ea7\u751f\uff0c\u8be5\u6587\u4ef6\u4e2d\u4ee5\u5b57\u7b26\u4e32\u7684\u65b9\u5f0f\u8bb0\u5f55\n\u4e86\u4e00\u4e2a\u975e\u8d1f\u6574\u6570\uff1b<\/li>\n<li>\u6216\u8005\u4ee5xx \u4e3a\u540d\u7684\u76ee\u5f55\u901a\u8fc7tar \u548cgzip \u6253\u5305\u538b\u7f29\u4ea7\u751f\uff0c\u8be5\u76ee\u5f55\u4e2d\u5305\u542b\u82e5\u5e72xx.tar.gz\u3002\n\u5176\u4e2d\uff0cx 2 [0, 9]\u3002<br>\n\u73b0\u7ed9\u5b9a\u4e00\u4e2a\u6839\u636e\u4e0a\u8ff0\u5b9a\u4e49\u751f\u6210\u7684\u6587\u4ef600.tar.gz (\u8be5\u6587\u4ef6\u4ece\u8bfe\u7a0b\u7f51\u7ad9\n\u4e0b\u8f7d)\uff0c\u8bf7\u786e\u5b9a\u5176\u4e2d\u5305\u542b\u7684\u4ee5xx \u4e3a\u6587\u4ef6\u540d\u7684\u6587\u4ef6\u4e2a\u6570\u4ee5\u53ca\u8fd9\u4e9b\u6587\u4ef6\u4e2d\u6240\u8bb0\u5f55\u7684\u975e\u8d1f\u6574\u6570\u4e4b\u548c\u3002<\/li>\n<\/ul>\n<blockquote>\n<p><strong>00.tar.gz<\/strong> \u4e0b\u8f7d\u94fe\u63a5\uff1a<a href=\"https:\/\/download.csdn.net\/download\/still_night\/10820211\">https:\/\/download.csdn.net\/download\/still_night\/10820211<\/a><\/p>\n<\/blockquote>\n<h1 id=\"\u4ee3\u7801\u5b9e\u73b0python\">\u4ee3\u7801\u5b9e\u73b0\uff08Python\uff09<\/h1>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-python\" data-lang=\"python\"><span class=\"line\"><span class=\"cl\"><span class=\"kn\">import<\/span> <span class=\"nn\">os<\/span><span class=\"o\">,<\/span><span class=\"nn\">tarfile<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"k\">def<\/span> <span class=\"nf\">unpack_path_file<\/span><span class=\"p\">(<\/span><span class=\"n\">pathname<\/span><span class=\"p\">):<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">archive<\/span> <span class=\"o\">=<\/span> <span class=\"n\">tarfile<\/span><span class=\"o\">.<\/span><span class=\"n\">open<\/span><span class=\"p\">(<\/span><span class=\"n\">pathname<\/span><span class=\"p\">,<\/span> <span class=\"s1\">&#39;r:gz&#39;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">path<\/span><span class=\"o\">=<\/span><span class=\"n\">os<\/span><span class=\"o\">.<\/span><span class=\"n\">path<\/span><span class=\"o\">.<\/span><span class=\"n\">split<\/span><span class=\"p\">(<\/span><span class=\"n\">os<\/span><span class=\"o\">.<\/span><span class=\"n\">path<\/span><span class=\"o\">.<\/span><span class=\"n\">abspath<\/span><span class=\"p\">(<\/span><span class=\"n\">pathname<\/span><span class=\"p\">))[<\/span><span class=\"mi\">0<\/span><span class=\"p\">]<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">f<\/span><span class=\"p\">,<\/span><span class=\"n\">n<\/span><span class=\"o\">=<\/span><span class=\"mi\">0<\/span><span class=\"p\">,<\/span><span class=\"mi\">0<\/span> <span class=\"c1\"># \u8bbe\u7f6e\u6587\u4ef6\u6570\u548c\u52a0\u548c\u4e3a0<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">for<\/span> <span class=\"n\">tarinfo<\/span> <span class=\"ow\">in<\/span> <span class=\"n\">archive<\/span><span class=\"p\">:<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">archive<\/span><span class=\"o\">.<\/span><span class=\"n\">extract<\/span><span class=\"p\">(<\/span><span class=\"n\">tarinfo<\/span><span class=\"p\">,<\/span> <span class=\"n\">path<\/span><span class=\"p\">)<\/span>   <span class=\"c1\"># \u89e3\u538b\u538b\u7f29\u6587\u4ef6\u4e2d\u7684\u4e00\u4e2a\u6587\u4ef6<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">name<\/span><span class=\"o\">=<\/span><span class=\"n\">tarinfo<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span> <span class=\"c1\"># \u89e3\u538b\u7684\u6587\u4ef6\u540d<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"n\">tfname<\/span><span class=\"o\">=<\/span><span class=\"n\">os<\/span><span class=\"o\">.<\/span><span class=\"n\">path<\/span><span class=\"o\">.<\/span><span class=\"n\">join<\/span><span class=\"p\">(<\/span><span class=\"n\">path<\/span><span class=\"p\">,<\/span><span class=\"n\">tarinfo<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"p\">)<\/span> <span class=\"c1\"># \u89e3\u538b\u540e\u7684\u6587\u4ef6\u8def\u5f84<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">        <span class=\"k\">if<\/span> <span class=\"n\">tarinfo<\/span><span class=\"o\">.<\/span><span class=\"n\">isfile<\/span><span class=\"p\">():<\/span> <span class=\"c1\"># \u5982\u679c\u662f\u6587\u4ef6 \u5b58\u5728\u5f85\u89e3\u538b\u6587\u4ef6\u662f.\u7684\u60c5\u51b5 \u8868\u793a\u5f53\u524d\u538b\u7f29\u6587\u4ef6<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">            <span class=\"k\">if<\/span> <span class=\"n\">tarinfo<\/span><span class=\"o\">.<\/span><span class=\"n\">name<\/span><span class=\"o\">.<\/span><span class=\"n\">rfind<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;.tar.gz&#34;<\/span><span class=\"p\">)<\/span><span class=\"o\">!=-<\/span><span class=\"mi\">1<\/span><span class=\"p\">:<\/span> <span class=\"c1\"># \u5982\u679c\u4e5f\u662f\u538b\u7f29\u6587\u4ef6\uff0c\u5219\u9012\u5f52\u89e3\u538b\u5b83<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">                <span class=\"n\">f1<\/span><span class=\"p\">,<\/span><span class=\"n\">n1<\/span><span class=\"o\">=<\/span><span class=\"n\">unpack_path_file<\/span><span class=\"p\">(<\/span><span class=\"n\">tfname<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">                <span class=\"n\">f<\/span><span class=\"o\">+=<\/span><span class=\"n\">f1<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">                <span class=\"n\">n<\/span><span class=\"o\">+=<\/span><span class=\"n\">n1<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">                <span class=\"c1\"># \u628a\u8c03\u7528\u51fd\u6570\u7684\u6587\u4ef6\u6570\u91cf\u548c\u6570\u5b57\u548c\u52a0\u4e0a\u6765<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">            <span class=\"k\">else<\/span><span class=\"p\">:<\/span> <span class=\"c1\"># \u5982\u679c\u4e0d\u662f\u538b\u7f29\u6587\u4ef6\uff0c\u5219\u662f\u6570\u636e\u6587\u4ef6\uff0c\u91cc\u9762\u542b\u6709\u975e\u8d1f\u6574\u6570<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">                <span class=\"n\">f<\/span><span class=\"o\">+=<\/span><span class=\"mi\">1<\/span> <span class=\"c1\"># \u6587\u4ef6\u6570\u91cf\u52a01<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">                <span class=\"k\">with<\/span> <span class=\"nb\">open<\/span><span class=\"p\">(<\/span><span class=\"n\">tfname<\/span><span class=\"p\">)<\/span> <span class=\"k\">as<\/span> <span class=\"n\">fp<\/span><span class=\"p\">:<\/span>  <span class=\"c1\"># \u8bfb\u51fa\u6765\u8fd9\u4e2a\u975e\u8d1f\u6574\u6570\u5e76\u52a0\u5230n\u4e0a<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">                    <span class=\"n\">n<\/span><span class=\"o\">+=<\/span><span class=\"nb\">int<\/span><span class=\"p\">(<\/span><span class=\"n\">fp<\/span><span class=\"o\">.<\/span><span class=\"n\">read<\/span><span class=\"p\">())<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"n\">archive<\/span><span class=\"o\">.<\/span><span class=\"n\">close<\/span><span class=\"p\">()<\/span> <span class=\"c1\"># \u5173\u95ed\u8fd9\u4e2a\u538b\u7f29\u6587\u4ef6<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\">    <span class=\"k\">return<\/span> <span class=\"n\">f<\/span><span class=\"p\">,<\/span><span class=\"n\">n<\/span>  <span class=\"c1\"># \u8fd4\u56de\u7ed9\u4e0a\u4e00\u7ea7\u6587\u4ef6\u6570\u91cf\u548c\u52a0\u548c<\/span>\n<\/span><\/span><\/code><\/pre><\/div><div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-python\" data-lang=\"python\"><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># \u8c03\u7528\u51fd\u6570\u5f00\u59cb\u89e3\u538b<\/span>\n<\/span><\/span><span class=\"line\"><span class=\"cl\"><span class=\"n\">unpack_path_file<\/span><span class=\"p\">(<\/span><span class=\"s2\">&#34;00.tar.gz&#34;<\/span><span class=\"p\">)<\/span>\n<\/span><\/span><\/code><\/pre><\/div><h2 id=\"\u7ed3\u679c\">\u7ed3\u679c<\/h2>\n<ul>\n<li>\u6587\u4ef6\u6570\uff1a3170<\/li>\n<li>\u52a0\u548c\uff1a15752491<\/li>\n<\/ul>\n<hr>\n<ul>\n<li><strong>\u7248\u6743\u58f0\u660e<\/strong>\uff1a\u672c\u6587\u4e3a m2kar \u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002<\/li>\n<li><strong>\u4f5c\u8005<\/strong>: m2kar<\/li>\n<li><strong>\u6253\u8d4f\u94fe\u63a5<\/strong>: <a href=\"http:\/\/m2kar-cn.mikecrm.com\/wy97haW\">\u6b22\u8fce\u6253\u8d4fm2kar<\/a><\/li>\n<li><strong>\u90ae\u7bb1<\/strong>: <a href=\"mailto:m2kar.cn@gmail.com\">m2kar.cn#gmail.com<\/a><\/li>\n<li><strong>\u4e3b\u9875<\/strong>: <a href=\"https:\/\/m2kar.cn\">m2kar.cn<\/a><\/li>\n<li><strong>Github<\/strong>: <a href=\"https:\/\/github.com\/m2kar\">github.com\/m2kar<\/a><\/li>\n<li><strong>CSDN<\/strong>: <a href=\"https:\/\/m2kar.blog.csdn.net\">M2kar\u7684\u4e13\u680f<\/a><\/li>\n<\/ul>","title":"[\u7b97\u6cd5] E02 \u9012\u5f52\u89e3\u538b\u5e76\u5bf9\u538b\u7f29\u5305\u5185\u7684\u6570\u5b57\u6c42\u548c"}]