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

pwnbotdetect

v0.1.7

Published

PwnBot / Aegis server SDK: protect() writes with single-use leases, plus the browser client.

Readme

pwnbotdetect

Stop fake accounts where they cost you money (sign-ups, invites, referral rewards, promo codes, API keys) without CAPTCHAs, browser fingerprinting or IP blocklists. PwnBot ties each scarce write to a verified device (App Attest, Play Integrity) or passkey, holds each one to a daily limit, and re-checks it on the write itself with a single-use pass.

A bot score guesses about anonymous traffic. PwnBot knows who did each write, on what verified hardware, and how often, so it can also tell you:

  • What a fake account costs an attacker, per route, before you ship: npx pwnbotdetect price policy.json.
  • What a user has left today: client.allowance(), so the app says "2 invites left" instead of surprising anyone.
  • Why it said no, in plain words: explainRefusal(), with a support reference your team can use to give the day back.
  • Limits that grow with trust: more room for stronger evidence and for older accounts, so a burst of fresh farm accounts meets the base limit.
  • Your users' own AI agents are welcome: client.delegate() lets a person's agent act on part of their allowance. It never adds capacity, and your server sees which writes it made.
  • Canary first: see what enforce would have refused before it refuses anyone.
import { protect, WRITE_HASH_HEADER } from "pwnbotdetect";

export const POST = protect({ route: "POST /v1/keys", grade: "G3" })(async (req, { lease }) => {
  const key = await createKey(lease?.principal_site);
  return Response.json({ key }, { headers: { [WRITE_HASH_HEADER]: key.id } });
});
npx pwnbotdetect recipes                        # ready-made policies for common farm targets
npx pwnbotdetect recipe referral-reward > policy.json
npx pwnbotdetect price policy.json              # the fake-account price per route
npx pwnbotdetect keys                           # signing keys and tokens for a deployment

Entry points: pwnbotdetect (server: protect, configureAegis, the engine), pwnbotdetect/client (browser client), pwnbotdetect/express (the middleware for a server that isn't this app: verify, settle, release, forget, and a "follow" mode that takes the console's per-route switch), pwnbotdetect/crypto (key helpers), pwnbotdetect/redis (shared state; install ioredis).

The full guide is INTEGRATION.md in this package; PRIVACY.md says what is stored about your users and gives privacy-policy and app-store wording. Licensed FSL-1.1 with an Apache 2.0 future license (see LICENSE).