{"id":114,"date":"2019-05-08T15:42:05","date_gmt":"2019-05-08T07:42:05","guid":{"rendered":"http:\/\/www.luyouli.com\/?p=114"},"modified":"2019-05-08T15:48:56","modified_gmt":"2019-05-08T07:48:56","slug":"python%e5%8d%95%e7%ba%bf%e7%a8%8b%e7%88%ac%e5%8f%96%e6%8c%87%e5%ae%9a%e8%a7%84%e5%88%99%e7%9a%84%e7%bd%91%e7%ab%99","status":"publish","type":"post","link":"https:\/\/www.luyouli.com\/?p=114","title":{"rendered":"Python\u5355\u7ebf\u7a0b\u722c\u53d6\u6307\u5b9a\u89c4\u5219\u7684\u7f51\u7ad9"},"content":{"rendered":"\n<p>\u7f51\u7ad9\u89c4\u5219\uff1a6\u4f4d\u9a8c\u8bc1\u7801\uff0c135\u4f4d\u662f\u5c0f\u5199\u5b57\u6bcd\uff0c246\u4f4d\u662f\u5927\u5199\u5b57\u6bcd\uff0c\u5176\u4e2d12\u4f4d\u548c56\u4f4d\u662f\u5927\u5c0f\u5199\u5bf9\u5e94\u7684\u5173\u7cfb\uff0c\u6bd4\u5982aBcDbA\uff0c\u5e76\u4e14\u628a\u722c\u7684\u7ed3\u679c\u8f93\u51fa\u5230log\u91cc\u9762<\/p>\n\n\n\n<p>\u5176\u5b9e\u8fd9\u5c31\u662f\u641e\u5b9a\u968f\u673a\u9a8c\u8bc1\u7801\u7684\u95ee\u9898\uff0c\u5e76\u4e14Python3.6\u7528requests\u6a21\u5757<\/p>\n\n\n<p><!--more--><\/p>\n\n\n<pre class=\"wp-block-preformatted\"># vim 666.py \nimport random\nimport requests\nimport time\n\ndef verification_code():\n    lowa = chr(random.randint(97, 122))\n    lowb = chr(random.randint(97, 122))\n    capa = chr(random.randint(65, 90))\n    capb = chr(random.randint(65, 90))\n    vercode = lowa + capa + lowb + capb + capa.lower() + lowa.upper()\n    return vercode\n\nfor i in range(1, 10000):    # \u5faa\u73af\u4e00\u4e07\u6b21\n    req = requests.get('https:\/\/www.luyouli.com\/' + verification_code())\n    luyoulidate = open('\/root\/luyouli.com.log', 'a+')   # \u8f93\u51fa\u7ed3\u679c\u5230.log\u6587\u4ef6\u91cc\n    print(req.text, req.url, file=luyoulidate)    # \u5199\u5165\u6587\u4ef6\u91cc\n    time.sleep(1)    # \u6bcf\u79d2\u949f\u6267\u884c\u4e00\u6b21\uff08\u6015\u88ab\u5c01IP\uff09\n# python36 666.py<\/pre>\n\n\n\n<p>\u4ee3\u7801\u5199\u7684\u6bd4\u8f83low\uff0c\u8fd8\u6ca1\u6709\u627e\u5230\u7279\u522b\u597d\u7684\u65b9\u6cd5\uff0c\u5982\u679c\u4ee5\u540e\u627e\u5230\u4e86\u66f4\u597d\u7684\u65b9\u6cd5\u5c31\u518d\u5199\u8fdb\u6765<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7f51\u7ad9\u89c4\u5219\uff1a6\u4f4d\u9a8c\u8bc1\u7801\uff0c135\u4f4d\u662f\u5c0f\u5199\u5b57\u6bcd\uff0c246\u4f4d\u662f\u5927\u5199\u5b57\u6bcd\uff0c\u5176\u4e2d12\u4f4d\u548c56\u4f4d\u662f\u5927\u5c0f\u5199\u5bf9\u5e94\u7684\u5173\u7cfb\uff0c\u6bd4\u5982aBc [&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-114","post","type-post","status-publish","format-standard","hentry","category-python"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"views":3781,"_links":{"self":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/114","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=114"}],"version-history":[{"count":4,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/114\/revisions\/121"}],"wp:attachment":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}