I really like radare2 and I am trying to follow a tutorial in which some code is changed to data. The tutorial uses IDA, I have tryed this with radare2. I entered visual mode by pressing V
and cursor mode by pressing c
. I stepped to the code which I want to modify.
| 0x00400440 * 31ed xorl %ebp, %ebp ; [12] va=0x00400440 pa=0x00000440 sz=386 vsz=
| 0x00400442 4989d1 movq %rdx, %r9
After pressing dd
the following output appeared:
0x00400440 hex length=175 delta=0
0x00400440 |31ed 4989 d15e 4889 e248 83e4 f050 5449| 1.I..^H..H...PTI
0x00400450 |c7c0 c005 4000 48c7 c150 0540 0048 c7c7| ....@.H..P.@.H..
0x00400460 |3605 4000 e8b7 ffff fff4 660f 1f44 0000| 6.@.......f..D..
0x00400470 |b847 1060 0055 482d 4010 6000 4883 f80e| .G.`.UH-@.`.H...
0x00400480 |4889 e576 1bb8 0000 0000 4885 c074 115d| H..v......H..t.]
0x00400490 |bf40 1060 00ff e066 0f1f 8400 0000 0000| .@.`...f........
0x004004a0 |5dc3 0f1f 4000 662e 0f1f 8400 0000 0000| ]...@.f.........
0x004004b0 |be40 1060 0055 4881 ee40 1060 0048 c1fe| .@.`.UH..@.`.H..
0x004004c0 |0348 89e5 4889 f048 c1e8 3f48 01c6 48d1| .H..H..H..?H..H.
0x004004d0 |fe74 15b8 0000 0000 4885 c074 0b5d bf40| .t......H..t.].@
0x004004e0 |1060 00ff e00f 1f00 5dc3 660f 1f44 00 | .`......].f..D.
; [12] va=0x00400440 pa=0x00000440 sz=386 vsz=
0x004004ef ~ 00803d490b20 addb %al, 0x200b493d(%rax)
Pressing dd
again disappears. After pressing dd
again nothing happens. This happens with all new lines, but I think the bytes remain interpreted as code since they are disassembled. Plese show me ho can I do this in radare2. I haven't done this before in any disassembler.