Home  >  Q&A  >  body text

python - Bin二进制文件编辑工具及方式?

Bin二进制文件编辑工具,好像UltraEdit可以查看bin文件,但不知道是否可以直接编辑文件?

另外,有什么C,C++,Python实现方式,可以编辑二进制文件?

伊谢尔伦伊谢尔伦2766 days ago539

reply all(4)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-17 13:21:41

    1.UltraEdit can edit binary files
    2. For C/C++, you can check fopen() and fwrite()

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 13:21:41

    It can be edited. There are also tools such as HxD, WinHex.

    To implement programming, just use the relevant API to open the file and read and write in binary mode. For example, C++:

    ofstream result;
    result.open("output.bin", ios::out | ios::binary);
    if(result.is_open()){
        //result.put(data);
        result.close();
    }
    

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 13:21:41

    vim :%!xxd

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 13:21:41

    010 editor.

    reply
    0
  • Cancelreply