@webdecoy/fcaptcha 1.19.2 → 1.20.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/package.json +1 -1
- package/server.js +18 -0
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -569,13 +569,31 @@ function detectHeadless(signals, userAgent) {
|
|
|
569
569
|
webdriver_configurable: 0.7,
|
|
570
570
|
chrome_runtime_missing: 0.6,
|
|
571
571
|
};
|
|
572
|
+
// Signals a genuine browser also produces, and therefore not evidence of
|
|
573
|
+
// anything. Ignored here as well as in the client, because clients already
|
|
574
|
+
// deployed will keep sending them.
|
|
575
|
+
//
|
|
576
|
+
// Measured in Chrome 150 with navigator.webdriver === false:
|
|
577
|
+
// webdriver_configurable descriptor present and configurable — WebIDL
|
|
578
|
+
// defines the attribute that way, so every browser
|
|
579
|
+
// reports what a patched one reports
|
|
580
|
+
// chrome_runtime_missing window.chrome present, chrome.runtime absent, on
|
|
581
|
+
// any page without a matching externally_connectable
|
|
582
|
+
// extension, i.e. almost every page
|
|
583
|
+
//
|
|
584
|
+
// They fired together on ordinary Chrome, so they cannot corroborate each
|
|
585
|
+
// other either.
|
|
586
|
+
const INERT_SIGNALS = new Set(['webdriver_configurable', 'chrome_runtime_missing']);
|
|
587
|
+
|
|
572
588
|
for (const sig of playwrightSignals) {
|
|
589
|
+
if (INERT_SIGNALS.has(sig)) continue;
|
|
573
590
|
const sigScore = scoreMap[sig] || 0.7;
|
|
574
591
|
detections.push({
|
|
575
592
|
category: 'headless', score: sigScore, confidence: 0.8,
|
|
576
593
|
reason: `Playwright artifact detected: ${sig}`
|
|
577
594
|
});
|
|
578
595
|
}
|
|
596
|
+
|
|
579
597
|
}
|
|
580
598
|
|
|
581
599
|
return detections;
|