blob: 2a903da1303be928afc570b5a76175f72a56f818 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# radare2(1)
## print
```markdown
pd <n> [@ <addr>] # print disassembly for <n> instructions
# with optional temporary seek to <addr>
```
## flags
```markdown
fs # list flag-spaces
fs <fs> # select flag-space <fs>
f # print flags of selected flag-space
```
## help
```markdown
?*~<kw> # '?*' list all commands and '~' grep for <kw>
?*~... # '..' less mode /'...' interactive search
```
## relocation
```markdown
> r2 -B <baddr> <exe> # open <exe> mapped to addr <baddr>
oob <addr> # reopen current file at <baddr>
```
# Examples
## Patch file (alter bytes)
```markdown
> r2 [-w] <file>
oo+ # re-open for write if -w was not passed
s <addr> # seek to position
wv <data> # 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
```
|