https://github.com/jirsh/pe-parser
Promise based PE Parser for Node.JS applications
https://github.com/jirsh/pe-parser
nodejs portable-executable windows
Last synced: 5 months ago
JSON representation
Promise based PE Parser for Node.JS applications
- Host: GitHub
- URL: https://github.com/jirsh/pe-parser
- Owner: jirsh
- License: gpl-3.0
- Created: 2022-04-30T22:48:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-24T20:28:49.000Z (over 3 years ago)
- Last Synced: 2025-08-12T02:32:26.940Z (6 months ago)
- Topics: nodejs, portable-executable, windows
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/pe-parser
- Size: 146 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pe-parser [](https://github.com/jirsh/pe-parser/actions/workflows/npm-publish.yml)
PE Parser for Node.JS applications
### Validation example
```js
// The Validate promise throws if the PE file is invalid
try {
const { architecture } = await Validate(file); // returns either 'x64' or 'x86'
console.log(architecture);
} catch (e) {
console.error(e);
}
```
### Parsing example
```js
// The parse function does not throw any errors as it assumes that the buffer is validated
const { dos_header, nt_headers, sections } = await Parse(file);
console.log(dos_header, nt_headers, sections);
```