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 🙏

© 2026 – Pkg Stats / Ryan Hefner

arper

v0.0.13

Published

Project for Istanbul Packathon (packathon.org)

Readme

Arper

Project for Istanbul Packathon (packathon.org)

NOTE: this tool is still under HEAVY development! The package is there just as a placeholder for the name. Use at your own risk.

Why

I want to see who is connecting to my WiFi network (or any other network for that matter) in real time.

Applications like [1] represent the state of the art in detecting nodes on a network. Their approach is based on periodic scanning of IP addresses using tools like Nmap. There are two problems with this approach:

  1. It's not real time and it requires constant polling (and we all hate polling don't we?).
  2. If there is a central entity in the network (e.g. a router) it might limit things like ICMP requests (ping), port scanning etc. Furthermore individual nodes can simply decide not to reply to any unauthenticated request, regardless of the protocol used (e.g. on OS X a user can set the machine in "stealth mode", i.e. the machine will stop replying to ICMP requests).
  3. They work on top of the IP layer (OSI level 3) which means the packets they send have to be routed by an entity, likely a router.

Why can't I just leave a RaspberryPi scanning IP addresses?

Because IP addresses can change on a regular basis, for example if you use DHCP. It's perfectly normal. MAC addresses, on the other hand, can only be spoofed and the average Joe most probably doesn't know how to do that.

How

In every network based on the Ethernet protocol (like WiFi 802.11) once a node obtains an IP address (e.g. from a DHCP server) it advertises its pair (IP address, MAC address), that is, its virtual and physical addresses, to every node on the network in a peer-to-peer fashion using the ARP [2] protocol.

ARP packets cannot be routed. A central entity in the network has no control over what ARP packets are sent. Nodes can at most flood the network with packets (for example flooding with ARP responses is often used to carry on man-in-the-middle attacks).

This means that every single node on the network will receive ARP packets broadcasted by other nodes, in a completely passive manner. No polling required!

What

Arper represents a new class of network detection tools. Arper can detect, in real time, when a new node in the network broadcasts its IP and MAC addresses. By monitoring a network device with Pcap it can passively listen for ARP packets. That passively is of extreme importance. It means there is virtually zero impact on performance and power usage while Arper is running.

Issues

This and any other detection methods (including Nmap) do not work if the WiFi access point (which acts at the datalink layer) implements VLANs [3] (a.k.a. "client isolation"). A VLAN is, in fact, a virtual channel established between the node and the AP, at the datalink layer, that prevents the node from communicating with any other node in the network, no matter what higher-level protocol is used. It's basically the equivalent of plugging a cable into a switch.

VLANs are usually implemented in places with a public network such as cafes, universities, companies etc.

I want it

npm install -g arper

Arper accepts three arguments:

  • interface (String): the network interface to use.
  • callback (Function): a callback for whenever a packet is received.
  • pretty (Boolean): if true IP and MAC addresses will be passed as strings (e.g. 00:01:02:AA:BB:CC) otherwise as an array of decimals (e.g. [128, 100, 150, 80, 10, 35]).
var arper = require("arper");
arper.monitor("en0", function(err, newNode) { // en0 is the default WiFi interface on Mac
  if (err)
    console.log("Something went wrong!");
  // Do something with newNode
}, true);

Middleware

Middleware for Arper can be easily attached. Do you want to receive a notification when a new node is connected? You can. Do you want to receive an SMS/Email/... when it happens? You can.

An example of dead simple logging middleware:

var arper = require("arper");

var loggingMiddleware = function(newNode) {
  console.log(newNode);
};

arper.addMiddleware(loggingMiddleware);

arper.monitor("en0", function(err, newNode) {
  ...
}, true);

Middleware functions are called in the order they are added and are never passed an error. Only the main callback does (see below).

Examples

The examples directory includes some use cases of Arper by using specific middleware.

Each example can be run with npm start.

Tests

Clone the repository or go to your NODE_PATH directory and cd to arper. Then run:

npm test

References

  • [1] http://whoisonmywifi.com/
  • [2] https://en.wikipedia.org/wiki/Address_Resolution_Protocol
  • [3] https://en.wikipedia.org/wiki/Virtual_LAN