From f33fbacc6aaa54599458ac3eb375708650656010 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sat, 30 Apr 2022 19:42:48 +0200 Subject: r2: add example rasm and patch file --- src/tools/radare2.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/tools/radare2.md') diff --git a/src/tools/radare2.md b/src/tools/radare2.md index 673c911..2a903da 100644 --- a/src/tools/radare2.md +++ b/src/tools/radare2.md @@ -25,3 +25,24 @@ > r2 -B # open mapped to addr oob # reopen current file at ``` + +# Examples + +## Patch file (alter bytes) +```markdown + > r2 [-w] + oo+ # re-open for write if -w was not passed + s # seek to position + wv # write 4 byte (dword) +``` + +## Assemble / Disassmble (rasm2) +```markdown + rasm2 -L # list supported archs + + > rasm2 -a x86 'mov eax, 0xdeadbeef' + b8efbeadde + + > rasm2 -a x86 -d "b8efbeadde" + mov eax, 0xdeadbeef +``` -- cgit v1.2.3