比较两个mach-o文件

时间:2012-07-17 06:18:10

标签: hex mach-o diffmerge

我有两个mach-o文件,我需要找到它们之间的差异(十六进制不同值)。是否有任何可用的工具。

我尝试使用“DiffMerge”但它似乎没有支持的编码格式。

1 个答案:

答案 0 :(得分:0)

怎么样:

hexdump binary1 > dump1.txt
hexdump binary2 > dump2.txt
diff dump1.txt dump2.txt

这将为您提供一个diff文件,您可以使用hexfiend第一列中的偏移量或您选择的编辑器进一步调查。

2c2
< 0000010 21 00 00 00 bc 0f 00 00 85 00 20 00 01 00 00 00
---
> 0000010 20 00 00 00 84 0f 00 00 85 00 20 00 01 00 00 00
248,254c248,250
< 0000f80 0c 00 00 00 38 00 00 00 18 00 00 00 02 00 00 00
< 0000f90 00 00 01 00 00 00 01 00 40 65 78 65 63 75 74 61
< 0000fa0 62 6c 65 5f 70 61 74 68 2f 69 6e 6a 65 63 74 2e
< 0000fb0 64 79 6c 69 62 00 00 00 26 00 00 00 10 00 00 00
< 0000fc0 58 76 18 00 a4 23 00 00 1d 00 00 00 10 00 00 00
< 0000fd0 e0 09 19 00 60 37 00 00 00 00 00 00 00 00 00 00
< 0000fe0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
---
> 0000f80 26 00 00 00 10 00 00 00 58 76 18 00 a4 23 00 00
> 0000f90 1d 00 00 00 10 00 00 00 e0 09 19 00 60 37 00 00
> 0000fa0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00