Let’s examine the program using radare2: command to print a fortune.
Now r2 shell is waiting for our commands and shows us the address in which we’re currently at (0x08048370).
Because of its complexity I’ll try to make things as clear and simple as I can.
radare2 doesn’t analyze the file by default because analysis is a complex process that can take a long time, especially when dealing with large files.
To read more about analysis and the choice not to perform analysis at startup you can read this post at radare2 blog.
As most command line utilities, the best approach to reveal the list of the possible arguments is to execute the program with the Usage: r2 [-ACdf LMn Nq Stuvwz] [-P patch] [-p prj] [-a arch] [-b bits] [-i file] [-s addr] [-B baddr] [-M maddr] [-c cmd] [-e k=v] file|pid|-|--|= -d: Debug the executable 'file' or running process 'pid' -A: Analyze executable at load time (xrefs, etc) -q: Quiet mode, exit after processing commands -w: Write mode enabled -L: List of supported IO plugins -i [file]: Interprets a r2 script -n: Bare load.
Do not load executable info as the entrypoint -c 'command; command; ...': Run r2 and execute commands (eg: r2 's main; px 60') -p [prj]: Creates a project for the file being analyzed -: Opens r2 with the malloc plugin that gives a 512 bytes memory area to play withrabin2 allows extracting information from binary files including Sections, Headers, Imports, Strings, Entrypoints, etc. rabin2 is able to understand many file formats such as ELF, PE, Mach-O, Java CLASS.
radare2 is an open source framework for reverse engineering and binaries analysis which implements a rich command line interface for disassembling, analyzing data, patching binaries, comparing data, searching, replacing, visualizing and more.