Skip to main content

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

Metadata

Release files for exe2txt 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for exe2txt 0.1.0
File Size Uploaded
exe2txt-0.1.0.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for exe2txt 0.1.0
File Interpreter ABI Platform
exe2txt-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / exe2txt-0.1.0.tar.gz

Download URL exe2txt-0.1.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
312aa0dbdf9e30454fb026a9205cfac5f1657ac59609930c2c81f0fae368fb02
BLAKE2b-256 checksum
How to use checksums
b83159468f7b9c531aa35297962be87635291ccfbf74542c109fe5d6cbd4608a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.26

Release files / exe2txt-0.1.0-py3-none-any.whl

Download URL exe2txt-0.1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e20b77d5ea7ee0d96b7258f2a4a28d168965dbfb256c53d917776c6ebc1c43cb
BLAKE2b-256 checksum
How to use checksums
7aff9d368d743d33f2340daba639597a3cca04ec5a44d40c7e6c38dbf4fad9a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.26

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page