1.0.0 • Published 7 years ago

pe-signature-offset v1.0.0

Weekly downloads
58
License
MIT
Repository
github
Last release
7 years ago

pe-signature-offset

Get position of PE signature. As specified by Microsoft PE and COFF Specification 9.3 doc, section 3.2:

After the MS-DOS stub, at the file offset specified at offset 0x3c, is a 4-byte signature that identifies the file as a PE format image file. This signature is PE\0\0 (the letters "P" and "E" followed by two null bytes).

npm status node Travis build status AppVeyor build status Dependency status

example

const getOffset = require('pe-signature-offset')

getOffset('file.exe', function (err, offset) {
  console.log(offset)
})

getOffset(mixed, callback)

Where mixed is either a filename or a file descriptor.

related

install

With npm do:

npm install pe-signature-offset

license

MIT © Vincent Weevers