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

ip-purity-check

v1.0.2

Published

Score an IP's cleanliness from the command line: ~25 DNSBL blocklists plus reverse DNS, turned into a 0-100 purity score. Zero dependencies, no API key, no third-party HTTP service.

Readme

ip-purity-check

Score an IP's cleanliness from the command line — using DNS alone.

Whether an IP gets trusted is decided less by what a website says about it and more by whether the networks that track abuse will talk about it. Those networks publish their answers over DNS. This tool asks ~25 of them in parallel, adds reverse DNS as a weak signal, and turns the replies into one score — plus a confidence level, so that no data never looks like clean.

$ ip-purity-check 8.8.8.8 --dns 1.1.1.1

IP Purity Report  8.8.8.8
------------------------------------------------------------
  Score       100 / 100   Clean
  Blacklists  0 hit / 25 checked   (18 answered, confidence medium)
  rDNS        1 PTR

  rDNS:
    dns.google

  Note: 7 list(s) did not answer. Unreachable != clean,
  and it does not count against the score.
------------------------------------------------------------
  Score = 100 minus blocklist weights; a missing PTR costs a few points.
  More detail: https://socks5ip.com.cn/ip-check-center/

Why DNS and not an API

Most "IP reputation" tools are a thin wrapper around someone else's HTTP API: you need a key, you get a rate limit, the answer is one company's opinion, and when their free tier changes your tool silently breaks.

Blocklist operators don't work that way. They publish over DNS, publicly, for free, and have done so for decades — every reply here is a query you could run yourself with dig:

$ dig +short 4.3.2.1.zen.spamhaus.org
127.0.0.2

So this package has no API key, no account, no HTTP dependency, and no dependencies at all.

Install

npm install -g ip-purity-check

Or without installing:

npx ip-purity-check 1.2.3.4

Usage

ip-purity-check 1.2.3.4                      # human-readable report
ip-purity-check 1.2.3.4 5.6.7.8              # several IPs
ip-purity-check 1.2.3.4 --json               # machine-readable
ip-purity-check 1.2.3.4 --dns 1.1.1.1        # pick the resolver (comma-separate for more)
ip-purity-check 1.2.3.4 --timeout 5000       # per-query timeout, ms (default 6000)
ip-purity-check 1.2.3.4 --concurrency 16     # parallel queries (default 8)
ip-purity-check --list                       # show the blocklists queried

Exit code: 0 nothing listed · 1 at least one listing · 2 could not be scored.

Programmatic use

const { check } = require('ip-purity-check');

const r = await check('8.8.8.8', { dnsServers: ['1.1.1.1'] });
// {
//   ip: '8.8.8.8', score: 100, grade: 'Clean', confidence: 'medium',
//   supported: true, checked: 25, answered: 18, coverage: 0.72,
//   listed: 0, unreachable: 7, hits: [],
//   ptr: ['dns.google'], ptrChecked: true, checkedAt: '2026-09-18T...'
// }

check() never throws for a well-formed IPv4 address — unreachable lists are reported as unreachable, never as clean.

How the score works

| Signal | Effect | |---|---| | Base | 100 | | Listed on a blocklist | −25 (Spamhaus ZEN), −15 (SpamCop / Barracuda / Abusix CBL), −12 (DroneBL / Blocklist.de), −8 to −10 (most others), −6 (FusionZero) | | No reverse DNS | −5 (only when the PTR lookup itself succeeded) |

Grades: ≥90 Clean · ≥70 Good · ≥40 Fair · <40 Poor · Inconclusive when too few lists answered.

Weights reflect both how widely a list is consulted and how damaging a listing is in practice — Spamhaus ZEN alone is used by a large share of mail systems, so a hit there costs the most.

Four things this tool is careful about

1. unreachable is not clean. A dead or blocked query proves nothing. Such lists are excluded from the score and counted separately.

2. Too little data means no score at all. If fewer than 60% of the lists answer, the tool reports Inconclusive and refuses to print a number — a score built on almost no answers looks like a clean bill of health while actually meaning "I could not ask". Each report also carries answered and confidence (high / medium / low).

3. Some blocklists refuse public resolvers. If you query Spamhaus from a shared resolver it replies 127.255.255.x, meaning "I won't answer you" — not "this IP is listed". Those are detected and reported as unreachable. Run against a resolver the lists accept (--dns 1.1.1.1) for better coverage.

4. IPv6 is deliberately not scored. DNSBL coverage for IPv6 is still thin and inconsistent; a number would imply more confidence than the data supports. The tool says so instead of inventing a score.

Related

License

MIT