Skip to main content

NB Binary File Dirty Edit

 

# generate example
while true ; do printf "\xDE\xAD\xBE\xEF" ; done \
          | dd of=file2.raw bs=1c count=32 iflag=fullblock
xxd -d file2.raw
00000000: dead beef dead beef dead beef dead beef  ................
00000016: dead beef dead beef dead beef dead beef  ................
# do some staff
printf "\xAB\xCD" | dd of=file2.raw seek=16  conv=notrunc bs=1c
xxd -d file2.raw
00000000: dead beef dead beef dead beef dead beef  ................
00000016: abcd beef dead beef dead beef dead beef  ................