lief

Library to instrument executable formats

Apache License 2.0 39 个版本 Python >=3.8
安装
pip install lief
poetry add lief
pipenv install lief
conda install lief
描述

About

The purpose of this project is to provide a cross platform library that can parse, modify and abstract ELF, PE and MachO formats.

Main features:

  • Parsing: LIEF can parse ELF, PE, MachO, OAT, DEX, VDEX, ART and provides an user-friendly API to access to format internals.
  • Modify: LIEF enables to modify some parts of these formats
  • Abstract: Three formats have common features like sections, symbols, entry point... LIEF factors them.
  • API: LIEF can be used in C, C++, Python and Rust

LIEF Extended:

  • DWARF/PDB Support
  • Objective-C Metadata
  • dyld shared cache

Checkout: https://lief.re/doc/latest/extended/intro.html for the details

Getting Started

.. code-block:: console

$ pip install lief

.. code-block:: python

import lief

elf = lief.ELF.parse("/bin/ls") for section in elf.sections: print(section.name, len(section.content))

pe = lief.PE.parse("cmd.exe") for imp in pe.imports: print(imp.name)

fat = lief.MachO.parse("/bin/dyld") for macho in fat: for sym in macho.symbols: print(sym)

Documentation

  • Main documentation <https://lief.re/doc/latest/index.html>_
  • API <https://lief.re/doc/latest/api/python/index.html>_

Contact

  • Mail: contact at lief.re
  • Discord: LIEF <https://discord.gg/jGQtyAYChJ>_

Authors

Romain Thomas @rh0main <https://x.com/rh0main>_


LIEF is provided under the Apache 2.0 license <https://github.com/lief-project/LIEF/blob/0.17.6/LICENSE>_

版本列表
0.17.6 2026-03-18
0.17.5 2026-03-08
0.17.4 2026-02-21
0.17.3 2026-01-24
0.17.2 2026-01-03
0.17.1 2025-10-25
0.17.0 2025-09-14
0.16.7 2025-10-05
0.16.6 2025-05-29
0.16.5 2025-04-19
0.16.4 2025-02-23
0.16.3 2025-02-02
0.16.2 2025-01-01
0.16.1 2024-12-26
0.16.0 2024-12-10
0.15.1 2024-07-23
0.15.0 2024-07-21
0.14.1 2024-02-11
0.14.0 2024-01-20
0.13.2 2023-06-17
0.13.1 2023-05-28
0.13.0 2023-04-14
0.12.3 2022-12-08
0.12.2 2022-10-02
0.12.1 2022-04-08
0.12.0 2022-03-26
0.11.5 2022-01-17
0.11.4 2021-03-10
0.11.3 2021-03-02
0.11.2 2021-02-24
0.11.1 2021-02-22
0.11.0 2021-01-18
0.10.1 2019-11-30
0.10.0 2019-11-24
0.9.0 2018-06-10
0.8.3 2017-11-21
0.8.2 2017-11-21
0.8.1 2017-11-21
0.8.0 2017-11-21