如何修改二进制(Mach-O)文件的字符串?

发布于 2024-08-15 20:55:46 字数 53 浏览 3 评论 0原文

有什么方法可以(轻松)修改 Mach-O 二进制文件中的字符串吗?我想延长现有字符串的长度。

Is there any way to (easily) modify a string in a Mach-O binary? I want to extend the length of a pre-existing string.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

老街孤人 2024-08-22 20:55:46

https://sourceforge.net/projects/machoview

通过手动编辑来扩展字符串并不是一件容易的事,但至少你可以了解一下 Mach-O 文件结构。

https://sourceforge.net/projects/machoview

Extending the string will not be an easy task with manual editing, but at least you can get a picture about the Mach-O file structure.

执手闯天涯 2024-08-22 20:55:46

这不是一个简单的过程,您不能只是去更改 textedit 中的字符串并希望它起作用,因为 mach-o 二进制文件使用编码字节,如果 1 个字节乱序,则二进制文件将无法正确执行。如果您确实希望修改完全组装的 mach-o 二进制文件中的字符串而不破坏其精致的代码,您将需要大量知识并理解 mach 二进制文件的工作原理。您将需要能够以单个字节修改它并替换其编码数字和偏移量。 Mac 版 Hopper 或许能够帮助您了解 mach-o 二进制文件的架构。但是,如果您需要将字符串替换为长度完全相同的不同字符串,则可以简单地替换其字节,以便二进制文件仍然以相同的长度读取它。但您将需要一个十六进制修改应用程序来执行此操作。

This will not be an easy procedure, you cannot just go and change a string in textedit and hope it works because mach-o binaries work with encoded bytes and if 1 byte is out of order, the binary will not be executed properly. If you really wish to modify a string inside a fully assembled mach-o binary file without disrupting its delicate code you will need lots of knowledge and understanding of how mach binaries work. You will need to be able to modify it in single bytes and replacing its encoded numbers and offsets. Hopper for Mac might be able to help you understand the architecture of a mach-o binary. but if you need to replace a string with a different string with the exact same length, you might be able to simply replace its bytes so that the binary still reads it at the same length. but you will need a hexadecimal modifying application to do that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文