libTriton  version 0.4 build 1356
Elf

Table of Contents

[python api] All information about the Elf python object.

Description


This object is used to represent the ELF binary format.

Example

>>> b = Elf('/usr/bin/gdb')
>>> for lib in b.getSharedLibraries():
... print lib
...
libreadline.so.6
libz.so.1
libdl.so.2
libncurses.so.5
libm.so.6
libpthread.so.0
libpython2.7.so.1.0
libc.so.6
>>> hex(b.getHeader().getEntry())
'0x45bc40L'
>>> for section in b.getSectionHeaders():
... print section.getName(), '\t', hex(section.getAddr())
...
0x0L
.interp 0x400270L
.note.ABI-tag 0x40028cL
.gnu.hash 0x4002b0L
.dynsym 0x40a388L
.dynstr 0x431268L
.gnu.version 0x451bc8L
.gnu.version_r 0x454fb0L
.rela.dyn 0x4550d0L
.rela.plt 0x455748L
.init 0x4580d0L
.plt 0x4580f0L
.text 0x459cb0L
.fini 0x783dccL
.rodata 0x783e00L
.eh_frame_hdr 0x961480L
.eh_frame 0x977898L
.init_array 0xbfdda0L
.fini_array 0xbfdda8L
.jcr 0xbfddb0L
.dynamic 0xbfddb8L
.got 0xbfdff8L
.got.plt 0xbfe000L
.data 0xbfee00L
.bss 0xc12280L
.shstrtab 0x0L

Constructor

>>> binary = Elf('/usr/bin/gdb')

Python API - Methods of the Elf class