{"id":108,"date":"2019-05-08T10:17:48","date_gmt":"2019-05-08T02:17:48","guid":{"rendered":"http:\/\/www.luyouli.com\/?p=108"},"modified":"2019-05-08T17:25:36","modified_gmt":"2019-05-08T09:25:36","slug":"python-3-6-%e7%94%9f%e6%88%90%e9%9a%8f%e6%9c%ba%e7%a0%81","status":"publish","type":"post","link":"https:\/\/www.luyouli.com\/?p=108","title":{"rendered":"Python 3.6 \u751f\u6210\u968f\u673a\u7801"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u56db\u79cd\u65b9\u6cd5\uff0c\u751f\u6210\u968f\u673a\u7801<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u8fd1\u9879\u76ee\u9700\u8981\u968f\u673a\u7801\uff0c\u67e5\u4e86\u67e5\u627e\u5230\u56db\u79cd\u65b9\u6cd5\uff0c\u5728\u8fd9\u91cc\u7f57\u5217\u51fa\u6765\uff0c\u4ee5\u5907\u4e0d\u65f6\u4e4b\u9700<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7531\u4e8eRHEL 8 \u53ea\u652f\u6301Python 3.6\uff0c\u6240\u4ee52.7\u7684\u5c31\u4e0d\u7814\u7a76\u4e86\uff08PS\uff1a\u6beb\u65e0\u6b67\u89c62.7\u7684\u610f\u601d\uff0c\u5355\u7eaf\u7684\u4e3a\u4e86\u4ee5\u540e\u5b89\u88c5CentOS 8 \u505a\u51c6\u5907\uff09<\/p>\n\n\n<p><!--more--><\/p>\n\n\n<pre class=\"wp-block-preformatted\"># vim 666.py\nimport random\nimport string\nseed = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\"\nsa = []\nfor i in range(123):\n    sa.append(random.choice(seed))\nsalt1=''.join(sa)\nprint(salt1)\n\nsalt2 = ''.join(random.sample(string.ascii_letters + string.digits, 60))\nprint(salt2)\n\nsalt3 = random.randint(100000,999999)\nprint(salt3)\n\nsalt4 = \"\"\nfor i in range(20):       #\u5faa\u73af20\u6b21\uff0c\u4ece0\u523019\n    salt5 = random.randrange(0,6)     #\u8fd9\u4e2a\u968f\u673a\u6570\u4e3a2\u6216\u80054\u65f6\uff0c\u751f\u6210\u4e00\u4e2a1\u52309\u7684\u968f\u673a\u6570\u653e\u5230\u5b57\u7b26\u4e32\u4e2d\n    if salt5 == 2 or salt5 == 4:\n        salt4 = salt4 + str(random.randrange(0,10))\n    else:\n        salt6 = chr(random.randrange(65,122))\n    salt4 = salt4 + salt6\nprint(salt4)\n# python3.6 666.py<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1008\" height=\"201\" src=\"https:\/\/www.luyouli.com\/wp-content\/uploads\/2019\/05\/image-1.png\" alt=\"\" class=\"wp-image-123\" srcset=\"https:\/\/www.luyouli.com\/wp-content\/uploads\/2019\/05\/image-1.png 1008w, https:\/\/www.luyouli.com\/wp-content\/uploads\/2019\/05\/image-1-300x60.png 300w, https:\/\/www.luyouli.com\/wp-content\/uploads\/2019\/05\/image-1-768x153.png 768w\" sizes=\"auto, (max-width: 1008px) 100vw, 1008px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u56db\u79cd\u65b9\u6cd5\uff0c\u751f\u6210\u968f\u673a\u7801 \u6700\u8fd1\u9879\u76ee\u9700\u8981\u968f\u673a\u7801\uff0c\u67e5\u4e86\u67e5\u627e\u5230\u56db\u79cd\u65b9\u6cd5\uff0c\u5728\u8fd9\u91cc\u7f57\u5217\u51fa\u6765\uff0c\u4ee5\u5907\u4e0d\u65f6\u4e4b\u9700 \u7531\u4e8eRHEL 8  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-108","post","type-post","status-publish","format-standard","hentry","category-python"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"views":5317,"_links":{"self":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=108"}],"version-history":[{"count":6,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/108\/revisions"}],"predecessor-version":[{"id":125,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/108\/revisions\/125"}],"wp:attachment":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}