pape
Portable Executable parsing library
Summary
| Latest Version | 0.0.3 |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-09-02 07:21 |
Tags
Authors
- hdbg
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 | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.6.6 | No |
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)