# peacap

> Cross-platform Python-based NPM module for sniffing system-wide TCP packets.

Latest version **0.1.2** (published 2022-09-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install peacap
pnpm add peacap
yarn add peacap
bun add peacap
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2022-09-04 |
| First published | 2022-09-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Maintainers | ridafkih |
| Keywords | pcap, sniff packet, packet sniffer, packet, network, sniff |

## Links

- npm: https://www.npmjs.com/package/peacap
- npm.io page: https://npm.io/package/peacap

## Dependencies (1)

- [python-shell](https://npm.io/package/python-shell.md) ^3.0.1

## Recent versions

- 0.1.2 (latest) — 2022-09-04
- 0.1.1 — 2022-09-04
- 0.1.0 — 2022-09-04

## README

<div align="center">
  <h1>Peacap</h1>
  <p>Cross-platform Python-based NPM module for sniffing system-wide TCP packets.</p>
  	<span>
		<a href="#prerequisites">Prerequisites</a>
		<span>&nbsp;&nbsp;·&nbsp;&nbsp;</span>
		<a href="#installation">Installation</a>
		<span>&nbsp;&nbsp;·&nbsp;&nbsp;</span>
		<a href="#usage">Usage</a>
		<span>&nbsp;&nbsp;·&nbsp;&nbsp;</span>
		<a href="#contribute">Contribute</a>
	</span>
</div>
<hr>

## Prerequisites

- You **must** have Python installed, and available at the `python` command on Windows, and `python3` on Windows & Linux.
- If `scapy`, the dependent python library isn't successfully installed when you install the `peacap` dependency, you can optionally install `scapy` using pip.

## Installation

Simply install using your favourite Node.js package manager.

```bash
yarn add peacap
```

```bash
npm install peacap
```

## Usage

Usage is simple, simply instantiate the `PacketSniffer` constructor, and observe.

```ts
import { PacketSniffer } from "peacap";

const sniffer = new PacketSniffer();
sniffer.on("packet", console.log);
/**
 * {
 *   source: "10.0.0.2",
 *   destination: "10.0.0.3",
 *   outgoing: true,
 *   size: 420,
 *   packet: <Buffer 00 00 00 ...>
 * }
 */
```

## Contribute

Feel free to contribute to the repository. Pull requests and issues with feature requests are _super_ welcome!

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