1.0.0 • Published 7 years ago

pe-machine-type v1.0.0

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

pe-machine-type

Get the CPU type of a Windows executable, cross-platform.

npm status node Travis build status AppVeyor build status Dependency status

example

const mt = require('pe-machine-type')

mt('chrome.exe', function (err, type) {
  console.log(type) // 'amd64'
})

mt(mixed, callback)

Where mixed is either a filename or a file descriptor.

types

typedescription
unknownThe contents of this field are assumed to be applicable to any machine type
am33Matsushita AM33
amd64x64
armARM little endian
armntARM Thumb-2 little endian
ebcEFI byte code
i386Intel 386 or later processors and compatible processors
ia64Intel Itanium processor family
m32rMitsubishi M32R little endian
mips16MIPS16
mipsfpuMIPS with FPU
mipsfpu16MIPS16 with FPU
powerpcPower PC little endian
powerpcfpPower PC with floating point support
r4000MIPS little endian
riscv32RISC-V 32-bit address space
riscv64RISC-V 64-bit address space
riscv128RISC-V 128-bit address space
sh3Hitachi SH3
sh3dspHitachi SH3 DSP
sh4Hitachi SH4
sh5Hitachi SH5
thumbThumb
wcemipsv2MIPS little-endian WCE v2

As specified by Microsoft PE and COFF Specification 9.3 doc, section 3.3.1.

related

install

With npm do:

npm install pe-machine-type

license

MIT © Vincent Weevers