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++ and Python
Downloads / Install
First, make sure to have an updated version of setuptools:
$ pip install setuptools --upgrade
To install the latest version (release):
$ pip install lief
To install nightly build:
$ pip install [--user] --index-url https://lief.s3-website.fr-par.scw.cloud/latest lief
Getting started
Python
import lief
# ELF
binary = lief.parse("/usr/bin/ls")
print(binary)
# PE
binary = lief.parse("C:\\Windows\\explorer.exe")
print(binary)
# Mach-O
binary = lief.parse("/usr/bin/ls")
print(binary)
C++
#include <LIEF/LIEF.hpp>
int main(int argc, char** argv) {
// ELF
try {
std::unique_ptr<LIEF::ELF::Binary> elf = LIEF::ELF::Parser::parse("/bin/ls");
std::cout << *elf << std::endl;
} catch (const LIEF::exception& err) {
std::cerr << err.what() << std::endl;
}
// PE
try {
std::unique_ptr<LIEF::PE::Binary> pe = LIEF::PE::Parser::parse("C:\\Windows\\explorer.exe");
std::cout << *pe << std::endl;
} catch (const LIEF::exception& err) {
std::cerr << err.what() << std::endl;
}
// Mach-O
try {
std::unique_ptr<LIEF::MachO::FatBinary> macho = LIEF::MachO::Parser::parse("/bin/ls");
std::cout << *macho << std::endl;
} catch (const LIEF::exception& err) {
std::cerr << err.what() << std::endl;
}
return 0;
}
C (Limited API)
#include <LIEF/LIEF.h>
int main(int argc, char** argv) {
Elf_Binary_t* elf = elf_parse("/usr/bin/ls");
Elf_Section_t** sections = elf->sections;
for (size_t i = 0; sections[i] != NULL; ++i) {
printf("%s\n", sections[i]->name);
}
elf_binary_destroy(elf);
return 0;
}
Documentation
Contact
Mail: contact at lief.re
Gitter: lief-project
Metadata
Release files for lief 0.13.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 78.8 MB
Release files / lief-0.13.0-cp311-cp311-win_amd64.whl
| Download URL | lief-0.13.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
31825961aa778481e483dcb081a40daec3dfa78ca8b2a4acefc32040ce4886ad
|
|
BLAKE2b-256 checksum How to use checksums |
df231ef3f49c5db0602ca6f9f797dbe3675d8de857bd55fbf0f43658f60e0cf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp311-cp311-win32.whl
| Download URL | lief-0.13.0-cp311-cp311-win32.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.11 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
07986f0991e1f942d4a277e4b15fe37dbc5b2a54c3baf2a58e719d9b258ce810
|
|
BLAKE2b-256 checksum How to use checksums |
d29d5ce14d6e6b864b2a016ae8be4cb60e37a37cc7a8f5c0b43bfda2d5629df3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp311-cp311-manylinux_2_24_x86_64.whl
| Download URL | lief-0.13.0-cp311-cp311-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
cacf8097970ddd5bbb82a6ad5c02f0423767300a3457d84566643cf3c4d7a69f
|
|
BLAKE2b-256 checksum How to use checksums |
55a3335985dcd537da7dbf8df1bbf7a960cad42992bf5f3e0e4c030e43c2470e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp311-cp311-manylinux2014_aarch64.whl
| Download URL | lief-0.13.0-cp311-cp311-manylinux2014_aarch64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
41ad87a7233927fef40c6b7e60684b962e623ef21d28be3528c9bd943be710b7
|
|
BLAKE2b-256 checksum How to use checksums |
054e75165c6ad0d87608aed3c55caa9f93ece63bb77acdefa0a31deca020fcdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | lief-0.13.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9daf09130edf02ca47b76f0b98390aa618b3d3bbc9c0588250b738ef50f4a539
|
|
BLAKE2b-256 checksum How to use checksums |
c1f4b2eea8da8b3649224e0fb097e9ad796d9ac05a9b297f912d9a4f5d055543
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp311-cp311-macosx_10_14_x86_64.whl
| Download URL | lief-0.13.0-cp311-cp311-macosx_10_14_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.11 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
8740abb2c0fb38a5040f4559a3766b724228a97155e92aa8cc8fa01bef1cea83
|
|
BLAKE2b-256 checksum How to use checksums |
0027928875c493c45de8fce4a30c65da8e39c1e3e6e782a511dc8543ddc886fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp310-cp310-win_amd64.whl
| Download URL | lief-0.13.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9f562a07f6fc4dc7958943fe840755932ffaf10da500ab1a537004ab61f6d3de
|
|
BLAKE2b-256 checksum How to use checksums |
da5ee0ee17fb8ea291205c94e37abf984c7f6b49148b3b9c3ae6f66f8f8f443a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp310-cp310-win32.whl
| Download URL | lief-0.13.0-cp310-cp310-win32.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.10 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
6c74fe1684f859a041408d6fc4c6262686bfb74d64afe38f7373c173fd144ac5
|
|
BLAKE2b-256 checksum How to use checksums |
6c3a801915f2c67789b2212b1aacc0475eb6972eadd6f303bc8243053938c93c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp310-cp310-manylinux_2_24_x86_64.whl
| Download URL | lief-0.13.0-cp310-cp310-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
c072929606f621697c9da2fabefccf8dac47a4283b8988ae9b3f6ca332352d66
|
|
BLAKE2b-256 checksum How to use checksums |
42ddb81296b74704133878509ad3381bbf27150390f68bbf02a65c5901314804
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp310-cp310-manylinux2014_aarch64.whl
| Download URL | lief-0.13.0-cp310-cp310-manylinux2014_aarch64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
0740eb7b2093ed82570315d614671ad69cc21a062d73e9213a263eec7c11dc3a
|
|
BLAKE2b-256 checksum How to use checksums |
c3aaaa247089e9e7fbebb304cce63e0bfc771c19ea2f5a3d0b2277b117e26c8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | lief-0.13.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c49aa1e573ddf7d9946d9779b5f4edad782976368c15094c6a815533fc1b50fd
|
|
BLAKE2b-256 checksum How to use checksums |
46b11d141d830a0d5bb0fc893668186b75901fdd6015fc01ecd9ff29b0404e39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp310-cp310-macosx_10_14_x86_64.whl
| Download URL | lief-0.13.0-cp310-cp310-macosx_10_14_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.10 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
e573bf1e37cd580ef87243d0dc48d5c56d535b84a8c91b9fa28f9631643cdc51
|
|
BLAKE2b-256 checksum How to use checksums |
09adf2b2a98caad655ee0a9948c35fb2142b9e0ca437f2f339eb5c22a0328b1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp39-cp39-win_amd64.whl
| Download URL | lief-0.13.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
70b08135413abe034e11c7c931de29be3e1902dde717c0681623da4fa18a3714
|
|
BLAKE2b-256 checksum How to use checksums |
dfe04987e64e868dc4471f610268805a95ae73deed045cf0b8d2d9d197c02573
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp39-cp39-win32.whl
| Download URL | lief-0.13.0-cp39-cp39-win32.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.9 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
2cfd8496ac85b64569a07f4cdd1e7424039e24113bdebc9ecc99694a8cf856f7
|
|
BLAKE2b-256 checksum How to use checksums |
2d94b99e0ad9a224d32d43d389a71417f14b626a796085650ca34134f7298ed1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp39-cp39-manylinux_2_24_x86_64.whl
| Download URL | lief-0.13.0-cp39-cp39-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.9 Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
28e15c164f49e66a6a876a12662414592f43444175d4fa9aad8d55654f4515af
|
|
BLAKE2b-256 checksum How to use checksums |
bc76300308af64a7f59bdecd2cb9fc89cc35f7355369acf459858f8c10aabc98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp39-cp39-manylinux2014_aarch64.whl
| Download URL | lief-0.13.0-cp39-cp39-manylinux2014_aarch64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
456e162c5cf518b34763f1a3c849a4af0a16d6b603729930064679b2756e8710
|
|
BLAKE2b-256 checksum How to use checksums |
ff2f608a549ec9de0cd649d3cc2790cd1c2f44a5dfcc1cfbcb671ff77a24080c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | lief-0.13.0-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f453f70c3c19f1d24008ae7d2aee4de3b2d73d095b99db78a062288c7ff6232b
|
|
BLAKE2b-256 checksum How to use checksums |
6e52736a49e4444ff5eed775d86d9c8a0a8180e5f265fe8e164268a635d068fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp39-cp39-macosx_10_14_x86_64.whl
| Download URL | lief-0.13.0-cp39-cp39-macosx_10_14_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.9 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
15c3e128d8c4ef9ba0f2d890003836e874ab285c5c09139df73fa4aef8abe70d
|
|
BLAKE2b-256 checksum How to use checksums |
7f6dff1280cff2c3eaca4beb10307b3b476002a505216e455a46ffa166d02e41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp38-cp38-win_amd64.whl
| Download URL | lief-0.13.0-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 3.1 MB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e15fabc5c86ebad7300c8eed1dcecb0a20e9fd4669b304192625edbb34b6e7f3
|
|
BLAKE2b-256 checksum How to use checksums |
0fbd2e039580dd48f32a6d6d5bafda9d508100c161c0cf10bc03c8bd0a43df18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp38-cp38-win32.whl
| Download URL | lief-0.13.0-cp38-cp38-win32.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.8 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
e744f3523913a1101af34c71e1c10a14a5c50eaaf054a53d469df19070e980d6
|
|
BLAKE2b-256 checksum How to use checksums |
39e6b296ce964510e72e71a4614aac0ecffee56ff971d2b3a668e61661be7d43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp38-cp38-manylinux_2_24_x86_64.whl
| Download URL | lief-0.13.0-cp38-cp38-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.8 Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
e1b292730658941035ea997de0fd6bd65393c660fe3a2afb53d737e6c4a156e4
|
|
BLAKE2b-256 checksum How to use checksums |
e6db05be52801549dfc702c865efe24692052ebe717fc90f26c08d4f72cb2d04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp38-cp38-manylinux2014_aarch64.whl
| Download URL | lief-0.13.0-cp38-cp38-manylinux2014_aarch64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
379201222ba63ac62399eabe7c97de0bbe5736f2f72c000cc224ebe6724b4bab
|
|
BLAKE2b-256 checksum How to use checksums |
ea90982a6df7dc423e2ea5e73ae304780ad21af457ac52300956ff1cb996295c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Release files / lief-0.13.0-cp38-cp38-macosx_10_14_x86_64.whl
| Download URL | lief-0.13.0-cp38-cp38-macosx_10_14_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.8 macOS 10.14+ x86-64 |
|
SHA-256 checksum How to use checksums |
c91e389604f4689d1de712b003d0df2ff9d3f47fd71e1bd4f1b36692a34ed97d
|
|
BLAKE2b-256 checksum How to use checksums |
3a3c68be3cc67033dd233303e2e162904a2abdd56088577b23714ecaae92f357
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/5.0.0 pkginfo/1.8.2 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.10
|
Security for lief 0.13.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.