Convert Windows EXE/DLL files into text representations for LLM prompting.
Project description
exe2txt
Convert Windows EXE/DLL files into text representations for LLM prompting.
Installation
Using uv (recommended)
# Install as a tool
uv tool install exe2txt
# Or run directly without installing
uvx exe2txt <file.exe>
Using pip
pip install exe2txt
Usage
Command Line
# Analyze an EXE file
exe2txt example.exe
# Save output to a file
exe2txt example.exe -o output.txt
As a Library
from exe2txt import analyze_pe
# Analyze a PE file
info = analyze_pe("example.exe")
# Get text representation
print(info.to_text())
# Access structured data
print(f"Machine type: {info.machine_type}")
print(f"Entry point: 0x{info.entry_point:08X}")
for section in info.sections:
print(f"Section: {section.name}")
for imp in info.imports:
print(f"Import: {imp.dll_name}")
Features
- Parse PE file headers and metadata
- Extract section information
- List imported DLLs and functions
- List exported functions
- Generate LLM-friendly text output
Development
Setup
# Clone the repository
git clone https://github.com/crlotwhite/exe2txt.git
cd exe2txt
# Create virtual environment and install dependencies
uv sync
# Install in development mode
uv pip install -e .
Running Tests
uv run pytest
Building
uv build
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
exe2txt-0.1.0.tar.gz
(6.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exe2txt-0.1.0.tar.gz.
File metadata
- Download URL: exe2txt-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
312aa0dbdf9e30454fb026a9205cfac5f1657ac59609930c2c81f0fae368fb02
|
|
| MD5 |
f8ca5b0b86cc1bd57ecccb94f0fb8d8a
|
|
| BLAKE2b-256 |
b83159468f7b9c531aa35297962be87635291ccfbf74542c109fe5d6cbd4608a
|
File details
Details for the file exe2txt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: exe2txt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.26
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e20b77d5ea7ee0d96b7258f2a4a28d168965dbfb256c53d917776c6ebc1c43cb
|
|
| MD5 |
f37e44b8e939c341d9d3e191f8fa979c
|
|
| BLAKE2b-256 |
7aff9d368d743d33f2340daba639597a3cca04ec5a44d40c7e6c38dbf4fad9a3
|