# portable-executable-signature

> Package for reading and writing PE code signatures (but not creating them)

Latest version **2.0.6** (published 2024-08-05) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install portable-executable-signature
pnpm add portable-executable-signature
yarn add portable-executable-signature
bun add portable-executable-signature
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.6 |
| Published | 2024-08-05 |
| First published | 2019-12-17 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.12.0 |
| Dependencies | 0 |
| Unpacked size | 76.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alexander O'Mara |
| Maintainers | alexanderomara |
| Keywords | portable-executable, pe, exe, dll, portable, executable, signature, codesign, unsign, windows, win32, win64 |

## Links

- npm: https://www.npmjs.com/package/portable-executable-signature
- Repository: https://github.com/AlexanderOMara/portable-executable-signature
- Homepage: https://github.com/AlexanderOMara/portable-executable-signature#readme
- Issues: https://github.com/AlexanderOMara/portable-executable-signature/issues
- npm.io page: https://npm.io/package/portable-executable-signature

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 2.0.6 (latest) — 2024-08-05
- 2.0.5 — 2024-04-19
- 2.0.4 — 2024-02-24
- 2.0.3 — 2023-11-04
- 2.0.2 — 2023-11-04
- 2.0.1 — 2023-10-01
- 2.0.0 — 2023-08-18
- 1.1.1 — 2022-07-11
- 1.1.0 — 2020-07-26
- 1.0.1 — 2019-12-17
- 1.0.0 — 2019-12-17

## README

# Portable Executable Signature

Package for reading and writing PE code signatures (but not creating them)

[![npm](https://img.shields.io/npm/v/portable-executable-signature.svg)](https://npmjs.com/package/portable-executable-signature)
[![node](https://img.shields.io/node/v/portable-executable-signature.svg)](https://nodejs.org)

[![size](https://packagephobia.now.sh/badge?p=portable-executable-signature)](https://packagephobia.now.sh/result?p=portable-executable-signature)
[![downloads](https://img.shields.io/npm/dm/portable-executable-signature.svg)](https://npmcharts.com/compare/portable-executable-signature?minimal=true)

[![main](https://github.com/AlexanderOMara/portable-executable-signature/actions/workflows/main.yaml/badge.svg)](https://github.com/AlexanderOMara/portable-executable-signature/actions/workflows/main.yaml)

# Overview

A broken code signature is often 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.

```js
import {readFile, writeFile} from 'node:fs/promises';
import {signatureGet, signatureSet} from 'portable-executable-signature';

const data = await readFile('pe-binary.exe');
const signature = signatureGet(data);
console.log('signature:', signature);
const unsigned = signatureSet(data, null);
console.log('unsigned:', unsigned);
await writeFile('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-2024 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.

---
_Source: https://npm.io/package/portable-executable-signature · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
