pape

Pure Nim PE parsing library

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:25

Installation

nimble install pape
choosenim install pape
git clone https://github.com/hdbg/pape

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
pape - - - - - - -

Source

Repository https://github.com/hdbg/pape
Homepage https://github.com/hdbg/pape
Registry Source nimble_official

README

pape

Pure Nim PE parsing library

How-to use

import pape
import std/[times, strutils, options]

var img = PEImage.newFromFile(r"C:\Windows\System32\kernel32.dll")

echo img.magic == PEMagic.PE64 # true
echo $img.timestamp            # 2038-08-04T14:50:58+03:00

echo img.ver.image             # (major: 10, minor: 0)
echo toHex img.entryPoint      # 0x0000000000015640

for importMod in img.imports:
  echo importMod.name          # api-ms-win-core-rtlsupport-l1-1-0.dll, etc...

# GetThreadId, LocalFree, LocalHandle etc...
for exportEntry in img.exports.entries: 
  if exportEntry.name.isSome:
    echo get(exportEntry.name)