使用 bash 或 C 比较 iOS 上的应用程序二进制文件
我的 iPhone 已越狱并具有完整的终端支持。我需要一些东西(不是 cmp
或 diff
)来比较应用程序二进制文件。这两个命令都给了我奇怪的结果,它们基本上说两个二进制文件完全不同,当我可以看到并知道只有一个字节被更改时。
My iPhone is jail broken with full terminal support. I need something (that isn't cmp
or diff
) to compare app binaries. Both those commands give me weird results, they basically say that both binaries are completely different, when I can see and know that only one byte has been changed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果可以为 iPhone 构建它,您可以尝试 bsdiff,它是一个类似 diff 的实用程序,专门设计用于处理二进制数据。您提到的工具适用于查找差异时的文本输入。
如果做不到这一点,您可以尝试生成一个极其臃肿的文本表示形式,每行一个字节(并且没有行号或偏移量!),然后对其进行文本比较。它应该拾取单个更改的字节,但根据文件的大小,它可能会非常慢和/或笨重。
If it's possible to build it for the iPhone, you could try bsdiff, it's a diff-like utility that is specifically designed to handle binary data. The tools you mention are meant for textual input when it comes to finding differences.
Failing that, you could try generating a brutally bloated textual representation, with a single byte per line (and no line number or offset!), and then text-
diff
ing that. It should pick up the single changed byte, but depending on the sizes of the files it might be very slow and/or unwieldy.