I need to write a script that patches a few bytes at a particular offset in a binary file. I know of textual tools for this task (sed, though I find it utterly hard to use) but can't find one for binary patching. Are there any?
If not installed by default, anything I can install with Homebrew would be acceptable as well.
Best Answer
You can achieve it with
dd
command. Here's an example:Explanation: