npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pown-now

v0.1.0

Published

Pownage guaranteed

Downloads

3

Readme

pown-now Gitter

Network over WebSockets

The Pown NOW tool relays network packets over a WebSocket using several builtin capture types:

  • 0 - raw packet frames
  • 1 - reconstructed TCP packet frames (incomplete)
  • 2 - reconstructed TCP sessions
  • 3 - HTTP sessions (default)

Clients connected to the WebSocket will receive messages in the format specified. You can build your own tool to consume the WebSocket feed or use one of the builtin tools such as HTTPView by SecApps.

How To Use

Pown NOW works with both network interfaces and PCAP files. To start capture on a network interface use the following command:

$ pown now eth0

In order to read a PCAP file use the following command:

$ pown now path/to/file.pcap

Keep in mind that the default capture type is 3 - meaning that packets will be reconstructed into HTTP sessions. You can see the reconstructed sessions using a tool such as HTTPView by SecApps. For example:

$ pow now -a httpview eth0

This command will open the established WebSocket into HTTPView. HTTP traffic captured on interface eth0 will be displayed inside the tool for further investigation.

One particular use case is investigating HTTP traffic from iOS devices which this tool handles very elegantly.

In order to capture the traffic from an iOS device first get the device UDID with the following command:

$ instruments -s devices

Using the Remote Virtual Interface Tool (rvictl) start a remote capture instance by using the following command:

$ rvictl -s $udid

This command will create a new network interface called rvi0 (most likely), which can be captured on with Pown NOW by using the following command:

$ pown now -a httpview rvi0

HTTP traffic from the iOS device will now be displayed inside HTTPView - excellent for security research among many other things.

Capture Types

The capture type defines a simple binary protocol that is used to transfer each individual packet or session, in case of HTTP. All messages begin with the transfer type number (indicating the transfer type) followed by the transfer type specific format.

The following transfer types are supported:

0 - RAW Packet

+-----------------------------------------+
| UINT32BE Transfer Type (set to 0)       |
+-----------------------------------------+
| Payload (packet with frames)            |
+-----------------------------------------+

1 - Reconstructed TCP packet frames (incomplete)

+-----------------------------------------+
| UINT32BE Transfer Type (set to 1)       |
+-----------------------------------------+
| SHORT Direction (0 send, 1 recv, 2 end) |
+-----------------------------------------+
| Payload (packet with frames)            |
+-----------------------------------------+

2 - Reconstructed TCP packet sessions

+-----------------------------------------+
| UINT32BE Transfer Type (set to 2)       |
+-----------------------------------------+
| UINT32BE Data Sent Length               |
+-----------------------------------------+
| Data Sent Payload                       |
+-----------------------------------------+
| Data Received Payload                   |
+-----------------------------------------+

3 - Reconstructed HTTP sessions

+-----------------------------------------+
| UINT32BE Transfer Type (set to 2)       |
+-----------------------------------------+
| UINT32BE Request Length                 |
+-----------------------------------------+
| Request Payload                         |
+-----------------------------------------+
| Response Payload                        |
+-----------------------------------------+

How To Contribute

Pown NOW is still in development although it is 100% functional. However, the following number of features will be good to have.

  • [ ] Relay packets from the client to the server - i.e. packet injection
  • [ ] Extend with additional capture types for reconstructing known protocols
  • [ ] Implement more tools to consume the WebSocket feed
  • [ ] Watch PCAP files, seek and continue reading - useful with tcpdump
  • [ ] Better support for streaming protocols - i.e. WebSockets, etc

Quickstart

From the same directory as your project's package.json, install this module with the following command:

$ npm install pown-now --save

Once that's done, you can invoke Pown NOW like this:

$ POWN_ROOT=. pown now

If installed globally or as part of Pown.js distribution invoke like this:

$ pown now