repository
docs/
CLI reference, architecture notes, Windows work, design documents, and a longer tutorial.
Quick start
Glaurung isn't on PyPI yet. uvx can build it from Git and run it without leaving a
checkout behind.
One command
The first run builds the Rust extension. uv keeps that build for next time.
$ uvx --from git+https://github.com/mjbommar/glaurung.git \
glaurung kickoff /bin/ls
On Linux, /bin/ls is usually an ELF binary. On macOS it is Mach-O. Replace it with
any binary you are allowed to inspect.
Install
uv gives the command its own environment and keeps it out of your project packages.
$ uv tool install git+https://github.com/mjbommar/glaurung.git
$ glaurung --version
glaurung 0.1.0
$ glaurung triage /bin/ls
$ glaurung kickoff /bin/ls --db ls.glaurung Commands
# Fast identification: format, architecture, hardening, strings.
$ glaurung triage /bin/ls
# Deeper analysis saved to a project file.
$ glaurung kickoff /bin/ls --db ls.glaurung
# Control flow and pseudocode for the entry point.
$ glaurung cfg /bin/ls
$ glaurung decompile /bin/ls --style c
# Machine-readable output for a script or pipeline.
$ glaurung triage /bin/ls --json triage reads the headers, strings, hardening flags, and entropy. kickoff
runs the larger analysis pipeline. Add --db to keep the names, types, comments,
and cross-references in a SQLite file.
Hack on it
The repository has a locked environment and sample binaries. uv sync builds the extension.
$ git clone https://github.com/mjbommar/glaurung.git
$ cd glaurung
$ uv sync --locked --dev
$ uv run glaurung --version
$ uv run glaurung kickoff \
samples/binaries/platforms/linux/amd64/export/native/gcc/O2/hello-gcc-O2 Python
The module returns the same objects used by the command line.
$ uv run --with 'glaurung @ git+https://github.com/mjbommar/glaurung.git' python
>>> import glaurung as g
>>> art = g.triage.analyze_path("/bin/ls")
>>> v = art.verdicts[0]
>>> print(v.format, v.arch, v.bits)
ELF x86_64 64 Projects
journal and undo take the project file first. Commands that read bytes also need the binary.
# Read the journal and undo log in the saved project.
$ glaurung journal ls.glaurung list --binary /bin/ls
$ glaurung undo ls.glaurung --list --binary /bin/ls
# Continue in the interactive shell.
$ glaurung repl /bin/ls --db ls.glaurung Repository
repository
CLI reference, architecture notes, Windows work, design documents, and a longer tutorial.
repository
Source fixtures, baselines, and the harness that recompiles and runs recovered C.
license
Use it, fork it, break it, and send patches.
Source, issues, and command reference: github.com/mjbommar/glaurung.