Java, Lua, and PE files
glaurung luac
Recognize Lua and LuaJIT bytecode and print header information.
use it for
The parser recognizes Lua 5.1 through 5.4 and LuaJIT bytecode. It reports metadata and available source-name information.
Run glaurung luac --help on your installed version before putting the command in a script.
Glaurung is still pre-1.0.
- input
- A Lua 5.1–5.4 or LuaJIT bytecode chunk.
- output
- Bytecode family, format byte, endianness, and any stored source name.
- mode
- read only. The examples leave the input unchanged.
command shape
syntax
$ glaurung luac PATH [--json]
The installed parser is authoritative: glaurung luac --help
run it
examples
Identify a Lua 5.3 chunk
The source path is metadata embedded by the compiler; it need not exist on your machine.
run
$ glaurung luac samples/binaries/platforms/linux/amd64/lua/hello-lua5.4.luac --json output
{"kind":"Lua 5.3","format":0,"source":"@/workspace/source/lua/hello.lua","little_endian":true} captured 2026-08-31.
Read the result: luac recognizes the header. It does not decompile the chunk into Lua source.
Reject a non-Lua file
Use a known native binary as a negative control for format detection.
run
$ glaurung luac /bin/ls output
Error: not Lua bytecode: /bin/ls captured on Ubuntu, 2026-08-31.
Read the result: The command stops at the header check. It does not try to interpret arbitrary native bytes as Lua instructions.
used above
important options
These are the flags used by the examples. Run glaurung luac --help for the complete parser help.
keep working