.Dd July 14, 2026 .Dt RABIN2 1 .Sh NAME .Nm rabin2 .Nd Binary Information Extractor .Sh SYNOPSIS .Nm rabin2 .Op Fl AcdeEghHiIjJlLMpqQrRsStuVvwxZ .Op Fl a Ar arch .Op Fl b Ar bits .Op Fl B Ar addr .Op Fl C Ar fmt:C:[D] .Op Fl D Ar lang sym|- .Op Fl f Ar subbin .Op Fl F Ar binfmt .Op Fl k Ar query .Op Fl K Ar algo .Op Fl m Ar addr .Op Fl n Ar str .Op Fl N Ar minlen:maxlen .Op Fl o Ar str .Op Fl O Ar binop .Op Fl X Ar fmt file ... .Op Fl @ Ar addr .Ar file .Sh DESCRIPTION A binary information extractor supporting ELF, PE, MZ, and Mach-O formats, providing details on headers, sections, symbols, imports, exports, and debug data. .Pp Most options are also available within the radare2 'i' command (type 'i?' for help). .Bl -tag -width Fl .It Fl @ Ar addr Show section, symbol or import at given address .It Fl A List sub-binaries and their associated arch-bits pairs .It Fl a Ar arch Set arch (x86, arm, .. or _) .It Fl b Ar bits Set bits (32, 64, ...) .It Fl B Ar addr Override base address (for address independent binaries) .It Fl c List classes .It Fl cc List classes in header format .It Fl C Ar [fmt:C[:D]] Create [elf,mach0,pe] with Code and Data hexpairs (see -a) .It Fl d Show debug/dwarf information .It Fl D Ar lang symbolname|- Demangle symbol name (or - to read from stdin) for lang (cxx, ibmxl, swift, java, msvc, ..) .It Fl e Program entrypoint .It Fl ee Constructor/destructor entrypoints .It Fl E Globally exportable symbols .It Fl f Ar subbin Select sub-binary architecture. Useful for fat-mach0 binaries .It Fl F Ar binfmt Force to use that bin plugin (ignore header check) .It Fl g Same as -SMZIHVResizcld -SS -SSS -ee (show all info) .It Fl G Ar addr Load address . address to header .It Fl h Show this help message .It Fl H Header fields .It Fl I Binary info .It Fl i Imports (symbols imported from libraries) .It Fl j Output in json .It Fl J Ar var Display environment variable .It Fl k Ar query Perform SDB query on loaded file. For example: '*' .It Fl K Ar algo Calculate section checksums (md5, sha1, ..) .It Fl l List linked libraries to the binary .It Fl L Ar plugin List supported bin plugins or plugin details .It Fl m Ar addr Show source line at addr .It Fl M Main (show address of main symbol) .It Fl n Ar str Show section, symbol or import named str .It Fl N Ar minlen:maxlen Force min:max number of chars per string (see -z and -zz) .It Fl o Ar str Output file or extraction directory for write operations .It Fl O Ar binop Perform binary operation on target binary (dump, resize, change sections, ...). Use -O help for more information: .Bd -literal -offset indent e/0x8048000 change entrypoint d/s/1024 dump symbols d/S/.text dump section r/.data/1024 resize section R remove RPATH a/l/libfoo.dylib add library p/.data/rwx change section permissions c show Codesign data C show LDID entitlements .Ed .It Fl p Show always physical addresses .It Fl P Show debug/pdb information .It Fl PP Download pdb file for binary .It Fl q Be quiet, just show less data .It Fl qq Show less info (no addr/size for -z for ex.) .It Fl Q Show load address used by dlopen (non-aslr libs) .It Fl r Radare output .It Fl R Relocations .It Fl s Symbols .It Fl S Sections .It Fl SS Segments .It Fl SSS Sections mapping to segments .It Fl t Display file hashes .It Fl T Display file signature, certificates and signing details .It Fl u Resources .It Fl v Display version and quit .It Fl V Show binary version information .It Fl w Display try/catch blocks .It Fl x Extract sub-binaries contained in the file (for example, architectures inside a FAT Mach-O binary). Combine with .Fl S , .Fl SS , or .Fl u to extract sections, segments, or raw resources instead. Thus, .Fl xS extracts sections, .Fl xSS extracts segments, and .Fl xu extracts resources. Resource extraction may be combined with section or segment extraction. Section, segment, and resource filenames include their kind, sanitized name or type, and index; existing files are never overwritten. Use .Fl o Ar dir to select the output directory. Without it, sections, segments, and resources are written below .Pa .sections , .Pa .segments , and .Pa .resources , respectively. Sub-binaries retain the traditional .Pa .fat directory. .It Fl X Ar format file ... Package in fat or zip the given files .It Fl z Strings (from data section) .It Fl Z Guess size of binary program .It Fl zz Show strings from raw bins .It Fl zzz Dump raw strings to stdout (for huge files) .El .Sh ENVIRONMENT .Pp .Bl -tag -width Fl .It Ev R2_NOPLUGINS Same as r2 -N. Do not load shared plugins .It Ev R2_PLUGINS_ORDER Plugin load order: i=internal, e=env, h=home, s=system; default=iehs; ? prints help .It Ev RABIN2_ARGS Ignore CLI and use these arguments instead .It Ev RABIN2_CHARSET Set default value charset for -z strings .It Ev RABIN2_DEBASE64 Same as r2 -e bin.str.debase64 - try to decode all strings as base64 if possible .It Ev RABIN2_DEMANGLE Same as r2 -e bin.demangle - demangle symbols .It Ev RABIN2_DEMANGLE_CMD Same as r2 -e bin.demangle.cmd - try to purge false positives .It Ev RABIN2_DEMANGLE_TRYLIB Same as r2 -e bin.demangle.trylib= - load Swift libs to demangle (default: false) .It Ev RABIN2_FILTER Same as r2 -e bin.filter= - set to false to not rename duplicated symbols/sections (default: true) .It Ev RABIN2_LANG Same as r2 -e bin.lang - assume lang for demangling .It Ev RABIN2_MACHO_NOFUNCSTARTS If set it will ignore the FUNCSTART information .It Ev RABIN2_MACHO_NOSWIFT Avoid parsing the swift metadata .It Ev RABIN2_MACHO_SKIPFIXUPS Do not parse the mach-o chained fixups .It Ev RABIN2_MAXSTRBUF Same as r2 -e bin.str.maxbuf - specify maximum buffer size .It Ev RABIN2_PDBSERVER Same as r2 -e pdb.server - use alternative PDB server .It Ev RABIN2_PREFIX Same as r2 -e bin.prefix - prefix symbols/sections/relocs with a specific string .It Ev RABIN2_RESRAW Same as r2 -e bin.resraw=true - extract resources without decoding their contents .It Ev RABIN2_STRFILTER Same as r2 -e bin.str.filter .It Ev RABIN2_STRPURGE Same as r2 -e bin.str.purge - try to purge false positives .It Ev RABIN2_SYMSTORE Same as r2 -e pdb.symstore - path to downstream symbol store .It Ev RABIN2_VERBOSE Same as r2 -e bin.verbose=true - show debugging messages from the parser .El .Sh EXAMPLES .Pp List symbols of a program .Pp $ rabin2 \-s a.out .Pp Get offset of symbol .Pp $ rabin2 \-n _main a.out .Pp Get entrypoint .Pp $ rabin2 \-e a.out .Pp Load symbols and imports from radare2 .Pp $ r2 -n /bin/ls [0x00000000]> .!rabin2 \-prsi $FILE .Sh SEE ALSO .Pp .Xr radare2(1) .Sh AUTHORS .Pp Written by pancake .