/nim-libpe

Nim wrapper for libpe library.

Primary LanguageNimGNU Lesser General Public License v3.0LGPL-3.0

nim-libpe

Nim rewrite of merces/libpe PE library.

This library is used by my PE multitool Peni.

Usage

Minimal working example based on the original one from Author's GH readme, would be:

import libpe
import libpe/pe
import libpe/error

var ctx: pe_ctx_t

assert pe_load_file(addr ctx, "path_to_file".cstring) == LIBPE_E_OK
assert pe_parse(addr ctx) == LIBPE_E_OK
assert pe_is_pe(addr ctx)

echo $ctx.pe.entrypoint

For more info consult the test file.