{"id":3446,"date":"2018-02-06T10:53:54","date_gmt":"2018-02-06T02:53:54","guid":{"rendered":"https:\/\/dmesg.app\/?p=3446"},"modified":"2018-08-31T11:08:55","modified_gmt":"2018-08-31T03:08:55","slug":"jbls","status":"publish","type":"post","link":"https:\/\/dmesg.app\/jbls.html","title":{"rendered":"JetBrains License Server\u539f\u7406\u53ca40\u884cPython\u4ee3\u7801\u7684\u5b9e\u73b0"},"content":{"rendered":"<div  class=\"sc_act\">\u8fd9\u7bc7\u6587\u7ae0\u5728 2018\u5e7408\u670831\u65e511:08:55 \u66f4\u65b0\u4e86\u54e6~<\/div><p>Repository:<br \/>\n<a class=\"dl\" href=\"https:\/\/coding.net\/u\/BennyThink\/p\/pyJetBrains_license_server\" target=\"_blank\" rel=\"nofollow\"><i class=\"fa fa-github-alt\"><\/i>\u5f00\u6e90\u5730\u5740<\/a><\/p>\n<p><div id=\"sc_error\"><span style=\"font-size: 12pt;\">\u8b66\u544a\uff1a<\/span><br \/>\n<span style=\"font-size: 12pt;\"> \u672c\u6587\u4ec5\u4f9b\u5b66\u4e60\u53c2\u8003\uff0c\u8bf7\u52ff\u7528\u4e8e\u5176\u4ed6\u7528\u9014\u3002\u5982\u679c\u4f60\u559c\u6b22JetBrains\u7684\u4ea7\u54c1\uff0c\u8bf7\u8d2d\u4e70\u6b63\u7248\u6388\u6743\u3002<\/span><\/div><br \/>\n<div id=\"sc_blue\">\u8fd1\u671flicense server\u5347\u7ea7\uff0c\u53ef\u4ee5\u9605\u8bfb\u5b98\u65b9\u7684<a href=\"https:\/\/www.jetbrains.com\/license-server\/outdated-ls\/\" target=\"_blank\" rel=\"noopener\">\u8fd9\u7bc7\u6587\u7ae0<\/a>\uff0c\u57282018.2.1\uff082018\u5e74\u7b2c\u4e09\u5b63\u5ea6\u5de6\u53f3\u53d1\u5e03\uff09\u4e4b\u540e\u65e7\u7248\u670d\u52a1\u5668\u5c06\u65e0\u6cd5\u4f7f\u7528\uff0c\u6240\u4ee5\u5148\u522b\u5347\u7ea7\u52302018.2.1\uff0c\u7559\u57282018.2\u5427\u3002\u5173\u4e8e\u65b0\u7684\u6fc0\u6d3b\u670d\u52a1\u5668\uff0c\u4f3c\u4e4e\u6709\u70b9\u96be\u5ea6\uff0c\u6b22\u8fce\u5404\u4f4d\u63d0\u4f9b\u4efb\u4f55\u53ef\u80fd\u4f1a\u6709\u5e2e\u52a9\u7684\u8d44\u6599\u548c\u5de5\u5177\uff08\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\u672c\u5730\u6fc0\u6d3b\u5668\uff0clicense server\uff0c\u4ee5\u53ca\u76f8\u5173\u4ecb\u7ecd\u6587\u7ae0\u548c\u6293\u5305\u8bb0\u5f55\u7b49\uff09\uff0c\u66f4\u591a\u8be6\u60c5\u8bf7\u53c2\u8003\u6587\u672b\u8bb0\u5f55<\/div><\/p>\n<p><span style=\"font-size: 12pt;\">\u4f30\u8ba1\u662f\u4e2a\u7a0b\u5e8f\u5458\u90fd\u5e94\u8be5\u4f7f\u7528\u8fc7<a href=\"https:\/\/www.jetbrains.com\/\" target=\"_blank\" rel=\"noopener\">JetBrains<\/a>\u7684IDE\uff08\u5c24\u5176\u662fPython\u7a0b\u5e8f\u5458\u5427\uff09\u3002JetBrains\u7684\u4ea7\u54c1\u7ebf\u975e\u5e38\u4e30\u5bcc\uff0cPHP\u7684PHPStorm\uff0c\u524d\u7aef\u7684Webstorm\uff0cPython\u7684Pycharm\uff0cJava\u7684IntelliJ\uff0cRuby\u7684RubyMine\uff0cGo\u7684Goland\uff0c\u6570\u636e\u5e93\u7684DataGrip\u2026\u2026<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u51e0\u4e2a\u6708\u4e4b\u524d\uff0c\u6211\u66fe\u7ecf\u5c1d\u8bd5\u7740\u628aJava\u7248\u672c\u7684License Server \u79fb\u690d\u5230Python\uff0c\u4f46\u662f\u5931\u8d25\u4e86\u3002\u4f46\u662f\u4eca\u5929\u6211\u5c31\u6210\u529f\u4e86\u2026\u2026\u597d\u4e86\u4e0d\u5e9f\u8bdd\u4e86\uff0c\u54b1\u6765\u4e00\u6b65\u4e00\u6b65\u7684\u5b66\u4e60\u4e0b\u600e\u4e48\u752840\u884c\u4ee3\u7801\u5199\u4e00\u4e2aJetBrains License Server<\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">JetBrains License Server\u6fc0\u6d3b\u6d41\u7a0b<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">\u6253\u5f00IDE\uff0c\u4f9d\u6b21\u70b9\u51fbHelp-Register\uff0c\u8f93\u5165\u670d\u52a1\u5668\u5730\u5740\uff0c\u70b9\u51fbActivate<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/2018020602360796.png\" alt=\"JetBrains License Server\u539f\u7406\u53ca40\u884cPython\u4ee3\u7801\u7684\u5b9e\u73b0\" title=\"JetBrains License Server\u539f\u7406\u53ca40\u884cPython\u4ee3\u7801\u7684\u5b9e\u73b0\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u8fd9\u65f6\u5c31\u4f1a\u4ece License Server\u53d6\u5f97\u4e00\u4e2aTicket\u4e86\u3002<\/span><\/p>\n<div id=\"sc_blue\"><span style=\"font-size: 12pt;\">\u53cb\u60c5\u63d0\u793a\uff1a<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u5982\u679c\u4f60\u6709edu\u90ae\u7bb1\u7684\u8bdd\uff0c\u90a3\u5feb\u53bb\u7533\u8bf7\u514d\u8d39\u6b63\u7248\u6388\u6743\u5427\uff0c\u54ea\u6015\u4f60\u6ca1\u6709edu\u90ae\u7bb1\uff0c\u4e5f\u53ef\u4ee5\u8bd5\u8bd5\u4ec0\u4e48\u6ce8\u518cedu\u90ae\u7bb1\u7684\uff0c\u6bd4\u5982\u8bf4<a href=\"https:\/\/free.kirito.edu.rs\/\">\u8fd9\u4e2a<\/a><\/span><\/div>\n<h2><span style=\"font-size: 12pt;\">\u6293\u5305\u4e0e\u5206\u6790<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">\u7f51\u4e0a\u5df2\u7ecf\u6709\u4eba\u5199\u597d\u4e86\u51e0\u4e2a\u7248\u672c\u7684\u6388\u6743\u670d\u52a1\u5668\uff0c\u6211\u53c2\u8003\u4e86<a href=\"https:\/\/coding.net\/u\/chenq_\/p\/license\/git\">Java\u7248<\/a>\u7684\u3001<a href=\"https:\/\/github.com\/xczh\/jetserver\">golang\u7248<\/a>\u7684\u8fd8\u6709<a href=\"https:\/\/github.com\/springhack\/JetBrains-License-Server\">JavaScript\u7248<\/a>\u7684\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u4e8e\u662f\u6211\u627e\u4e86\u90a3\u4e2a\u80fd\u7528\u7684Java\u7248\u672c\u7684\uff0c\u81ea\u5df1\u642d\u5efa\uff0c\u7136\u540e\u5c1d\u8bd5\u6fc0\u6d3b\u3001\u6293\u5305\u5e76\u8fc7\u6ee4http\uff0c\u8fdb\u884c\u5206\u6790\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u901a\u8fc7\u8ffd\u8e2aHTTP\u6d41\u6211\u4eec\u80fd\u53d1\u73b0\uff0cIDE\u5411\u6307\u5b9a\u670d\u52a1\u5668\u53d1\u8d77\u4e86\u4e00\u4e2aGET\u8bf7\u6c42\uff0c\u8bf7\u6c42\u4e2d\u5305\u542b\u5f88\u591a\u53c2\u6570\uff0c\u4e4b\u540e\u670d\u52a1\u5668\u8fd4\u56de\u4e86\u4e00\u4e2a\u50cf\u662f\u6563\u5217\u503c\uff0c\u8fd8\u6709\u4e00\u5c0f\u4e32XML<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/201802060236083.png\" alt=\"JetBrains License Server\u539f\u7406\u53ca40\u884cPython\u4ee3\u7801\u7684\u5b9e\u73b0\" title=\"JetBrains License Server\u539f\u7406\u53ca40\u884cPython\u4ee3\u7801\u7684\u5b9e\u73b0\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt;\">IDE\u8bf7\u6c42\uff1a<\/span><\/p>\n<pre class=\"prettyprint linenums\">GET \/rpc\/obtainTicket.action?buildDate=20170719&amp;buildNumber=2017.2.2+Build+CL-172.3968.17&amp;clientVersion=4&amp;hostName=xxxxxxm&amp;machineId=51xxxxx20a-14d259f1fc94&amp;productCode=cfc7xxxx978-a2a2-46fxxxx405&amp;productFamilyId=cfxxxx-ae43-4978-a2a2-46feb1679405&amp;salt=1506491409302&amp;secure=false&amp;userName=xxxx&amp;version=2017200&amp;versionNumber=2017200\r\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u670d\u52a1\u5668\u8fd4\u56de\uff1a<\/span><\/p>\n<pre class=\"prettyprint linenums\">&lt;!-- 61b3a2f53ffxxxxxxxxx6b132e0270275d12434f217ba3231b5 --&gt;\r\n\r\n&lt;ObtainTicketResponse&gt;&lt;message&gt;&lt;\/message&gt;&lt;prolongationPeriod&gt;607875500&lt;\/prolongationPeriod&gt;&lt;responseCode&gt;OK&lt;\/responseCode&gt;&lt;salt&gt;1506491409302&lt;\/salt&gt;&lt;ticketId&gt;1&lt;\/ticketId&gt;&lt;ticketProperties&gt;licensee=xxxxx licenseType=0 &lt;\/ticketProperties&gt;&lt;\/ObtainTicketResponse&gt;\r\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u7531\u6b64\u6211\u4eec\u53ef\u4ee5\u5f88\u6e05\u695a\u7684\u4e86\u89e3\u5230\u6fc0\u6d3b\u7684\u6b65\u9aa4\uff1a\u8bf7\u6c42+\u76f8\u5e94+\u9a8c\u8bc1\uff0c\u90a3\u4e48\u5927\u4f53\u731c\u6d4b\u4e00\u4e0b\u5e94\u8be5\u662f\u670d\u52a1\u7aef\u6301\u6709\u4e00\u4e2a\u79c1\u94a5\uff0c\u5bf9\u8bf7\u6c42\u5b57\u7b26\u4e32\u8fdb\u884c\u52a0\u5bc6\uff0c\u7136\u540e\u8fd4\u56de\uff0c\u5ba2\u6237\u7aef\u4f7f\u7528\u516c\u94a5\u9a8c\u8bc1\u3002<\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">\u9a8c\u8bc1\u731c\u60f3<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">\u4e3a\u4e86\u9a8c\u8bc1\u6211\u4eec\u7684\u731c\u60f3\uff0c\u54b1\u5176\u5b9e\u662f\u8981\u53bb\u8bfb\u5176\u4ed6\u7248\u672c\u7684\u6e90\u4ee3\u7801\u7684\u2026\u2026\u9274\u4e8e\u8fd9\u4e2a\u6d41\u7a0b\u633a\u590d\u6742\uff0c\u8981\u6c42\u4f60\u4f1a\u591a\u95e8\u8bed\u8a00\uff0c\u6240\u4ee5\u54b1\u5c31\u4e0d\u6f14\u793a\u4e86\u2026\u2026\u603b\u4e4b\uff0c\u7ecf\u8fc7\u6211\u7684\u7814\u8bfb\uff0c\u6211\u53d1\u73b0\u7684\u7ec6\u8282\u662f\u8fd9\u6837\u7684\uff1a<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u670d\u52a1\u7aef\u6784\u9020\u5982\u4e0b\u7684\u5b57\u7b26\u4e32\uff1a<\/span><\/p>\n<pre class=\"prettyprint linenums\">&lt;ObtainTicketResponse&gt;&lt;message&gt;&lt;\/message&gt;&lt;prolongationPeriod&gt;607875500&lt;\/prolongationPeriod&gt;&lt;responseCode&gt;OK&lt;\/responseCode&gt;&lt;salt&gt;1506491409302&lt;\/salt&gt;&lt;ticketId&gt;1&lt;\/ticketId&gt;&lt;ticketProperties&gt;licensee=xxxxx licenseType=0 &lt;\/ticketProperties&gt;&lt;\/ObtainTicketResponse&gt;\r\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u5176\u4e2dsalt\u662f\u53d1\u8d77\u8bf7\u6c42\u65f6\u7684\u65f6\u95f4\u6233\uff08\u5355\u4f4d\u6beb\u79d2\uff09\uff0clicensee\u662f\u53d1\u8d77\u8bf7\u6c42\u7684\u7528\u6237\u540d\uff08\u5176\u5b9e\u8fd9\u4e2a\u7528\u6237\u540d\u662f\u968f\u4fbf\u7684\uff0c\u5728\u4ee3\u7801\u91cc\u5199\u6b7b\u4e5f\u662f\u53ef\u4ee5\u7684\uff09\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u7136\u540e\u670d\u52a1\u5668\u4f7f\u7528RSA with MD5 and PKCS1v15\u8fdb\u884c\u52a0\u5bc6\uff0c\u628a\u52a0\u5bc6\u540e\u7684\u5185\u5bb9\u8f6c\u6362\u4e3a\u5341\u516d\u8fdb\u5236\uff0c\u52a0\u4e0aHTML\u6ce8\u91ca&lt;!-- hex --&gt;\uff08\u6ce8\u610f\u524d\u540e\u7684\u4e24\u4e2a\u7a7a\u683c\uff09\uff0c\u628a\u5341\u516d\u8fdb\u5236HTML\u6ce8\u91ca\u548c\u6784\u9020\u7684\u5b57\u7b26\u4e32\u4e00\u8d77\u8fd4\u56de\uff0c\u5ba2\u6237\u7aef\u4f7f\u7528hex\u548c\u8fd4\u56de\u7684\u5b57\u7b26\u4e32\uff08\u4ee5\u53ca\u516c\u94a5\uff09\u8fdb\u884c\u9a8c\u8bc1\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u5176\u5b9e\u9a8c\u8bc1\u731c\u60f3\u7684\u8fd9\u4e00\u6b65\u624d\u662f\u6700\u590d\u6742\u7684\uff0c\u9700\u8981\u53c2\u8003\u5f88\u591a\u6e90\u4ee3\u7801\u505a\u51fa\u9002\u5f53\u7684\u5b9e\u9a8c\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u65e2\u7136\u731c\u60f3\u5df2\u7ecf\u5f97\u5230\u4e86\u8bc1\u5b9e\uff0c\u90a3\u4e48\u5269\u4e0b\u6765\u5c31\u5f00\u59cb\u5199\u4e86\u3002\u57fa\u7840\u7684\u7ed3\u6784\u5f88\u7b80\u5355\uff0c\u7528flask\u642d\u5efa\u4e00\u4e2a\u7b80\u6613\u7684\u670d\u52a1\u5668\uff0c\u7528cryptography\u5b8c\u6210\u5bc6\u7801\u5b66\u76f8\u5173\u7684\u64cd\u4f5c\u3002<\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">cryptography\u5b8c\u6210RSA\u7b7e\u540d\u4e0e\u5341\u516d\u8fdb\u5236\u8f6c\u6362<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">Python\u4e2d\u6bd4\u8f83\u5b89\u5168\u597d\u7528\u7684\u5bc6\u7801\u5b66\u5e93\u662f<a href=\"https:\/\/cryptography.io\/en\/latest\/\" target=\"_blank\" rel=\"noopener\">cryptography<\/a>\uff08\u5509 \u597d\u5427\uff09\u3001<a href=\"https:\/\/www.dlitz.net\/software\/pycrypto\/\" target=\"_blank\" rel=\"noopener\">pycrypto<\/a>\uff08\u8fd9\u8d27\u5f88\u4e45\u4e0d\u66f4\u65b0\u4e86\uff0c\u4e0d\u6562\u7528\uff09\uff0c\u987a\u4fbf\u8bf4\u4e00\u53e5\uff0c\u8fdb\u884c\u5b89\u5168\u968f\u673a\u76d0\u6563\u5217\u51fd\u6570\u7684\u6709<a href=\"https:\/\/passlib.readthedocs.io\/en\/stable\/index.html\" target=\"_blank\" rel=\"noopener\">passlib<\/a>\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u9996\u5148\u9700\u8981\u5f15\u5165\u5bf9\u5e94\u7684\u5e93<\/span><\/p>\n<pre class=\"prettyprint linenums\">from cryptography.hazmat.backends import default_backend\r\nfrom cryptography.hazmat.primitives import hashes\r\nfrom cryptography.hazmat.primitives import serialization\r\nfrom cryptography.hazmat.primitives.asymmetric import padding\r\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u7136\u540e\u8f7d\u5165key\uff08\u6587\u4ef6\u5f62\u5f0f\uff09<\/span><\/p>\n<pre class=\"prettyprint linenums\">with open(&#039;jbls_private_key.pem&#039;) as f:\r\n    private_key = serialization.load_pem_private_key(f.read(), password=None, backend=default_backend())\r\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u6267\u884c\u52a0\u5bc6<\/span><\/p>\n<pre class=\"prettyprint linenums\">i = bytes(content)\r\nsignature = private_key.sign(i, padding.PKCS1v15(), hashes.MD5())\r\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u8f6c\u6362\u4e8c\u8fdb\u5236\u4e3a\u5341\u516d\u8fdb\u5236\u8868\u8fbe<\/span><\/p>\n<pre class=\"prettyprint linenums\">binascii.hexlify(signature)\r\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u5927\u6982\u8fd9\u4e48\u4e94\u884c\uff0c\u6211\u4eec\u5c31\u5b8c\u6210\u4e86\u52a0\u5bc6\u4e0e\u8f6c\u6362\u64cd\u4f5c\uff0c\u5269\u4e0b\u6211\u4eec\u53ea\u8981\u5728Flask\u7aef\u505a\u4e00\u4e0b\u903b\u8f91\u5904\u7406\u5c31\u597d\u4e86\u3002<\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">Flask\u8fdb\u884c\u903b\u8f91\u5904\u7406<\/span><\/h2>\n<p><span style=\"font-size: 12pt;\">\u8fd9\u4e00\u6b65\u4e5f\u5f88\u7b80\u5355\uff0c\u7528<code>@app.route()<\/code>\u88c5\u9970\u5668\u786e\u5b9a\u8def\u7531\uff0c\u6784\u9020\u5b57\u7b26\u4e32\u4e0e\u8fd4\u56de\u3002\u771f\u7684\u662f\u5f88\u7b80\u5355\uff0c\u5927\u6982\u5c31\u662f\u5982\u4e0b\u8fd9\u4e48\u5341\u51e0\u884c\uff1a<\/span><\/p>\n<pre class=\"prettyprint linenums\">@app.route(&quot;\/rpc\/obtainTicket.action&quot;)\r\ndef obtain():\r\n    salt = request.args.get(&#039;salt&#039;)\r\n    user_name = request.args.get(&#039;userName&#039;)\r\n    content = &quot;&lt;ObtainTicketResponse&gt;&lt;message&gt;&lt;\/message&gt;&quot; + \\\r\n        &quot;&lt;prolongationPeriod&gt;607875500&lt;\/prolongationPeriod&gt;&lt;responseCode&gt;OK&lt;\/responseCode&gt;&quot; + \\\r\n        &quot;&lt;salt&gt;&quot; + salt + &quot;&lt;\/salt&gt;&lt;ticketId&gt;1&lt;\/ticketId&gt;&quot; \\\r\n        &quot;&lt;ticketProperties&gt;licensee=&quot; + user_name + &quot;\\tlicenseType=0\\t&lt;\/ticketProperties&gt;&quot; \\\r\n        &quot;&lt;\/ObtainTicketResponse&gt;&quot;\r\n    verification_hex = hex_signature(content)\r\n    return &quot;&lt;!-- &quot; + verification_hex + &quot; --&gt;\\n&quot; + content\r\n<\/pre>\n<p><span style=\"font-size: 12pt;\">\u901a\u8fc7Flask\u7684requests\u62ff\u5230salt\u548cusername\uff0c\u6784\u9020XML\uff0c\u8c03\u7528\u51fd\u6570\uff0c\u8fd4\u56dehex\u4ee5\u53caXML\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u6240\u4ee5\u52a0\u8d77\u6765\uff0c\u6574\u4f53\u4ee3\u7801\u771f\u7684\u53ea\u6709\u4e0d\u523040\u884c\u3002\u5c31\u7b97\u628aKEY\u5d4c\u5165\u5230\u6e90\u4ee3\u7801\u4e2d\uff0c\u4e5f\u53ea\u662f43\u884c\u800c\u5df2\u2026\u2026<\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">\u6700\u7ec8\u7ed3\u679c<\/span><\/h2>\n<h3><span style=\"font-size: 12pt;\">\u670d\u52a1\u7aef\u7684\u8bf7\u6c42\u65e5\u5fd7<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/201802060236112.png\" alt=\"JetBrains License Server\u539f\u7406\u53ca40\u884cPython\u4ee3\u7801\u7684\u5b9e\u73b0\" title=\"JetBrains License Server\u539f\u7406\u53ca40\u884cPython\u4ee3\u7801\u7684\u5b9e\u73b0\" \/><\/span><\/p>\n<h3><span style=\"font-size: 12pt;\">\u5ba2\u6237\u7aef\u663e\u793a\u6fc0\u6d3b\u6210\u529f<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\"><img decoding=\"async\" src=\"https:\/\/7bc5d24.webp.ee\/wp-content\/uploads\/2018\/02\/2018020602361187.png\" alt=\"JetBrains License Server\u539f\u7406\u53ca40\u884cPython\u4ee3\u7801\u7684\u5b9e\u73b0\" title=\"JetBrains License Server\u539f\u7406\u53ca40\u884cPython\u4ee3\u7801\u7684\u5b9e\u73b0\" \/><\/span><\/p>\n<h2><span style=\"font-size: 12pt;\">\u9644\u5f55\u4e0eFAQ<\/span><\/h2>\n<h3><span style=\"font-size: 12pt;\">\u76d1\u542c0.0.0.0<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\">\u5982\u679c\u60f3\u8981\u628a\u8fd9\u4e2a\u670d\u52a1\u90e8\u7f72\u5728\u670d\u52a1\u5668\u4e0a\uff0c\u90a3\u4e48\u6700\u597d\u5c31\u76d1\u542c0.0.0.0\uff0c\u53ea\u9700\u8981\u628aapp.run()\u5199\u6210 app.run(host='0.0.0.0')\u5373\u53ef\u3002<\/span><\/p>\n<h3><span style=\"font-size: 12pt;\">\u6301\u4e45\u8fd0\u884c<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\">\u5f53\u7136\u6211\u4eec\u5e0c\u671b\u8fd9\u4e2aFlask\u7a0b\u5e8f\u80fd\u591f\u957f\u671f\u8fd0\u884c\u800c\u4e0d\u9000\u51fa\uff0c\u6b64\u65f6\u6211\u4eec\u6700\u597d\u4f7f\u7528supervisor\u6216\u8005systemd\u5566\uff0c\u8be6\u7ec6\u53c2\u8003\u6b64\u7bc7<a href=\"https:\/\/dmesg.app\/linux-keep-running.html\">\u300aLinux \u600e\u4e48\u8ba9\u7a0b\u5e8f\u6301\u7eed\u8fd0\u884c\uff1a\u7b80\u5355\u8bf4\u8bf4\u51e0\u79cd\u597d\u73a9\u7684\u529e\u6cd5\u300b<\/a><\/span><\/p>\n<h3><span style=\"font-size: 12pt;\">\u793a\u4f8b\u6e90\u4ee3\u7801<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\">\u672c\u793a\u4f8b\u6e90\u4ee3\u7801\u53ef\u4ee5\u5230\u4e0b\u9762\u7684\u5730\u5740\u67e5\u770b\uff1a<\/span><br \/>\n<a class=\"dl\" href=\"https:\/\/coding.net\/u\/BennyThink\/p\/pyJetBrains_license_server\" target=\"_blank\" rel=\"nofollow\"><i class=\"fa fa-github-alt\"><\/i>\u5f00\u6e90\u5730\u5740<\/a><\/p>\n<p><span style=\"font-size: 12pt;\">\u4e3a\u5565\u4e0d\u653e\u5230GitHub\u5462\uff1f\u88abDMCA Takedown\u5566\u03b5=\u03b5=\u03b5=\u250f(\u309c\u30ed\u309c;)\u251b<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u9700\u8981\u4f7f\u7528pip\u5b89\u88c5cryptography\u3001flask\uff0c\u5e76\u4e14jbls.py\u540c\u65f6\u652f\u6301Python 2\u548cPython 3.<\/span><\/p>\n<h3><span style=\"font-size: 12pt;\">\u53ef\u5426\u63d0\u4f9b\u4e00\u4e2a\u6709\u6548\u7684\u79c1\u94a5<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\">\u4e0d\u597d\u610f\u601d\uff0c\u4e0d\u63d0\u4f9b\u2026\u2026\u81f3\u4e8e\u6211\u8fd9\u4e2a\u6d4b\u8bd5\u7684\u79c1\u94a5\u662f\u5728\u54ea\u627e\u7684\u2026\u2026\u4f60\u4eec\u731c\u5440\u3002<\/span><\/p>\n<h3><span style=\"font-size: 12pt;\">\u5982\u4f55\u751f\u6210exe\u6587\u4ef6<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\">\u4f7f\u7528<a href=\"http:\/\/www.pyinstaller.org\/\">pyinstaller<\/a>\u5c31\u53ef\u4ee5\u4e86\u3002<\/span><\/p>\n<pre class=\"prettyprint linenums\">pyinstaller -F demo.py\r\n<\/pre>\n<h3><span style=\"font-size: 12pt;\">travis-ci<\/span><\/h3>\n<p><span style=\"font-size: 12pt;\">\u6211\u4eec\u7528travis-ci\u505a\u6301\u7eed\u96c6\u6210\u6d4b\u8bd5\uff0c\u4f46\u662ftravis-ci\u5e76\u4e0d\u662f\u4e3a\u4e86\u8fd0\u884c\u7a0b\u5e8f\u800c\u51c6\u5907\u7684\u3002\u4f46\u662f\u6211\u4eec\u8fd9\u4e2aFlask\u5e94\u7528\u8fd8\u5fc5\u987b\u5f97\u8fd0\u884c\u624d\u80fd\u6d4b\u8bd5\u3002\u90a3\u548b\u529e\u5462\uff1f<code>subprocess.Popen()<\/code>\uff1f\u53cd\u6b63\u5404\u79cd\u5947\u6280\u6deb\u5de7\u90fd\u8bd5\u8fc7\u4e86\uff0c\u4e0d\u597d\u7528\u7684\u3002\u529d\u5927\u5bb6\u8fd8\u662f\u8bd5\u8bd5<code>app.test_client().get(url).data<\/code>\u5427\uff0c\u8fd9\u6837\u5c31\u80fd\u83b7\u53d6\u5230\u54cd\u5e94\u7136\u540eassert\u4e86\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>\u65b0\u7248JetBrains License Server\u5907\u6ce8<\/h2>\n<p><span style=\"font-size: 12pt;\">\u4ee5\u4e0b\u5185\u5bb9\u5168\u6587\u5f15\u7528\u81ea<a href=\"http:\/\/blog.lanyus.com\/archives\/174.html\/comment-page-21#comments\" target=\"_blank\" rel=\"noopener\">lanyus<\/a>\u8bc4\u8bba<\/span><\/p>\n<blockquote><p><span style=\"font-size: 12pt;\">\u8d35\u7ad9\u5c45\u7136\u6ca1\u6709\u8fc7\u6ee4html\u7684\u7279\u6b8a\u5b57\u7b26\uff1f\u91cd\u65b0\u53d1\u4e00\u4e0b\u5427\uff0c\u4ee5\u4e0b\u662f\u539f\u6587\uff1a<\/span><\/p>\n<p><span style=\"font-size: 12pt;\">Jetbrains\u5bb6\u4ea7\u54c1\u7ebf\u6fc0\u6d3b\u670d\u52a1\u5668\u8ba4\u8bc1\u4ece2018.2\u5f00\u59cb\u4f7f\u7528\u4e24\u4e2ahandler\u6765\u5904\u7406\uff0c\u7b2c\u4e00\u4e2ahandler\u4f1a\u5bf9\u8001\u7684\u7b7e\u540d\u65b9\u5f0f\u8fdb\u884c\u8ba4\u8bc1\uff08&lt;!-- abcdef1234567890 --&gt;&lt;ObtainTicketResponse&gt;&lt;\/ObtainTicketResponse &gt;\u7c7b\u6837\u5f0f\uff09\uff0c\u8be5handler\u4f1a\u5224\u65ad\u7b7e\u540d\u662f\u5426\u5305\u542bhex\u4e4b\u5916\u7684\u5b57\u7b26\u3002\u5982\u679c\u6ca1\u6709\uff0c\u6309\u8001\u7248\u672c\u65b9\u5f0f\u6765\u9a8c\u8bc1\u7b7e\u540d\uff0c\u5982\u679c\u5b58\u5728hex\u4e4b\u5916\u5b57\u7b26\u5219\u629b\u5f02\u5e38\u7531\u81ea\u5df1\u63a5\u4f4f\u540e\u8fdb\u5165\u7b2c\u4e8c\u4e2ahandler\u6765\u9a8c\u8bc1\u3002<\/span><br \/>\n<span style=\"font-size: 12pt;\">\u4ece\u7248\u672c2018.2.1\u5f00\u59cb\u4fbf\u53bb\u6389\u4e86\u7b2c\u4e00\u4e2ahandler\uff0c\u6539\u4e3a\u53ea\u7531\u7b2c\u4e8c\u4e2ahandler\u6765\u9a8c\u8bc1\uff0c\u7531\u6b64\u8001\u7684\u9a8c\u8bc1\u670d\u52a1\u5668\u5168\u9762\u5931\u6548\u3002<\/span><br \/>\n<span style=\"font-size: 12pt;\">\u6765\u8bf4\u8bf4\u7b2c\u4e8c\u4e2ahandler\u7684\u9a8c\u8bc1\u903b\u8f91\u5427\uff1a<\/span><br \/>\n<span style=\"font-size: 12pt;\">\u65b0\u7684\u62a5\u6587\u8fd4\u56de\u8fd8\u662f\u5f62\u540c\uff1a&lt;!-- sign_body --&gt;&lt;xxxResponse&gt;&lt;\/xxxResponse&gt;\uff0c\u5176\u4e2d&lt;xxxResponse&gt;&lt;\/xxxResponse&gt;\u8fd9\u6837\u7684\u54cd\u5e94\u6b63\u6587\u4e2d\u76f8\u6bd4\u8f83\u8001\u7248\u672c\u6dfb\u52a0&lt;serveruid&gt;xyz&lt;\/serveruid&gt;\u914d\u7f6e\uff0c\u8fd9\u4e2axyz\u540e\u6587\u4e2d\u6709\u7528\u5230\uff0c\u4e0d\u53ef\u7f3a\u5c11\u3002<\/span><br \/>\n<span style=\"font-size: 12pt;\">sign_body\u683c\u5f0f\u8f83\u8001\u7248\u672c\u7684hex\u5b57\u7b26\u4e32\u53d8\u52a8\u5f88\u5927\uff0c\u5176\u793a\u4f8b\u683c\u5f0f\u5982\u4e0b\uff1aSHA1withRSA-xxxxxxxxxxxxxx-yyyyyyyyyyyyyyy\uff0c\u4ee5-\u7b26\u53f7\u5206\u9694\uff0cSHA1withRSA\u5bf9\u5e94java\u4e2d\u7b7e\u540d\u6240\u4f7f\u7528\u7684\u7b97\u6cd5\uff08\u53ef\u6362\u4e3aMD5withRSA\u7b49\uff09\uff0cxxxxxxxxxxxxxx\u90e8\u5206\u662f\u4f7f\u7528\u8be5\u7b97\u6cd5\u4ee5\u79c1\u94a5\u7b7e\u540d\u7684bin -&gt; base64\u5b57\u7b26\u4e32\uff0cyyyyyyyyyyyyyyy\u90e8\u5206\u5219\u662fpem\u683c\u5f0f\u7684\u8bc1\u4e66\u5b57\u7b26\u4e32\uff08\u53ef\u76f4\u63a5\u653e\u8bc1\u4e66\u6b63\u6587\uff0c\u4e0d\u6362\u884c\uff09\u3002<\/span><br \/>\n<span style=\"font-size: 12pt;\">\u5176\u4e2dyyyyyyyyyyyyyyy\u8bc1\u4e66\u5fc5\u987b\u7531Jetbrains\u4ea7\u54c1\u5185\u7f6e\u7684\u4e00\u4e2aCN\u4e3aLicense Server CA\u7684CA\u8bc1\u4e66\u7b7e\u53d1\u624d\u6709\u6548\uff0c\u800c\u4e14yyyyyyyyyyyyyyy\u8bc1\u4e66\u4e2d\u5fc5\u987b\u5305\u542bCN=xyz.lsrv.jetbrains.com(\u5176\u4e2dxyz\u5bf9\u5e94\u524d\u6587&lt;serveruid&gt;xyz&lt;\/serveruid&gt;\u90e8\u5206\u6240\u586b)\u3002<\/span><br \/>\n<span style=\"font-size: 12pt;\">\u8bc1\u4e66\u9a8c\u8bc1\u901a\u8fc7\u540e\u624d\u4f1a\u53d6\u51fa\u8bc1\u4e66\u4e2d\u6240\u5305\u542b\u7684\u516c\u94a5\u6765\u9a8c\u8bc1\u7b7e\u540d&lt;xxxResponse&gt;&lt;\/xxxResponse&gt;\u54cd\u5e94\u6b63\u6587\uff08\u548cbase64Decode(xxxxxxxxxxxxxx)\u6bd4\u5bf9\uff09\uff0c\u9a8c\u8bc1\u901a\u8fc7\u540e\u7ee7\u7eed\u5b8c\u6210\u670d\u52a1\u5668\u8ba4\u8bc1\uff08\u89e3\u6790\u6b63\u6587\u5185\u5bb9\uff0c\u903b\u8f91\u540c\u65e7\u7248\uff09\u3002<\/span><br \/>\n<span style=\"font-size: 12pt;\">\u5570\u5570\u55e6\u55e6\u8fd9\u4e48\u591a\uff0c\u603b\u7ed3\u4e00\u4e0b\uff1a\u5982\u679c\u6211\u4eec\u60f3\u8981\u81ea\u5df1\u9020\u9a8c\u8bc1\u670d\u52a1\u5668\uff0c\u5219\u9700\u8981\u62ff\u5230\u4e00\u5f20License Server CA\u7b7e\u53d1\u7684\u8bc1\u4e66\uff08\u5305\u62ec\u79c1\u94a5\uff09\uff0c\u800c\u4e14\u8fd9\u4e2a\u8bc1\u4e66\u88abJetbrains\u53d1\u73b0\u53ef\u80fd\u4f1a\u88ab\u540a\u9500\uff01\u6240\u4ee5\u8fd9\u4e2a\u6050\u6015\u6709\u4e9b\u75f4\u4eba\u8bf4\u68a6\u4e86\u3002<\/span><br \/>\n<span style=\"font-size: 12pt;\">\u5bf9\u4e86License Server CA\u8bc1\u4e66\u7684\u5185\u5bb9\u7531\u53e6\u4e00\u5f20Jetprofile\u7b7e\u53d1\u7684\u53ebprod3y\u7684\u8bc1\u4e66\u516c\u94a5\u5b9a\u65f6\u6821\u9a8c\uff08\u6570\u636e\u683c\u5f0f\u540c\u4e0a\u6587\u6240\u8ff0\uff0c\u4e0d\u8fc7\u6b63\u6587\u90e8\u5206\u662fCA\u8bc1\u4e66\u5b57\u7b26\u4e32\uff09\uff0c\u5e94\u8be5\u662f\u9632\u6b62\u88ab\u66ff\u6362\u5427\u3002<\/span><br \/>\n<span style=\"font-size: 12pt;\">\u8fd8\u6709\u7c7b\u4f3cidea.lanyus.com\u8fd9\u6837\u7684\u8ba4\u8bc1\u670d\u52a1\u5668\u57df\u540d\u9ed1\u540d\u5355\u4e5f\u7531\u8fd9\u5f20prod3y\u8bc1\u4e66\u516c\u94a5\u5b9a\u65f6\u6821\u9a8c\uff0c\u4e5f\u662f\u6015\u88ab\u7be1\u6539\u5427\u3002\u5982\u679c\u8981\u66ff\u6362CA\u8981\u4ece\u66ff\u6362prod3y\u8bc1\u4e66\u5f00\u59cb\uff0c\u4f46\u90a3\u662f\u7834\u89e3\u7684\u5185\u5bb9\u4e86\uff0c\u4e0d\u5982\u6ce8\u518c\u670d\u52a1\u5668\u4f18\u96c5\u3002<\/span><br \/>\n<span style=\"font-size: 12pt;\">\u5c31\u8fd9\u4e48\u591a\u3002<\/span><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 12pt; color: #ff99cc;\">\u6240\u4ee5\u4f30\u8ba1License Server\u8fd9\u6761\u8def\u53ef\u80fd\u8d70\u4e0d\u901a\u4e86\uff0c\u53ea\u80fd\u901a\u8fc7javaagent\u8fd9\u79cd\u65b9\u6cd5\u4fee\u6539\u5ba2\u6237\u7aef\uff08IDE\uff09\u4ee3\u7801\u7136\u540e\u8fbe\u5230\u76ee\u7684\u4e86\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u7bc7\u6587\u7ae0\u5728 2018\u5e7408\u670831\u65e511:08:55 \u66f4\u65b0\u4e86\u54e6~Repository: \u4f30\u8ba1\u662f\u4e2a\u7a0b\u5e8f\u5458\u90fd\u5e94\u8be5\u4f7f\u7528 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,9],"tags":[],"class_list":["post-3446","post","type-post","status-publish","format-standard","hentry","category-program","category-share"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/posts\/3446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/comments?post=3446"}],"version-history":[{"count":0,"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/posts\/3446\/revisions"}],"wp:attachment":[{"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/media?parent=3446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/categories?post=3446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dmesg.app\/wp-json\/wp\/v2\/tags?post=3446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}