radare2/man/radare2.1

157 lines
4.7 KiB
Groff
Raw Normal View History

.Dd May 20, 2022
2014-09-30 09:01:45 +00:00
.Dt RADARE2 1
2014-09-30 09:37:26 +00:00
.Sh NAME
.Nm radare2
2021-05-25 08:51:18 +00:00
.Nd Advanced command-line hexadecimal editor, disassembler and debugger
.Sh SYNOPSIS
.Nm radare2
.Op Fl a Ar arch
.Op Fl b Ar bits
.Op Fl B Ar baddr
.Op Fl c Ar cmd
.Op Fl e Ar k=v
2011-12-02 02:43:08 +00:00
.Op Fl i Ar file
.Op Fl I Ar prefile
2016-10-04 12:47:09 +00:00
.Op Fl k Ar kernel
2016-04-04 20:24:53 +00:00
.Op Fl m Ar addr
.Op Fl p Ar project
.Op Fl P Ar patch
.Op Fl r Ar rarun2
.Op Fl R Ar rr2rule
.Op Fl s Ar addr
.Op Fl 0AdDjwntLquvVxX
.Ar -|--|=|file
.Sh DESCRIPTION
2021-05-25 08:51:18 +00:00
radare2 is a command-line hexadecimal editor.
.Pp
"r2" is the alias program name for radare2.
.Pp
This manpage is not updated yet. Feel free to contribute.
.Pp
The options are:
.Bl -tag -width Fl
2014-11-03 15:52:10 +00:00
.It Fl Fl
Open radare2 on an empty file
.It Fl
Equivalent of 'r2 malloc://512'
2014-08-17 00:55:47 +00:00
.It Fl 0
Print \\x00 after initialization and after every command executed
2017-02-23 11:13:17 +00:00
.It Fl 2
Close stderr before starting RCore
.It Fl a Ar arch
force asm.arch (x86, ppc, arm, mips, bf, java, ...)
.It Fl A
run 'aaa' command before prompt or patch to analyze all referenced code. Use -AA to run aaaa
.It Fl b Ar bits
force asm.bits (16, 32, 64)
.It Fl B Ar baddr
Specify the base address to be used when loading a new binary. See 'e?bin.baddr'
.It Fl c Ar cmd
Execute the given command before giving prompt
.It Fl d
Start in debugger mode
.It Fl D Ar dbg.backend
Enable debug mode. Set cfg.debug=true
2011-12-02 02:43:08 +00:00
.It Fl e Ar k=v
Set configuration eval variable key=value. For example \-e scr.color=false. When -e is passed after -j, it will set the script source to run instead of setting eval vars.
2011-12-02 02:43:08 +00:00
.It Fl f
Blocksize = file size
.It Fl j
Run QJS script if an argument is passed or enter the qjs shell if no file is specified. You can evaluate expressions when passing the -e flag after the -j.
2011-12-02 02:43:08 +00:00
.It Fl i Ar file
Run script file. After the file is loaded
2016-07-05 22:09:55 +00:00
.It Fl I Ar file
Run script file. Before the file is loaded
2016-10-04 12:47:09 +00:00
.It Fl k Ar kernel
Select kernel (asm.os) for syscall resolution
.It Fl l Ar plugfile
Load given plugin file
.It Fl L
List loaded IO plugins.
.It Fl LL
List loaded core plugins.
2016-04-04 20:24:53 +00:00
.It Fl m Ar addr
map file at given address
2016-03-12 17:01:12 +00:00
.It Fl M
Disable demangling
2011-12-02 02:43:08 +00:00
.It Fl n
Do not perform any analysis (r_bin). Just load the raw file
.It Fl nn
Only load the rbin structures (elf, mach0, ...)
.It Fl N
Do not load user settings/projects from ~/.radare2rc, ~/.config/radare2/radare2rc and the scripts inside .../radare2rc.d/ directory.
.It Fl NN
Same as -N but also disables the automatic loading of plugins on startup time
2011-12-02 02:43:08 +00:00
.It Fl q
2017-03-20 09:12:59 +00:00
Quiet mode (no prompt) and quit after running the commands specified with -i or -c
.It Fl qq
Quit before showing the prompt. Right after all the -e -c and -i arguments are evaluated.
2017-03-20 09:12:59 +00:00
.It Fl Q
Same as q, but exiting without freeing RCore, this produces leaks at exit time, but saves some precious ms to run the testsuite in fast mode.
2011-12-02 02:43:08 +00:00
.It Fl p Ar prj
Set project file
.It Fl P Ar file
2016-05-25 21:37:41 +00:00
Apply rapatch file and quit (see doc/rapatch.md for more details)
.It Fl r Ar rarun2
2016-05-15 21:19:06 +00:00
Specify dbg.profile rarun2 profile to use when spawning a program for debugging
.It Fl R Ar rarun2-directive
Specify custom rarun2 directives without having to create a rarun2 profile
2011-12-02 02:43:08 +00:00
.It Fl s Ar addr
Start seeking at this address
2014-02-20 23:49:47 +00:00
.It Fl S
Enable sandboxed mode (same as \-e cfg.sandbox=true)
2011-12-02 02:43:08 +00:00
.It Fl t
Get binary information and analyze binary in a background thread
.It Fl T
Avoid computing the file hashes
2015-07-05 22:57:55 +00:00
.It Fl u
2016-05-15 21:19:06 +00:00
Set bin.filter=false to load rbin info without filtering names
2011-12-02 02:43:08 +00:00
.It Fl v
2016-05-15 21:19:06 +00:00
Show version information and exit (Use -qv to get just the version number)
2015-07-05 22:57:55 +00:00
.It Fl V
2022-05-20 09:24:03 +00:00
Show radare2 library versions (prints JSON format if -j is used)
2011-12-02 02:43:08 +00:00
.It Fl w
Open in write mode
.It Fl h
Show help message
2011-12-02 02:43:08 +00:00
.It Fl H
Show files and environment help
2017-08-23 23:24:52 +00:00
.It Fl x
Open the file map without executable permissions
.It Fl X
Same as -e bin.usextr=false, do not use extract plugins, useful for dyldcache
.El
.Sh SHELL
2016-05-15 21:19:06 +00:00
Type '?' for help
.Pp
.Sh VISUAL
2016-05-15 21:19:06 +00:00
To enter visual mode use the 'V' command. Then press '?' for help
.Sh DEBUGGER
2016-05-15 21:19:06 +00:00
In r2 the debugger commands are implemented under the 'd' command. Type 'd?' for help
.Sh ENVIRONMENT
2023-08-18 12:07:24 +00:00
R2_ARGS run radare2 with defined arguments in environment and ignore cli ones
R2_IGNVER load plugins ignoring the specified version. (be careful)
R2_DEBUG if defined, show error messages and crash signal
R2_DEBUG_ASSERT=1 set a breakpoint when hitting an assert
2023-08-18 12:07:24 +00:00
R2_MAGICPATH /Users/pancake/.local/share/radare2/share/radare2/4.5.0-git/magic
R2_NOPLUGINS do not load r2 shared plugins
R2_RCFILE ~/.radare2rc (user preferences, batch script)
R2_RDATAHOME /usr/local
.Ar FILE
path to the current working file.
.Sh SEE ALSO
.Pp
.Xr r2r(1) ,
.Xr rahash2(1) ,
.Xr rafind2(1) ,
.Xr rabin2(1) ,
.Xr radiff2(1) ,
.Xr rasm2(1) ,
.Xr rax2(1) ,
.Xr ravc2(1) ,
.Xr ragg2(1) ,
.Xr rarun2(1) ,
.Sh AUTHORS
.Pp
pancake <pancake@nopcode.org>