Skip to content

DiffCustomToolOutput

Sebastien Pouliot edited this page Oct 17, 2022 · 5 revisions

You can run existing tools or scripts to help you identify the differences between the two app bundles.

First select the files to compare. The selected line must have two files to be compared.

screenshot 1

Next press SHIFT+T to show the analyzer dialog.

Type the name of the tool (e.g. otool, nm, strings) inside Tool Executable and the arguments inside Arguments.

By default the output is sorted alphabetically. You can disable this by unchecking the Sort checkbox.

screenshot 2

Select (or click) on Open... to run the tool, on both files, then run diff -u on their respective output. The application associated with .diff will be opened with the result.

Alternatively you can select Gist... which will also run the tool and then create a private gist and open your default web browser to display it.

Examples

File Type Tool Arguments Sorted Description
MachO executable otool -L {file} yes List linked libraries and frameworks
MachO / ELF executable nm -g {file} yes List global (exported) symbols
.net assemblies cilout assembly {file} references no List References
.net assemblies cilout assembly {file} definitions no List Definitions
.net assemblies ilspycmd {file} no Decompile (to C#) .net assemblies
.net assemblies ilspycmd -il {file} no Disassemble .net assemblies
Text cat {file} no Display the contents of text file
.plist (binary) /usr/libexec/PlistBuddy -c print {file} no Display the contents of binary plist
Any Binary strings {file} yes List strings found inside the file
Any Binary xxd {file} no Display the contents of binary file

Notes:

  • {file} is a placeholder and will be replaced by the selected file's name.
  • Not every tool is available on all platforms / operating systems. Some might be installed by default, some can be added (first or third party), some won't be available or named differently.
  • Due to how diff works large files with a lot of changes might be difficult to read - and likely not helpful at all.
  • Custom tools or scripts can be useful to reduce the amount of data to diff, IOW avoid GIGO.

non pre-installed tools

macOS specific notes

strings

The macOS version of strings does not support --encoding option and will miss the unicode UTF-16 encoded strings.

You can use brew install binutils to get the GNU version of the strings tool. To avoid conflicting with the macOS version, it will be made available as /opt/homebrew/opt/binutils/bin/strings.

This is important for .net assemblies since they uses 16bits unicode strings. Using --encoding b will show the unicode strings.

Clone this wiki locally