pcappp

0.1.4 • Public • Published

pcappp (Package capture per port)

This is a lightweight wrap up of node_pcap, which recording data transfer per port, and a http api for access the data.

Usage

Install

npm i pcappp -g

Listen on device lo0, and filter the package to a port range [8080,8081]. Serve the data at 1.2.3.4:6334

sudo pcappp -b 1.2.3.4 -p 6334 -i lo0 dst portrange 8080-8081

Access the data

curl http://localhost:6334/8080/127.0.0.1
{
  "date": 1424919851117,
  "bytes": 141
}

Note

  • All data are add together until you take it.
  • Filter is follow the lib_pcap pattern

Package Sidebar

Install

npm i pcappp

Weekly Downloads

0

Version

0.1.4

License

MIT

Last publish

Collaborators

  • x_reception
  • idy