--- id: cle version: "9.3.2" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # cle — CLE Loads Everything (at least, many binary formats!) and provides a pythonic interface to analyze what they are and what they would look like in memory. License: permissive · Maintenance: active · Downloads: 901.9K/mo ## What it is and what it does CLE is a binary loader that reads executable files in formats like ELF, PE (Windows), and Mach-O, then constructs an in-memory representation of how the OS would lay them out after loading. It resolves imports between the main binary and its shared libraries, searches for those libraries across configurable paths, and exposes the resulting memory state through a Python interface. You give it a file path, and it returns an object representing the loaded process with access to entry points, imports, memory contents, and architecture information. The package is designed for binary analysis workflows—reverse engineering, vulnerability research, and automated program understanding. It sits at the foundation of the angr framework and handles the low-level mechanics of parsing multiple binary formats and reconciling their dependencies, so higher-level tools don't have to. Its main dependencies are format-specific parsers (pyelftools, pefile, pyxbe) and architecture metadata (archinfo), plus pyvex for lifting machine code to an intermediate representation. Use it for: - Load a binary and inspect its entry point, imports, and memory layout for reverse-engineering or static analysis - Resolve all shared library dependencies of an executable and examine their symbols and relocations - Extract raw machine code from a loaded binary and lift it to an intermediate representation for analysis - Analyze Windows PE binaries or ARM Mach-O files by selecting the appropriate backend and architecture - Build a custom binary analysis tool that needs to understand process memory layout without running the binary ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. CLE loads binary executables and shared libraries, resolves their imports, and provides a unified memory abstraction as if the OS loader had run them. Yes. CLE is actively maintained, has no known vulnerabilities, installs with low friction, and is essential if you're doing binary analysis or building on the angr framework. The BSD-2-Clause license is permissive. The only caveat is the Python 3.12+ requirement; if you're on an older version, you cannot use it. ## Install pip install cle uv add cle poetry add cle ## Installing cle Before you install: Low friction installation with a pure-Python wheel. Active maintenance with a recent release (9 days old) and steady repository activity. Requires Python 3.12 or later. License in practice: BSD-2-Clause is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice. Quickstart: pip install cle import cle ld = cle.Loader("/bin/ls") print(hex(ld.main_object.entry)) print(ld.shared_objects) Requires Python 3.12 or later. Cross-architecture library loading may require system cross-compilation libraries (e.g., libc6-powerpc-cross on Debian for ARM support). Verify before relying: - Whether the package supports loading binaries from non-native architectures without cross-compilation libraries installed - Performance characteristics when loading very large binaries or many shared objects simultaneously - Whether all 11 runtime dependencies are required for basic use or only for specific backends ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 901.9K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags binary loader library, ELF PE Mach-O loader, load binaries and libraries, process memory abstraction, binary analysis framework, shared object resolution, executable format parser, binary-analysis, reverse-engineering, executable-loader [View on SkillFed](https://skillfed.io/packages/cle) · [View on PyPI](https://pypi.org/project/cle/)