{"id":182305,"date":"2020-10-30T23:58:42","date_gmt":"2020-10-30T15:58:42","guid":{"rendered":"http:\/\/4563.org\/?p=182305"},"modified":"2020-10-30T23:58:42","modified_gmt":"2020-10-30T15:58:42","slug":"%e8%af%b7%e6%95%99%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8-python-%e7%9b%b4%e6%8e%a5%e5%af%b9%e4%ba%8c%e8%bf%9b%e5%88%b6%e6%96%87%e4%bb%b6%e8%bf%9b%e8%a1%8c%e4%bf%ae%e6%94%b9","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=182305","title":{"rendered":"\u8bf7\u6559\u5982\u4f55\u4f7f\u7528 Python \u76f4\u63a5\u5bf9\u4e8c\u8fdb\u5236\u6587\u4ef6\u8fdb\u884c\u4fee\u6539"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u6559\u5982\u4f55\u4f7f\u7528 Python \u76f4\u63a5\u5bf9\u4e8c\u8fdb\u5236\u6587\u4ef6\u8fdb\u884c\u4fee\u6539               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : v2410117 <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u521a\u63a5\u89e6 python \u4e0d\u4e45\uff0c\u60f3\u7528 python \u76f4\u63a5\u4fee\u6539\u4e8c\u8fdb\u5236\u6587\u4ef6\u4e2d\u7684\u67d0\u6bb5\u5b57\u7b26\u4e32\u5185\u5bb9\uff0c\u5728\u7f51\u4e0a\u67e5\u8be2\u4f7f\u7528<code>fopen<\/code>\u7136\u540e\u7528<code>seek<\/code>\u5b9a\u4f4d,<code>write<\/code>\u5199\u5165.\u6211\u6d4b\u8bd5\u8fc7\u786e\u5b9e\u80fd\u8fbe\u5230\u6548\u679c\u3002<\/p>\n<p>\u4f46\u662f\u5982\u679c\u66ff\u6362\u7684\u957f\u5ea6\u4e0d\u4e00\u6837\uff0c\u6bd4\u5982\u672c\u6765\u7684\u5b57\u7b26\u4e32\u4e3a<code>test<\/code>,\u6211\u7528\u4e0a\u9762\u7684\u65b9\u6cd5\u60f3\u66ff\u6362\u6210<code>mytest<\/code>,\u56e0\u4e3a\u957f\u5ea6\u6bd4\u539f\u6765\u7684\u957f,\u5c31\u66ff\u6362\u4e0d\u6210\u529f,\u672c\u6765\u6211\u60f3\u7684\u662f,\u5728\u5185\u5b58\u91cc\u627e\u4e00\u5757\u7a7a\u7684\u5730\u5740,\u5199\u5165<code>mytest<\/code>,\u7136\u540e\u5c06\u5730\u5740\u66ff\u6362\u5230<code>test<\/code>\u91cc\u9762,\u867d\u7136\u60f3\u7684\u5f88\u7f8e\u597d,\u4f46\u662f\u5b9e\u5728\u4e0d\u4f1a\u64cd\u4f5c,\u7279\u6765\u8bf7\u6559\u4e00\u4e0b\u8fd9\u79cd\u66ff\u6362\u957f\u5ea6\u4e0d\u4e00\u81f4\u7684,\u8be5\u5982\u4f55\u64cd\u4f5c,\u63d0\u524d\u81f4\u8c22<\/p>\n<\/p><\/div>\n<p><\/p>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>22<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3959760\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : whileFalse <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u6587\u4ef6\u4e0d\u5927\u7684\u8bdd\uff0c\u5168\u90e8\u8bfb\u51fa-\u5185\u5b58\u66ff\u6362-\u5168\u90e8\u5199\u56de                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959761\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fasionchan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6587\u4ef6\u4e0d\u5927\u7684\u8bdd\u53ef\u4ee5\u5c06\u6574\u4e2a\u6587\u4ef6\u8bfb\u5230\u5185\u5b58\uff0c\u5728\u5185\u5b58\u4e2d\u505a\u66ff\u6362\u540e\uff0c\u518d\u6574\u4f53\u8986\u76d6\u5199\u5165                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959762\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : whileFalse <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             replace_data = b&#8217;mytest&#8217;<br \/>replace_begin = 3<br \/>replace_end = 7<\/p>\n<p>with open(&#8216;a.txt&#8217;, &#8216;rb&#8217;) as f:<br \/> data = f.read()<br \/>print(data)<br \/>print(data[replace_begin:replace_end])<br \/>data = data[:replace_begin] + replace_data + data[replace_end:]<br \/>print(data)<br \/>with open(&#8216;b.txt&#8217;, &#8216;wb&#8217;) as f:<br \/> f.write(data)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959763\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Python \u4e0d\u9700\u8981\u627e \u201c\u7a7a\u7684\u5730\u5740\u201d\uff0c\u4f60\u76f4\u63a5\u521b\u5efa\u5bf9\u8c61\u5c31\u4f1a\u81ea\u52a8\u5206\u914d\u5185\u5b58\u3002<br \/>f.read() \u5c31\u4f1a\u521b\u5efa bytes \u5bf9\u8c61\uff0c\u4e4b\u540e replace \u66ff\u6362\uff0c\u5b8c\u4e86\u518d f.write() \u56de\u53bb\u5c31\u6210<br \/>\u4e0d\u4e00\u6837\u957f\u5ea6\u7684\u8bdd\uff0c\u9664\u975e\u6574 block\uff0c\u5e76\u4e14\u4fee\u6539\u6587\u4ef6\u7cfb\u7edf metadata\uff0c\u4e0d\u7136\u4ece\u4f60\u4fee\u6539\u7684\u4f4d\u7f6e\u5f00\u59cb\u540e\u9762\u5168\u90e8\u5f97\u8986\u5199\u4e00\u904d\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959764\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lllllliu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u96be\u9053\u4e0d\u662f\u8ba1\u7b97\u4fee\u6539\u540e\u7684\u6587\u4ef6\u957f\u5ea6\uff0c\u4fee\u6539\u533a\u6bb5\u8868\u6216\u8005\u7ed3\u6784\u6bb5\u5b9a\u4e49\u5934\u7684\u957f\u5ea6\uff0c\u7136\u540e\u5728\u4fee\u6539\u6216\u586b\u5145\u4e48\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959765\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zone10 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u65b0\u624b\u591a\u627e\u6210\u578b\u7684\u4ee3\u7801\u770b, \u6309\u7167\u89c4\u8303\u6765\u5199\u4ee3\u7801, \u522b\u8001\u662f\u4ee5\u81ea\u5df1\u72ed\u9698\u7684\u601d\u8def\u5199, \u770b\u591a\u4e86\u4f60\u5c31\u77e5\u9053\u6709\u4e9b\u95ee\u9898\u538b\u6839\u4e0d\u5b58\u5728                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959766\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : v2410117 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @whileFalse \u5927\u4f6c\u60a8\u597d\uff0c\u9996\u5148\u611f\u8c22\u60a8\u63d0\u4f9b\u7684\u4ee3\u7801\uff0c\u6211\u4f7f\u7528\u6d4b\u8bd5\u540e\uff0c\u53d1\u73b0\u4fee\u6539\u540e\u63d0\u793a`segmentation fault`,\u65e0\u6cd5\u8fd0\u884c,\u662f\u8fd8\u9700\u8981\u4fee\u6539\u5176\u4ed6\u7684\u7ed3\u6784\u5417\uff1f\u8c22\u8c22                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959767\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : v2410117 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zone10 \u611f\u8c22\u60a8\u63d0\u4f9b\u7684\u5efa\u8bae,\u591a\u591a\u770b\u4ee3\u7801\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959768\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : whileFalse <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @v2410117 \u4f60\u5728\u4ee3\u7801\u76f8\u540c\u76ee\u5f55\u4e0b\u653e\u4e00\u4e2a a.txt \u6587\u4ef6\uff0c\u5185\u5bb9\u662f\u201c123test123\u201d\u8bd5\u8bd5\u770b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959769\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : playniuniu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e8c\u8fdb\u5236\u6587\u4ef6\u6bd4\u5982 ELF \u7c7b\u578b\u7684\u662f\u6709\u7279\u5b9a\u683c\u5f0f\u7684\uff0c\u4f60\u8981\u662f\u5728\u4e2d\u95f4\u968f\u4fbf\u589e\u52a0\u957f\u5ea6\uff0c\u4f30\u8ba1\u6574\u4e2a\u7a0b\u5e8f\u90fd\u8fd0\u884c\u4e0d\u4e86\u3002\u8981\u589e\u52a0\u957f\u5ea6\uff0c\u5148\u786e\u5b9a\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u7c7b\u578b\uff0c\u6bd4\u5982 ELF \u683c\u5f0f\u7684\uff0c\u662f\u9700\u8981\u627e\u4e00\u7247\u7a7a\u767d\u533a\u57df\uff0c\u628a\u65b0\u6570\u636e\u653e\u8fdb\u53bb\uff0c\u5728\u628a\u539f\u6765\u8bfb\u8fd9\u7aef\u7a0b\u5e8f\u7684\u5730\u65b9\u6539\u6210\u8bfb\u65b0\u7684\uff0c\u8fd8\u662f\u86ee\u9ebb\u70e6\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959770\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : v2410117 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @whileFalse \u6587\u672c\u6587\u4ef6\u662f\u53ef\u4ee5,\u4f46\u662f\u4e8c\u8fdb\u5236\u6267\u884c\u6587\u4ef6\u5c31\u4e0d\u884c\u4e86\uff0c\u5e94\u8be5\u662f\u5982\u4e0a\u8bf4\u7684\u90a3\u6837\uff0c\u8fd8\u8981\u4fee\u6539\u7ed3\u6784\u5565\u7684\u5427\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959771\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : v2410117 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @playniuniu \u55ef,\u5bf9,\u786e\u5b9e\u5982\u60a8\u6240\u8bf4\u7684\u4e3a elf \u683c\u5f0f,\u6309\u76f4\u63a5\u62fc\u63a5 bytes \u7684\u505a\u6cd5\u786e\u5b9e\u5bfc\u81f4\u6574\u4e2a\u7a0b\u5e8f\u90fd\u65e0\u6cd5\u8fd0\u884c\u4e86.\u6211\u4e5f\u662f\u60f3\u7684\u60a8\u540e\u9762\u63d0\u5230\u7684\u90a3\u4e2a\u64cd\u4f5c,\u5148\u627e\u4e2a\u7a7a\u767d\u533a\u57df\u5199\u597d\uff0c\u7136\u540e\u4fee\u6539\u8bfb\u7684\u5730\u5740\uff0c\u4f46\u662f\u4e0d\u592a\u4f1a\u7528 python \u64cd\u4f5c\uff0c\u6b63\u5728\u5bfb\u627e\u89e3\u51b3\u529e\u6cd5\u4e2d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959772\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mumbler <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e8c\u8fdb\u5236\u7ed3\u6784\u4e00\u822c\u4f1a\u56fa\u5b9a\u5b57\u6bb5\u957f\u5ea6\uff0c\u5982\u679c test \u6ca1\u5360\u6ee1\uff0c\u540e\u9762\u4e00\u5b9a\u4f1a\u6709\u7a7a\u5b57\u8282\uff0c\u5c31\u628a mytest \u5199\u5165\u524d 6 \u4f4d\u3002\u5f52\u6839\u7ed3\u5e95\uff0c\u8981\u4e86\u89e3\u8fd9\u79cd\u4e8c\u8fdb\u5236\u7684\u6587\u4ef6\u7ed3\u6784                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959773\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : whileFalse <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @v2410117 \u53ef\u6267\u884c\u6587\u4ef6\u6709\u6587\u4ef6\u683c\u5f0f\u554a\u2026\u2026\u4f60\u5f97\u7814\u7a76\u6587\u4ef6\u683c\u5f0f\u3002\u4fee\u6539\u8fd8\u662f\u6309\u7167\u6211\u8bf4\u7684\u65b9\u6cd5\u4fee\u6539\u7684\u3002\u4f46\u5728\u7279\u5b9a\u7684\u6587\u4ef6\u683c\u5f0f\u4e0b\u5e94\u8be5\u600e\u4e48\u4fee\u6539\uff0c\u90a3\u4f60\u5f97\u81ea\u5df1\u7814\u7a76\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959774\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhyl <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u9700\u8981\u5199\u5165\u540e\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u8fd8\u662f\u6b63\u5e38\u8fd0\u884c\uff0c\u90a3\u4e48\u91cd\u70b9\u4e0d\u5728\u4e8e\u5982\u4f55\u5199\u5165\uff0c\u9700\u8981\u4e86\u89e3\u5bf9\u5e94\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u683c\u5f0f\uff0c\u4f8b\u5982 windows \u4e0b PE \u683c\u5f0f\u4ee5\u533a\u6bb5\u5212\u5206\uff0c\u4ee3\u7801\u5b58\u653e\u5728\u4ee3\u7801\u6bb5\uff0c\u6570\u636e\u5b58\u653e\u5728\u6570\u636e\u6bb5\uff0c\u5982\u679c\u4fee\u6539\uff08\u53d8\u957f\u6216\u51cf\u77ed\uff09\u6570\u636e\u6bb5\u7684\u5185\u5bb9\uff0c\u90a3\u4e48\u5728\u4ee3\u7801\u6bb5\u4e2d\u6240\u6709\u8fd9\u5757\u4fee\u6539\u6570\u636e\u4e4b\u540e\u7684\u6570\u636e\u88ab\u5f15\u7528\u65f6\uff0c\u5176\u5f15\u7528\u7684\u5730\u5740\u90fd\u9700\u8981\u4fee\u6b63\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959775\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : belite <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u6709\u4e00\u4e2a\u60f3\u6cd5 \u8fb9\u8bfb\u8fb9\u6539\u8fb9\u5199 \u5199\u5230\u53e6\u4e00\u4e2a\u7a7a\u6587\u4ef6\u91cc \u5b8c\u6210\u540e\u66ff\u6362\u539f\u6587\u4ef6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959776\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : aneostart173 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8fd9\u4e2a\u8981\u6c42\u5bf9\u5e94\u6587\u672c\u7f16\u8f91\u5668\u7684\u63d2\u5165\u7f16\u8f91\u64cd\u4f5c\uff0c\u6587\u672c\u7f16\u8f91\u5668\u7684\u5b9e\u73b0\u5c31\u5f88\u590d\u6742\uff0c\u4e00\u4e24\u53e5\u8bf4\u4e0d\u6e05\u695a\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959777\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : CRVV <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @v2410117 <\/p>\n<p>\u5982\u679c\u4f60\u8fde\u6539\u6587\u4ef6\u5185\u5bb9\u90fd\u9700\u8981\u6765\u53d1\u5e16\u5b50\u95ee\uff0c\u6539 ELF \u7136\u540e\u8fd8\u8981\u80fd\u8dd1\u5c5e\u4e8e\u4f60\u4e0d\u53ef\u80fd\u5b8c\u6210\u7684\u4e8b\u60c5\uff0c\u653e\u5f03\u5427\u3002<\/p>\n<p>https:\/\/blog.0patch.com\/2017\/11\/did-microsoft-just-manually-patch-their.html<br \/>\u8fd9\u662f\u5fae\u8f6f\u505a\u8fc7\u7136\u540e\u80fd\u4e0a\u65b0\u95fb\u7684\u64cd\u4f5c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959778\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : playniuniu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @v2410117 \u8fd9\u7bc7\u6587\u7ae0\u6709\u5173\u4e8e Android so \u6587\u4ef6 \u7684\u4fee\u6539\u65b9\u6cd5 http:\/\/www.520monkey.com\/archives\/561\uff0c\u4f60\u53ef\u4ee5\u53c2\u8003\u4e00\u4e0b\uff0c\u5176\u4ed6 ELF \u683c\u5f0f\u5e94\u8be5\u5dee\u4e0d\u591a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959779\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : imn1 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1.\u5b57\u8282\u662f\u53ef\u4ee5\u4f7f\u7528 replace \u51fd\u6570\u7684<br \/>2.\u53ef\u4ee5\u524d\u540e\u622a\u53d6\uff0c\u518d\u7528\u65b0\u5b57\u8282\u91cd\u65b0\u62fc\u63a5<\/p>\n<p>\u5982\u679c\u4e8c\u8fdb\u5236\u6587\u4ef6\u662f\u67d0\u79cd\u683c\u5f0f\uff0c\u81ea\u7136\u8981\u6309\u90a3\u79cd\u683c\u5f0f\u7684\u89c4\u8303\u6765\u505a\uff0c\u4e0d\u662f\u8fd9\u6837\u968f\u610f\u6539\u52a8\uff0c\u4f8b\u5982 jpg \u91cc\u9762\u6539\u52a8 exif\uff0cexif \u5b9e\u9645\u53ea\u662f\u5b57\u8282\u6570\u636e\uff0c\u53ef\u4ee5\u6539\u52a8\u4e0d\u5f71\u54cd\u56fe\u50cf\u663e\u793a\uff0c\u4f46\u4e5f\u662f\u8981\u7b26\u5408 exif \u4ee5\u53ca jpeg \u89c4\u8303\u7684\uff0c\u6ca1\u6709\u8db3\u591f\u77e5\u8bc6\u7684\u8bdd\uff0c\u6700\u597d\u7528\u76f8\u5173\u6a21\u5757\u8f85\u52a9\u5b8c\u6210                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959780\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xcai007 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7528 mmap<\/p>\n<p>import mmap<br \/>with open(&#8216;file&#8217;, &#8216;rb) as f:<br \/> with mmap.mmap(f.fileno(), length=0, access=mmap.ACCESS_READ) as contents:<br \/> start = contents.find(&#8216;test&#8217;)<br \/> print(contents[:start]+&#8217;mytest&#8217;+contents[start+len(&#8216;test&#8217;):]                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3959781\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Owenjia <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4fee\u6539 elf \u6587\u4ef6\u7684\u8bdd\u53ef\u4ee5\u770b\u4e0b lief \u8fd9\u4e2a\u5e93\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6559\u5982\u4f55\u4f7f\u7528 Python \u76f4\u63a5\u5bf9&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\/182305"}],"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=182305"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/182305\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=182305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=182305"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=182305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}