SplitScript reference / Module / machUuid
Module.machUuid
Method
Module.machUuid() -> [u8; 16]?!
Reads the UUID of a mapped little-endian 64-bit Mach-O image.
Reads LC_UUID from the active image at this module's base, rather than selecting a slice from a universal file on disk. Returns None when no UUID command exists. Unsupported headers, malformed command sizes, and failed reads return an error. The walk stays inside the mapped command table and examines at most 4096 load commands.
Effects: reads process memory, requires an attached process
Runtime behavior: available while a process is attached, except in onDetach; synchronous
Examples
Inspect the loaded macOS Mono runtime's UUID
let runtime = await process.module("libmonobdwgc-2.0.dylib")
let uuid = runtime.machUuid()? else return
print(uuid)