rizin/doc/rapatch.md
Riccardo Schirone 22239a1bfc
Delete some unneded documentation (#59)
* Adjust doxygen documentation on rz_cmd
2020-10-30 16:06:38 +01:00

713 B

RAPATCH

Human friendly text format to apply patches to binary files.

Patch format

Those patches must be written in files and the syntax looks like the following:

^# -> comments
. -> execute command
! -> execute command
OFFSET { code block }
OFFSET "string"
OFFSET 01020304
OFFSET : assembly
+ {code}|"str"|0210|: asm

Example scripts

This script will run the ?e .. command in rizin and then write the string 'Hello' at 0x200 offset

# rapatch example
:?e hello world
0x200 "Hello"

Running rapatches

$ rizin -P rapatch.txt target-program.txt

Or for scripted patching like patch(1):

$ rizin -w -q -P rapatch.txt target-program.txt