Search code examples
linuxcommand-linebinarydecode

What is good way to modify (add a number to every byte) a binary file in Linux?


I have an encoded file whose bytes are off by some number. I want to add that number to every byte in the file to decode it. But doing so by manually adding number to every single byte in a hex editor is very time-consuming and not efficient.

It looks like bbe can be right tool to do it, but I'm not sure how to use it well. Is there a tool that has a feature to add/delete/modify a binary file block by block?


Solution

  • tr \\000-\\376 \\001-\\377  <input >output