Radare2 Disassembler您如何组织可视面板(V!)?

问题描述 投票:4回答:1

我想使用Radare2来学习C是如何组装成汇编的,但是我在布局上遇到了麻烦。我认为是V!模式非常方便,因为您可以看到寄存器随着指令指针在程序中移动而更新,但是我不了解其布局。

这是我想要的布局示例:enter image description here

似乎当我添加一个窗口(如这张照片中的堆栈或寄存器)时,它似乎出现在屏幕外,我必须尝试关闭不同的窗口并拆分窗口,直到布局类型正确。有没有一种简单的方法可以准确地更改每个窗口中的内容?

我知道“ X”关闭一个窗口,“ z”将当前窗口切换到最前面,“-” /“ |”分割一个窗口。

我尝试查看帮助,但似乎无法找出与此问题相关的任何其他命令。

x86-64 reverse-engineering disassembly radare2
1个回答
0
投票

环境

  • radare2: 4.2.0-git 23712 @ linux-x86-64 git.4.1.1-97-g5a48a4017提交:5a48a401787c0eab31ecfb48bebf7cdfccb66e9b内部版本:2020-01-09__21:44:51
  • 系统: Ubuntu 18.04.3 LTS

SOLUTION] >>

  • 此问题可以通过多种方式解决,这只是一个示例。
  • 要创建您描述的布局,请通过以下方式更改默认布局中显示的命令:

  1. 单击内部/选择要更改的面板。
  2. 右键单击面板并选择新命令或
  3. 输入“ e”,然后输入新命令。 (例如:寄存器= dr)
  • 下面显示的更多文档可以在这里找到:https://radare.gitbooks.io/radare2book/visual_mode/visual_panels.html

  • |Visual Ascii Art Panels:
    | |      split the current panel vertically
    | -      split the current panel horizontally
    | :      run r2 command in prompt
    | _      start the hud input mode
    | ?      show this help
    | ??     show the user-friendly hud
    | !      run r2048 game
    | .      seek to PC or entrypoint
    | *      show pseudo code/r2dec in the current panel
    | /      highlight the keyword
    | (      toggle snow
    | &      toggle cache
    | [1-9]  follow jmp/call identified by shortcut (like ;[1])
    | ' '    (space) toggle graph / panels
    | tab    go to the next panel
    | a      toggle auto update for decompiler
    | b      browse symbols, flags, configurations, classes, ...
    | c      toggle cursor
    | C      toggle color
    | d      define in the current address. Same as Vd
    | D      show disassembly in the current panel
    | e      change title and command of current panel
    | g      go/seek to given offset
    | G      show graph in the current panel
    | i      insert hex
    | hjkl   move around (left-down-up-right)
    | J      scroll panels down by page
    | K      scroll panels up by page
    | H      scroll panels left by page
    | L      scroll panels right by page
    | m      select the menu panel
    | M      open new custom frame
    | nN     create new panel with given command
    | pP     seek to next or previous scr.nkey
    | q      quit, back to visual mode
    | r      toggle jmphints/leahints
    | sS     step in / step over
    | t      rotate related commands in a panel
    | uU     undo / redo seek
    | w      start Window mode
    | V      go to the graph mode
    | X      close current panel
    | z      swap current panel with the first one
    

    示例

    打开视觉面板

    user@host:~$ r2 /bin/ls
    [0x00005850]> aaaa
    ...
    [0x00005850]> s main
    [0x00003e90]> V!
    

    打开可视面板后的默认视图default panel view

    选择右上方的面板,然后右键单击并选择寄存器selecting registers command

    选择右下面板,然后右键单击并选择堆栈selecting stack command

    最终视图enter image description here

    © www.soinside.com 2019 - 2024. All rights reserved.