Package detail

pe-library

jet2jet1.9mMIT0.4.1

Node.js library for Portable Executable format

javascript, library, pe, pe-executable

readme

NPM version Build Status

pe-library

pe-library provides parsing and generating Portable Executable (known as Windows Executables) binaries.

Usage

import * as PE from 'pe-library';
import * as fs from 'fs';

// load and parse data
let data = fs.readFileSync('MyApp.exe');
// (the Node.js Buffer instance can be specified directly to NtExecutable.from)
let exe = PE.NtExecutable.from(data);

// get section data
let exportSection = exe.getSectionByEntry(PE.Format.ImageDirectoryEntry.Export);
// read binary data stored in exportSection.data ...
// to write binary: use exe.setSectionByEntry

// write to buffer
let newBin = exe.generate();
fs.writeFileSync('MyApp_modified.exe', new Buffer(newBin));

License

changelog

Changelog

v0.4.1

v0.4.0

  • Add support for ES module loading in Node.js environment

v0.3.0

  • Add support for 'unparsable' resource data
    • Use ignoreUnparsableData parameter on from method of NtExecutableResource.

v0.2.1

  • Fix version information (no classes/types are changed)

v0.2.0

  • Add NtExecutableResource class and related types

v0.1.3

  • Export calculateCheckSumForPE function

v0.1.2

  • Remove @internal specifier for some methods

v0.1.1

  • Export NtExecutableSection and NtExecutableFromOptions types

v0.1.0

Initial version (almost cloned from resedit-js)