@webdecoy/node 0.29.0 → 0.31.0
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 +13 -0
- package/dist/{chunk-VPPTUL5K.mjs → chunk-BBRVE4RC.mjs} +85 -85
- package/dist/{chunk-32TEUD5K.mjs → chunk-IGSPJVI6.mjs} +26 -0
- package/dist/{detect-and-gate-Dnfo2t3B.d.ts → detect-and-gate-BfL39HDb.d.ts} +1 -1
- package/dist/{detect-and-gate-BNq26N9d.d.mts → detect-and-gate-DWOUDUSY.d.mts} +1 -1
- package/dist/index.d.mts +66 -7
- package/dist/index.d.ts +66 -7
- package/dist/index.js +311 -149
- package/dist/index.mjs +188 -53
- package/dist/{sdk-CJ6pmQGy.d.mts → sdk-DveMEqxl.d.mts} +2 -2
- package/dist/{sdk-CJ6pmQGy.d.ts → sdk-DveMEqxl.d.ts} +2 -2
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +26 -0
- package/dist/testing.mjs +1 -1
- package/dist/vercel.d.mts +2 -2
- package/dist/vercel.d.ts +2 -2
- package/dist/vercel.js +124 -98
- package/dist/vercel.mjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -74,6 +74,7 @@ __export(index_exports, {
|
|
|
74
74
|
createClearanceGate: () => createClearanceGate,
|
|
75
75
|
createDetectAndGate: () => createDetectAndGate,
|
|
76
76
|
createFetchGuard: () => createFetchGuard,
|
|
77
|
+
createNodeHttpGuard: () => createNodeHttpGuard,
|
|
77
78
|
createOffensiveToolchainEvidence: () => createOffensiveToolchainEvidence,
|
|
78
79
|
deriveAndArm: () => deriveAndArm,
|
|
79
80
|
deriveKey: () => deriveKey,
|
|
@@ -499,6 +500,8 @@ var BOT_REGISTRY = [
|
|
|
499
500
|
{ id: "kimibot", name: "KimiBot", category: "training_crawler", organization: "Moonshot AI", baseScore: 80, respectsRobots: true, uaPatterns: ["kimibot"] },
|
|
500
501
|
{ id: "moonshotbot", name: "MoonshotBot", category: "training_crawler", organization: "Moonshot AI", baseScore: 80, respectsRobots: false, uaPatterns: ["moonshotbot"] },
|
|
501
502
|
{ id: "chatglm-spider", name: "ChatGLM-Spider", category: "training_crawler", organization: "Zhipu AI", baseScore: 80, respectsRobots: false, uaPatterns: ["chatglm-spider"] },
|
|
503
|
+
{ id: "generalretrievalbot", name: "GeneralRetrievalBot", category: "ai_search_crawler", organization: "General Retrieval", baseScore: 60, respectsRobots: true, uaPatterns: ["generalretrievalbot"] },
|
|
504
|
+
{ id: "andi-searchbot", name: "Andi-SearchBot", category: "ai_search_crawler", organization: "Andi", baseScore: 55, respectsRobots: true, uaPatterns: ["andi-searchbot"] },
|
|
502
505
|
{ id: "talarionsearchbot", name: "TalarionSearchBot", category: "ai_search_crawler", organization: "Talarion", baseScore: 65, respectsRobots: false, uaPatterns: ["talarionsearchbot"] },
|
|
503
506
|
{ id: "unfragilebot", name: "UnfragileBot", category: "ai_search_crawler", organization: "Unfragile", baseScore: 65, respectsRobots: true, uaPatterns: ["unfragilebot"] },
|
|
504
507
|
{ id: "aranet-searchbot", name: "Aranet-SearchBot", category: "ai_search_crawler", organization: "Aranet", baseScore: 65, respectsRobots: false, uaPatterns: ["aranet-searchbot"] },
|
|
@@ -534,6 +537,9 @@ var BOT_REGISTRY = [
|
|
|
534
537
|
{ id: "manus-user", name: "Manus-User", category: "ai_agent", organization: "Manus", baseScore: 70, respectsRobots: false, uaPatterns: ["manus-user"] },
|
|
535
538
|
{ id: "multion", name: "MultiOn", category: "ai_agent", organization: "MultiOn", baseScore: 70, respectsRobots: false, uaPatterns: ["multion"] },
|
|
536
539
|
{ id: "opencode-user", name: "OpenCode-User", category: "ai_agent", organization: "OpenCode", baseScore: 75, respectsRobots: false, uaPatterns: ["opencode-user"] },
|
|
540
|
+
{ id: "jambot", name: "Jambot", category: "search_crawler", organization: "Jambot", baseScore: 40, respectsRobots: true, uaPatterns: ["jambot"] },
|
|
541
|
+
{ id: "fyndbot", name: "fyndbot", category: "search_crawler", organization: "Fynd", baseScore: 40, respectsRobots: true, uaPatterns: ["fyndbot"] },
|
|
542
|
+
{ id: "pexelsbot", name: "PexelsBot", category: "search_crawler", organization: "pexels.de", baseScore: 40, respectsRobots: true, uaPatterns: ["pexelsbot"] },
|
|
537
543
|
{ id: "360spider", name: "360Spider", category: "search_crawler", organization: "Qihoo 360", baseScore: 40, respectsRobots: true, uaPatterns: ["360spider"] },
|
|
538
544
|
{ id: "cgmsearchbot", name: "CGMSearchBot", category: "search_crawler", organization: "CGMIMM", baseScore: 40, respectsRobots: true, uaPatterns: ["cgmsearchbot"] },
|
|
539
545
|
{ id: "iboubot", name: "IbouBot", category: "search_crawler", organization: "Ibou", baseScore: 30, respectsRobots: true, uaPatterns: ["iboubot", "ibou-search"] },
|
|
@@ -557,6 +563,10 @@ var BOT_REGISTRY = [
|
|
|
557
563
|
{ id: "coccocbot", name: "Coc Coc", category: "search_crawler", organization: "Coc Coc", baseScore: 35, respectsRobots: true, uaPatterns: ["coccocbot"] },
|
|
558
564
|
{ id: "yisouspider", name: "YisouSpider", category: "search_crawler", organization: "Alibaba", baseScore: 40, respectsRobots: true, uaPatterns: ["yisouspider"] },
|
|
559
565
|
{ id: "yepbot", name: "YepBot", category: "search_crawler", organization: "Ahrefs", baseScore: 30, respectsRobots: true, uaPatterns: ["yepbot"] },
|
|
566
|
+
{ id: "agentreadyscan", name: "AgentReadyScan", category: "seo_crawler", organization: "Agent Ready", baseScore: 45, respectsRobots: true, uaPatterns: ["agentreadyscan"] },
|
|
567
|
+
{ id: "crawlcheck", name: "CrawlCheck", category: "seo_crawler", organization: "CrawlCheck", baseScore: 45, respectsRobots: true, uaPatterns: ["crawlcheck/"] },
|
|
568
|
+
{ id: "kostobot", name: "KostoBot", category: "seo_crawler", organization: "Kosto", baseScore: 50, respectsRobots: true, uaPatterns: ["kostobot"] },
|
|
569
|
+
{ id: "keys-so-bot", name: "keys.so", category: "seo_crawler", organization: "Keys.so", baseScore: 50, respectsRobots: false, uaPatterns: ["keys-so-bot"] },
|
|
560
570
|
{ id: "crolbot", name: "CrolBot", category: "seo_crawler", organization: "cloro", baseScore: 50, respectsRobots: false, uaPatterns: ["crolbot"] },
|
|
561
571
|
{ id: "ahrefsbot", name: "AhrefsBot", category: "seo_crawler", organization: "Ahrefs", baseScore: 50, respectsRobots: true, uaPatterns: ["ahrefsbot", "ahrefs"] },
|
|
562
572
|
{ id: "semrushbot", name: "SemrushBot", category: "seo_crawler", organization: "Semrush", baseScore: 50, respectsRobots: true, uaPatterns: ["semrushbot", "semrush"] },
|
|
@@ -582,6 +592,10 @@ var BOT_REGISTRY = [
|
|
|
582
592
|
{ id: "seojuice-searchbot", name: "SEOJuice-SearchBot", category: "seo_crawler", organization: "SEOJuice", baseScore: 50, respectsRobots: true, uaPatterns: ["seojuice-searchbot"] },
|
|
583
593
|
{ id: "trendictionbot", name: "trendictionbot", category: "seo_crawler", organization: "Talkwalker", baseScore: 50, respectsRobots: true, uaPatterns: ["trendictionbot"] },
|
|
584
594
|
{ id: "hubspot-crawler", name: "HubSpot Crawler", category: "seo_crawler", organization: "HubSpot", baseScore: 45, respectsRobots: true, uaPatterns: ["hubspot crawler"] },
|
|
595
|
+
{ id: "bitsightbot", name: "BitSightBot", category: "security_scanner", organization: "BitSight", baseScore: 70, respectsRobots: false, uaPatterns: ["bitsightbot"] },
|
|
596
|
+
{ id: "leakix", name: "LeakIX", category: "security_scanner", organization: "LeakIX", baseScore: 75, respectsRobots: false, uaPatterns: ["l9scan"] },
|
|
597
|
+
{ id: "modatscanner", name: "ModatScanner", category: "security_scanner", organization: "Modat", baseScore: 75, respectsRobots: false, uaPatterns: ["modatscanner"] },
|
|
598
|
+
{ id: "umaibot", name: "UmaiBot", category: "security_scanner", organization: "UMAI", baseScore: 60, respectsRobots: true, uaPatterns: ["umaibot"] },
|
|
585
599
|
{ id: "artex", name: "ARTEX", category: "security_scanner", organization: "Open Source", baseScore: 90, respectsRobots: false, uaPatterns: ["artex-enrich/"] },
|
|
586
600
|
{ id: "nessus", name: "Nessus", category: "security_scanner", organization: "Tenable", baseScore: 70, respectsRobots: false, uaPatterns: ["nessus"] },
|
|
587
601
|
{ id: "qualys", name: "Qualys", category: "security_scanner", organization: "Qualys", baseScore: 70, respectsRobots: false, uaPatterns: ["qualys"] },
|
|
@@ -636,6 +650,8 @@ var BOT_REGISTRY = [
|
|
|
636
650
|
{ id: "wayback", name: "Wayback Machine", category: "archiver", organization: "Internet Archive", baseScore: 25, respectsRobots: true, uaPatterns: ["wayback"] },
|
|
637
651
|
{ id: "heritrix", name: "Heritrix", category: "archiver", organization: "Internet Archive", baseScore: 30, respectsRobots: true, uaPatterns: ["heritrix"] },
|
|
638
652
|
{ id: "brozzler", name: "Brozzler", category: "archiver", organization: "Internet Archive", baseScore: 30, respectsRobots: true, uaPatterns: ["brozzler"] },
|
|
653
|
+
{ id: "findfiles-linkchecker", name: "FindFiles.net LinkChecker", category: "fetcher", organization: "FindFiles.net", baseScore: 30, respectsRobots: true, uaPatterns: ["findfiles.net-linkchecker"] },
|
|
654
|
+
{ id: "hstspreload-bot", name: "hstspreload-bot", category: "fetcher", organization: "Chromium", baseScore: 20, respectsRobots: false, uaPatterns: ["hstspreload-bot"] },
|
|
639
655
|
{ id: "facebookexternalhit", name: "Facebook", category: "fetcher", organization: "Meta", baseScore: 25, respectsRobots: true, uaPatterns: ["facebookexternalhit"] },
|
|
640
656
|
{ id: "facebot", name: "Facebot", category: "fetcher", organization: "Meta", baseScore: 25, respectsRobots: true, uaPatterns: ["facebot"] },
|
|
641
657
|
{ id: "twitterbot", name: "Twitterbot", category: "fetcher", organization: "X Corp", baseScore: 25, respectsRobots: true, uaPatterns: ["twitterbot"] },
|
|
@@ -660,6 +676,7 @@ var BOT_REGISTRY = [
|
|
|
660
676
|
{ id: "libwww-perl", name: "libwww-perl", category: "fetcher", organization: "Perl", baseScore: 50, respectsRobots: false, uaPatterns: ["libwww-perl"] },
|
|
661
677
|
{ id: "lwp", name: "LWP", category: "fetcher", organization: "Perl", baseScore: 50, respectsRobots: false, uaPatterns: ["lwp-"] },
|
|
662
678
|
{ id: "httrack", name: "HTTrack", category: "fetcher", organization: "Open Source", baseScore: 60, respectsRobots: true, uaPatterns: ["httrack"] },
|
|
679
|
+
{ id: "truetierbot", name: "TrueTierBot", category: "monitoring", organization: "TrueTier", baseScore: 25, respectsRobots: true, uaPatterns: ["truetierbot"] },
|
|
663
680
|
{ id: "webdecoybot", name: "WebDecoyBot", category: "monitoring", organization: "WebDecoy", baseScore: 5, respectsRobots: true, uaPatterns: ["webdecoybot"] },
|
|
664
681
|
{ id: "uptimerobot", name: "UptimeRobot", category: "monitoring", organization: "UptimeRobot", baseScore: 20, respectsRobots: true, uaPatterns: ["uptimerobot"] },
|
|
665
682
|
{ id: "pingdom", name: "Pingdom", category: "monitoring", organization: "SolarWinds", baseScore: 20, respectsRobots: true, uaPatterns: ["pingdom"] },
|
|
@@ -673,6 +690,9 @@ var BOT_REGISTRY = [
|
|
|
673
690
|
{ id: "nodeping", name: "NodePing", category: "monitoring", organization: "NodePing", baseScore: 20, respectsRobots: true, uaPatterns: ["nodeping"] },
|
|
674
691
|
{ id: "gtmetrix", name: "GTmetrix", category: "monitoring", organization: "GTmetrix", baseScore: 20, respectsRobots: true, uaPatterns: ["gtmetrix"] },
|
|
675
692
|
{ id: "chrome-lighthouse", name: "Lighthouse", category: "monitoring", organization: "Google", baseScore: 20, respectsRobots: true, uaPatterns: ["chrome-lighthouse", "google page speed"] },
|
|
693
|
+
{ id: "andifeedbot", name: "AndiFeedBot", category: "feed_reader", organization: "Andi", baseScore: 30, respectsRobots: true, uaPatterns: ["andifeedbot"] },
|
|
694
|
+
{ id: "librarianbot", name: "LibrarianBot", category: "feed_reader", organization: "GenioFab", baseScore: 30, respectsRobots: true, uaPatterns: ["librarianbot"] },
|
|
695
|
+
{ id: "oursignal", name: "oursignal", category: "feed_reader", organization: "oursignal", baseScore: 25, respectsRobots: true, uaPatterns: ["oursignal/"] },
|
|
676
696
|
{ id: "feedly", name: "Feedly", category: "feed_reader", organization: "Feedly", baseScore: 25, respectsRobots: true, uaPatterns: ["feedly"] },
|
|
677
697
|
{ id: "livelapbot", name: "LivelapBot", category: "feed_reader", organization: "Livelap", baseScore: 30, respectsRobots: true, uaPatterns: ["livelapbot"] },
|
|
678
698
|
{ id: "feedfetcher-google", name: "Feedfetcher-Google", category: "feed_reader", organization: "Google", baseScore: 25, respectsRobots: true, uaPatterns: ["feedfetcher"] },
|
|
@@ -683,6 +703,12 @@ var BOT_REGISTRY = [
|
|
|
683
703
|
{ id: "miniflux", name: "Miniflux", category: "feed_reader", organization: "Open Source", baseScore: 25, respectsRobots: true, uaPatterns: ["miniflux"] },
|
|
684
704
|
{ id: "freshrss", name: "FreshRSS", category: "feed_reader", organization: "Open Source", baseScore: 25, respectsRobots: true, uaPatterns: ["freshrss"] },
|
|
685
705
|
{ id: "commafeed", name: "CommaFeed", category: "feed_reader", organization: "Open Source", baseScore: 25, respectsRobots: true, uaPatterns: ["commafeed"] },
|
|
706
|
+
{ id: "tphotobot", name: "tphotobot", category: "commercial_scraper", organization: "Estidraft", baseScore: 50, respectsRobots: true, uaPatterns: ["tphotobot"] },
|
|
707
|
+
{ id: "bangobot", name: "BangoBot", category: "commercial_scraper", organization: "Bango API", baseScore: 55, respectsRobots: false, uaPatterns: ["bangobot"] },
|
|
708
|
+
{ id: "kamatabot", name: "KamataBot", category: "commercial_scraper", organization: "Kamata", baseScore: 55, respectsRobots: true, uaPatterns: ["kamatabot"] },
|
|
709
|
+
{ id: "boehmbot", name: "BoehmBot", category: "commercial_scraper", organization: "b\xF6hm systems", baseScore: 50, respectsRobots: true, uaPatterns: ["boehmbot"] },
|
|
710
|
+
{ id: "pipericbot", name: "PipericBot", category: "commercial_scraper", organization: "Piperic", baseScore: 55, respectsRobots: true, uaPatterns: ["pipericbot"] },
|
|
711
|
+
{ id: "pandalytics", name: "Pandalytics", category: "commercial_scraper", organization: "Domainsbot", baseScore: 50, respectsRobots: true, uaPatterns: ["pandalytics"] },
|
|
686
712
|
{ id: "spiderling", name: "SpiderLing", category: "commercial_scraper", organization: "Lexical Computing", baseScore: 55, respectsRobots: true, uaPatterns: ["spiderling", "sketchengine"] },
|
|
687
713
|
{ id: "netapi", name: "NetAPI Bot", category: "commercial_scraper", organization: "NetAPI", baseScore: 50, respectsRobots: true, uaPatterns: ["netapi/"] },
|
|
688
714
|
{ id: "anticlonebot", name: "AntiCloneBot", category: "commercial_scraper", organization: "AntiClone", baseScore: 45, respectsRobots: true, uaPatterns: ["anticlonebot"] },
|
|
@@ -700,6 +726,7 @@ var BOT_REGISTRY = [
|
|
|
700
726
|
{ id: "apify", name: "Apify", category: "commercial_scraper", organization: "Apify", baseScore: 65, respectsRobots: true, uaPatterns: ["apify"] },
|
|
701
727
|
{ id: "crawlbase", name: "Crawlbase", category: "commercial_scraper", organization: "Crawlbase", baseScore: 65, respectsRobots: true, uaPatterns: ["crawlbase"] },
|
|
702
728
|
{ id: "webscrapingapi", name: "WebScrapingAPI", category: "commercial_scraper", organization: "WebScrapingAPI", baseScore: 65, respectsRobots: true, uaPatterns: ["webscrapingapi"] },
|
|
729
|
+
{ id: "andi-user", name: "Andi-User", category: "ai_assistant", organization: "Andi", baseScore: 60, respectsRobots: false, uaPatterns: ["andi-user"] },
|
|
703
730
|
{ id: "chatgpt-user", name: "ChatGPT-User", category: "ai_assistant", organization: "OpenAI", baseScore: 85, respectsRobots: true, uaPatterns: ["chatgpt-user"] },
|
|
704
731
|
{ id: "perplexity-user", name: "Perplexity-User", category: "ai_assistant", organization: "Perplexity AI", baseScore: 75, respectsRobots: false, uaPatterns: ["perplexity-user"] },
|
|
705
732
|
{ id: "mistralai-user", name: "MistralAI-User", category: "ai_assistant", organization: "Mistral AI", baseScore: 75, respectsRobots: true, uaPatterns: ["mistralai-user"] },
|
|
@@ -2464,7 +2491,7 @@ var MAX_ENTRIES = 500;
|
|
|
2464
2491
|
var header = (headers, name) => {
|
|
2465
2492
|
const v = headers[name] ?? headers[name.toLowerCase()];
|
|
2466
2493
|
if (v !== void 0) return v;
|
|
2467
|
-
for (const [
|
|
2494
|
+
for (const [k, value] of Object.entries(headers)) if (k.toLowerCase() === name) return value;
|
|
2468
2495
|
return "";
|
|
2469
2496
|
};
|
|
2470
2497
|
var AIReferralCounter = class {
|
|
@@ -2589,16 +2616,16 @@ async function rsaThumbprint(n, e) {
|
|
|
2589
2616
|
async function okpThumbprint(crv, x2) {
|
|
2590
2617
|
return digest(`{"crv":${JSON.stringify(crv)},"kty":"OKP","x":${JSON.stringify(x2)}}`);
|
|
2591
2618
|
}
|
|
2592
|
-
async function jwkThumbprint(
|
|
2593
|
-
switch (
|
|
2619
|
+
async function jwkThumbprint(k) {
|
|
2620
|
+
switch (k.kty) {
|
|
2594
2621
|
case "OKP":
|
|
2595
|
-
if (!
|
|
2596
|
-
return okpThumbprint(
|
|
2622
|
+
if (!k.crv || !k.x) throw new Error("thumbprint: OKP JWK missing crv or x");
|
|
2623
|
+
return okpThumbprint(k.crv, k.x);
|
|
2597
2624
|
case "RSA":
|
|
2598
|
-
if (!
|
|
2599
|
-
return rsaThumbprint(
|
|
2625
|
+
if (!k.n || !k.e) throw new Error("thumbprint: RSA JWK missing n or e");
|
|
2626
|
+
return rsaThumbprint(k.n, k.e);
|
|
2600
2627
|
default:
|
|
2601
|
-
throw new Error(`thumbprint: unsupported kty ${JSON.stringify(
|
|
2628
|
+
throw new Error(`thumbprint: unsupported kty ${JSON.stringify(k.kty)}`);
|
|
2602
2629
|
}
|
|
2603
2630
|
}
|
|
2604
2631
|
async function digest(canonical) {
|
|
@@ -2694,7 +2721,7 @@ var DirectoryCache = class {
|
|
|
2694
2721
|
for (const keys of results) {
|
|
2695
2722
|
if (keys === null) continue;
|
|
2696
2723
|
fetchedAny = true;
|
|
2697
|
-
for (const
|
|
2724
|
+
for (const k of keys) next.set(cacheKey(k.identifier, k.thumbprint), k.key);
|
|
2698
2725
|
}
|
|
2699
2726
|
if (fetchedAny) {
|
|
2700
2727
|
this.keys = next;
|
|
@@ -3234,8 +3261,8 @@ function isRequest(input) {
|
|
|
3234
3261
|
}
|
|
3235
3262
|
function toHeaders(record) {
|
|
3236
3263
|
const h = new Headers();
|
|
3237
|
-
for (const [
|
|
3238
|
-
if (v !== void 0 && v !== null) h.set(
|
|
3264
|
+
for (const [k, v] of Object.entries(record)) {
|
|
3265
|
+
if (v !== void 0 && v !== null) h.set(k, String(v));
|
|
3239
3266
|
}
|
|
3240
3267
|
return h;
|
|
3241
3268
|
}
|
|
@@ -3264,9 +3291,9 @@ function readEdgeVerdict(headers) {
|
|
|
3264
3291
|
let clearanceRaw;
|
|
3265
3292
|
let classRaw;
|
|
3266
3293
|
for (const key of Object.keys(headers)) {
|
|
3267
|
-
const
|
|
3268
|
-
if (
|
|
3269
|
-
else if (
|
|
3294
|
+
const k = key.toLowerCase();
|
|
3295
|
+
if (k === EDGE_CLEARANCE_HEADER) clearanceRaw = headers[key];
|
|
3296
|
+
else if (k === EDGE_CLASS_HEADER) classRaw = headers[key];
|
|
3270
3297
|
}
|
|
3271
3298
|
const clearance = clearanceRaw?.trim() || void 0;
|
|
3272
3299
|
const cls = normaliseClass(classRaw);
|
|
@@ -4447,7 +4474,7 @@ async function ce(e, t) {
|
|
|
4447
4474
|
if (!t || t.length === 0) return { status: "unknown_key" };
|
|
4448
4475
|
let o, a;
|
|
4449
4476
|
try {
|
|
4450
|
-
o =
|
|
4477
|
+
o = dt(r), a = ft(n);
|
|
4451
4478
|
} catch {
|
|
4452
4479
|
return { status: "invalid" };
|
|
4453
4480
|
}
|
|
@@ -4455,21 +4482,21 @@ async function ce(e, t) {
|
|
|
4455
4482
|
for (let c of o) {
|
|
4456
4483
|
if (c.params.get("tag") !== at) continue;
|
|
4457
4484
|
i = true;
|
|
4458
|
-
let
|
|
4459
|
-
if (!
|
|
4485
|
+
let d = a.get(c.label);
|
|
4486
|
+
if (!d) continue;
|
|
4460
4487
|
let l = c.params.get("keyid");
|
|
4461
4488
|
if (typeof l != "string") continue;
|
|
4462
4489
|
let h;
|
|
4463
4490
|
try {
|
|
4464
4491
|
h = it(e, c);
|
|
4465
4492
|
} catch {
|
|
4466
|
-
s || (s = t.some((
|
|
4493
|
+
s || (s = t.some((f) => f.keyid === l));
|
|
4467
4494
|
continue;
|
|
4468
4495
|
}
|
|
4469
|
-
let p = t.find((
|
|
4470
|
-
if (
|
|
4496
|
+
let p = t.find((f) => {
|
|
4497
|
+
if (f.keyid !== l) return false;
|
|
4471
4498
|
try {
|
|
4472
|
-
return le(
|
|
4499
|
+
return le(f.directory) === h;
|
|
4473
4500
|
} catch {
|
|
4474
4501
|
return false;
|
|
4475
4502
|
}
|
|
@@ -4477,17 +4504,17 @@ async function ce(e, t) {
|
|
|
4477
4504
|
if (!p) continue;
|
|
4478
4505
|
s = true;
|
|
4479
4506
|
let w = Date.now() / 1e3, b = c.params.get("created"), g = c.params.get("expires");
|
|
4480
|
-
if (typeof b != "number" || typeof g != "number" || w >= g + 10 || w + 10 < b || g <= b || g - b > 1440 * 60 || !c.components.some((
|
|
4481
|
-
let
|
|
4507
|
+
if (typeof b != "number" || typeof g != "number" || w >= g + 10 || w + 10 < b || g <= b || g - b > 1440 * 60 || !c.components.some((f) => f.name === "@authority" || f.name === "@target-uri")) continue;
|
|
4508
|
+
let k;
|
|
4482
4509
|
try {
|
|
4483
|
-
|
|
4510
|
+
k = ct(e, c);
|
|
4484
4511
|
} catch {
|
|
4485
4512
|
continue;
|
|
4486
4513
|
}
|
|
4487
4514
|
let u = false;
|
|
4488
4515
|
try {
|
|
4489
|
-
let
|
|
4490
|
-
u = await crypto.subtle.verify({ name: "Ed25519" },
|
|
4516
|
+
let f = await crypto.subtle.importKey("raw", pe(p.public_key), { name: "Ed25519" }, false, ["verify"]);
|
|
4517
|
+
u = await crypto.subtle.verify({ name: "Ed25519" }, f, d, new TextEncoder().encode(k));
|
|
4491
4518
|
} catch {
|
|
4492
4519
|
u = false;
|
|
4493
4520
|
}
|
|
@@ -4504,7 +4531,7 @@ function it(e, t) {
|
|
|
4504
4531
|
if (o.startsWith('"')) {
|
|
4505
4532
|
if (n.keyParam !== void 0) throw new Error("legacy string cannot select a member");
|
|
4506
4533
|
let i = new B(o);
|
|
4507
|
-
if (a =
|
|
4534
|
+
if (a = fe(i), i.skipSP(), !i.eof()) throw new Error("trailing signature-agent data");
|
|
4508
4535
|
} else {
|
|
4509
4536
|
if (n.keyParam === void 0) throw new Error("dictionary member is not covered");
|
|
4510
4537
|
let i = T(o).find((c) => c.key === n.keyParam), s = i?.items[0];
|
|
@@ -4553,7 +4580,7 @@ function gt(e, t) {
|
|
|
4553
4580
|
if (!n) throw new Error(`signature-agent has no member ${t}`);
|
|
4554
4581
|
return n.raw;
|
|
4555
4582
|
}
|
|
4556
|
-
function
|
|
4583
|
+
function dt(e) {
|
|
4557
4584
|
return T(e).map((r) => {
|
|
4558
4585
|
if (!r.isList) throw new Error(`Signature-Input member ${r.key} is not an inner list`);
|
|
4559
4586
|
let n = r.items.map((o) => {
|
|
@@ -4564,7 +4591,7 @@ function ft(e) {
|
|
|
4564
4591
|
return { label: r.key, components: n, params: r.params, raw: r.raw };
|
|
4565
4592
|
});
|
|
4566
4593
|
}
|
|
4567
|
-
function
|
|
4594
|
+
function ft(e) {
|
|
4568
4595
|
let t = T(e), r = /* @__PURE__ */ new Map();
|
|
4569
4596
|
for (let n of t) {
|
|
4570
4597
|
if (n.isList || n.items.length !== 1) throw new Error(`Signature member ${n.key} is not a byte sequence`);
|
|
@@ -4598,8 +4625,8 @@ function T(e) {
|
|
|
4598
4625
|
let a = t.i;
|
|
4599
4626
|
if (!t.eof() && t.peek() === "(") o.isList = true, pt(t, o);
|
|
4600
4627
|
else {
|
|
4601
|
-
let { value: i, params: s, hasParams: c, bytes:
|
|
4602
|
-
o.items.push({ value: i, params: s, hasParams: c, ...
|
|
4628
|
+
let { value: i, params: s, hasParams: c, bytes: d } = ue(t);
|
|
4629
|
+
o.items.push({ value: i, params: s, hasParams: c, ...d ? { bytes: d } : {} });
|
|
4603
4630
|
}
|
|
4604
4631
|
o.raw = e.slice(a, t.i);
|
|
4605
4632
|
} else o.params = V(t), o.items.push({ value: true, params: /* @__PURE__ */ new Map() });
|
|
@@ -4624,7 +4651,7 @@ function pt(e, t) {
|
|
|
4624
4651
|
t.params = V(e);
|
|
4625
4652
|
}
|
|
4626
4653
|
function ue(e) {
|
|
4627
|
-
let { value: t, bytes: r } =
|
|
4654
|
+
let { value: t, bytes: r } = de(e), n = !e.eof() && e.peek() === ";", o = V(e);
|
|
4628
4655
|
return { value: t, params: o, hasParams: n, bytes: r };
|
|
4629
4656
|
}
|
|
4630
4657
|
function V(e) {
|
|
@@ -4634,7 +4661,7 @@ function V(e) {
|
|
|
4634
4661
|
let r = ge(e), n = true;
|
|
4635
4662
|
if (!e.eof() && e.peek() === "=") {
|
|
4636
4663
|
e.i++;
|
|
4637
|
-
let o =
|
|
4664
|
+
let o = de(e);
|
|
4638
4665
|
n = (typeof o.value == "boolean", o.value);
|
|
4639
4666
|
}
|
|
4640
4667
|
typeof n != "boolean" && t.set(r, n);
|
|
@@ -4648,9 +4675,9 @@ function ge(e) {
|
|
|
4648
4675
|
for (; !e.eof() && /[a-z0-9_\-.*]/.test(e.peek()); ) e.i++;
|
|
4649
4676
|
return e.s.slice(r, e.i);
|
|
4650
4677
|
}
|
|
4651
|
-
function
|
|
4678
|
+
function de(e) {
|
|
4652
4679
|
let t = e.peek();
|
|
4653
|
-
if (t === '"') return { value:
|
|
4680
|
+
if (t === '"') return { value: fe(e) };
|
|
4654
4681
|
if (t === ":") return { value: "", bytes: ht(e) };
|
|
4655
4682
|
if (t === "?") {
|
|
4656
4683
|
e.i++;
|
|
@@ -4663,7 +4690,7 @@ function fe(e) {
|
|
|
4663
4690
|
if (/[a-zA-Z*]/.test(t)) return { value: wt(e) };
|
|
4664
4691
|
throw new Error(`invalid bare item at ${e.i}`);
|
|
4665
4692
|
}
|
|
4666
|
-
function
|
|
4693
|
+
function fe(e) {
|
|
4667
4694
|
e.i++;
|
|
4668
4695
|
let t = "";
|
|
4669
4696
|
for (; !e.eof(); ) {
|
|
@@ -4772,57 +4799,57 @@ function O(e) {
|
|
|
4772
4799
|
return e.endsWith("/*") ? e.length - 2 : 1 << 20;
|
|
4773
4800
|
}
|
|
4774
4801
|
function be(e, t, r) {
|
|
4775
|
-
let n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), a = [], i = [], s = /* @__PURE__ */ new Map(), c = (u,
|
|
4802
|
+
let n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), a = [], i = [], s = /* @__PURE__ */ new Map(), c = (u, f) => {
|
|
4776
4803
|
let v = new Set(u);
|
|
4777
|
-
for (let S of
|
|
4804
|
+
for (let S of f) for (let _ of s.get(S) ?? []) v.add(_);
|
|
4778
4805
|
return v.size === 0 ? void 0 : [...v].sort();
|
|
4779
|
-
},
|
|
4806
|
+
}, d = (u, f, v) => v ? { pattern: u, required_trust: f, refused_behaviors: v } : { pattern: u, required_trust: f };
|
|
4780
4807
|
for (let u of t) {
|
|
4781
4808
|
if (!I(e, u.pattern)) continue;
|
|
4782
4809
|
if ((u.exceptions ?? []).some((S) => I(e, S))) {
|
|
4783
4810
|
i.push(u.pattern);
|
|
4784
4811
|
continue;
|
|
4785
4812
|
}
|
|
4786
|
-
let
|
|
4787
|
-
|
|
4813
|
+
let f = n.get(u.pattern);
|
|
4814
|
+
f === void 0 && a.push(u.pattern);
|
|
4788
4815
|
let v = bt(u.min_trust);
|
|
4789
|
-
(
|
|
4816
|
+
(f === void 0 || v > f) && n.set(u.pattern, v), u.mode !== "monitor" && o.add(u.pattern);
|
|
4790
4817
|
for (let S of u.refuse_behaviors ?? []) s.has(u.pattern) || s.set(u.pattern, /* @__PURE__ */ new Set()), s.get(u.pattern)?.add(S);
|
|
4791
4818
|
}
|
|
4792
4819
|
let l = [];
|
|
4793
4820
|
if (a.length === 0) {
|
|
4794
4821
|
let u = "";
|
|
4795
|
-
for (let
|
|
4822
|
+
for (let f of i) (u === "" || O(f) > O(u)) && (u = f);
|
|
4796
4823
|
return { covering: a, deciding_mode: "", attributed: "", required_trust: "", requirement_source: "", previews: l, excepted_by: u, refused_behaviors: [] };
|
|
4797
4824
|
}
|
|
4798
|
-
a.sort((u,
|
|
4825
|
+
a.sort((u, f) => O(f) - O(u));
|
|
4799
4826
|
let h = r === "monitor", p = a.filter((u) => o.has(u)), w = h ? "monitor" : "enforce";
|
|
4800
4827
|
if (p.length === 0) {
|
|
4801
|
-
if (!h) for (let u of a) l.push(
|
|
4828
|
+
if (!h) for (let u of a) l.push(d(u, z(n.get(u) ?? 0), c([], [u])));
|
|
4802
4829
|
p = a, w = "monitor";
|
|
4803
4830
|
}
|
|
4804
4831
|
let b = 0, g = "";
|
|
4805
4832
|
for (let u of p) {
|
|
4806
|
-
let
|
|
4807
|
-
|
|
4833
|
+
let f = n.get(u) ?? 0;
|
|
4834
|
+
f > b && (b = f, g = u);
|
|
4808
4835
|
}
|
|
4809
|
-
let
|
|
4810
|
-
if (w === "enforce") for (let u of a) o.has(u) || l.push(
|
|
4811
|
-
return { covering: a, deciding_mode: w, attributed: p[0], required_trust: z(b), requirement_source: g, previews: l, excepted_by: "", refused_behaviors:
|
|
4836
|
+
let k = c([], p) ?? [];
|
|
4837
|
+
if (w === "enforce") for (let u of a) o.has(u) || l.push(d(u, z(Math.max(b, n.get(u) ?? 0)), c(k, [u])));
|
|
4838
|
+
return { covering: a, deciding_mode: w, attributed: p[0], required_trust: z(b), requirement_source: g, previews: l, excepted_by: "", refused_behaviors: k };
|
|
4812
4839
|
}
|
|
4813
4840
|
var xt = "other";
|
|
4814
|
-
var
|
|
4841
|
+
var kt = { "search engine crawler": "search", "ai search": "search", "ai assistant": "agent", "ai crawler": "training", "page preview": "link_preview", "feed fetcher": "feeds", "monitoring & analytics": "monitoring", "search engine optimization": "seo", security: "security_testing" };
|
|
4815
4842
|
function M(e) {
|
|
4816
4843
|
let t = e.trim().toLowerCase();
|
|
4817
|
-
return t ?
|
|
4844
|
+
return t ? kt[t] ?? xt : "";
|
|
4818
4845
|
}
|
|
4819
4846
|
function F(e, t) {
|
|
4820
4847
|
let r = M(e);
|
|
4821
4848
|
return r !== "" && t.includes(r);
|
|
4822
4849
|
}
|
|
4823
|
-
var
|
|
4850
|
+
var At = { search_engines: ["search engine crawler"], ai_crawlers: ["ai assistant", "ai crawler", "ai search"], monitoring: ["monitoring & analytics"] };
|
|
4824
4851
|
function ye(e, t) {
|
|
4825
|
-
let r =
|
|
4852
|
+
let r = At[e];
|
|
4826
4853
|
return r ? r.every((n) => F(n, t)) : false;
|
|
4827
4854
|
}
|
|
4828
4855
|
var St = I;
|
|
@@ -4840,11 +4867,11 @@ function _e(e, t, r = []) {
|
|
|
4840
4867
|
return { pass: e.pass, label: e.label };
|
|
4841
4868
|
}
|
|
4842
4869
|
async function Se(e, t, r) {
|
|
4843
|
-
let n = new URL(e.url).pathname, o = be(n, Tt(t), t.mode), a = o.deciding_mode || t.mode, i = await Et(e, t, r, o.covering.length > 0, o.excepted_by !== ""), s = i.behavior ?? "", c = _e(i, o.required_trust, o.refused_behaviors),
|
|
4870
|
+
let n = new URL(e.url).pathname, o = be(n, Tt(t), t.mode), a = o.deciding_mode || t.mode, i = await Et(e, t, r, o.covering.length > 0, o.excepted_by !== ""), s = i.behavior ?? "", c = _e(i, o.required_trust, o.refused_behaviors), d = c.label === "excepted" ? o.excepted_by : c.label === "unscoped" ? "" : o.attributed, l = !c.pass && a === "enforce", h = o.previews.map((p) => {
|
|
4844
4871
|
let w = _e(i, p.required_trust, p.refused_behaviors ?? []);
|
|
4845
4872
|
return { pattern: p.pattern, refused: !w.pass && !l ? w.label : "" };
|
|
4846
4873
|
});
|
|
4847
|
-
return { pass: c.pass, label: c.label, pattern:
|
|
4874
|
+
return { pass: c.pass, label: c.label, pattern: d, mode: a, previews: h, behavior: c.pass ? s : "", crawlerBehavior: i.crawler?.behavior ?? "", referral: se(e, new URL(e.url)), outsideReach: i.outsideReach ?? "" };
|
|
4848
4875
|
}
|
|
4849
4876
|
async function Et(e, t, r, n, o) {
|
|
4850
4877
|
let a = await Pt(e, t, r);
|
|
@@ -4870,13 +4897,13 @@ async function Bt(e, t, r, n, o) {
|
|
|
4870
4897
|
return { pass: true, label: "verified-bot", behavior: l, crawler: { behavior: l, exempted: true } };
|
|
4871
4898
|
}
|
|
4872
4899
|
let s = await ce(e, t.signed_agents);
|
|
4873
|
-
if (s.status === "verified" && Dt(s.category, t)) return { pass: true, label: "signed-agent", behavior:
|
|
4900
|
+
if (s.status === "verified" && Dt(s.category, t)) return { pass: true, label: "signed-agent", behavior: ke(s.category), crawler: { behavior: ke(s.category), exempted: true } };
|
|
4874
4901
|
if (s.status === "invalid" && n) return { pass: false, label: "agent-impersonation", crawler: i };
|
|
4875
4902
|
if (!n) return o ? { pass: true, label: "excepted", crawler: i } : { pass: true, label: "unscoped", crawler: i };
|
|
4876
4903
|
let c = q(e.headers.get("cookie") ?? "", Rt);
|
|
4877
4904
|
if (!c) return { pass: false, label: "missing", crawler: i };
|
|
4878
|
-
let
|
|
4879
|
-
return !
|
|
4905
|
+
let d = await Re(c, t.keys, r.siteKey);
|
|
4906
|
+
return !d || (d.typ ?? "") !== "" ? { pass: false, label: "invalid", crawler: i } : t.denied_fps && t.denied_fps.includes(d.fp) ? { pass: false, label: "revoked", crawler: i } : { pass: true, label: "valid", graded: { trust: d.trust }, crawler: i };
|
|
4880
4907
|
}
|
|
4881
4908
|
function Tt(e) {
|
|
4882
4909
|
let t = new Set(e.routes), r = /* @__PURE__ */ new Map();
|
|
@@ -4902,7 +4929,7 @@ function Dt(e, t) {
|
|
|
4902
4929
|
let r = t.allow_behaviors;
|
|
4903
4930
|
return r ? ye(e, r) : he(e, t.allow);
|
|
4904
4931
|
}
|
|
4905
|
-
function
|
|
4932
|
+
function ke(e) {
|
|
4906
4933
|
return e === "search_engines" ? "search" : e === "monitoring" ? "monitoring" : "";
|
|
4907
4934
|
}
|
|
4908
4935
|
function Lt(e, t) {
|
|
@@ -4926,7 +4953,7 @@ async function Re(e, t, r) {
|
|
|
4926
4953
|
try {
|
|
4927
4954
|
let n = e.indexOf(".");
|
|
4928
4955
|
if (n < 0) return null;
|
|
4929
|
-
let o =
|
|
4956
|
+
let o = Ae(e.slice(0, n)), a = Ae(e.slice(n + 1)), i = JSON.parse(new TextDecoder().decode(o)), s = t.find((l) => l.kid === i.kid);
|
|
4930
4957
|
if (!s) return null;
|
|
4931
4958
|
let c = await crypto.subtle.importKey("raw", Ut(s.public_key), { name: "Ed25519" }, false, ["verify"]);
|
|
4932
4959
|
return !await crypto.subtle.verify({ name: "Ed25519" }, c, a, o) || i.tenant !== r || Date.now() / 1e3 >= i.exp ? null : i;
|
|
@@ -4934,7 +4961,7 @@ async function Re(e, t, r) {
|
|
|
4934
4961
|
return null;
|
|
4935
4962
|
}
|
|
4936
4963
|
}
|
|
4937
|
-
function
|
|
4964
|
+
function Ae(e) {
|
|
4938
4965
|
let t = e.replace(/-/g, "+").replace(/_/g, "/") + "=".repeat((4 - e.length % 4) % 4);
|
|
4939
4966
|
return Ee(atob(t));
|
|
4940
4967
|
}
|
|
@@ -4947,7 +4974,7 @@ function Ee(e) {
|
|
|
4947
4974
|
return t;
|
|
4948
4975
|
}
|
|
4949
4976
|
var L = "/.well-known/wd-clearance/outage";
|
|
4950
|
-
var
|
|
4977
|
+
var J = "wd_outage";
|
|
4951
4978
|
var Nt = "wd-outage-v1";
|
|
4952
4979
|
var D = null;
|
|
4953
4980
|
var E = null;
|
|
@@ -5002,9 +5029,9 @@ async function Ie(e, t, r, n, o) {
|
|
|
5002
5029
|
if (!Number.isInteger(i) || i <= Math.floor(o / 1e3) || i > Math.floor(o / 1e3) + 300) return false;
|
|
5003
5030
|
let s = await Be(t, Oe(r, i, await Te(n))), c = e.slice(a + 1);
|
|
5004
5031
|
if (c.length !== s.length) return false;
|
|
5005
|
-
let
|
|
5006
|
-
for (let l = 0; l < s.length; l++)
|
|
5007
|
-
return
|
|
5032
|
+
let d = 0;
|
|
5033
|
+
for (let l = 0; l < s.length; l++) d |= s.charCodeAt(l) ^ c.charCodeAt(l);
|
|
5034
|
+
return d === 0;
|
|
5008
5035
|
}
|
|
5009
5036
|
async function Me(e, t, r = Date.now(), n = fetch) {
|
|
5010
5037
|
let o = (i, s, c = {}) => new Response(JSON.stringify(s), { status: i, headers: { "content-type": "application/json", "cache-control": "no-store", ...c } });
|
|
@@ -5012,7 +5039,7 @@ async function Me(e, t, r = Date.now(), n = fetch) {
|
|
|
5012
5039
|
if (!t.sensorKey) return o(503, { pass: false, reason: "unsupported" });
|
|
5013
5040
|
if (await Kt(t.apiBase, t.siteKey, r, n)) return o(409, { pass: false, reason: "mint_available" });
|
|
5014
5041
|
let a = await Gt(t.sensorKey, t.host, e.headers.get("user-agent") ?? "", r);
|
|
5015
|
-
return o(200, { pass: true, expires_in: 300 }, { "set-cookie": `${
|
|
5042
|
+
return o(200, { pass: true, expires_in: 300 }, { "set-cookie": `${J}=${a}; Path=/; Secure; SameSite=Lax; HttpOnly; Max-Age=300` });
|
|
5016
5043
|
}
|
|
5017
5044
|
var $t = "wdfp1";
|
|
5018
5045
|
var De = `
|
|
@@ -5063,12 +5090,12 @@ async function wdDeviceFP() {
|
|
|
5063
5090
|
return { fp: fp, canvas32: canvas32, webgl: webgl };
|
|
5064
5091
|
}
|
|
5065
5092
|
`;
|
|
5066
|
-
function
|
|
5093
|
+
function Y(e) {
|
|
5067
5094
|
let r = ["missing", "invalid", "insufficient-trust", "revoked", "crawler-refused", "agent-impersonation"].includes(e) ? e : "denied";
|
|
5068
5095
|
return { version: 1, reason: r, recoverable: r === "missing" || r === "invalid" || r === "insufficient-trust" };
|
|
5069
5096
|
}
|
|
5070
5097
|
function Le(e) {
|
|
5071
|
-
let t =
|
|
5098
|
+
let t = Y(e);
|
|
5072
5099
|
return { "cache-control": "no-store", "x-wd-clearance": "challenged", "x-wd-challenge": String(t.version), "x-wd-challenge-reason": t.reason, "x-wd-challenge-recoverable": String(t.recoverable) };
|
|
5073
5100
|
}
|
|
5074
5101
|
var Ht = 6e4;
|
|
@@ -5121,7 +5148,7 @@ async function He(e, t) {
|
|
|
5121
5148
|
if (a !== void 0 && r < a) return o?.config ?? await $e(e.siteKey, t);
|
|
5122
5149
|
let i = X.get(n);
|
|
5123
5150
|
if (i) return o?.config ?? i;
|
|
5124
|
-
let s =
|
|
5151
|
+
let s = Jt(e, t, n, r, o?.config ?? null);
|
|
5125
5152
|
X.set(n, s);
|
|
5126
5153
|
try {
|
|
5127
5154
|
return await s;
|
|
@@ -5129,7 +5156,7 @@ async function He(e, t) {
|
|
|
5129
5156
|
X.delete(n);
|
|
5130
5157
|
}
|
|
5131
5158
|
}
|
|
5132
|
-
async function
|
|
5159
|
+
async function Jt(e, t, r, n, o) {
|
|
5133
5160
|
let a = null;
|
|
5134
5161
|
try {
|
|
5135
5162
|
let i = `${e.apiBase}/api/v1/clearance/config?aid=${encodeURIComponent(e.siteKey)}`;
|
|
@@ -5148,13 +5175,13 @@ async function Yt(e, t, r, n, o) {
|
|
|
5148
5175
|
function Ve(e, t, r, n) {
|
|
5149
5176
|
return new Response(JSON.stringify({ wd_clearance: true, nonce: e, mode: t, site_key: r, capabilities: n }), { status: 200, headers: { "content-type": "application/json", "cache-control": "no-store", "access-control-allow-origin": "*" } });
|
|
5150
5177
|
}
|
|
5151
|
-
var
|
|
5178
|
+
var Yt = 3e3;
|
|
5152
5179
|
async function ze(e, t) {
|
|
5153
5180
|
let r = new URL(e.url).searchParams.get("fp") ?? "", n = `${t}/api/v1/clearance/pat?fp=${encodeURIComponent(r)}`, o = new Headers(), a = e.headers.get("authorization");
|
|
5154
5181
|
a && o.set("authorization", a);
|
|
5155
5182
|
let i;
|
|
5156
5183
|
try {
|
|
5157
|
-
i = await fetch(n, { method: "GET", headers: o, redirect: "manual", signal: AbortSignal.timeout(
|
|
5184
|
+
i = await fetch(n, { method: "GET", headers: o, redirect: "manual", signal: AbortSignal.timeout(Yt) });
|
|
5158
5185
|
} catch {
|
|
5159
5186
|
return new Response(JSON.stringify({ attested: false, reason: "unreachable" }), { status: 200, headers: { "content-type": "application/json", "cache-control": "no-store" } });
|
|
5160
5187
|
}
|
|
@@ -5163,7 +5190,7 @@ async function ze(e, t) {
|
|
|
5163
5190
|
}
|
|
5164
5191
|
function We(e, t, r, n = "denied") {
|
|
5165
5192
|
let o = e.headers.get("accept") ?? "";
|
|
5166
|
-
if (e.method !== "GET" || !o.includes("text/html")) return new Response(JSON.stringify({ error: "clearance required", challenge:
|
|
5193
|
+
if (e.method !== "GET" || !o.includes("text/html")) return new Response(JSON.stringify({ error: "clearance required", challenge: Y(n) }), { status: 403, headers: { "content-type": "application/json", ...Le(n) } });
|
|
5167
5194
|
let a = Zt(t, r);
|
|
5168
5195
|
return new Response(a, { status: 403, headers: { "content-type": "text/html; charset=utf-8", "cache-control": "no-store", [U]: "challenged" } });
|
|
5169
5196
|
}
|
|
@@ -5340,7 +5367,7 @@ var er = 6e3;
|
|
|
5340
5367
|
var je = 40;
|
|
5341
5368
|
var tr = 60;
|
|
5342
5369
|
var rr = 16;
|
|
5343
|
-
var
|
|
5370
|
+
var A = new TextEncoder();
|
|
5344
5371
|
var nr = 60;
|
|
5345
5372
|
var or = 24;
|
|
5346
5373
|
var ar = 3e3;
|
|
@@ -5353,7 +5380,7 @@ function lr(e, t, r) {
|
|
|
5353
5380
|
}
|
|
5354
5381
|
function qe(e, t, r, n, o = Date.now()) {
|
|
5355
5382
|
try {
|
|
5356
|
-
let a = e?.label ?? "", i = e?.mode ?? "", s = e?.pattern ?? "", c = e?.previews ?? [],
|
|
5383
|
+
let a = e?.label ?? "", i = e?.mode ?? "", s = e?.pattern ?? "", c = e?.previews ?? [], d = e?.behavior ?? "", l = e?.crawlerBehavior ?? "", h = e?.outsideReach ?? "";
|
|
5357
5384
|
if (!a || !r || !r.siteKey || !r.apiBase) return;
|
|
5358
5385
|
let p = N(t);
|
|
5359
5386
|
if (!p) return;
|
|
@@ -5365,22 +5392,22 @@ function qe(e, t, r, n, o = Date.now()) {
|
|
|
5365
5392
|
g = { bucketStart: w, mode: i, host: p, counts: /* @__PURE__ */ new Map(), routes: /* @__PURE__ */ new Map(), previews: /* @__PURE__ */ new Map(), credentials: /* @__PURE__ */ new Map(), referrals: /* @__PURE__ */ new Map(), refusals: [], routeBytes: 0, total: 0 }, x.set(b, g), ur(b, g, r, n, o);
|
|
5366
5393
|
}
|
|
5367
5394
|
g.counts.set(a, (g.counts.get(a) ?? 0) + 1);
|
|
5368
|
-
let
|
|
5395
|
+
let k = typeof s == "string" ? s : "", u = typeof d == "string" ? d : "", f = typeof l == "string" ? l : "", v = `${k}
|
|
5369
5396
|
${a}
|
|
5370
5397
|
${u}
|
|
5371
|
-
${
|
|
5372
|
-
S ? S.count++ : (g.routes.set(v, { pattern:
|
|
5398
|
+
${f}`, S = g.routes.get(v);
|
|
5399
|
+
S ? S.count++ : (g.routes.set(v, { pattern: k, verdict: a, behavior: u, crawlerBehavior: f, count: 1 }), g.routeBytes += A.encode(k).length + A.encode(a).length + A.encode(u).length + A.encode(f).length + je);
|
|
5373
5400
|
for (let m of Array.isArray(c) ? c : []) {
|
|
5374
5401
|
if (!m || typeof m.pattern != "string" || !m.pattern) continue;
|
|
5375
5402
|
let y = g.previews.get(m.pattern);
|
|
5376
|
-
y || (y = { evaluated: 0, refused: /* @__PURE__ */ new Map() }, g.previews.set(m.pattern, y), g.routeBytes +=
|
|
5403
|
+
y || (y = { evaluated: 0, refused: /* @__PURE__ */ new Map() }, g.previews.set(m.pattern, y), g.routeBytes += A.encode(m.pattern).length + tr), y.evaluated++, typeof m.refused == "string" && m.refused && (y.refused.has(m.refused) || (g.routeBytes += A.encode(m.refused).length + rr), y.refused.set(m.refused, (y.refused.get(m.refused) ?? 0) + 1));
|
|
5377
5404
|
}
|
|
5378
5405
|
typeof h == "string" && h && g.credentials.set(h, (g.credentials.get(h) ?? 0) + 1);
|
|
5379
5406
|
let _ = e?.referral;
|
|
5380
5407
|
if (_ && typeof _.platform == "string" && _.platform && typeof _.path == "string") {
|
|
5381
5408
|
let m = `${_.platform}
|
|
5382
5409
|
${_.path}`, y = g.referrals.get(m);
|
|
5383
|
-
y ? y.count++ : (g.referrals.set(m, { platform: _.platform, path: _.path, count: 1 }), g.routeBytes +=
|
|
5410
|
+
y ? y.count++ : (g.referrals.set(m, { platform: _.platform, path: _.path, count: 1 }), g.routeBytes += A.encode(_.platform).length + A.encode(_.path).length + je);
|
|
5384
5411
|
}
|
|
5385
5412
|
let C = e?.refusal;
|
|
5386
5413
|
C && typeof C.ip == "string" && C.ip && typeof C.path == "string" && C.path.startsWith("/") && (g.refusals.push({ ip: C.ip, path: C.path, at: Math.floor(o / 1e3), verdict: a }), g.routeBytes += nr), g.total++, (g.total >= Qt || g.routeBytes >= er) && (K(g, r, n), x.delete(b));
|
|
@@ -5430,27 +5457,27 @@ function K(e, t, r) {
|
|
|
5430
5457
|
e.referrals.size > 0 && (a.ai_referrals = [...e.referrals.values()].map((l) => ({ platform: l.platform, path: l.path, count: l.count }))), t.propertyId && (a.property_id = t.propertyId), a.host = e.host, t.bundleVersion && (a.reporter_version = t.bundleVersion);
|
|
5431
5458
|
let i = !!(t.scannerId && t.sensorKey);
|
|
5432
5459
|
i && (a.scanner_id = t.scannerId), a.capabilities = t.capabilities ?? Fe;
|
|
5433
|
-
let s = i ? e.refusals : [], c = () =>
|
|
5460
|
+
let s = i ? e.refusals : [], c = () => fr(t.apiBase, JSON.stringify(a), i ? t.sensorKey : void 0), d = s.length === 0 ? c() : dr(t.siteKey, s).then((l) => {
|
|
5434
5461
|
a.refusals = l;
|
|
5435
5462
|
}).catch(() => {
|
|
5436
5463
|
}).then(c);
|
|
5437
|
-
r.waitUntil(
|
|
5464
|
+
r.waitUntil(d.then(() => {
|
|
5438
5465
|
}, () => {
|
|
5439
5466
|
}));
|
|
5440
5467
|
} catch {
|
|
5441
5468
|
}
|
|
5442
5469
|
}
|
|
5443
5470
|
async function gr(e, t, r) {
|
|
5444
|
-
let n = await crypto.subtle.digest("SHA-256",
|
|
5471
|
+
let n = await crypto.subtle.digest("SHA-256", A.encode(`${e.toLowerCase()}|${t}|${r}`)), o = "";
|
|
5445
5472
|
for (let a of new Uint8Array(n)) o += a.toString(16).padStart(2, "0");
|
|
5446
5473
|
return o.slice(0, or);
|
|
5447
5474
|
}
|
|
5448
|
-
async function
|
|
5475
|
+
async function dr(e, t) {
|
|
5449
5476
|
let r = [];
|
|
5450
5477
|
for (let n of t) r.push({ k: await gr(e, n.ip, n.path), t: n.at, v: n.verdict });
|
|
5451
5478
|
return r;
|
|
5452
5479
|
}
|
|
5453
|
-
async function
|
|
5480
|
+
async function fr(e, t, r) {
|
|
5454
5481
|
let n = new AbortController(), o = setTimeout(() => n.abort(), ar), a = { "content-type": "application/json" };
|
|
5455
5482
|
r && (a["x-wd-sensor-key"] = r);
|
|
5456
5483
|
try {
|
|
@@ -5471,7 +5498,7 @@ function hr(e, t) {
|
|
|
5471
5498
|
var $ = /* @__PURE__ */ new Map();
|
|
5472
5499
|
var mr = 36e5;
|
|
5473
5500
|
var wr = 5e3;
|
|
5474
|
-
async function
|
|
5501
|
+
async function Je(e, t, r, n) {
|
|
5475
5502
|
let o = $.get(e);
|
|
5476
5503
|
if (o && n - o.at < mr) return o.category;
|
|
5477
5504
|
let a = null;
|
|
@@ -5497,9 +5524,9 @@ async function br(e, t, r) {
|
|
|
5497
5524
|
return false;
|
|
5498
5525
|
}
|
|
5499
5526
|
}
|
|
5500
|
-
var Je = [["hunyuan/", "Hunyuan", "hunyuan", "crawler"], ["speridlabsresearchcrawler", "SperidLabsResearchCrawler", "speridlabsresearchcrawler", "crawler"], ["abliterantbot", "AbliterantBot", "abliterantbot", "crawler"], ["tokenfoundrybot", "TokenFoundryBot", "tokenfoundrybot", "crawler"], ["reflectionbot", "Reflectionbot", "reflectionbot", "crawler"], ["gptbot", "GPTBot", "gptbot", "crawler"], ["claudebot", "ClaudeBot", "claudebot", "crawler"], ["anthropic-ai", "Anthropic", "anthropic", "crawler"], ["claude-web", "Claude-Web", "claude-web", "crawler"], ["ccbot", "CCBot", "ccbot", "crawler"], ["google-extended", "Google-Extended", "google-extended", "crawler"], ["bytespider", "ByteSpider", "bytespider", "crawler"], ["amazonbot", "Amazonbot", "amazonbot", "crawler"], ["facebookbot", "FacebookBot", "facebookbot", "crawler"], ["meta-externalagent", "Meta-ExternalAgent", "meta-externalagent", "crawler"], ["cohere-ai", "Cohere", "cohere-ai", "crawler"], ["cohere", "Cohere", "cohere-ai", "crawler"], ["applebot-extended", "Applebot-Extended", "applebot-extended", "crawler"], ["youbot", "YouBot", "youbot", "crawler"], ["mistralbot", "MistralBot", "mistral", "crawler"], ["gemini", "Gemini", "gemini", "crawler"], ["ai2bot", "AI2Bot", "ai2bot", "crawler"], ["deepseek", "DeepSeek", "deepseek", "crawler"], ["qwen", "Qwen", "qwen", "crawler"], ["webzio", "Webz.io", "webzio", "crawler"], ["sentibot", "Sentibot", "sentibot", "crawler"], ["omgili", "Omgili", "omgili", "crawler"], ["img2dataset", "img2dataset", "img2dataset", "crawler"], ["timpibot", "Timpibot", "timpibot", "crawler"], ["velenpublicwebcrawler", "VelenPublicWebCrawler", "velenpublicwebcrawler", "crawler"], ["isscyberriskcrawler", "ISSCyberRiskCrawler", "isscyberriskcrawler", "crawler"], ["friendlycrawler", "FriendlyCrawler", "friendlycrawler", "crawler"], ["elevenlabscrawler", "ElevenlabsCrawler", "elevenlabscrawler", "crawler"], ["riverbot", "RiverBot", "riverbot", "crawler"], ["kimibot", "KimiBot", "kimibot", "crawler"], ["moonshotbot", "MoonshotBot", "moonshotbot", "crawler"], ["chatglm-spider", "ChatGLM-Spider", "chatglm-spider", "crawler"], ["talarionsearchbot", "TalarionSearchBot", "talarionsearchbot", "crawler"], ["unfragilebot", "UnfragileBot", "unfragilebot", "crawler"], ["aranet-searchbot", "Aranet-SearchBot", "aranet-searchbot", "crawler"], ["duckassistbot", "DuckAssistBot", "duckassistbot", "crawler"], ["sofyabot", "SofyaBot", "sofyabot", "crawler"], ["xai-searchbot", "xAI-SearchBot", "xai-searchbot", "crawler"], ["linkupbot", "LinkupBot", "linkupbot", "crawler"], ["perplexitybot", "PerplexityBot", "perplexitybot", "crawler"], ["claude-searchbot", "Claude-SearchBot", "claude-searchbot", "crawler"], ["oai-searchbot", "OAI-SearchBot", "oai-searchbot", "crawler"], ["searchgpt", "SearchGPT", "searchgpt", "crawler"], ["phind", "Phind", "phind", "crawler"], ["kagi", "Kagi", "kagi", "crawler"], ["exasearchbot", "Exa", "exa", "crawler"], ["exabot", "Exa", "exa", "crawler"], ["shapbot", "ShapBot", "shapbot", "crawler"], ["meta-webindexer", "Meta-WebIndexer", "meta-webindexer", "crawler"], ["metaphor", "Metaphor", "metaphor", "crawler"], ["tavily", "Tavily", "tavily", "crawler"], ["bravesearch", "BraveSearch", "brave-search", "crawler"], ["neevabot", "NeevaBot", "neeva", "crawler"], ["kimi-searchbot", "Kimi-SearchBot", "kimi-searchbot", "crawler"], ["isonsearchbot", "IsonSearchBot", "isonsearchbot", "crawler"], ["keenablebot", "KeenableBot", "keenablebot", "crawler"], ["azureai-searchbot", "AzureAI-SearchBot", "azureai-searchbot", "crawler"], ["grokbot", "GrokBot", "grokbot", "crawler"], ["operator", "Operator", "operator", "crawler"], ["claude-user", "Claude-User", "claude-user", "crawler"], ["gemini-user", "Gemini-User", "gemini-user", "crawler"], ["googleagent-mariner", "GoogleAgent-Mariner", "googleagent-mariner", "crawler"], ["mariner", "GoogleAgent-Mariner", "googleagent-mariner", "crawler"], ["amazonbuyforme", "AmazonBuyForMe", "amazon-buyforme", "crawler"], ["buyforme", "AmazonBuyForMe", "amazon-buyforme", "crawler"], ["browser-use", "Browser-Use", "browser-use", "crawler"], ["stagehand", "Stagehand", "stagehand", "crawler"], ["manus-user", "Manus-User", "manus-user", "crawler"], ["multion", "MultiOn", "multion", "crawler"], ["opencode-user", "OpenCode-User", "opencode-user", "crawler"], ["360spider", "360Spider", "360spider", "crawler"], ["cgmsearchbot", "CGMSearchBot", "cgmsearchbot", "crawler"], ["iboubot", "IbouBot", "iboubot", "crawler"], ["ibou-search", "IbouBot", "iboubot", "crawler"], ["googlebot", "Googlebot", "googlebot", "crawler"], ["google-inspectiontool", "Google-InspectionTool", "google-inspectiontool", "crawler"], ["bingbot", "Bingbot", "bingbot", "crawler"], ["msnbot", "MSNBot", "msnbot", "crawler"], ["yandexbot", "YandexBot", "yandexbot", "crawler"], ["baiduspider", "Baiduspider", "baiduspider", "crawler"], ["petalbot", "PetalBot", "petalbot", "crawler"], ["duckduckbot", "DuckDuckBot", "duckduckbot", "crawler"], ["applebot", "Applebot", "applebot", "crawler"], ["sogou", "Sogou Spider", "sogou", "crawler"], ["qwantify", "Qwantify", "qwantify", "crawler"], ["qwantbot", "Qwantify", "qwantify", "crawler"], ["naver", "Naver", "naver", "crawler"], ["yeti", "Naver", "naver", "crawler"], ["seznambot", "SeznamBot", "seznam", "crawler"], ["ecosia", "Ecosia", "ecosia", "crawler"], ["mojeekbot", "MojeekBot", "mojeek", "crawler"], ["slurp", "Yahoo! Slurp", "yahoo-slurp", "crawler"], ["bravebot", "Bravebot", "bravebot", "crawler"], ["coccocbot", "Coc Coc", "coccocbot", "crawler"], ["yisouspider", "YisouSpider", "yisouspider", "crawler"], ["yepbot", "YepBot", "yepbot", "crawler"], ["crolbot", "CrolBot", "crolbot", "crawler"], ["ahrefsbot", "AhrefsBot", "ahrefsbot", "crawler"], ["ahrefs", "AhrefsBot", "ahrefsbot", "crawler"], ["semrushbot", "SemrushBot", "semrushbot", "crawler"], ["semrush", "SemrushBot", "semrushbot", "crawler"], ["mj12bot", "MJ12bot", "mj12bot", "crawler"], ["dotbot", "DotBot", "dotbot", "crawler"], ["rogerbot", "Rogerbot", "rogerbot", "crawler"], ["screaming frog", "Screaming Frog", "screaming-frog", "crawler"], ["sitebulb", "Sitebulb", "sitebulb", "crawler"], ["deepcrawl", "DeepCrawl", "deepcrawl", "crawler"], ["oncrawl", "OnCrawl", "oncrawl", "crawler"], ["botify", "Botify", "botify", "crawler"], ["contentking", "ContentKing", "contentking", "crawler"], ["sistrix", "SISTRIX", "sistrix", "crawler"], ["serpstat", "Serpstat", "serpstat", "crawler"], ["spyfu", "SpyFu", "spyfu", "crawler"], ["meta-externalads", "meta-externalads", "meta-externalads", "crawler"], ["dataforseobot", "DataForSeoBot", "dataforseobot", "crawler"], ["barkrowler", "Barkrowler", "barkrowler", "crawler"], ["scrunchbot", "Scrunchbot", "scrunchbot", "crawler"], ["webxtrendbot", "webXtrendBot", "webxtrendbot", "crawler"], ["serankingbacklinksbot", "SERankingBacklinksBot", "serankingbacklinksbot", "crawler"], ["awariobot", "AwarioBot", "awariobot", "crawler"], ["awariosmartbot", "AwarioBot", "awariobot", "crawler"], ["seojuice-searchbot", "SEOJuice-SearchBot", "seojuice-searchbot", "crawler"], ["trendictionbot", "trendictionbot", "trendictionbot", "crawler"], ["hubspot crawler", "HubSpot Crawler", "hubspot-crawler", "crawler"], ["artex-enrich/", "ARTEX", "artex", "tool"], ["nessus", "Nessus", "nessus", "crawler"], ["qualys", "Qualys", "qualys", "crawler"], ["shodan", "Shodan", "shodan", "crawler"], ["censys", "Censys", "censys", "crawler"], ["nmap", "Nmap", "nmap", "crawler"], ["zap/", "OWASP ZAP", "zap", "crawler"], ["burp", "Burp Suite", "burp", "crawler"], ["nikto", "Nikto", "nikto", "crawler"], ["nuclei", "Nuclei", "nuclei", "crawler"], ["acunetix", "Acunetix", "acunetix", "crawler"], ["netsparker", "Netsparker", "netsparker", "crawler"], ["detectify", "Detectify", "detectify", "crawler"], ["palo alto networks", "Palo Alto Networks Cortex Xpanse", "paloalto-xpanse", "crawler"], ["recordedfuture", "Recorded Future Crawler", "recordedfuture", "crawler"], ["developers.cloudflare.com/security-center", "Cloudflare Security Center", "cloudflare-security-center", "crawler"], ["virustotalcloud", "VirusTotal", "virustotal-cloud", "crawler"], ["intruder", "Intruder", "intruder", "crawler"], ["norma/", "Norma WebFetch", "norma", "tool"], ["python-requests", "Python-Requests", "python-requests", "tool"], ["python-urllib", "Python-urllib", "python-urllib", "tool"], ["python/", "Python", "python", "tool"], ["scrapy", "Scrapy", "scrapy", "tool"], ["httpx", "HTTPX", "httpx", "tool"], ["aiohttp", "aiohttp", "aiohttp", "tool"], ["beautifulsoup", "BeautifulSoup", "beautifulsoup", "tool"], ["node-fetch", "node-fetch", "node-fetch", "tool"], ["axios/", "Axios", "axios", "tool"], ["got/", "Got", "got", "tool"], ["undici", "Undici", "undici", "tool"], ["go-http-client", "Go-HTTP-Client", "go-http-client", "tool"], ["colly", "Colly", "colly", "tool"], ["java/", "Java", "java", "tool"], ["okhttp", "OkHttp", "okhttp", "tool"], ["apache-httpclient", "Apache-HttpClient", "apache-httpclient", "tool"], ["jsoup", "Jsoup", "jsoup", "tool"], ["guzzlehttp", "GuzzleHttp", "guzzlehttp", "tool"], ["php/", "PHP", "php", "tool"], ["ruby", "Ruby", "ruby", "tool"], ["faraday", "Faraday", "faraday", "tool"], ["mechanize", "Mechanize", "mechanize", "tool"], ["headlesschrome", "HeadlessChrome", "headlesschrome", "tool"], ["puppeteer", "Puppeteer", "puppeteer", "tool"], ["playwright", "Playwright", "playwright", "tool"], ["selenium", "Selenium", "selenium", "tool"], ["phantomjs", "PhantomJS", "phantomjs", "tool"], ["splash", "Splash", "splash", "tool"], ["browserless", "Browserless", "browserless", "tool"], ["browserbase", "Browserbase", "browserbase", "tool"], ["ia_archiver", "Internet Archive", "ia-archiver", "crawler"], ["archive.org_bot", "Archive.org", "archive-org-bot", "crawler"], ["wayback", "Wayback Machine", "wayback", "crawler"], ["heritrix", "Heritrix", "heritrix", "crawler"], ["brozzler", "Brozzler", "brozzler", "crawler"], ["facebookexternalhit", "Facebook", "facebookexternalhit", "crawler"], ["facebot", "Facebot", "facebot", "crawler"], ["twitterbot", "Twitterbot", "twitterbot", "crawler"], ["linkedinbot", "LinkedInBot", "linkedinbot", "crawler"], ["slackbot", "Slackbot", "slackbot", "crawler"], ["telegrambot", "TelegramBot", "telegrambot", "crawler"], ["whatsapp", "WhatsApp", "whatsapp", "crawler"], ["discordbot", "Discordbot", "discordbot", "crawler"], ["pinterest", "Pinterest", "pinterestbot", "crawler"], ["tumblr", "Tumblr", "tumblr", "crawler"], ["reddit", "Reddit", "reddit", "crawler"], ["embedly", "Embedly", "embedly", "crawler"], ["iframely", "Iframely", "iframely", "crawler"], ["adsbot-google", "AdsBot-Google", "adsbot-google", "crawler"], ["stripebot", "Stripebot", "stripebot", "crawler"], ["google-read-aloud", "Google-Read-Aloud", "google-read-aloud", "crawler"], ["google-safety", "Google-Safety", "google-safety", "crawler"], ["oai-adsbot", "OAI-AdsBot", "oai-adsbot", "crawler"], ["kakaobot", "KakaoBot", "kakaobot", "crawler"], ["curl/", "cURL", "curl", "tool"], ["wget/", "Wget", "wget", "tool"], ["libwww-perl", "libwww-perl", "libwww-perl", "tool"], ["lwp-", "LWP", "lwp", "tool"], ["httrack", "HTTrack", "httrack", "tool"], ["webdecoybot", "WebDecoyBot", "webdecoybot", "crawler"], ["uptimerobot", "UptimeRobot", "uptimerobot", "crawler"], ["pingdom", "Pingdom", "pingdom", "crawler"], ["statuscake", "StatusCake", "statuscake", "crawler"], ["betteruptime", "Better Uptime", "better-uptime", "crawler"], ["datadog", "Datadog Synthetics", "datadog-synthetics", "crawler"], ["newrelic", "New Relic", "newrelic", "crawler"], ["site24x7", "Site24x7", "site24x7", "crawler"], ["freshping", "Freshping", "freshping", "crawler"], ["hetrixtools", "HetrixTools", "hetrixtools", "crawler"], ["nodeping", "NodePing", "nodeping", "crawler"], ["gtmetrix", "GTmetrix", "gtmetrix", "crawler"], ["chrome-lighthouse", "Lighthouse", "chrome-lighthouse", "crawler"], ["google page speed", "Lighthouse", "chrome-lighthouse", "crawler"], ["feedly", "Feedly", "feedly", "crawler"], ["livelapbot", "LivelapBot", "livelapbot", "crawler"], ["feedfetcher", "Feedfetcher-Google", "feedfetcher-google", "crawler"], ["newsblur", "NewsBlur", "newsblur", "crawler"], ["inoreader", "Inoreader", "inoreader", "crawler"], ["theoldreader", "The Old Reader", "theoldreader", "crawler"], ["feedbin", "Feedbin", "feedbin", "crawler"], ["miniflux", "Miniflux", "miniflux", "crawler"], ["freshrss", "FreshRSS", "freshrss", "crawler"], ["commafeed", "CommaFeed", "commafeed", "crawler"], ["spiderling", "SpiderLing", "spiderling", "crawler"], ["sketchengine", "SpiderLing", "spiderling", "crawler"], ["netapi/", "NetAPI Bot", "netapi", "crawler"], ["anticlonebot", "AntiCloneBot", "anticlonebot", "crawler"], ["terncrawler", "TernCrawler", "terncrawler", "crawler"], ["diffbot", "Diffbot", "diffbot", "crawler"], ["import.io", "Import.io", "import-io", "crawler"], ["brightdata", "Bright Data", "bright-data", "crawler"], ["luminati", "Bright Data", "bright-data", "crawler"], ["brightbot", "Brightbot", "brightbot", "crawler"], ["cloudflarebrowserrenderingcrawler", "Cloudflare Browser Rendering Crawler", "cloudflare-crawl", "crawler"], ["ev-crawler", "ev-crawler", "ev-crawler", "crawler"], ["oxylabs", "Oxylabs", "oxylabs", "crawler"], ["scrapingbee", "ScrapingBee", "scrapingbee", "crawler"], ["scrapingant", "ScrapingAnt", "scrapingant", "crawler"], ["zyte", "Zyte", "zyte", "crawler"], ["scrapinghub", "Zyte", "zyte", "crawler"], ["apify", "Apify", "apify", "crawler"], ["crawlbase", "Crawlbase", "crawlbase", "crawler"], ["webscrapingapi", "WebScrapingAPI", "webscrapingapi", "crawler"], ["chatgpt-user", "ChatGPT-User", "chatgpt-user", "crawler"], ["perplexity-user", "Perplexity-User", "perplexity-user", "crawler"], ["mistralai-user", "MistralAI-User", "mistralai-user", "crawler"], ["exauser", "ExaUser", "exauser", "crawler"], ["shap-user", "Shap-User", "shap-user", "crawler"], ["meta-externalfetcher", "Meta-ExternalFetcher", "meta-externalfetcher", "crawler"], ["gemini-deep-research", "Gemini-Deep-Research", "gemini-deep-research", "crawler"], ["copilot", "Microsoft Copilot", "copilot", "crawler"], ["cortana", "Cortana", "cortana", "crawler"], ["siri", "Siri", "siri", "crawler"], ["kimi-user", "Kimi-User", "kimi-user", "crawler"], ["keenable-user", "Keenable-User", "keenable-user", "crawler"], ["elevenlabsbot", "ElevenlabsBot", "elevenlabsbot", "crawler"], ["klaviyoaibot", "KlaviyoAIBot", "klaviyoaibot", "crawler"]];
|
|
5527
|
+
var Ye = [["hunyuan/", "Hunyuan", "hunyuan", "crawler"], ["speridlabsresearchcrawler", "SperidLabsResearchCrawler", "speridlabsresearchcrawler", "crawler"], ["abliterantbot", "AbliterantBot", "abliterantbot", "crawler"], ["tokenfoundrybot", "TokenFoundryBot", "tokenfoundrybot", "crawler"], ["reflectionbot", "Reflectionbot", "reflectionbot", "crawler"], ["gptbot", "GPTBot", "gptbot", "crawler"], ["claudebot", "ClaudeBot", "claudebot", "crawler"], ["anthropic-ai", "Anthropic", "anthropic", "crawler"], ["claude-web", "Claude-Web", "claude-web", "crawler"], ["ccbot", "CCBot", "ccbot", "crawler"], ["google-extended", "Google-Extended", "google-extended", "crawler"], ["bytespider", "ByteSpider", "bytespider", "crawler"], ["amazonbot", "Amazonbot", "amazonbot", "crawler"], ["facebookbot", "FacebookBot", "facebookbot", "crawler"], ["meta-externalagent", "Meta-ExternalAgent", "meta-externalagent", "crawler"], ["cohere-ai", "Cohere", "cohere-ai", "crawler"], ["cohere", "Cohere", "cohere-ai", "crawler"], ["applebot-extended", "Applebot-Extended", "applebot-extended", "crawler"], ["youbot", "YouBot", "youbot", "crawler"], ["mistralbot", "MistralBot", "mistral", "crawler"], ["gemini", "Gemini", "gemini", "crawler"], ["ai2bot", "AI2Bot", "ai2bot", "crawler"], ["deepseek", "DeepSeek", "deepseek", "crawler"], ["qwen", "Qwen", "qwen", "crawler"], ["webzio", "Webz.io", "webzio", "crawler"], ["sentibot", "Sentibot", "sentibot", "crawler"], ["omgili", "Omgili", "omgili", "crawler"], ["img2dataset", "img2dataset", "img2dataset", "crawler"], ["timpibot", "Timpibot", "timpibot", "crawler"], ["velenpublicwebcrawler", "VelenPublicWebCrawler", "velenpublicwebcrawler", "crawler"], ["isscyberriskcrawler", "ISSCyberRiskCrawler", "isscyberriskcrawler", "crawler"], ["friendlycrawler", "FriendlyCrawler", "friendlycrawler", "crawler"], ["elevenlabscrawler", "ElevenlabsCrawler", "elevenlabscrawler", "crawler"], ["riverbot", "RiverBot", "riverbot", "crawler"], ["kimibot", "KimiBot", "kimibot", "crawler"], ["moonshotbot", "MoonshotBot", "moonshotbot", "crawler"], ["chatglm-spider", "ChatGLM-Spider", "chatglm-spider", "crawler"], ["generalretrievalbot", "GeneralRetrievalBot", "generalretrievalbot", "crawler"], ["andi-searchbot", "Andi-SearchBot", "andi-searchbot", "crawler"], ["talarionsearchbot", "TalarionSearchBot", "talarionsearchbot", "crawler"], ["unfragilebot", "UnfragileBot", "unfragilebot", "crawler"], ["aranet-searchbot", "Aranet-SearchBot", "aranet-searchbot", "crawler"], ["duckassistbot", "DuckAssistBot", "duckassistbot", "crawler"], ["sofyabot", "SofyaBot", "sofyabot", "crawler"], ["xai-searchbot", "xAI-SearchBot", "xai-searchbot", "crawler"], ["linkupbot", "LinkupBot", "linkupbot", "crawler"], ["perplexitybot", "PerplexityBot", "perplexitybot", "crawler"], ["claude-searchbot", "Claude-SearchBot", "claude-searchbot", "crawler"], ["oai-searchbot", "OAI-SearchBot", "oai-searchbot", "crawler"], ["searchgpt", "SearchGPT", "searchgpt", "crawler"], ["phind", "Phind", "phind", "crawler"], ["kagi", "Kagi", "kagi", "crawler"], ["exasearchbot", "Exa", "exa", "crawler"], ["exabot", "Exa", "exa", "crawler"], ["shapbot", "ShapBot", "shapbot", "crawler"], ["meta-webindexer", "Meta-WebIndexer", "meta-webindexer", "crawler"], ["metaphor", "Metaphor", "metaphor", "crawler"], ["tavily", "Tavily", "tavily", "crawler"], ["bravesearch", "BraveSearch", "brave-search", "crawler"], ["neevabot", "NeevaBot", "neeva", "crawler"], ["kimi-searchbot", "Kimi-SearchBot", "kimi-searchbot", "crawler"], ["isonsearchbot", "IsonSearchBot", "isonsearchbot", "crawler"], ["keenablebot", "KeenableBot", "keenablebot", "crawler"], ["azureai-searchbot", "AzureAI-SearchBot", "azureai-searchbot", "crawler"], ["grokbot", "GrokBot", "grokbot", "crawler"], ["operator", "Operator", "operator", "crawler"], ["claude-user", "Claude-User", "claude-user", "crawler"], ["gemini-user", "Gemini-User", "gemini-user", "crawler"], ["googleagent-mariner", "GoogleAgent-Mariner", "googleagent-mariner", "crawler"], ["mariner", "GoogleAgent-Mariner", "googleagent-mariner", "crawler"], ["amazonbuyforme", "AmazonBuyForMe", "amazon-buyforme", "crawler"], ["buyforme", "AmazonBuyForMe", "amazon-buyforme", "crawler"], ["browser-use", "Browser-Use", "browser-use", "crawler"], ["stagehand", "Stagehand", "stagehand", "crawler"], ["manus-user", "Manus-User", "manus-user", "crawler"], ["multion", "MultiOn", "multion", "crawler"], ["opencode-user", "OpenCode-User", "opencode-user", "crawler"], ["jambot", "Jambot", "jambot", "crawler"], ["fyndbot", "fyndbot", "fyndbot", "crawler"], ["pexelsbot", "PexelsBot", "pexelsbot", "crawler"], ["360spider", "360Spider", "360spider", "crawler"], ["cgmsearchbot", "CGMSearchBot", "cgmsearchbot", "crawler"], ["iboubot", "IbouBot", "iboubot", "crawler"], ["ibou-search", "IbouBot", "iboubot", "crawler"], ["googlebot", "Googlebot", "googlebot", "crawler"], ["google-inspectiontool", "Google-InspectionTool", "google-inspectiontool", "crawler"], ["bingbot", "Bingbot", "bingbot", "crawler"], ["msnbot", "MSNBot", "msnbot", "crawler"], ["yandexbot", "YandexBot", "yandexbot", "crawler"], ["baiduspider", "Baiduspider", "baiduspider", "crawler"], ["petalbot", "PetalBot", "petalbot", "crawler"], ["duckduckbot", "DuckDuckBot", "duckduckbot", "crawler"], ["applebot", "Applebot", "applebot", "crawler"], ["sogou", "Sogou Spider", "sogou", "crawler"], ["qwantify", "Qwantify", "qwantify", "crawler"], ["qwantbot", "Qwantify", "qwantify", "crawler"], ["naver", "Naver", "naver", "crawler"], ["yeti", "Naver", "naver", "crawler"], ["seznambot", "SeznamBot", "seznam", "crawler"], ["ecosia", "Ecosia", "ecosia", "crawler"], ["mojeekbot", "MojeekBot", "mojeek", "crawler"], ["slurp", "Yahoo! Slurp", "yahoo-slurp", "crawler"], ["bravebot", "Bravebot", "bravebot", "crawler"], ["coccocbot", "Coc Coc", "coccocbot", "crawler"], ["yisouspider", "YisouSpider", "yisouspider", "crawler"], ["yepbot", "YepBot", "yepbot", "crawler"], ["agentreadyscan", "AgentReadyScan", "agentreadyscan", "crawler"], ["crawlcheck/", "CrawlCheck", "crawlcheck", "crawler"], ["kostobot", "KostoBot", "kostobot", "crawler"], ["keys-so-bot", "keys.so", "keys-so-bot", "crawler"], ["crolbot", "CrolBot", "crolbot", "crawler"], ["ahrefsbot", "AhrefsBot", "ahrefsbot", "crawler"], ["ahrefs", "AhrefsBot", "ahrefsbot", "crawler"], ["semrushbot", "SemrushBot", "semrushbot", "crawler"], ["semrush", "SemrushBot", "semrushbot", "crawler"], ["mj12bot", "MJ12bot", "mj12bot", "crawler"], ["dotbot", "DotBot", "dotbot", "crawler"], ["rogerbot", "Rogerbot", "rogerbot", "crawler"], ["screaming frog", "Screaming Frog", "screaming-frog", "crawler"], ["sitebulb", "Sitebulb", "sitebulb", "crawler"], ["deepcrawl", "DeepCrawl", "deepcrawl", "crawler"], ["oncrawl", "OnCrawl", "oncrawl", "crawler"], ["botify", "Botify", "botify", "crawler"], ["contentking", "ContentKing", "contentking", "crawler"], ["sistrix", "SISTRIX", "sistrix", "crawler"], ["serpstat", "Serpstat", "serpstat", "crawler"], ["spyfu", "SpyFu", "spyfu", "crawler"], ["meta-externalads", "meta-externalads", "meta-externalads", "crawler"], ["dataforseobot", "DataForSeoBot", "dataforseobot", "crawler"], ["barkrowler", "Barkrowler", "barkrowler", "crawler"], ["scrunchbot", "Scrunchbot", "scrunchbot", "crawler"], ["webxtrendbot", "webXtrendBot", "webxtrendbot", "crawler"], ["serankingbacklinksbot", "SERankingBacklinksBot", "serankingbacklinksbot", "crawler"], ["awariobot", "AwarioBot", "awariobot", "crawler"], ["awariosmartbot", "AwarioBot", "awariobot", "crawler"], ["seojuice-searchbot", "SEOJuice-SearchBot", "seojuice-searchbot", "crawler"], ["trendictionbot", "trendictionbot", "trendictionbot", "crawler"], ["hubspot crawler", "HubSpot Crawler", "hubspot-crawler", "crawler"], ["bitsightbot", "BitSightBot", "bitsightbot", "crawler"], ["l9scan", "LeakIX", "leakix", "crawler"], ["modatscanner", "ModatScanner", "modatscanner", "crawler"], ["umaibot", "UmaiBot", "umaibot", "crawler"], ["artex-enrich/", "ARTEX", "artex", "tool"], ["nessus", "Nessus", "nessus", "crawler"], ["qualys", "Qualys", "qualys", "crawler"], ["shodan", "Shodan", "shodan", "crawler"], ["censys", "Censys", "censys", "crawler"], ["nmap", "Nmap", "nmap", "crawler"], ["zap/", "OWASP ZAP", "zap", "crawler"], ["burp", "Burp Suite", "burp", "crawler"], ["nikto", "Nikto", "nikto", "crawler"], ["nuclei", "Nuclei", "nuclei", "crawler"], ["acunetix", "Acunetix", "acunetix", "crawler"], ["netsparker", "Netsparker", "netsparker", "crawler"], ["detectify", "Detectify", "detectify", "crawler"], ["palo alto networks", "Palo Alto Networks Cortex Xpanse", "paloalto-xpanse", "crawler"], ["recordedfuture", "Recorded Future Crawler", "recordedfuture", "crawler"], ["developers.cloudflare.com/security-center", "Cloudflare Security Center", "cloudflare-security-center", "crawler"], ["virustotalcloud", "VirusTotal", "virustotal-cloud", "crawler"], ["intruder", "Intruder", "intruder", "crawler"], ["norma/", "Norma WebFetch", "norma", "tool"], ["python-requests", "Python-Requests", "python-requests", "tool"], ["python-urllib", "Python-urllib", "python-urllib", "tool"], ["python/", "Python", "python", "tool"], ["scrapy", "Scrapy", "scrapy", "tool"], ["httpx", "HTTPX", "httpx", "tool"], ["aiohttp", "aiohttp", "aiohttp", "tool"], ["beautifulsoup", "BeautifulSoup", "beautifulsoup", "tool"], ["node-fetch", "node-fetch", "node-fetch", "tool"], ["axios/", "Axios", "axios", "tool"], ["got/", "Got", "got", "tool"], ["undici", "Undici", "undici", "tool"], ["go-http-client", "Go-HTTP-Client", "go-http-client", "tool"], ["colly", "Colly", "colly", "tool"], ["java/", "Java", "java", "tool"], ["okhttp", "OkHttp", "okhttp", "tool"], ["apache-httpclient", "Apache-HttpClient", "apache-httpclient", "tool"], ["jsoup", "Jsoup", "jsoup", "tool"], ["guzzlehttp", "GuzzleHttp", "guzzlehttp", "tool"], ["php/", "PHP", "php", "tool"], ["ruby", "Ruby", "ruby", "tool"], ["faraday", "Faraday", "faraday", "tool"], ["mechanize", "Mechanize", "mechanize", "tool"], ["headlesschrome", "HeadlessChrome", "headlesschrome", "tool"], ["puppeteer", "Puppeteer", "puppeteer", "tool"], ["playwright", "Playwright", "playwright", "tool"], ["selenium", "Selenium", "selenium", "tool"], ["phantomjs", "PhantomJS", "phantomjs", "tool"], ["splash", "Splash", "splash", "tool"], ["browserless", "Browserless", "browserless", "tool"], ["browserbase", "Browserbase", "browserbase", "tool"], ["ia_archiver", "Internet Archive", "ia-archiver", "crawler"], ["archive.org_bot", "Archive.org", "archive-org-bot", "crawler"], ["wayback", "Wayback Machine", "wayback", "crawler"], ["heritrix", "Heritrix", "heritrix", "crawler"], ["brozzler", "Brozzler", "brozzler", "crawler"], ["findfiles.net-linkchecker", "FindFiles.net LinkChecker", "findfiles-linkchecker", "crawler"], ["hstspreload-bot", "hstspreload-bot", "hstspreload-bot", "crawler"], ["facebookexternalhit", "Facebook", "facebookexternalhit", "crawler"], ["facebot", "Facebot", "facebot", "crawler"], ["twitterbot", "Twitterbot", "twitterbot", "crawler"], ["linkedinbot", "LinkedInBot", "linkedinbot", "crawler"], ["slackbot", "Slackbot", "slackbot", "crawler"], ["telegrambot", "TelegramBot", "telegrambot", "crawler"], ["whatsapp", "WhatsApp", "whatsapp", "crawler"], ["discordbot", "Discordbot", "discordbot", "crawler"], ["pinterest", "Pinterest", "pinterestbot", "crawler"], ["tumblr", "Tumblr", "tumblr", "crawler"], ["reddit", "Reddit", "reddit", "crawler"], ["embedly", "Embedly", "embedly", "crawler"], ["iframely", "Iframely", "iframely", "crawler"], ["adsbot-google", "AdsBot-Google", "adsbot-google", "crawler"], ["stripebot", "Stripebot", "stripebot", "crawler"], ["google-read-aloud", "Google-Read-Aloud", "google-read-aloud", "crawler"], ["google-safety", "Google-Safety", "google-safety", "crawler"], ["oai-adsbot", "OAI-AdsBot", "oai-adsbot", "crawler"], ["kakaobot", "KakaoBot", "kakaobot", "crawler"], ["curl/", "cURL", "curl", "tool"], ["wget/", "Wget", "wget", "tool"], ["libwww-perl", "libwww-perl", "libwww-perl", "tool"], ["lwp-", "LWP", "lwp", "tool"], ["httrack", "HTTrack", "httrack", "tool"], ["truetierbot", "TrueTierBot", "truetierbot", "crawler"], ["webdecoybot", "WebDecoyBot", "webdecoybot", "crawler"], ["uptimerobot", "UptimeRobot", "uptimerobot", "crawler"], ["pingdom", "Pingdom", "pingdom", "crawler"], ["statuscake", "StatusCake", "statuscake", "crawler"], ["betteruptime", "Better Uptime", "better-uptime", "crawler"], ["datadog", "Datadog Synthetics", "datadog-synthetics", "crawler"], ["newrelic", "New Relic", "newrelic", "crawler"], ["site24x7", "Site24x7", "site24x7", "crawler"], ["freshping", "Freshping", "freshping", "crawler"], ["hetrixtools", "HetrixTools", "hetrixtools", "crawler"], ["nodeping", "NodePing", "nodeping", "crawler"], ["gtmetrix", "GTmetrix", "gtmetrix", "crawler"], ["chrome-lighthouse", "Lighthouse", "chrome-lighthouse", "crawler"], ["google page speed", "Lighthouse", "chrome-lighthouse", "crawler"], ["andifeedbot", "AndiFeedBot", "andifeedbot", "crawler"], ["librarianbot", "LibrarianBot", "librarianbot", "crawler"], ["oursignal/", "oursignal", "oursignal", "crawler"], ["feedly", "Feedly", "feedly", "crawler"], ["livelapbot", "LivelapBot", "livelapbot", "crawler"], ["feedfetcher", "Feedfetcher-Google", "feedfetcher-google", "crawler"], ["newsblur", "NewsBlur", "newsblur", "crawler"], ["inoreader", "Inoreader", "inoreader", "crawler"], ["theoldreader", "The Old Reader", "theoldreader", "crawler"], ["feedbin", "Feedbin", "feedbin", "crawler"], ["miniflux", "Miniflux", "miniflux", "crawler"], ["freshrss", "FreshRSS", "freshrss", "crawler"], ["commafeed", "CommaFeed", "commafeed", "crawler"], ["tphotobot", "tphotobot", "tphotobot", "crawler"], ["bangobot", "BangoBot", "bangobot", "crawler"], ["kamatabot", "KamataBot", "kamatabot", "crawler"], ["boehmbot", "BoehmBot", "boehmbot", "crawler"], ["pipericbot", "PipericBot", "pipericbot", "crawler"], ["pandalytics", "Pandalytics", "pandalytics", "crawler"], ["spiderling", "SpiderLing", "spiderling", "crawler"], ["sketchengine", "SpiderLing", "spiderling", "crawler"], ["netapi/", "NetAPI Bot", "netapi", "crawler"], ["anticlonebot", "AntiCloneBot", "anticlonebot", "crawler"], ["terncrawler", "TernCrawler", "terncrawler", "crawler"], ["diffbot", "Diffbot", "diffbot", "crawler"], ["import.io", "Import.io", "import-io", "crawler"], ["brightdata", "Bright Data", "bright-data", "crawler"], ["luminati", "Bright Data", "bright-data", "crawler"], ["brightbot", "Brightbot", "brightbot", "crawler"], ["cloudflarebrowserrenderingcrawler", "Cloudflare Browser Rendering Crawler", "cloudflare-crawl", "crawler"], ["ev-crawler", "ev-crawler", "ev-crawler", "crawler"], ["oxylabs", "Oxylabs", "oxylabs", "crawler"], ["scrapingbee", "ScrapingBee", "scrapingbee", "crawler"], ["scrapingant", "ScrapingAnt", "scrapingant", "crawler"], ["zyte", "Zyte", "zyte", "crawler"], ["scrapinghub", "Zyte", "zyte", "crawler"], ["apify", "Apify", "apify", "crawler"], ["crawlbase", "Crawlbase", "crawlbase", "crawler"], ["webscrapingapi", "WebScrapingAPI", "webscrapingapi", "crawler"], ["andi-user", "Andi-User", "andi-user", "crawler"], ["chatgpt-user", "ChatGPT-User", "chatgpt-user", "crawler"], ["perplexity-user", "Perplexity-User", "perplexity-user", "crawler"], ["mistralai-user", "MistralAI-User", "mistralai-user", "crawler"], ["exauser", "ExaUser", "exauser", "crawler"], ["shap-user", "Shap-User", "shap-user", "crawler"], ["meta-externalfetcher", "Meta-ExternalFetcher", "meta-externalfetcher", "crawler"], ["gemini-deep-research", "Gemini-Deep-Research", "gemini-deep-research", "crawler"], ["copilot", "Microsoft Copilot", "copilot", "crawler"], ["cortana", "Cortana", "cortana", "crawler"], ["siri", "Siri", "siri", "crawler"], ["kimi-user", "Kimi-User", "kimi-user", "crawler"], ["keenable-user", "Keenable-User", "keenable-user", "crawler"], ["elevenlabsbot", "ElevenlabsBot", "elevenlabsbot", "crawler"], ["klaviyoaibot", "KlaviyoAIBot", "klaviyoaibot", "crawler"]];
|
|
5501
5528
|
function yr(e) {
|
|
5502
|
-
for (let [t, r, n, o] of
|
|
5529
|
+
for (let [t, r, n, o] of Ye) if (e.includes(t)) return { name: r, id: n, kind: o };
|
|
5503
5530
|
return null;
|
|
5504
5531
|
}
|
|
5505
5532
|
var vr = /(?:bot|crawler|spider)(?:[/\s);,]|$)/i;
|
|
@@ -5510,7 +5537,7 @@ function Xe(e) {
|
|
|
5510
5537
|
var _r = "Search Engine Crawler";
|
|
5511
5538
|
var te = 1e3;
|
|
5512
5539
|
var xr = { search_engines: true, ai_crawlers: true, monitoring: true };
|
|
5513
|
-
function
|
|
5540
|
+
function kr(e) {
|
|
5514
5541
|
if (!e.includes(":")) return e.split(".").reverse().join(".") + ".in-addr.arpa";
|
|
5515
5542
|
let [t, r = ""] = e.split("::"), n = t ? t.split(":") : [], o = r ? r.split(":") : [], a = 8 - n.length - o.length;
|
|
5516
5543
|
return a < 0 ? "" : [...n, ...Array(Math.max(0, a)).fill("0"), ...o].map((s) => s.padStart(4, "0")).join("").split("").reverse().join(".") + ".ip6.arpa";
|
|
@@ -5518,11 +5545,11 @@ function Ar(e) {
|
|
|
5518
5545
|
function re(e, t) {
|
|
5519
5546
|
return Promise.race([e, new Promise((r, n) => setTimeout(() => n(new Error("dns timeout")), t))]);
|
|
5520
5547
|
}
|
|
5521
|
-
function
|
|
5522
|
-
return { reverse: (t) => re(e(
|
|
5548
|
+
function Ar(e) {
|
|
5549
|
+
return { reverse: (t) => re(e(kr(t), "PTR"), te), resolve4: (t) => re(e(t, "A"), te), resolve6: (t) => re(e(t, "AAAA"), te) };
|
|
5523
5550
|
}
|
|
5524
5551
|
function Ze(e, t, r, n = typeof Deno < "u" && Deno && typeof Deno.resolveDns == "function" ? Deno.resolveDns.bind(Deno) : void 0, o = Date.now()) {
|
|
5525
|
-
return !r || !e || !n || !Xe(t) ? Promise.resolve("") :
|
|
5552
|
+
return !r || !e || !n || !Xe(t) ? Promise.resolve("") : Je(e, xr, Ar(n), o).then((a) => a === "search_engines" ? _r : "").catch(() => "");
|
|
5526
5553
|
}
|
|
5527
5554
|
var Sr = "https://cloudflare-dns.com/dns-query";
|
|
5528
5555
|
var Cr = 1e3;
|
|
@@ -5543,7 +5570,7 @@ function Er(e = fetch) {
|
|
|
5543
5570
|
function Qe(e, t, r, n = fetch) {
|
|
5544
5571
|
return Ze(e, t, r, Er(n));
|
|
5545
5572
|
}
|
|
5546
|
-
var ne = "vercel-
|
|
5573
|
+
var ne = "vercel-2344a07611ce";
|
|
5547
5574
|
var et = "https://in.webdecoy.com";
|
|
5548
5575
|
function tt(e) {
|
|
5549
5576
|
let t = new Headers(e.headers);
|
|
@@ -5560,12 +5587,12 @@ async function Pr(e, t, r) {
|
|
|
5560
5587
|
if (o.pathname === Q) return { action: "respond", response: await ze(e, n) };
|
|
5561
5588
|
if (o.pathname === L) return { action: "respond", response: await Me(e, { apiBase: n, siteKey: r.siteKey, sensorKey: r.sensorKey, host: i }) };
|
|
5562
5589
|
if (!s) return oe(e, null);
|
|
5563
|
-
let c = await Se(e, s, { siteKey: r.siteKey, verifiedBotCategory: (
|
|
5590
|
+
let c = await Se(e, s, { siteKey: r.siteKey, verifiedBotCategory: (d, l) => Qe(t.ip, d.headers.get("user-agent") ?? "", l, t.fetch ?? fetch) });
|
|
5564
5591
|
if (j(c)) {
|
|
5565
|
-
let
|
|
5566
|
-
|
|
5592
|
+
let d = q(e.headers.get("cookie") ?? "", J);
|
|
5593
|
+
d && await Ie(d, r.sensorKey, i, e.headers.get("user-agent") ?? "", Date.now()) && (c = Ce(c));
|
|
5567
5594
|
}
|
|
5568
|
-
return qe({ ...c, refusal: c.pass ? null : { ip: t.ip, path: o.pathname } }, o.hostname, { siteKey: r.siteKey, apiBase: n, scannerId: r.scannerId, sensorKey: r.sensorKey, bundleVersion: ne, capabilities: G }, { waitUntil: (
|
|
5595
|
+
return qe({ ...c, refusal: c.pass ? null : { ip: t.ip, path: o.pathname } }, o.hostname, { siteKey: r.siteKey, apiBase: n, scannerId: r.scannerId, sensorKey: r.sensorKey, bundleVersion: ne, capabilities: G }, { waitUntil: (d) => t.waitUntil?.(d) }, Date.now()), c.pass || c.mode !== "enforce" ? oe(e, c.label) : { action: "respond", response: We(e, n, r.siteKey, c.label) };
|
|
5569
5596
|
} catch {
|
|
5570
5597
|
try {
|
|
5571
5598
|
return oe(e, null);
|
|
@@ -5950,6 +5977,56 @@ function clientSignals(config) {
|
|
|
5950
5977
|
return new ClientSignalRule(config);
|
|
5951
5978
|
}
|
|
5952
5979
|
|
|
5980
|
+
// src/node-http-guard.ts
|
|
5981
|
+
function createNodeHttpGuard(options = {}) {
|
|
5982
|
+
const sdk = new WebDecoy(options);
|
|
5983
|
+
const mode = options.mode ?? "monitor";
|
|
5984
|
+
const protectOptions = {
|
|
5985
|
+
threshold: options.threshold,
|
|
5986
|
+
skipLocalAnalysis: options.skipLocalAnalysis,
|
|
5987
|
+
metadata: options.metadata
|
|
5988
|
+
};
|
|
5989
|
+
return {
|
|
5990
|
+
sdk,
|
|
5991
|
+
async check(request) {
|
|
5992
|
+
const target = (request.url ?? "/").replace(/^https?:\/\/[^/?#]+/i, "");
|
|
5993
|
+
const queryStart = target.indexOf("?");
|
|
5994
|
+
const path = (queryStart === -1 ? target : target.slice(0, queryStart)) || "/";
|
|
5995
|
+
const query = queryStart === -1 ? void 0 : target.slice(queryStart + 1);
|
|
5996
|
+
if (shouldSkipPath(path, options.skipPaths)) return void 0;
|
|
5997
|
+
const headers = /* @__PURE__ */ Object.create(null);
|
|
5998
|
+
for (const [name, value] of Object.entries(request.headers)) {
|
|
5999
|
+
if (value !== void 0) headers[name] = Array.isArray(value) ? value.join(", ") : value;
|
|
6000
|
+
}
|
|
6001
|
+
const peer = request.socket.remoteAddress;
|
|
6002
|
+
const metadata = {
|
|
6003
|
+
method: request.method ?? "GET",
|
|
6004
|
+
path,
|
|
6005
|
+
query,
|
|
6006
|
+
headers,
|
|
6007
|
+
user_agent: headers["user-agent"],
|
|
6008
|
+
ip: resolveClientIp({ headers, peer, trustProxy: options.trustProxy }) ?? normalizeIp(peer) ?? "127.0.0.1",
|
|
6009
|
+
timestamp: Date.now()
|
|
6010
|
+
};
|
|
6011
|
+
const decision = await sdk.protect(metadata, protectOptions);
|
|
6012
|
+
if (decision.allowed || mode !== "enforce") return { decision };
|
|
6013
|
+
const block = ruleBlockResponse(decision) ?? {
|
|
6014
|
+
status: 403,
|
|
6015
|
+
headers: {},
|
|
6016
|
+
body: { error: "Forbidden", message: "Access denied by WebDecoy protection" }
|
|
6017
|
+
};
|
|
6018
|
+
return {
|
|
6019
|
+
decision,
|
|
6020
|
+
response: {
|
|
6021
|
+
status: block.status,
|
|
6022
|
+
headers: { "content-type": "application/json", ...block.headers },
|
|
6023
|
+
body: { ...block.body, detection_id: decision.id }
|
|
6024
|
+
}
|
|
6025
|
+
};
|
|
6026
|
+
}
|
|
6027
|
+
};
|
|
6028
|
+
}
|
|
6029
|
+
|
|
5953
6030
|
// src/detection/weights.ts
|
|
5954
6031
|
var DEFAULT_WEIGHTS = {
|
|
5955
6032
|
vision_ai: 0.15,
|
|
@@ -6117,7 +6194,67 @@ var InMemoryRateLimiter2 = class {
|
|
|
6117
6194
|
}
|
|
6118
6195
|
};
|
|
6119
6196
|
|
|
6197
|
+
// src/detection/detectors/cdp.ts
|
|
6198
|
+
var HIGH_CONFIDENCE_SIGNALS = ["chromedriver_cdc", "puppeteer_eval", "cdp_script_injection"];
|
|
6199
|
+
var CORROBORATING_DRIVER_SIGNALS = /* @__PURE__ */ new Set([
|
|
6200
|
+
...HIGH_CONFIDENCE_SIGNALS,
|
|
6201
|
+
"selenium_evaluate",
|
|
6202
|
+
"selenium_driver_evaluate",
|
|
6203
|
+
"selenium_unwrapped",
|
|
6204
|
+
"selenium_driver_unwrapped",
|
|
6205
|
+
"selenium_direct",
|
|
6206
|
+
"firefox_driver",
|
|
6207
|
+
"firefox_driver_unwrapped"
|
|
6208
|
+
]);
|
|
6209
|
+
function hasDriverInjection(signals) {
|
|
6210
|
+
return signals.some((signal) => HIGH_CONFIDENCE_SIGNALS.includes(signal));
|
|
6211
|
+
}
|
|
6212
|
+
function detectCDP(signals, corroborating) {
|
|
6213
|
+
const detections = [];
|
|
6214
|
+
const cdp = signals.environmental?.cdp ?? {};
|
|
6215
|
+
if (!cdp.detected) return detections;
|
|
6216
|
+
const signalList = cdp.signals ?? [];
|
|
6217
|
+
const signalCount = signalList.length;
|
|
6218
|
+
if (hasDriverInjection(signalList)) {
|
|
6219
|
+
detections.push({
|
|
6220
|
+
category: "cdp",
|
|
6221
|
+
score: 0.9,
|
|
6222
|
+
confidence: 0.95,
|
|
6223
|
+
reason: `CDP automation detected: ${signalList.join(", ")}`
|
|
6224
|
+
});
|
|
6225
|
+
} else if (signalCount >= 2) {
|
|
6226
|
+
detections.push({
|
|
6227
|
+
category: "cdp",
|
|
6228
|
+
score: 0.8,
|
|
6229
|
+
confidence: 0.85,
|
|
6230
|
+
reason: `Multiple CDP indicators: ${signalList.join(", ")}`
|
|
6231
|
+
});
|
|
6232
|
+
} else if (signalCount === 1) {
|
|
6233
|
+
detections.push({
|
|
6234
|
+
category: "cdp",
|
|
6235
|
+
score: 0.6,
|
|
6236
|
+
confidence: 0.7,
|
|
6237
|
+
reason: `CDP indicator: ${signalList.join(", ")}`
|
|
6238
|
+
});
|
|
6239
|
+
}
|
|
6240
|
+
if (corroborating && signalList.every((signal) => CORROBORATING_DRIVER_SIGNALS.has(signal))) {
|
|
6241
|
+
corroborating.push(...detections);
|
|
6242
|
+
}
|
|
6243
|
+
return detections;
|
|
6244
|
+
}
|
|
6245
|
+
|
|
6120
6246
|
// src/detection/scoring.ts
|
|
6247
|
+
function applyDecisiveScoreFloor(score, env, weights) {
|
|
6248
|
+
const declaresWebDriver = (weights.headless ?? 0) > 0 && env?.webdriver === true && env.automationFlags?.webdriver === true;
|
|
6249
|
+
const hasInjectedDriver = (weights.cdp ?? 0) > 0 && env?.cdp?.detected === true && hasDriverInjection(env.cdp.signals ?? []);
|
|
6250
|
+
return declaresWebDriver || hasInjectedDriver ? Math.max(0.9, score) : score;
|
|
6251
|
+
}
|
|
6252
|
+
function applyCorroborationScoreFloor(score, detections, weights) {
|
|
6253
|
+
if (score >= 0.6 || detections.length < 2) return score;
|
|
6254
|
+
const support = calculateNoisyOrCategoryScores(detections, weights);
|
|
6255
|
+
const agrees = (category) => (weights[category] ?? 0) > 0 && (support[category] ?? 0) >= 0.4 - 1e-9;
|
|
6256
|
+
return agrees("cdp") && (agrees("vision_ai") || agrees("behavioral")) ? 0.6 : score;
|
|
6257
|
+
}
|
|
6121
6258
|
function calculateCategoryScores(detections, weights) {
|
|
6122
6259
|
var _a;
|
|
6123
6260
|
const categoryData = {};
|
|
@@ -6139,6 +6276,19 @@ function calculateCategoryScores(detections, weights) {
|
|
|
6139
6276
|
}
|
|
6140
6277
|
return result;
|
|
6141
6278
|
}
|
|
6279
|
+
function calculateNoisyOrCategoryScores(detections, weights) {
|
|
6280
|
+
const remaining = /* @__PURE__ */ new Map();
|
|
6281
|
+
for (const { category, score, confidence } of detections) {
|
|
6282
|
+
if (!Number.isFinite(score) || !Number.isFinite(confidence) || score <= 0 || confidence <= 0) {
|
|
6283
|
+
continue;
|
|
6284
|
+
}
|
|
6285
|
+
const evidence = Math.min(1, score * confidence);
|
|
6286
|
+
remaining.set(category, (remaining.get(category) ?? 1) * (1 - evidence));
|
|
6287
|
+
}
|
|
6288
|
+
return Object.fromEntries(
|
|
6289
|
+
Object.keys(weights).map((category) => [category, 1 - (remaining.get(category) ?? 1)])
|
|
6290
|
+
);
|
|
6291
|
+
}
|
|
6142
6292
|
function calculateFinalScore(categoryScores, weights) {
|
|
6143
6293
|
let total = 0;
|
|
6144
6294
|
for (const [cat, weight] of Object.entries(weights)) {
|
|
@@ -6152,6 +6302,12 @@ function recommend(finalScore) {
|
|
|
6152
6302
|
return "block";
|
|
6153
6303
|
}
|
|
6154
6304
|
|
|
6305
|
+
// src/detection/detectors/corroborating-detection.ts
|
|
6306
|
+
function addCorroboratingDetection(detections, corroborating, detection) {
|
|
6307
|
+
detections.push(detection);
|
|
6308
|
+
corroborating?.push(detection);
|
|
6309
|
+
}
|
|
6310
|
+
|
|
6155
6311
|
// src/detection/detectors/keyboard-input.ts
|
|
6156
6312
|
var MIN_KEY_HOLD_SAMPLES = 3;
|
|
6157
6313
|
var MAX_KEY_HOLD_SAMPLES = 200;
|
|
@@ -6186,14 +6342,14 @@ function isTouchModality(behavioral) {
|
|
|
6186
6342
|
return touchEvents >= 3 || hasTouchSample && behavioral.pointerHasNonMouseType === true;
|
|
6187
6343
|
}
|
|
6188
6344
|
function hasHumanMovementMarkers(behavioral) {
|
|
6189
|
-
const tremor = behavioral.microTremorScore ?? 0;
|
|
6345
|
+
const tremor = behavioral.microTremorScore ?? 0.5;
|
|
6190
6346
|
const corrections = behavioral.overshootCorrections ?? 0;
|
|
6191
6347
|
const changes = behavioral.directionChanges ?? 0;
|
|
6192
6348
|
return tremor >= 0.5 && (corrections >= 1 || changes >= 10);
|
|
6193
6349
|
}
|
|
6194
6350
|
|
|
6195
6351
|
// src/detection/detectors/vision-ai.ts
|
|
6196
|
-
function detectVisionAI(signals, widgetInteraction = true) {
|
|
6352
|
+
function detectVisionAI(signals, widgetInteraction = true, corroborating) {
|
|
6197
6353
|
const detections = [];
|
|
6198
6354
|
const b = signals.behavioral ?? {};
|
|
6199
6355
|
const t = signals.temporal ?? {};
|
|
@@ -6241,7 +6397,7 @@ function detectVisionAI(signals, widgetInteraction = true) {
|
|
|
6241
6397
|
}
|
|
6242
6398
|
const microTremor = b.microTremorScore ?? 0.5;
|
|
6243
6399
|
if (usesMouse && totalPoints >= 5 && microTremor < 0.15) {
|
|
6244
|
-
detections
|
|
6400
|
+
addCorroboratingDetection(detections, corroborating, {
|
|
6245
6401
|
category: "vision_ai",
|
|
6246
6402
|
score: 0.7,
|
|
6247
6403
|
confidence: 0.6,
|
|
@@ -6249,7 +6405,7 @@ function detectVisionAI(signals, widgetInteraction = true) {
|
|
|
6249
6405
|
});
|
|
6250
6406
|
}
|
|
6251
6407
|
if (widgetInteraction && usesMouse && approachPts >= 5 && (b.approachDirectness ?? 0) > 0.95 && !hasHumanMovementMarkers(b)) {
|
|
6252
|
-
detections
|
|
6408
|
+
addCorroboratingDetection(detections, corroborating, {
|
|
6253
6409
|
category: "vision_ai",
|
|
6254
6410
|
score: 0.5,
|
|
6255
6411
|
confidence: 0.5,
|
|
@@ -6258,7 +6414,7 @@ function detectVisionAI(signals, widgetInteraction = true) {
|
|
|
6258
6414
|
}
|
|
6259
6415
|
const exploration = b.explorationRatio ?? 0.3;
|
|
6260
6416
|
if (widgetInteraction && exploration < 0.05 && trajectory > 50) {
|
|
6261
|
-
detections
|
|
6417
|
+
addCorroboratingDetection(detections, corroborating, {
|
|
6262
6418
|
category: "vision_ai",
|
|
6263
6419
|
score: 0.4,
|
|
6264
6420
|
confidence: 0.4,
|
|
@@ -6406,42 +6562,8 @@ function detectAutomation(signals) {
|
|
|
6406
6562
|
return detections;
|
|
6407
6563
|
}
|
|
6408
6564
|
|
|
6409
|
-
// src/detection/detectors/cdp.ts
|
|
6410
|
-
var HIGH_CONFIDENCE_SIGNALS = ["chromedriver_cdc", "puppeteer_eval", "cdp_script_injection"];
|
|
6411
|
-
function detectCDP(signals) {
|
|
6412
|
-
const detections = [];
|
|
6413
|
-
const cdp = signals.environmental?.cdp ?? {};
|
|
6414
|
-
if (!cdp.detected) return detections;
|
|
6415
|
-
const signalList = cdp.signals ?? [];
|
|
6416
|
-
const signalCount = signalList.length;
|
|
6417
|
-
const hasHighConf = signalList.some((s) => HIGH_CONFIDENCE_SIGNALS.includes(s));
|
|
6418
|
-
if (hasHighConf) {
|
|
6419
|
-
detections.push({
|
|
6420
|
-
category: "cdp",
|
|
6421
|
-
score: 0.9,
|
|
6422
|
-
confidence: 0.95,
|
|
6423
|
-
reason: `CDP automation detected: ${signalList.join(", ")}`
|
|
6424
|
-
});
|
|
6425
|
-
} else if (signalCount >= 2) {
|
|
6426
|
-
detections.push({
|
|
6427
|
-
category: "cdp",
|
|
6428
|
-
score: 0.8,
|
|
6429
|
-
confidence: 0.85,
|
|
6430
|
-
reason: `Multiple CDP indicators: ${signalList.join(", ")}`
|
|
6431
|
-
});
|
|
6432
|
-
} else if (signalCount === 1) {
|
|
6433
|
-
detections.push({
|
|
6434
|
-
category: "cdp",
|
|
6435
|
-
score: 0.6,
|
|
6436
|
-
confidence: 0.7,
|
|
6437
|
-
reason: `CDP indicator: ${signalList.join(", ")}`
|
|
6438
|
-
});
|
|
6439
|
-
}
|
|
6440
|
-
return detections;
|
|
6441
|
-
}
|
|
6442
|
-
|
|
6443
6565
|
// src/detection/detectors/behavioral.ts
|
|
6444
|
-
function detectBehavioral(signals, widgetInteraction = true) {
|
|
6566
|
+
function detectBehavioral(signals, widgetInteraction = true, corroborating) {
|
|
6445
6567
|
const detections = [];
|
|
6446
6568
|
const b = signals.behavioral ?? {};
|
|
6447
6569
|
const t = signals.temporal ?? {};
|
|
@@ -6451,7 +6573,7 @@ function detectBehavioral(signals, widgetInteraction = true) {
|
|
|
6451
6573
|
const keyboard = classifyKeyboardInput(signals);
|
|
6452
6574
|
const humanMovement = hasHumanMovementMarkers(b);
|
|
6453
6575
|
if (keyboard === "short-key-holds" && !isTouchUser) {
|
|
6454
|
-
detections
|
|
6576
|
+
addCorroboratingDetection(detections, corroborating, {
|
|
6455
6577
|
category: "behavioral",
|
|
6456
6578
|
score: 0.8,
|
|
6457
6579
|
confidence: 0.9,
|
|
@@ -6474,7 +6596,7 @@ function detectBehavioral(signals, widgetInteraction = true) {
|
|
|
6474
6596
|
}
|
|
6475
6597
|
const velVar = b.velocityVariance ?? 1;
|
|
6476
6598
|
if (velVar < 0.02 && trajectory > 50 && !humanMovement) {
|
|
6477
|
-
detections
|
|
6599
|
+
addCorroboratingDetection(detections, corroborating, {
|
|
6478
6600
|
category: "behavioral",
|
|
6479
6601
|
score: 0.6,
|
|
6480
6602
|
confidence: 0.6,
|
|
@@ -6533,7 +6655,7 @@ function detectBehavioral(signals, widgetInteraction = true) {
|
|
|
6533
6655
|
}
|
|
6534
6656
|
const straight = b.straightLineRatio ?? 0;
|
|
6535
6657
|
if (straight > 0.8 && trajectory > 100) {
|
|
6536
|
-
detections
|
|
6658
|
+
addCorroboratingDetection(detections, corroborating, {
|
|
6537
6659
|
category: "behavioral",
|
|
6538
6660
|
score: 0.5,
|
|
6539
6661
|
confidence: 0.5,
|
|
@@ -6542,7 +6664,7 @@ function detectBehavioral(signals, widgetInteraction = true) {
|
|
|
6542
6664
|
}
|
|
6543
6665
|
const dirChanges = b.directionChanges ?? 10;
|
|
6544
6666
|
if (totalPoints > 50 && dirChanges < 3) {
|
|
6545
|
-
detections
|
|
6667
|
+
addCorroboratingDetection(detections, corroborating, {
|
|
6546
6668
|
category: "behavioral",
|
|
6547
6669
|
score: 0.4,
|
|
6548
6670
|
confidence: 0.4,
|
|
@@ -7504,16 +7626,24 @@ function analyzeAdvancedSignals(signals) {
|
|
|
7504
7626
|
// src/detection/engine.ts
|
|
7505
7627
|
var DetectionEngine = class {
|
|
7506
7628
|
constructor(options = {}) {
|
|
7629
|
+
if (options.scoringPolicy !== void 0 && options.scoringPolicy !== "weighted-mean-v1" && options.scoringPolicy !== "noisy-or-floors-v1") {
|
|
7630
|
+
throw new TypeError("Unknown detection scoring policy: " + String(options.scoringPolicy));
|
|
7631
|
+
}
|
|
7507
7632
|
this.weights = options.weights ?? DEFAULT_WEIGHTS;
|
|
7633
|
+
this.scoringPolicy = options.scoringPolicy ?? "weighted-mean-v1";
|
|
7508
7634
|
this.requirePoW = options.requirePoW ?? true;
|
|
7509
7635
|
this.fingerprintStore = options.fingerprintStore ?? new InMemoryFingerprintStore();
|
|
7510
7636
|
this.rateLimiter = options.rateLimiter ?? new InMemoryRateLimiter2();
|
|
7637
|
+
this.onScoringComparison = options.onScoringComparison;
|
|
7511
7638
|
}
|
|
7512
7639
|
/** Score `signals` for the given request context and return a verdict. */
|
|
7513
7640
|
score(signals, context) {
|
|
7514
7641
|
const { ip, siteKey, userAgent } = context;
|
|
7515
7642
|
const headers = context.headers ?? {};
|
|
7516
7643
|
const detections = [];
|
|
7644
|
+
const onScoringComparison = this.onScoringComparison;
|
|
7645
|
+
const useCandidate = this.scoringPolicy === "noisy-or-floors-v1";
|
|
7646
|
+
const corroborating = onScoringComparison || useCandidate ? [] : void 0;
|
|
7517
7647
|
if (context.extraDetections) detections.push(...context.extraDetections);
|
|
7518
7648
|
const pow = context.pow;
|
|
7519
7649
|
if (pow && pow.provided) {
|
|
@@ -7554,11 +7684,11 @@ var DetectionEngine = class {
|
|
|
7554
7684
|
}
|
|
7555
7685
|
const widgetInteraction = context.widgetInteraction !== false;
|
|
7556
7686
|
detections.push(
|
|
7557
|
-
...detectVisionAI(signals, widgetInteraction),
|
|
7687
|
+
...detectVisionAI(signals, widgetInteraction, corroborating),
|
|
7558
7688
|
...detectHeadless(signals, userAgent),
|
|
7559
7689
|
...detectAutomation(signals),
|
|
7560
|
-
...detectCDP(signals),
|
|
7561
|
-
...detectBehavioral(signals, widgetInteraction),
|
|
7690
|
+
...detectCDP(signals, corroborating),
|
|
7691
|
+
...detectBehavioral(signals, widgetInteraction, corroborating),
|
|
7562
7692
|
...detectTouchAuthenticity(signals, userAgent),
|
|
7563
7693
|
...detectSensorEntropy(signals, userAgent),
|
|
7564
7694
|
...detectTouchKinematics(signals),
|
|
@@ -7586,13 +7716,42 @@ var DetectionEngine = class {
|
|
|
7586
7716
|
detections.push(...analyzeFormInteraction(signals.formAnalysis, signals.behavioral));
|
|
7587
7717
|
}
|
|
7588
7718
|
detections.push(...analyzeAdvancedSignals(signals));
|
|
7589
|
-
const
|
|
7590
|
-
const
|
|
7719
|
+
const currentCategoryScores = calculateCategoryScores(detections, this.weights);
|
|
7720
|
+
const currentScore = calculateFinalScore(currentCategoryScores, this.weights);
|
|
7721
|
+
const currentRecommendation = recommend(currentScore);
|
|
7591
7722
|
const scrollObservation = observeScrollJump(signals.behavioral);
|
|
7723
|
+
let candidateCategoryScores;
|
|
7724
|
+
let candidateScore;
|
|
7725
|
+
let candidateRecommendation;
|
|
7726
|
+
if (corroborating) {
|
|
7727
|
+
candidateCategoryScores = calculateNoisyOrCategoryScores(detections, this.weights);
|
|
7728
|
+
const decisiveScore = applyDecisiveScoreFloor(
|
|
7729
|
+
calculateFinalScore(candidateCategoryScores, this.weights),
|
|
7730
|
+
signals.environmental,
|
|
7731
|
+
this.weights
|
|
7732
|
+
);
|
|
7733
|
+
candidateScore = applyCorroborationScoreFloor(decisiveScore, corroborating, this.weights);
|
|
7734
|
+
candidateRecommendation = recommend(candidateScore);
|
|
7735
|
+
}
|
|
7736
|
+
if (onScoringComparison && candidateScore !== void 0 && candidateRecommendation !== void 0) {
|
|
7737
|
+
try {
|
|
7738
|
+
const pending = onScoringComparison({
|
|
7739
|
+
policy: "noisy-or-floors-v1",
|
|
7740
|
+
current: { score: currentScore, recommendation: currentRecommendation },
|
|
7741
|
+
candidate: { score: candidateScore, recommendation: candidateRecommendation }
|
|
7742
|
+
});
|
|
7743
|
+
void pending?.catch(() => {
|
|
7744
|
+
});
|
|
7745
|
+
} catch {
|
|
7746
|
+
}
|
|
7747
|
+
}
|
|
7748
|
+
const categoryScores = useCandidate ? candidateCategoryScores : currentCategoryScores;
|
|
7749
|
+
const score = useCandidate ? candidateScore : currentScore;
|
|
7750
|
+
const recommendation = useCandidate ? candidateRecommendation : currentRecommendation;
|
|
7592
7751
|
return {
|
|
7593
7752
|
success: score < 0.5,
|
|
7594
7753
|
score,
|
|
7595
|
-
recommendation
|
|
7754
|
+
recommendation,
|
|
7596
7755
|
categoryScores,
|
|
7597
7756
|
detections,
|
|
7598
7757
|
...scrollObservation ? { observations: [scrollObservation] } : {},
|
|
@@ -7803,9 +7962,11 @@ var Captcha = class {
|
|
|
7803
7962
|
const fingerprintStore = options.fingerprintStore ?? new InMemoryFingerprintStore();
|
|
7804
7963
|
this.engine = new DetectionEngine({
|
|
7805
7964
|
weights: options.weights,
|
|
7965
|
+
scoringPolicy: options.scoringPolicy,
|
|
7806
7966
|
requirePoW: true,
|
|
7807
7967
|
fingerprintStore,
|
|
7808
|
-
rateLimiter
|
|
7968
|
+
rateLimiter,
|
|
7969
|
+
onScoringComparison: options.onScoringComparison
|
|
7809
7970
|
});
|
|
7810
7971
|
this.pow = new PoWManager({ secret, store: options.challengeStore, rateLimiter });
|
|
7811
7972
|
this.tokens = new TokenManager({ secret, store: options.tokenStore });
|
|
@@ -8051,6 +8212,7 @@ function createCaptchaEndpoints(options = {}) {
|
|
|
8051
8212
|
createClearanceGate,
|
|
8052
8213
|
createDetectAndGate,
|
|
8053
8214
|
createFetchGuard,
|
|
8215
|
+
createNodeHttpGuard,
|
|
8054
8216
|
createOffensiveToolchainEvidence,
|
|
8055
8217
|
deriveAndArm,
|
|
8056
8218
|
deriveKey,
|