Linux command
r2 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Open binary for analysis
r2 [binary]
Open in write mode
r2 -w [binary]
Open with analysis
r2 -A [binary]
Debug mode
r2 -d [binary]
Open remote file
r2 [gdb://host:port]
说明
r2 (radare2) is an open-source reverse engineering framework for analyzing, disassembling, debugging, and patching binary files. It supports a wide range of architectures and file formats, providing an interactive command-line shell with hundreds of commands for navigating code, examining data structures, and performing forensic analysis. The framework includes a built-in disassembler, hex editor, debugger, and scripting engine. The -A flag triggers automatic analysis to identify functions, strings, and cross-references on load, while -d enables live debugging of running processes. Remote analysis is supported through protocols like GDB, allowing connection to embedded targets and virtual machines. Its plugin system and scripting via Python, JavaScript, and r2pipe make it extensible for custom analysis workflows.
参数
- -A
- Run analysis.
- -w
- Write mode.
- -d
- Debug mode.
- -a _ARCH_
- Architecture.
- -b _BITS_
- Bits (32/64).
- -c _CMD_
- Run command.
FAQ
What is the r2 command used for?
r2 (radare2) is an open-source reverse engineering framework for analyzing, disassembling, debugging, and patching binary files. It supports a wide range of architectures and file formats, providing an interactive command-line shell with hundreds of commands for navigating code, examining data structures, and performing forensic analysis. The framework includes a built-in disassembler, hex editor, debugger, and scripting engine. The -A flag triggers automatic analysis to identify functions, strings, and cross-references on load, while -d enables live debugging of running processes. Remote analysis is supported through protocols like GDB, allowing connection to embedded targets and virtual machines. Its plugin system and scripting via Python, JavaScript, and r2pipe make it extensible for custom analysis workflows.
How do I run a basic r2 example?
Run `r2 [binary]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -A do in r2?
Run analysis.