{"id":185964,"date":"2020-10-26T22:08:12","date_gmt":"2020-10-26T14:08:12","guid":{"rendered":"http:\/\/4563.org\/?p=185964"},"modified":"2020-11-06T01:31:23","modified_gmt":"2020-11-05T17:31:23","slug":"python-%e5%a4%a7%e4%bd%ac%e4%bb%ac%e7%9c%8b%e4%b8%8b%e8%bf%99%e4%b8%aa%e8%84%9a%e6%9c%ac%e6%9c%89%e4%bb%80%e4%b9%88%e9%97%ae%e9%a2%98%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=185964","title":{"rendered":"Python \u5927\u4f6c\u4eec\u770b\u4e0b\u8fd9\u4e2a\u811a\u672c\u6709\u4ec0\u4e48\u95ee\u9898\u5417\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Python \u5927\u4f6c\u4eec\u770b\u4e0b\u8fd9\u4e2a\u811a\u672c\u6709\u4ec0\u4e48\u95ee\u9898\u5417\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : madlifer <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5728\u6539\u4e00\u4e2a\u626b\u56fd\u5185 Cloudfront \u8282\u70b9\u7684 python \u811a\u672c\uff0c\u9047\u5230\u4e86\u4e2a\u641e\u4e0d\u61c2\u7684\u95ee\u9898\uff1a<\/p>\n<p>\u6838\u5fc3\u811a\u672c\u622a\u56fe\u5982\u4e0b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/20201105_5fa4365beafce.png\" alt=\"Python \u5927\u4f6c\u4eec\u770b\u4e0b\u8fd9\u4e2a\u811a\u672c\u6709\u4ec0\u4e48\u95ee\u9898\u5417\uff1f\" \/><\/p>\n<p>\u73b0\u5728\u7684\u95ee\u9898\u662f\uff0c\u5982\u679c\u6570\u636e\u91cf\u5f88\u5c11\uff0c\u5c31\u53ef\u4ee5\u8f93\u51fa\u7684 result.txt \u4e2d<\/p>\n<p>\u6bd4\u5982\uff1a<\/p>\n<pre><code>python 1.py ip.txt 800        #1.py \u662f\u811a\u672c\u6587\u4ef6\u540d  ip.txt \u662f ip \u5730\u5740   800 \u662f\u7ebf\u7a0b <\/code><\/pre>\n<p>ip.txt \u4e2d \u53ea\u6709\u51e0\u5341\u4e2a ip \u5730\u5740\u7684\u65f6\u5019 \u662f\u53ef\u4ee5\u6b63\u5e38\u8f93\u51fa\u7684\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/20201105_5fa4366113114.png\" alt=\"Python \u5927\u4f6c\u4eec\u770b\u4e0b\u8fd9\u4e2a\u811a\u672c\u6709\u4ec0\u4e48\u95ee\u9898\u5417\uff1f\" \/><\/p>\n<p>\u4f46\u662f\u5982\u679c\u6570\u636e\u91cf\u6bd4\u8f83\u5927\uff0c\u6bd4\u5982:<\/p>\n<pre><code>python 1.py ip-new.txt 800 <\/code><\/pre>\n<p>result.txt \u4e2d\u5c31\u5b8c\u5168\u662f\u7a7a\u7684\uff0c\u4e0d\u4f1a\u8fdb\u884c\u8f93\u51fa<\/p>\n<p>\u6c42 Ptyhon \u5927\u4f6c\u544a\u77e5\u662f\u4e3a\u4ec0\u4e48\uff1f \u5b8c\u6574\u4ee3\u7801\u5728 pastebin<\/p>\n<p>https:\/\/paste.ubuntu.com\/p\/bMhWWGdbHT\/<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4013753\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : frostming <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6700\u5173\u952e\u7684\u80fd\u77e5\u9053\u9519\u8bef\u662f\u4ec0\u4e48\u7684\u5730\u65b9\uff0c\u6070\u6070\u88ab\u4f60\u5ffd\u7565\u4e86<br \/>try:<br \/> checkServer(host)<br \/>except:<br \/> continue<\/p>\n<p>\u8bf7\u95ee\uff0c\u5982\u679c\u5168\u90fd\u6389\u8fdb except \u91cc\u9762\u53bb\u4e86\uff0c\u4f60\u5982\u4f55\u77e5\u9053\u53d1\u751f\u4e86\u4ec0\u4e48\u9519\u8bef\uff0c\u8fd9\u65f6 file \u91cc\u9762\u4f1a\u5199\u5185\u5bb9\u5417                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4013754\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : singerll <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             open \u65b9\u6cd5\u5e94\u8be5\u7528\u7684\u4e0d\u662f w\uff0c\u662f a \u5427\uff0cw \u597d\u50cf\u662f\u6e05\u7a7a\u540e\u5199\u5165\u3002\u8bb0\u4e0d\u6e05\u4e86\u6211\u4e0d\u662f\u4e13\u4e1a python                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4013755\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lpts007 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6309\u7406\u8bf4\u7b2c\u4e8c\u4e2a\u547d\u4ee4\u6709\u53ef\u80fd\u4f1a\u5361\u4f4f\uff0c\u7ed3\u675f\u4e0d\u4e86\u5427\u3002<\/p>\n<p>queue. get(blocking=false)                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4013756\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : madlifer <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @frostming \u8c22\u8c22\u8001\u54e5. \u8fd9\u4e2a\u4ee3\u7801\u662f\u6211\u62ff\u6765\u540e\u6539\u7684\uff0c \u539f\u56e0\u627e\u5230\u4e86\uff0c\u6700\u5927\u7684\u95ee\u9898\u662f\u5fd8\u4e86\u628a\u6587\u4ef6\u5173\u95ed\uff0c\u5bfc\u81f4\u4e0d\u7ed3\u675f\u7a0b\u5e8f\u4e0d\u5199\u5165\u6570\u636e\u3002 \u6570\u636e\u91cf\u5c0f\u7684\u65f6\u5019\u5f88\u5feb\u5c31\u8dd1\u5b8c\u4e00\u6b21\u6027\u5199\u5165\u4e86\uff0c\u6570\u636e\u91cf\u5927\u7684\u65f6\u5019\u5f88\u5bb9\u6613\u5199\u4e0d\u8fdb\u53bb                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4013757\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : madlifer <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lpts007 \u662f\u7684 \u6211\u4e00\u76f4\u5728\u5947\u602a..\u660e\u660e\u8bbe\u7f6e\u4e86\u8d85\u65f6\u4e3a\u5565\u6709\u7684\u65f6\u5019\u4f1a\u5361\u4f4f\u3002 \u6211\u4e0d\u662f\u5f88\u61c2\u4ee3\u7801\uff0c\u6539\u4e0a\u53bb\u8bd5\u8bd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4013758\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : renmu123 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8be5\u5347\u7ea7 Python3 \u4e86 <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/11\/92IL9xOI-3.jpeg\" alt=\"Python \u5927\u4f6c\u4eec\u770b\u4e0b\u8fd9\u4e2a\u811a\u672c\u6709\u4ec0\u4e48\u95ee\u9898\u5417\uff1f\"> <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4013759\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xichuhanguguan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             write \u5e76\u6ca1\u6709\u628a\u6570\u636e\u5199\u8fdb\u6587\u4ef6\uff0c\u53ea\u662f\u5728\u7f13\u5b58\u5f53\u4e2d\uff0c\u4f60\u9700\u8981 flush \u8fd9\u4e2a\u65b9\u6cd5\u5f3a\u5236\u628a\u7f13\u5b58\u4e2d\u7684\u6570\u636e\u5199\u5165\u5230\u6587\u4ef6\u4e2d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4013760\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wangchonglie <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5efa\u8bae\u4f7f\u7528 with \u8bed\u53e5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Python \u5927\u4f6c\u4eec\u770b\u4e0b\u8fd9\u4e2a\u811a\u672c\u6709&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/185964"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=185964"}],"version-history":[{"count":1,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/185964\/revisions"}],"predecessor-version":[{"id":185967,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/185964\/revisions\/185967"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=185964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=185964"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=185964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}