Update rapatch documentation

This commit is contained in:
pancake 2016-05-25 23:37:41 +02:00
parent 132b173b87
commit f05c81b074
3 changed files with 33 additions and 28 deletions

View File

@ -1,27 +0,0 @@
RAPATCH
=======
Rapatch is a human friendly text format to apply patches
to binary files.
Patch format
============
^# -> 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 r2 and then
write the string 'Hello' at 0x200 offset
# rapatch example
:?e hello world
0x200 "Hello"

32
doc/rapatch.md Normal file
View File

@ -0,0 +1,32 @@
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 r2 and then write the string 'Hello' at 0x200 offset
# rapatch example
:?e hello world
0x200 "Hello"
Running rapatches
-----------------
$ r2 -P rapatch.txt target-program.txt

View File

@ -78,7 +78,7 @@ Quiet mode (no prompt)
.It Fl p Ar prj
Set project file
.It Fl P Ar file
Apply rapatch file and quit
Apply rapatch file and quit (see doc/rapatch.md for more details)
.It Fl R Ar rarun2
Specify dbg.profile rarun2 profile to use when spawning a program for debugging
.It Fl s Ar addr