Write byte at address (hexedit/modify binary from the command line)

printf '\x31\xc0\xc3' | dd of=test_blob bs=1 seek=100 count=3 conv=notrunc

dd arguments:

  • of | file to patch
  • bs | 1 byte at a time please
  • seek | go to position 100 (decimal)
  • conv=notrunc | don’t truncate the output after the edit (which dd does by default)

One Josh looking out for another 😉

Leave a Comment