New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

node-coff-pe

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-coff-pe

PE file format

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

NodeJS: PE file format

Read Windows EXE/DLL/... files with NodeJS.

Usage:

var fs = require('fs');
var pe = require('node-coff-pe');

var fd = fs.openSync('./some.exe', 'r');
pe.read(fd, function(err, exehdr, coffhdr) {
  if (err) throw err;
  console.log(exehdr);
  console.log(coffhdr);
  pe.getSection(fd, coffhdr, '.rsrc', function(err, data) {
    if (err) throw err;
    console.log(data); // could be null, if section not found
  });
  pe.checksum(fd, coffhdr, function(err, checksum) {
    if (err) throw err;
    console.log('Checksum:', checksum.toString(16));
    console.log('Expected:', coffhdr.Optional.Checksum.toString(16));
  });
});

TODO: Update, Write.

Copyright (c) 2016 Tobias Hoffmann

License: https://opensource.org/licenses/MIT

Keywords

windows

FAQs

Package last updated on 07 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts