-
Notifications
You must be signed in to change notification settings - Fork 7
An ELF format manipulation library in python
License
tbursztyka/python-elf
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Python-ELF ========== Python-ELF is a python library targeting ELF binary format manipulation. It is OS and machine independant, or tends to be. It has nothing new nor nothing better than existing libraries and currently is suffers from lacks which makes it much more a draft than anything else. So for a real usage, consider using something else. Its goal it to make, anyway, static ELF binary manipulation easy. The Q&D dumpelf.py is an example on how current ease of use level is. Contributions are welcome! Features -------- It can read and interpret "allmost" any ELF-specific part in an ELF binary. E.g.: it cannot intepret DWARF2 specific sections. Limitations ----------- - no writing capabilities... coming soon - doet not yet interpret machine specific data, though necessary values interpreters are already present. - No version part interpretation. - Only basic relocation interpretation - Prone to error while binary owns anti-re tricks. (could be easily fixed, some case are already handled) Design ------ Everything in python-elf is thought and handled as a "chunk". An ELF file is a chunk made of multiple other chunks. Headers in ELF are chunks. Due to the fact that all section and program part possess a header, there is a class representing a chunk with a header: the page. Here is a quick overview on the basic design: --> Chunk <-- | | | | Header - - - - Page Section, Program and Note classes are sub-classes of Page so they embed their respective headers. This simplify then the relationshid within this two chunk (e.g. a section and its header). Using python-elf ---------------- (through python interpreter) >>> from elf.elf_binary import Elf >>> bin = Elf("/some/path/some_file_name") >>> Some printer helper functions can be found in from elf.printers import printHeader It prints out only headers of course, in a human readable way. Important note -------------- As any other ELF manipulation library, you MUST know how ELF format is made to use python-elf. Contact ------- For any further information, help, ideas, contributions, critics: contact the author: tomasz.m.bursztyka@gmail.com
About
An ELF format manipulation library in python
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published