💾 Archived View for radare.org › book › tools › rabin2 › file_identification.gmi captured on 2024-05-10 at 11:08:40. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-11-04)

➡️ Next capture (2024-08-18)

-=-=-=-=-=-=-

File Properties Identification

File type identification is done using `-I`. With this option, rabin2 prints information on a binary type, like its encoding, endianness, class, operating system: ``` $ rabin2 -I /bin/ls arch x86 binsz 128456 bintype elf bits 64 canary true class ELF64 crypto false endian little havecode true intrp /lib64/ld-linux-x86-64.so.2 lang c linenum false lsyms false machine AMD x86-64 architecture maxopsz 16 minopsz 1 nx true os linux pcalign 0 pic true relocs false relro partial rpath NONE static false stripped true subsys linux va true ```

To make rabin2 output information in format that the main program, radare2, can understand, pass `-Ir` option to it: ``` $ rabin2 -Ir /bin/ls e cfg.bigendian=false e asm.bits=64 e asm.dwarf=true e bin.lang=c e file.type=elf e asm.os=linux e asm.arch=x86 e asm.pcalign=0 ```