0.1.2 • Published 3 years ago
peacap
Licence
ISC
Version
0.1.2
Deps
1
Size
9 kB
Vulns
0
Weekly
0
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)
Peacap
Cross-platform Python-based NPM module for sniffing system-wide TCP packets.
Prerequisites · Installation · Usage · ContributePrerequisites
- You must have Python installed, and available at the
pythoncommand on Windows, andpython3on Windows & Linux. - If
scapy, the dependent python library isn't successfully installed when you install thepeacapdependency, you can optionally installscapyusing pip.
Installation
Simply install using your favourite Node.js package manager.
yarn add peacap
npm install peacap
Usage
Usage is simple, simply instantiate the PacketSniffer constructor, and observe.
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!