@profullstack/threatcrush 0.13.48 → 0.13.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/daemon.js +70 -1
- package/dist/daemon.js.map +1 -1
- package/dist/index.js +70 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44500,6 +44500,75 @@ var DEFAULT_RULES = [
|
|
|
44500
44500
|
},
|
|
44501
44501
|
enabled: true
|
|
44502
44502
|
},
|
|
44503
|
+
{
|
|
44504
|
+
// The slow twin of paywall-hammering. A caller that paces itself under 30 a
|
|
44505
|
+
// minute never trips that rule, yet twenty 402s in ten minutes from one
|
|
44506
|
+
// address is not a reader deciding whether to pay: it has been told the
|
|
44507
|
+
// price twenty times and kept walking. DataForSeoBot took ~21k pages a day
|
|
44508
|
+
// from ONE address on watchnews.now (2026-10-19), about 15 a minute.
|
|
44509
|
+
//
|
|
44510
|
+
// A podcast app polling a paid feed, or a person who hit the free limit and
|
|
44511
|
+
// clicks a few more links, stays far under this. FCrDNS-verified search
|
|
44512
|
+
// crawlers are spared by remediation whatever they trip, and every ban
|
|
44513
|
+
// follows the ladder, so a first offence is minutes, not days.
|
|
44514
|
+
id: "paywall-ignored",
|
|
44515
|
+
title: "Paywall Ignored",
|
|
44516
|
+
description: "One source kept requesting after twenty 402 Payment Required answers in ten minutes",
|
|
44517
|
+
version: "1.0.0",
|
|
44518
|
+
category: "web",
|
|
44519
|
+
severity: "high",
|
|
44520
|
+
source_types: ["log-watcher", "web"],
|
|
44521
|
+
match: {
|
|
44522
|
+
field: "message",
|
|
44523
|
+
operator: "regex",
|
|
44524
|
+
value: "Client error 402:"
|
|
44525
|
+
},
|
|
44526
|
+
threshold: 20,
|
|
44527
|
+
window_seconds: 600,
|
|
44528
|
+
cooldown_seconds: 600,
|
|
44529
|
+
tags: ["web", "scraper", "x402", "paywall"],
|
|
44530
|
+
remediation: {
|
|
44531
|
+
action: "block",
|
|
44532
|
+
description: "Block a caller that keeps requesting after being told the price"
|
|
44533
|
+
},
|
|
44534
|
+
enabled: true
|
|
44535
|
+
},
|
|
44536
|
+
{
|
|
44537
|
+
// A crawler that names itself as a scraper (a headless browser, an SEO
|
|
44538
|
+
// reseller) and is refused with a 402 has its answer; a fifth one inside five
|
|
44539
|
+
// minutes from the same address means it is ignoring it. The gateway charges
|
|
44540
|
+
// these by name (x402-gateway 0.8: HEADLESS_AGENTS + SCRAPER_AGENTS) and the
|
|
44541
|
+
// resellers are refused in robots.txt too, so nothing welcome matches here.
|
|
44542
|
+
// Search crawlers (Googlebot, bingbot, Applebot) are deliberately absent.
|
|
44543
|
+
id: "paywall-declared-scraper",
|
|
44544
|
+
title: "Declared Scraper Ignoring the Paywall",
|
|
44545
|
+
description: "A self-declared scraper or headless browser keeps requesting after 402 answers",
|
|
44546
|
+
version: "1.0.0",
|
|
44547
|
+
category: "web",
|
|
44548
|
+
severity: "high",
|
|
44549
|
+
source_types: ["log-watcher", "web"],
|
|
44550
|
+
match: {
|
|
44551
|
+
field: "message",
|
|
44552
|
+
operator: "regex",
|
|
44553
|
+
value: "Client error 402:",
|
|
44554
|
+
and: [
|
|
44555
|
+
{
|
|
44556
|
+
field: "ua",
|
|
44557
|
+
operator: "regex",
|
|
44558
|
+
value: "(Lightpanda|HeadlessChrome|PhantomJS|AhrefsBot|SemrushBot|MJ12bot|DataForSeoBot|DotBot|BLEXBot|serpstatbot|Barkrowler)"
|
|
44559
|
+
}
|
|
44560
|
+
]
|
|
44561
|
+
},
|
|
44562
|
+
threshold: 5,
|
|
44563
|
+
window_seconds: 300,
|
|
44564
|
+
cooldown_seconds: 600,
|
|
44565
|
+
tags: ["web", "scraper", "x402", "paywall", "headless"],
|
|
44566
|
+
remediation: {
|
|
44567
|
+
action: "block",
|
|
44568
|
+
description: "Block a declared scraper that keeps requesting after being told the price"
|
|
44569
|
+
},
|
|
44570
|
+
enabled: true
|
|
44571
|
+
},
|
|
44503
44572
|
{
|
|
44504
44573
|
// The distributed twin of paywall-hammering. A proxy swarm asks once per
|
|
44505
44574
|
// address — 189k 402s across 111k IPs, ~1.7 each, observed on dev2's
|
|
@@ -44965,7 +45034,7 @@ init_backoff();
|
|
|
44965
45034
|
|
|
44966
45035
|
// src/daemon/firewall/crawlers.ts
|
|
44967
45036
|
var import_node_dns = require("dns");
|
|
44968
|
-
var CRAWLER_DOMAINS = ["googlebot.com", "google.com", "search.msn.com"];
|
|
45037
|
+
var CRAWLER_DOMAINS = ["googlebot.com", "google.com", "search.msn.com", "applebot.apple.com"];
|
|
44969
45038
|
var systemResolver = {
|
|
44970
45039
|
reverse: (ip) => import_node_dns.promises.reverse(ip),
|
|
44971
45040
|
lookup: async (host) => (await import_node_dns.promises.lookup(host, { all: true })).map((a) => a.address)
|