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

前端 未结 8 857
轻奢々
轻奢々 2020-12-02 12:25

Is there any straightforward way to modify a binary from the commandline? Let\'s say I know that my binary contains 1234abcd and i want to change it to 12FFabcd or FFFFabcd

8条回答
  •  抹茶落季
    2020-12-02 12:35

    Some alternatives:

    • HexAlter (open source compiled tool)
    • ucon64 --nbak --poke=OFF:V FILE (meant for ROM dumps, should work with any binary file, but no inplace editing)
    • printf '\x31' | dd of=FILE bs=1 seek=OFFSET count=1 conv=notrunc (wrapped in a shellscript like this that also allows reading)

提交回复
热议问题