{"id":155934,"date":"2020-09-09T19:49:41","date_gmt":"2020-09-09T11:49:41","guid":{"rendered":"http:\/\/4563.org\/?p=155934"},"modified":"2020-09-09T19:49:41","modified_gmt":"2020-09-09T11:49:41","slug":"%e9%9d%99%e6%80%81%e5%88%86%e6%9e%90%e4%ba%8c%e8%bf%9b%e5%88%b6%e6%96%87%e4%bb%b6%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a8%ef%bc%8c%e8%af%b7%e9%97%ae-python-%e4%b8%ba%e4%bb%80%e4%b9%88%e6%89%be%e4%b8%8d","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=155934","title":{"rendered":"\u9759\u6001\u5206\u6790\u4e8c\u8fdb\u5236\u6587\u4ef6\u7cfb\u7edf\u8c03\u7528\uff0c\u8bf7\u95ee Python \u4e3a\u4ec0\u4e48\u627e\u4e0d\u5230 socket"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u9759\u6001\u5206\u6790\u4e8c\u8fdb\u5236\u6587\u4ef6\u7cfb\u7edf\u8c03\u7528\uff0c\u8bf7\u95ee Python \u4e3a\u4ec0\u4e48\u627e\u4e0d\u5230 socket               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : pmispig <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<pre><code>[[email&#160;protected] tmp]# ldd \/usr\/bin\/python2.7   linux-vdso.so.1 =&gt;  (0x00007ffc63f78000)  libpython2.7.so.1.0 =&gt; \/lib64\/libpython2.7.so.1.0 (0x00007fb2b7efc000)  libpthread.so.0 =&gt; \/lib64\/libpthread.so.0 (0x00007fb2b7ce0000)  libdl.so.2 =&gt; \/lib64\/libdl.so.2 (0x00007fb2b7adc000)  libutil.so.1 =&gt; \/lib64\/libutil.so.1 (0x00007fb2b78d9000)  libm.so.6 =&gt; \/lib64\/libm.so.6 (0x00007fb2b75d7000)  libc.so.6 =&gt; \/lib64\/libc.so.6 (0x00007fb2b7209000)  \/lib64\/ld-linux-x86-64.so.2 (0x00007fb2b82c8000)   [[email&#160;protected] tmp]# readelf  \/usr\/lib64\/libpython2.7.so.1.0  -a |grep sock [[email&#160;protected] tmp]# readelf  \/usr\/bin\/python2.7  -a |grep socket [[email&#160;protected] tmp]# readelf  \/usr\/lib64\/libpython2.7.so.1.0  -a |grep open 00000037f7f8  002e00000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0 000000380140  007300000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0 000000380278  007d00000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0 0000003803e8  008400000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0 000000380810  00a400000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0 000000380900  00ad00000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0 000000380a80  00bc00000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0     46: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND [email&#160;protected]_2.2.5 (3)    115: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND [email&#160;protected]_2.2.5 (3)    125: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND [email&#160;protected]_2.2.5 (9)    132: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND [email&#160;protected]_2.2.5 (10)    164: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND [email&#160;protected]_2.2.5 (3)    173: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND [email&#160;protected]_2.2.5 (4)    188: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND [email&#160;protected]_2.2.5 (3)   [[email&#160;protected] tmp]# readelf  \/usr\/bin\/ssh  -a |grep socket 0000002b8548  002b00000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0 0000002b8918  00b400000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0     43: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND [email&#160;protected]_2.2.5 (5)    180: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND [email&#160;protected]_2.2.5 (5)  <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>1<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3310765\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : pmispig <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u901a\u8fc7 strace \u77e5\u9053\u4e86,python \u52a8\u6001\u52a0\u8f7d\u4e86 so<br \/>&#8220;`<br \/>readelf -a \/usr\/lib64\/python2.7\/lib-dynload\/_socketmodule.so |grep socket<br \/>00000020f1f0 004500000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0<br \/>00000020f3b8 008200000007 R_X86_64_JUMP_SLO 0000000000000000 [email&#160;protected]_2.2.5 + 0<br \/> 69: 0000000000000000 0 FUNC GLOBAL DEFAULT UND [email&#160;protected]_2.2.5 (2)<br \/> 130: 0000000000000000 0 FUNC GLOBAL DEFAULT UND [email&#160;protected]_2.2.5 (2)<br \/> 137: 0000000000008d10 5379 FUNC GLOBAL DEFAULT 11 init_socket<br \/>&#8220;`                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u9759\u6001\u5206\u6790\u4e8c\u8fdb\u5236\u6587\u4ef6\u7cfb\u7edf\u8c03\u7528\uff0c\u8bf7\u95ee &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\/155934"}],"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=155934"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/155934\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=155934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=155934"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=155934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}