📕
Radare2手册
  • 简介
  • 历史
  • Radare2框架
  • 下载radare2
  • 编译与可移植性
  • Compilation on Windows
  • Compilation on Android
  • 用户界面
  • 快速上手
    • 命令行选项
    • 命令格式
    • 表达式
    • 基本的debug操作
    • Contributing to radare2
  • 配置
    • Colors
    • 配置项
    • radare2相关文件
  • 基本命令
    • 定位
    • 块大小
    • 节区
    • 映射文件
    • 输出模式
    • 标记符(Flags)
    • 写入数据
    • Zoom模式
    • 复制/粘贴
    • 字节比较
    • SDB
    • Dietline
  • 可视化模式
    • 反汇编界面
    • 汇编界面
    • 变量编辑器界面
    • 可视化面板
  • 搜索字节
    • 基本的搜索用法
    • 配置搜索引擎
    • 搜索重复字节序列
    • 搜索中的自动化
    • 回溯搜索
    • 搜索汇编指令
    • Searching for AES Keys
  • 反汇编
    • 为反汇编添加元数据
    • ESIL
  • 分析
    • 代码分析
    • 变量
    • 类型
    • 调用约定
    • 虚函数表
    • 系统调用
    • 模拟执行
    • Symbols 信息
    • 函数签名
    • 图形化命令
  • 脚本化
    • 循环(Loops)
    • 宏(Macros)
    • R2pipe
  • 调试器
    • 入门
    • 从ida, GDB 或 WinDBG迁移到radare2
    • 寄存器(Registers)
    • 内存映射(Memory Maps)
    • 堆(Heap)
    • 文件(Files)
    • 反向调试
    • Windows消息(Messages)
  • 远程访问
    • 远程GDB调试
    • 远程WinDbg
  • 命令行工具
    • Rax2
    • Rafind2
    • Rarun2
    • Rabin2
      • 文件信息识别
      • 入口点(EP)
      • 导入(Imports)
      • 导出(Exports)
      • Symbols (exports)
      • 库文件
      • 字符串(String)
      • 节区(Sections)
    • Radiff2
      • 二进制文件比较
    • Rasm2
      • 汇编
      • 反汇编
      • 配置项
    • Ragg2
      • Language
    • Rahash2
      • Rahash Tool
  • 插件
    • IO 插件
    • Asm 插件
    • Analysis 插件
    • Bin 插件
    • 其它插件
    • Python插件
    • 对插件进行调试
    • 测试
    • 打包
  • Crackmes
    • IOLI
      • IOLI 0x00
      • IOLI 0x01
    • Avatao R3v3rs3 4
      • .radare2
      • .first_steps
      • .main
      • .vmloop
      • .instructionset
      • .bytecode
      • .outro
  • Reference Card
  • Acknowledgments
由 GitBook 提供支持
在本页
  • Dietline
  • 自动补全
  • Emacs (default) mode
  • 移动
  • 删除
  • Killing and Yanking
  • History
  • Vi mode
  • Entering command modes
  • Moving
  • Deleting and Yanking

这有帮助吗?

  1. 基本命令

Dietline

上一页SDB下一页可视化模式

最后更新于4年前

这有帮助吗?

Dietline

Radare2具有如处理输入的能力,通过Lean库处理命令编辑和历史导航的功能,允许用户移动光标、进行历史搜索,并实现了自动补全功能。 归功于radare2的可移植性,在radare2支持的所有平台上Dietline的体验都是统一的,在radare2的所有子shell - 主界面,SDB shell,可视化界面以及偏移量界面都使用了Dietline,其也实现了常见的特性以及按键行为,与GNU Readline相兼容。

Dietline支持两类配置模式: Emacs-mode和Vi-mode

其还支持著名的Ctrl-R-历史字符串逆向搜索功能。使用TAB键可以显示出自动补全建议。

自动补全

radare2里的每个shell都支持自动不全,其支持多种模式 - files,flags,以及SDB keys/namespaces。为了能够方便地选择补全选项,可以将scr.prompt.popup设置为true,启用下拉式补全窗口。

Emacs (default) mode

默认的dietline模式与readline的Emacs-like模式兼容,因此对应的行为为:

移动

  • Ctrl-a - 移动至行开头

  • Ctrl-e - 移动至行结尾

  • Ctrl-b - 向左移动一个字符

  • Ctrl-f - 向右移动一个字符

删除

  • Ctrl-w - 删除前一个词

  • Ctrl-u - 删除整行

  • Ctrl-h - 删除左边的字符

  • Ctrl-d - 删除右边的字符

  • Alt-d - 删除光标右边的一个词

Killing and Yanking

  • Ctrl-k - kill至行尾

  • Ctrl-x - 反向kill至行的开头

  • Ctrl-t - kill至词尾, 若在二词之间则kill至下一个词结束。词边界的界定与下面相同

  • Ctrl-w - 反向kill至词头,词以空格作为界定。kill的内容都存在kill-ring中

  • Ctrl-y - 将kill ring的顶部(最近的一个内容)粘贴到此处

  • Ctrl-] - 将kill ring旋转,然后将新的kill ring的顶部内容粘贴于此。仅可在前一条命令为yank或yank-pop才可进行此操作。

History

  • Ctrl-r - the reverse search in the command history

Vi mode

Radare2 also comes with in vi mode that can be enabled by toggling scr.prompt.vi. The various keybindings available in this mode are:

Entering command modes

  • ESC - enter into the control mode

  • i - enter into the insert mode

Moving

  • j - acts like up arrow key

  • k - acts like down arrow key

  • a - move cursor forward and enter into insert mode

  • I - move to the beginning of the line and enter into insert mode

  • A - move to the end of the line and enter into insert mode

  • ^ - move to the beginning of the line

  • 0 - move to the beginning of the line

  • $ - move to the end of the line

  • h - move one character backward

  • l - move one character forward

Deleting and Yanking

  • x - cuts the character

  • dw - delete the current word

  • diw - deletes the current word.

  • db - delete the previous word

  • D - delete the whole line

  • dh - delete a character to the left

  • dl - delete a character to the right

  • d$ - kill the text from point to the end of the line.

  • d^ - kill backward from the cursor to the beginning of the current line.

  • de - kill from point to the end of the current word, or if between words, to the end of the next word. Word boundaries are the same as forward-word.

  • p - yank the top of the kill ring into the buffer at point.

  • c - acts similar to d based commands, but goes into insert mode in the end by prefixing the commands with numbers, the command is performed multiple times.

If you are finding it hard to keep track of which mode you are in, just set scr.prompt.mode=true to update the color of the prompt based on the vi-mode.

readline