portable-executable-signature

Package for reading and writing PE code signatures

Usage no npm install needed!

<script type="module">
  import portableExecutableSignature from 'https://cdn.skypack.dev/portable-executable-signature';
</script>

README

portable-executable-signature

Package for reading and writing PE code signatures

npm node

dependencies size downloads

travis-ci

Overview

A broken code signature is worse than no signature, so it can be desirable to remove a signature.

This package can remove code signatures from PE binaries.

Usage

Just pass an ArrayBuffer or an object that is a view of an ArrayBuffer to the signatureGet and signatureSet functions.

import fs from 'fs';
import {
    signatureGet,
    signatureSet
} from 'portable-executable-signature';

const data = fs.readFileSync('pe-binary.exe');
const signature = signatureGet(data);
console.log('signature:', signature);
const unsigned = signatureSet(data, null);
console.log('unsigned:', unsigned);
fs.writeFileSync('pe-binary-unsigned.exe', Buffer.from(unsigned));

Bugs

If you find a bug or have compatibility issues, please open a ticket under issues section for this repository.

License

Copyright (c) 2019-2020 Alexander O'Mara

Licensed under the Mozilla Public License, v. 2.0.

If this license does not work for you, feel free to contact me.