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:

  1. $ rabin2 -I /bin/ls
  2. arch x86
  3. binsz 128456
  4. bintype elf
  5. bits 64
  6. canary true
  7. class ELF64
  8. crypto false
  9. endian little
  10. havecode true
  11. intrp /lib64/ld-linux-x86-64.so.2
  12. lang c
  13. linenum false
  14. lsyms false
  15. machine AMD x86-64 architecture
  16. maxopsz 16
  17. minopsz 1
  18. nx true
  19. os linux
  20. pcalign 0
  21. pic true
  22. relocs false
  23. relro partial
  24. rpath NONE
  25. static false
  26. stripped true
  27. subsys linux
  28. va true

To make rabin2 output information in format that the main program, radare2, can understand, pass -Ir option to it:

  1. $ rabin2 -Ir /bin/ls
  2. e cfg.bigendian=false
  3. e asm.bits=64
  4. e asm.dwarf=true
  5. e bin.lang=c
  6. e file.type=elf
  7. e asm.os=linux
  8. e asm.arch=x86
  9. e asm.pcalign=0