mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 13:19:54 +00:00
Update rapatch documentation
This commit is contained in:
parent
132b173b87
commit
f05c81b074
27
doc/rapatch
27
doc/rapatch
@ -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
32
doc/rapatch.md
Normal 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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user