擅长:python、mysql、java
<p>如果您只需要编辑文件中包含的二进制数据,那么只需将文件作为二进制文件打开,然后像对待任何其他二进制文件一样查找/读取/写入。在</p>
<p>请参阅有关读写文件的Python文档:<a href="http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files" rel="nofollow">Reading and Writing Files</a></p>
<p>你会做一些类似的事情:</p>
<pre><code>f = open('filename.exe', 'r+b') //'r+b' means read and write binary
</code></pre>
<p>然后继续搜索文件,在需要的地方读写。在</p>