|
MakeELF
ELF reader-writer library
|
Complete ELF structure storage class. More...
Public Member Functions | |
| def | __init__ (self, Ehdr=None, Phdr_table=None, Shdr_table=None, sections=None, little=False) |
| The constructor. More... | |
| def | __str__ (self) |
| Convert to str. More... | |
| def | __repr__ (self) |
| String representation. More... | |
| def | __bytes__ (self) |
| Serialization to bytes. More... | |
| def | from_bytes (b, little=False) |
| Deserialization of object. More... | |
| def | __len__ (self) |
| Length of object. More... | |
Public Attributes | |
| Ehdr | |
| Instance of Elf32_Ehdr. | |
| Phdr_table | |
| List of instances of Elf32_Phdr. | |
| Shdr_table | |
| List of instances of Elf32_Shdr. | |
| sections | |
| List of section content. More... | |
| little | |
Complete ELF structure storage class.
Allows to craft ELF file using low-level interfaces for manipulating data fields and accessing headers contained inside. This class is not meant to provide any abstraction on top of ELF structure
| def makeelf.elfstruct.Elf32.__init__ | ( | self, | |
Ehdr = None, |
|||
Phdr_table = None, |
|||
Shdr_table = None, |
|||
sections = None, |
|||
little = False |
|||
| ) |
The constructor.
Reconstructs new Elf32 object with all stored public members
| Ehdr | ELF header |
| Phdr_table | List of program headers |
| Shdr_table | List of section headers |
| sections | List of section contents |
| little | Endianness of ELF file |
| def makeelf.elfstruct.Elf32.__bytes__ | ( | self | ) |
Serialization to bytes.
Converts Python object to byte stream, ready to be saved to ELF file
| def makeelf.elfstruct.Elf32.__len__ | ( | self | ) |
Length of object.
| def makeelf.elfstruct.Elf32.__repr__ | ( | self | ) |
String representation.
Provides ability to recreate object using its constructor, from Python CLI mode
| def makeelf.elfstruct.Elf32.__str__ | ( | self | ) |
Convert to str.
Useful for presenting contents to the user
| def makeelf.elfstruct.Elf32.from_bytes | ( | b, | |
little = False |
|||
| ) |
Deserialization of object.
| b | bytes object with serialized data on the beginning |
| little | endianness of data |
| makeelf.elfstruct.Elf32.sections |
List of section content.
Contains raw bytes objects or any type that can be converted using bytes function