jumpy-lion 0.1.1 → 0.1.2
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/dist/browser-controller.d.ts +22 -3
- package/dist/browser-controller.d.ts.map +1 -1
- package/dist/browser-controller.js +316 -71
- package/dist/browser-controller.js.map +1 -1
- package/dist/browser-plugin.d.ts +56 -7
- package/dist/browser-plugin.d.ts.map +1 -1
- package/dist/browser-plugin.js +268 -56
- package/dist/browser-plugin.js.map +1 -1
- package/dist/browser-process/browser.d.ts +39 -0
- package/dist/browser-process/browser.d.ts.map +1 -1
- package/dist/browser-process/browser.js +125 -16
- package/dist/browser-process/browser.js.map +1 -1
- package/dist/browser-process/process.d.ts +9 -0
- package/dist/browser-process/process.d.ts.map +1 -1
- package/dist/browser-process/process.js +100 -6
- package/dist/browser-process/process.js.map +1 -1
- package/dist/browser-profiles/chrome/default.d.ts +116 -0
- package/dist/browser-profiles/chrome/default.d.ts.map +1 -1
- package/dist/browser-profiles/chrome/default.js +118 -1
- package/dist/browser-profiles/chrome/default.js.map +1 -1
- package/dist/browser-profiles/chrome/populate-profile.d.ts +76 -0
- package/dist/browser-profiles/chrome/populate-profile.d.ts.map +1 -0
- package/dist/browser-profiles/chrome/populate-profile.js +300 -0
- package/dist/browser-profiles/chrome/populate-profile.js.map +1 -0
- package/dist/browser-profiles/index.d.ts +1 -0
- package/dist/browser-profiles/index.d.ts.map +1 -1
- package/dist/browser-profiles/index.js +2 -0
- package/dist/browser-profiles/index.js.map +1 -1
- package/dist/crawler.d.ts +81 -9
- package/dist/crawler.d.ts.map +1 -1
- package/dist/crawler.js +26 -10
- package/dist/crawler.js.map +1 -1
- package/dist/fingerprinting/all-fingerprint-defender/_locales/en/messages.json +95 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-16ff15da.d.ts +2 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-16ff15da.d.ts.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-16ff15da.js +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-16ff15da.js.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-1a1456ec.d.ts +2 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-1a1456ec.d.ts.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-1a1456ec.js +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-1a1456ec.js.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-3a7b59dd.d.ts +83 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-3a7b59dd.d.ts.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-3a7b59dd.js +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-3a7b59dd.js.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-7ce85519.d.ts +2 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-7ce85519.d.ts.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-7ce85519.js +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-7ce85519.js.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-aaea1190.d.ts +2 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-aaea1190.d.ts.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-aaea1190.js +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-aaea1190.js.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-b4410958.d.ts +2 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-b4410958.d.ts.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-b4410958.js +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-b4410958.js.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-dfed3562.d.ts +2 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-dfed3562.d.ts.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-dfed3562.js +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/chunk-dfed3562.js.map +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/debounce-09920c81.css +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/options-fe2fb5aa.css +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/assets/popup-1886d2ef.css +1 -0
- package/dist/fingerprinting/all-fingerprint-defender/img/icon-128.png +0 -0
- package/dist/fingerprinting/all-fingerprint-defender/img/icon-16.png +0 -0
- package/dist/fingerprinting/all-fingerprint-defender/img/icon-24.png +0 -0
- package/dist/fingerprinting/all-fingerprint-defender/img/icon-32-disabled.png +0 -0
- package/dist/fingerprinting/all-fingerprint-defender/img/icon-32.png +0 -0
- package/dist/fingerprinting/all-fingerprint-defender/img/icon-48.png +0 -0
- package/dist/fingerprinting/all-fingerprint-defender/manifest.json +83 -0
- package/dist/fingerprinting/all-fingerprint-defender/options.html +17 -0
- package/dist/fingerprinting/all-fingerprint-defender/popup.html +23 -0
- package/dist/fingerprinting/anti-webgpu/background.d.ts +2 -0
- package/dist/fingerprinting/anti-webgpu/background.d.ts.map +1 -0
- package/dist/fingerprinting/anti-webgpu/background.js +4 -0
- package/dist/fingerprinting/anti-webgpu/background.js.map +1 -0
- package/dist/fingerprinting/anti-webgpu/data/content_script/inject.d.ts +2 -0
- package/dist/fingerprinting/anti-webgpu/data/content_script/inject.d.ts.map +1 -0
- package/dist/fingerprinting/anti-webgpu/data/content_script/inject.js +50 -0
- package/dist/fingerprinting/anti-webgpu/data/content_script/inject.js.map +1 -0
- package/dist/fingerprinting/anti-webgpu/data/content_script/page_context/inject.d.ts +2 -0
- package/dist/fingerprinting/anti-webgpu/data/content_script/page_context/inject.d.ts.map +1 -0
- package/dist/fingerprinting/anti-webgpu/data/content_script/page_context/inject.js +172 -0
- package/dist/fingerprinting/anti-webgpu/data/content_script/page_context/inject.js.map +1 -0
- package/dist/fingerprinting/anti-webgpu/data/icons/128.png +0 -0
- package/dist/fingerprinting/anti-webgpu/data/icons/16.png +0 -0
- package/dist/fingerprinting/anti-webgpu/data/icons/32.png +0 -0
- package/dist/fingerprinting/anti-webgpu/data/icons/48.png +0 -0
- package/dist/fingerprinting/anti-webgpu/data/icons/64.png +0 -0
- package/dist/fingerprinting/anti-webgpu/data/popup/popup.css +88 -0
- package/dist/fingerprinting/anti-webgpu/data/popup/popup.d.ts +2 -0
- package/dist/fingerprinting/anti-webgpu/data/popup/popup.d.ts.map +1 -0
- package/dist/fingerprinting/anti-webgpu/data/popup/popup.html +58 -0
- package/dist/fingerprinting/anti-webgpu/data/popup/popup.js +96 -0
- package/dist/fingerprinting/anti-webgpu/data/popup/popup.js.map +1 -0
- package/dist/fingerprinting/anti-webgpu/lib/chrome.d.ts +2 -0
- package/dist/fingerprinting/anti-webgpu/lib/chrome.d.ts.map +1 -0
- package/dist/fingerprinting/anti-webgpu/lib/chrome.js +249 -0
- package/dist/fingerprinting/anti-webgpu/lib/chrome.js.map +1 -0
- package/dist/fingerprinting/anti-webgpu/lib/common.d.ts +2 -0
- package/dist/fingerprinting/anti-webgpu/lib/common.d.ts.map +1 -0
- package/dist/fingerprinting/anti-webgpu/lib/common.js +86 -0
- package/dist/fingerprinting/anti-webgpu/lib/common.js.map +1 -0
- package/dist/fingerprinting/anti-webgpu/lib/config.d.ts +2 -0
- package/dist/fingerprinting/anti-webgpu/lib/config.d.ts.map +1 -0
- package/dist/fingerprinting/anti-webgpu/lib/config.js +14 -0
- package/dist/fingerprinting/anti-webgpu/lib/config.js.map +1 -0
- package/dist/fingerprinting/anti-webgpu/lib/runtime.d.ts +2 -0
- package/dist/fingerprinting/anti-webgpu/lib/runtime.d.ts.map +1 -0
- package/dist/fingerprinting/anti-webgpu/lib/runtime.js +107 -0
- package/dist/fingerprinting/anti-webgpu/lib/runtime.js.map +1 -0
- package/dist/fingerprinting/anti-webgpu/manifest.json +58 -0
- package/dist/fingerprinting/custom-fingerprint-injector.d.ts +87 -0
- package/dist/fingerprinting/custom-fingerprint-injector.d.ts.map +1 -0
- package/dist/fingerprinting/custom-fingerprint-injector.js +342 -0
- package/dist/fingerprinting/custom-fingerprint-injector.js.map +1 -0
- package/dist/fingerprinting/fingerprint-injector.d.ts +157 -0
- package/dist/fingerprinting/fingerprint-injector.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-injector.js +632 -0
- package/dist/fingerprinting/fingerprint-injector.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.d.ts +6 -0
- package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.js +119 -0
- package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/canvas-protection.d.ts +6 -0
- package/dist/fingerprinting/fingerprint-overrides/canvas-protection.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/canvas-protection.js +149 -0
- package/dist/fingerprinting/fingerprint-overrides/canvas-protection.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.d.ts +14 -0
- package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.js +763 -0
- package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.d.ts +6 -0
- package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.js +195 -0
- package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/coalesced-events-spoofing.d.ts +10 -0
- package/dist/fingerprinting/fingerprint-overrides/coalesced-events-spoofing.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/coalesced-events-spoofing.js +195 -0
- package/dist/fingerprinting/fingerprint-overrides/coalesced-events-spoofing.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts +28 -0
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js +1181 -0
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/font-spoofing.d.ts +7 -0
- package/dist/fingerprinting/fingerprint-overrides/font-spoofing.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/font-spoofing.js +171 -0
- package/dist/fingerprinting/fingerprint-overrides/font-spoofing.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/index.d.ts +36 -0
- package/dist/fingerprinting/fingerprint-overrides/index.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/index.js +40 -0
- package/dist/fingerprinting/fingerprint-overrides/index.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.d.ts +45 -0
- package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js +268 -0
- package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.d.ts +6 -0
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.js +301 -0
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.d.ts +7 -0
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.js +58 -0
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.d.ts +6 -0
- package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.js +249 -0
- package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts +33 -0
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js +618 -0
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/prototype-integrity.d.ts +13 -0
- package/dist/fingerprinting/fingerprint-overrides/prototype-integrity.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/prototype-integrity.js +356 -0
- package/dist/fingerprinting/fingerprint-overrides/prototype-integrity.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.d.ts +18 -0
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.js +171 -0
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.d.ts +55 -0
- package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js +244 -0
- package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts +14 -0
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.js +925 -0
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/storage-consistency.d.ts +13 -0
- package/dist/fingerprinting/fingerprint-overrides/storage-consistency.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/storage-consistency.js +346 -0
- package/dist/fingerprinting/fingerprint-overrides/storage-consistency.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/timing-consistency.d.ts +13 -0
- package/dist/fingerprinting/fingerprint-overrides/timing-consistency.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/timing-consistency.js +264 -0
- package/dist/fingerprinting/fingerprint-overrides/timing-consistency.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/ua-ch.d.ts +27 -0
- package/dist/fingerprinting/fingerprint-overrides/ua-ch.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/ua-ch.js +213 -0
- package/dist/fingerprinting/fingerprint-overrides/ua-ch.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/utils.d.ts +12 -0
- package/dist/fingerprinting/fingerprint-overrides/utils.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/utils.js +517 -0
- package/dist/fingerprinting/fingerprint-overrides/utils.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.d.ts +12 -0
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js +215 -0
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.d.ts +6 -0
- package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.js +202 -0
- package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.d.ts +6 -0
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js +188 -0
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/launcher-wrap.d.ts +2 -2
- package/dist/launcher-wrap.d.ts.map +1 -1
- package/dist/launcher-wrap.js.map +1 -1
- package/dist/page.d.ts +160 -13
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +1027 -42
- package/dist/page.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,1181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DataDome-Specific Bypass Module - MAXIMUM AGGRESSION Edition 2025-2026
|
|
3
|
+
*
|
|
4
|
+
* Based on comprehensive analysis of DataDome fingerprinting from:
|
|
5
|
+
* - analysis-a8005bea5af559c5.json (36 fingerprinting methods, 1080+ property accesses)
|
|
6
|
+
* - fingerprint-traps-d1764644c7101d16.json (799 method calls traced)
|
|
7
|
+
*
|
|
8
|
+
* This module overrides EVERYTHING DataDome checks.
|
|
9
|
+
*
|
|
10
|
+
* CRITICAL DETECTION VECTORS (All Addressed):
|
|
11
|
+
* - Error.constructor (100+ stack trace checks)
|
|
12
|
+
* - navigator.userAgentData.getHighEntropyValues() (architecture, bitness, platform)
|
|
13
|
+
* - Date.constructor (timing analysis)
|
|
14
|
+
* - Function.prototype.toString (native code checks)
|
|
15
|
+
* - performance.memory (iframe checks via geo.captcha-delivery.com)
|
|
16
|
+
* - screen.* (all properties)
|
|
17
|
+
* - window.* (dimensions, parent, top, self)
|
|
18
|
+
* - navigator.* (40+ properties)
|
|
19
|
+
* - localStorage/sessionStorage
|
|
20
|
+
* - history API
|
|
21
|
+
* - Permissions API
|
|
22
|
+
* - MediaDevices API
|
|
23
|
+
* - Keyboard API
|
|
24
|
+
* - Battery API
|
|
25
|
+
* - WebGL/Canvas
|
|
26
|
+
*/
|
|
27
|
+
export const createDataDomeBypassScript = () => {
|
|
28
|
+
return `
|
|
29
|
+
(() => {
|
|
30
|
+
'use strict';
|
|
31
|
+
|
|
32
|
+
// Use shared stealth store (created by bundler preamble, or bootstrap here)
|
|
33
|
+
const _s = typeof __stealth !== 'undefined' ? __stealth : {};
|
|
34
|
+
if (_s.ddInit) return;
|
|
35
|
+
_s.ddInit = true;
|
|
36
|
+
|
|
37
|
+
const DEBUG = '[DD-BYPASS]';
|
|
38
|
+
const log = (...a) => console.log(DEBUG, ...a);
|
|
39
|
+
|
|
40
|
+
// ================================================================
|
|
41
|
+
// FINGERPRINT CONFIGURATION - Consistent across all properties
|
|
42
|
+
// ================================================================
|
|
43
|
+
const seed = Date.now() % 1000000;
|
|
44
|
+
// Seeded PRNG (mulberry32) for consistent values
|
|
45
|
+
let _rngs = seed | 0;
|
|
46
|
+
const stableRand = (min, max) => {
|
|
47
|
+
_rngs = _rngs + 0x6D2B79F5 | 0;
|
|
48
|
+
let t = Math.imul(_rngs ^ _rngs >>> 15, 1 | _rngs);
|
|
49
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
50
|
+
const r = ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
51
|
+
return min + r * (max - min);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const CONFIG = {
|
|
55
|
+
// Navigator
|
|
56
|
+
userAgent: navigator.userAgent,
|
|
57
|
+
platform: navigator.platform || 'Win32',
|
|
58
|
+
vendor: 'Google Inc.',
|
|
59
|
+
vendorSub: '',
|
|
60
|
+
productSub: '20030107',
|
|
61
|
+
appCodeName: 'Mozilla',
|
|
62
|
+
appName: 'Netscape',
|
|
63
|
+
appVersion: navigator.appVersion,
|
|
64
|
+
product: 'Gecko',
|
|
65
|
+
language: navigator.language || 'en-US',
|
|
66
|
+
languages: Object.freeze(['en-US', 'en']),
|
|
67
|
+
hardwareConcurrency: navigator.hardwareConcurrency || 8,
|
|
68
|
+
deviceMemory: navigator.deviceMemory || 8,
|
|
69
|
+
maxTouchPoints: 0,
|
|
70
|
+
cookieEnabled: true,
|
|
71
|
+
onLine: true,
|
|
72
|
+
webdriver: false,
|
|
73
|
+
pdfViewerEnabled: true,
|
|
74
|
+
doNotTrack: null,
|
|
75
|
+
|
|
76
|
+
// Screen
|
|
77
|
+
screenWidth: screen.width || 1920,
|
|
78
|
+
screenHeight: screen.height || 1080,
|
|
79
|
+
availWidth: screen.availWidth || 1920,
|
|
80
|
+
availHeight: screen.availHeight || 1040,
|
|
81
|
+
colorDepth: 24,
|
|
82
|
+
pixelDepth: 24,
|
|
83
|
+
devicePixelRatio: window.devicePixelRatio || 1,
|
|
84
|
+
|
|
85
|
+
// Window
|
|
86
|
+
innerWidth: window.innerWidth || 1920,
|
|
87
|
+
innerHeight: window.innerHeight || 937,
|
|
88
|
+
outerWidth: window.outerWidth || 1920,
|
|
89
|
+
outerHeight: window.outerHeight || 1080,
|
|
90
|
+
screenX: 0,
|
|
91
|
+
screenY: 0,
|
|
92
|
+
screenLeft: 0,
|
|
93
|
+
screenTop: 0,
|
|
94
|
+
|
|
95
|
+
// Memory
|
|
96
|
+
jsHeapSizeLimit: 2172649472,
|
|
97
|
+
totalJSHeapSize: 18000000 + Math.floor(stableRand(0, 8000000)),
|
|
98
|
+
usedJSHeapSize: 12000000 + Math.floor(stableRand(0, 6000000)),
|
|
99
|
+
|
|
100
|
+
// Battery
|
|
101
|
+
batteryCharging: true,
|
|
102
|
+
batteryLevel: 0.85 + stableRand(0, 0.15),
|
|
103
|
+
|
|
104
|
+
// Connection
|
|
105
|
+
effectiveType: '4g',
|
|
106
|
+
rtt: 50 + Math.floor(stableRand(0, 50)),
|
|
107
|
+
downlink: 10 + stableRand(0, 40),
|
|
108
|
+
|
|
109
|
+
// Client Hints (CRITICAL for DataDome) - must match ua-ch.ts
|
|
110
|
+
brands: [
|
|
111
|
+
{ brand: 'Google Chrome', version: '134' },
|
|
112
|
+
{ brand: 'Chromium', version: '134' },
|
|
113
|
+
{ brand: 'Not_A Brand', version: '24' }
|
|
114
|
+
],
|
|
115
|
+
fullVersionList: [
|
|
116
|
+
{ brand: 'Google Chrome', version: '134.0.6998.88' },
|
|
117
|
+
{ brand: 'Chromium', version: '134.0.6998.88' },
|
|
118
|
+
{ brand: 'Not_A Brand', version: '24.0.0.0' }
|
|
119
|
+
],
|
|
120
|
+
architecture: 'x86',
|
|
121
|
+
bitness: '64',
|
|
122
|
+
model: '',
|
|
123
|
+
platformVersion: '15.0.0',
|
|
124
|
+
uaFullVersion: '134.0.6998.88',
|
|
125
|
+
wow64: false,
|
|
126
|
+
mobile: false,
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// ================================================================
|
|
130
|
+
// 1. ERROR STACK TRACE SANITIZATION (100+ checks detected)
|
|
131
|
+
// ================================================================
|
|
132
|
+
const sanitizeStacks = () => {
|
|
133
|
+
const patterns = [
|
|
134
|
+
/at Object\\.(?:get|set|construct|apply|has|deleteProperty) \\(<anonymous>:\\d+:\\d+\\)/g,
|
|
135
|
+
/at (?:Proxy|Reflect)\\.[a-zA-Z]+/g,
|
|
136
|
+
/<anonymous>:\\d+:\\d+/g,
|
|
137
|
+
/newHandler\\.<computed>/g,
|
|
138
|
+
/__puppeteer|__playwright|__selenium|__webdriver|__CDP/gi,
|
|
139
|
+
/pptr:|devtools:|chrome-extension:/g,
|
|
140
|
+
/evaluateOnNewDocument|addScriptToEvaluate/g,
|
|
141
|
+
/Runtime\\.evaluate|Page\\.addScript/g,
|
|
142
|
+
];
|
|
143
|
+
|
|
144
|
+
const clean = (stack) => {
|
|
145
|
+
if (!stack || typeof stack !== 'string') return stack;
|
|
146
|
+
let s = stack;
|
|
147
|
+
for (const p of patterns) s = s.replace(p, '');
|
|
148
|
+
return s.split('\\n').filter(l => l.trim() && l.trim() !== 'at').join('\\n');
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const OrigError = Error;
|
|
152
|
+
const errProxy = new Proxy(OrigError, {
|
|
153
|
+
construct(t, a) {
|
|
154
|
+
const e = Reflect.construct(t, a);
|
|
155
|
+
if (e.stack) {
|
|
156
|
+
const cleaned = clean(e.stack);
|
|
157
|
+
Object.defineProperty(e, 'stack', { get: () => cleaned, configurable: true });
|
|
158
|
+
}
|
|
159
|
+
return e;
|
|
160
|
+
},
|
|
161
|
+
apply(t, th, a) {
|
|
162
|
+
const e = Reflect.apply(t, th, a);
|
|
163
|
+
if (e?.stack) e.stack = clean(e.stack);
|
|
164
|
+
return e;
|
|
165
|
+
},
|
|
166
|
+
get(t, p) {
|
|
167
|
+
if (p === 'captureStackTrace') {
|
|
168
|
+
return function(obj, fn) {
|
|
169
|
+
OrigError.captureStackTrace(obj, fn);
|
|
170
|
+
if (obj.stack) {
|
|
171
|
+
const cleaned = clean(obj.stack);
|
|
172
|
+
Object.defineProperty(obj, 'stack', { get: () => cleaned, configurable: true });
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
return Reflect.get(t, p);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
try {
|
|
181
|
+
Object.defineProperty(window, 'Error', { value: errProxy, writable: true, configurable: true });
|
|
182
|
+
['TypeError', 'ReferenceError', 'SyntaxError', 'RangeError', 'URIError', 'EvalError'].forEach(n => {
|
|
183
|
+
if (window[n]) {
|
|
184
|
+
const O = window[n];
|
|
185
|
+
const P = new Proxy(O, {
|
|
186
|
+
construct(t, a) {
|
|
187
|
+
const e = Reflect.construct(t, a);
|
|
188
|
+
if (e.stack) e.stack = clean(e.stack);
|
|
189
|
+
return e;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
try { Object.defineProperty(window, n, { value: P, writable: true, configurable: true }); } catch {}
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
} catch {}
|
|
196
|
+
|
|
197
|
+
log('✓ Stack sanitization');
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
// ================================================================
|
|
201
|
+
// 2. NAVIGATOR.USERAGENTDATA.GETHIGHENTROPYVALUES() - CRITICAL
|
|
202
|
+
// (Date protection is handled by timing-consistency.ts to avoid conflicts)
|
|
203
|
+
// ================================================================
|
|
204
|
+
const spoofUserAgentData = () => {
|
|
205
|
+
if (!navigator.userAgentData) return;
|
|
206
|
+
|
|
207
|
+
const uaData = {
|
|
208
|
+
brands: CONFIG.brands,
|
|
209
|
+
mobile: CONFIG.mobile,
|
|
210
|
+
platform: CONFIG.platform.includes('Win') ? 'Windows' :
|
|
211
|
+
CONFIG.platform.includes('Mac') ? 'macOS' : 'Linux',
|
|
212
|
+
|
|
213
|
+
getHighEntropyValues: function(hints) {
|
|
214
|
+
const result = {
|
|
215
|
+
brands: CONFIG.brands,
|
|
216
|
+
mobile: CONFIG.mobile,
|
|
217
|
+
platform: this.platform,
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
if (hints.includes('architecture')) result.architecture = CONFIG.architecture;
|
|
221
|
+
if (hints.includes('bitness')) result.bitness = CONFIG.bitness;
|
|
222
|
+
if (hints.includes('model')) result.model = CONFIG.model;
|
|
223
|
+
if (hints.includes('platformVersion')) result.platformVersion = CONFIG.platformVersion;
|
|
224
|
+
if (hints.includes('uaFullVersion')) result.uaFullVersion = CONFIG.uaFullVersion;
|
|
225
|
+
if (hints.includes('fullVersionList')) result.fullVersionList = CONFIG.fullVersionList;
|
|
226
|
+
if (hints.includes('wow64')) result.wow64 = CONFIG.wow64;
|
|
227
|
+
|
|
228
|
+
return Promise.resolve(result);
|
|
229
|
+
},
|
|
230
|
+
|
|
231
|
+
toJSON: function() {
|
|
232
|
+
return {
|
|
233
|
+
brands: this.brands,
|
|
234
|
+
mobile: this.mobile,
|
|
235
|
+
platform: this.platform
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
// Make getHighEntropyValues look native
|
|
241
|
+
Object.defineProperty(uaData.getHighEntropyValues, 'toString', {
|
|
242
|
+
value: () => 'function getHighEntropyValues() { [native code] }',
|
|
243
|
+
configurable: false
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
try {
|
|
247
|
+
Object.defineProperty(navigator, 'userAgentData', {
|
|
248
|
+
get: () => uaData,
|
|
249
|
+
configurable: true
|
|
250
|
+
});
|
|
251
|
+
} catch {}
|
|
252
|
+
|
|
253
|
+
log('✓ userAgentData + getHighEntropyValues');
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
// ================================================================
|
|
257
|
+
// 4. ALL NAVIGATOR PROPERTIES
|
|
258
|
+
// ================================================================
|
|
259
|
+
const spoofNavigator = () => {
|
|
260
|
+
const props = {
|
|
261
|
+
platform: CONFIG.platform,
|
|
262
|
+
vendor: CONFIG.vendor,
|
|
263
|
+
vendorSub: CONFIG.vendorSub,
|
|
264
|
+
productSub: CONFIG.productSub,
|
|
265
|
+
appCodeName: CONFIG.appCodeName,
|
|
266
|
+
appName: CONFIG.appName,
|
|
267
|
+
product: CONFIG.product,
|
|
268
|
+
language: CONFIG.language,
|
|
269
|
+
languages: CONFIG.languages,
|
|
270
|
+
hardwareConcurrency: CONFIG.hardwareConcurrency,
|
|
271
|
+
deviceMemory: CONFIG.deviceMemory,
|
|
272
|
+
maxTouchPoints: CONFIG.maxTouchPoints,
|
|
273
|
+
cookieEnabled: CONFIG.cookieEnabled,
|
|
274
|
+
onLine: CONFIG.onLine,
|
|
275
|
+
webdriver: CONFIG.webdriver,
|
|
276
|
+
pdfViewerEnabled: CONFIG.pdfViewerEnabled,
|
|
277
|
+
doNotTrack: CONFIG.doNotTrack,
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
for (const [k, v] of Object.entries(props)) {
|
|
281
|
+
try {
|
|
282
|
+
Object.defineProperty(navigator, k, { get: () => v, configurable: true });
|
|
283
|
+
} catch {}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// cookieDeprecationLabel
|
|
287
|
+
try {
|
|
288
|
+
Object.defineProperty(navigator, 'cookieDeprecationLabel', {
|
|
289
|
+
get: () => undefined,
|
|
290
|
+
configurable: true
|
|
291
|
+
});
|
|
292
|
+
} catch {}
|
|
293
|
+
|
|
294
|
+
// loadPurpose
|
|
295
|
+
try {
|
|
296
|
+
Object.defineProperty(navigator, 'loadPurpose', {
|
|
297
|
+
get: () => undefined,
|
|
298
|
+
configurable: true
|
|
299
|
+
});
|
|
300
|
+
} catch {}
|
|
301
|
+
|
|
302
|
+
log('✓ Navigator (20+ props)');
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
// ================================================================
|
|
306
|
+
// 5. ALL SCREEN PROPERTIES
|
|
307
|
+
// ================================================================
|
|
308
|
+
const spoofScreen = () => {
|
|
309
|
+
const props = {
|
|
310
|
+
width: CONFIG.screenWidth,
|
|
311
|
+
height: CONFIG.screenHeight,
|
|
312
|
+
availWidth: CONFIG.availWidth,
|
|
313
|
+
availHeight: CONFIG.availHeight,
|
|
314
|
+
colorDepth: CONFIG.colorDepth,
|
|
315
|
+
pixelDepth: CONFIG.pixelDepth,
|
|
316
|
+
availLeft: 0,
|
|
317
|
+
availTop: 0,
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
for (const [k, v] of Object.entries(props)) {
|
|
321
|
+
try {
|
|
322
|
+
Object.defineProperty(screen, k, { get: () => v, configurable: true });
|
|
323
|
+
} catch {}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// Screen orientation
|
|
327
|
+
if (screen.orientation) {
|
|
328
|
+
try {
|
|
329
|
+
Object.defineProperty(screen.orientation, 'type', { get: () => 'landscape-primary', configurable: true });
|
|
330
|
+
Object.defineProperty(screen.orientation, 'angle', { get: () => 0, configurable: true });
|
|
331
|
+
} catch {}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
log('✓ Screen (all props)');
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
// ================================================================
|
|
338
|
+
// 6. ALL WINDOW PROPERTIES
|
|
339
|
+
// ================================================================
|
|
340
|
+
const spoofWindow = () => {
|
|
341
|
+
const props = {
|
|
342
|
+
devicePixelRatio: CONFIG.devicePixelRatio,
|
|
343
|
+
screenX: CONFIG.screenX,
|
|
344
|
+
screenY: CONFIG.screenY,
|
|
345
|
+
screenLeft: CONFIG.screenLeft,
|
|
346
|
+
screenTop: CONFIG.screenTop,
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
for (const [k, v] of Object.entries(props)) {
|
|
350
|
+
try {
|
|
351
|
+
Object.defineProperty(window, k, { get: () => v, configurable: true });
|
|
352
|
+
} catch {}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// Frame detection
|
|
356
|
+
if (window === window.top) {
|
|
357
|
+
try {
|
|
358
|
+
Object.defineProperty(window, 'self', { get: () => window, configurable: true });
|
|
359
|
+
Object.defineProperty(window, 'top', { get: () => window, configurable: true });
|
|
360
|
+
Object.defineProperty(window, 'parent', { get: () => window, configurable: true });
|
|
361
|
+
Object.defineProperty(window, 'frameElement', { get: () => null, configurable: true });
|
|
362
|
+
} catch {}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// window.name filter
|
|
366
|
+
let wName = '';
|
|
367
|
+
try {
|
|
368
|
+
Object.defineProperty(window, 'name', {
|
|
369
|
+
get: () => wName,
|
|
370
|
+
set: (v) => { if (!String(v).match(/puppet|playwright|selenium/i)) wName = v; },
|
|
371
|
+
configurable: true
|
|
372
|
+
});
|
|
373
|
+
} catch {}
|
|
374
|
+
|
|
375
|
+
log('✓ Window (all props)');
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
// ================================================================
|
|
379
|
+
// 7. PERFORMANCE.MEMORY (Critical for iframe detection)
|
|
380
|
+
// ================================================================
|
|
381
|
+
const spoofPerformanceMemory = () => {
|
|
382
|
+
const mem = Object.freeze({
|
|
383
|
+
jsHeapSizeLimit: CONFIG.jsHeapSizeLimit,
|
|
384
|
+
totalJSHeapSize: CONFIG.totalJSHeapSize,
|
|
385
|
+
usedJSHeapSize: CONFIG.usedJSHeapSize,
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
try {
|
|
389
|
+
Object.defineProperty(performance, 'memory', { get: () => mem, configurable: true });
|
|
390
|
+
} catch {}
|
|
391
|
+
|
|
392
|
+
// performance.now jitter
|
|
393
|
+
const origNow = performance.now.bind(performance);
|
|
394
|
+
let last = 0;
|
|
395
|
+
performance.now = function() {
|
|
396
|
+
let n = origNow();
|
|
397
|
+
if (n <= last) n = last + 0.001 + Math.random() * 0.001;
|
|
398
|
+
last = n;
|
|
399
|
+
return n;
|
|
400
|
+
};
|
|
401
|
+
Object.defineProperty(performance.now, 'toString', {
|
|
402
|
+
value: () => 'function now() { [native code] }',
|
|
403
|
+
configurable: false
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
// performance.timeOrigin
|
|
407
|
+
const origTimeOrigin = performance.timeOrigin;
|
|
408
|
+
try {
|
|
409
|
+
Object.defineProperty(performance, 'timeOrigin', {
|
|
410
|
+
get: () => origTimeOrigin,
|
|
411
|
+
configurable: true
|
|
412
|
+
});
|
|
413
|
+
} catch {}
|
|
414
|
+
|
|
415
|
+
// Filter suspicious performance entries
|
|
416
|
+
if (performance.getEntries) {
|
|
417
|
+
const origGetEntries = performance.getEntries.bind(performance);
|
|
418
|
+
performance.getEntries = function() {
|
|
419
|
+
return origGetEntries().filter(e =>
|
|
420
|
+
!e.name?.includes('puppeteer') &&
|
|
421
|
+
!e.name?.includes('playwright') &&
|
|
422
|
+
!e.name?.includes('chrome-extension')
|
|
423
|
+
);
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if (performance.getEntriesByType) {
|
|
428
|
+
const orig = performance.getEntriesByType.bind(performance);
|
|
429
|
+
performance.getEntriesByType = function(type) {
|
|
430
|
+
return orig(type).filter(e =>
|
|
431
|
+
!e.name?.includes('puppeteer') &&
|
|
432
|
+
!e.name?.includes('playwright')
|
|
433
|
+
);
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
log('✓ Performance (memory, now, entries)');
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
// ================================================================
|
|
441
|
+
// 8. BATTERY API
|
|
442
|
+
// ================================================================
|
|
443
|
+
const spoofBattery = () => {
|
|
444
|
+
if (!navigator.getBattery) return;
|
|
445
|
+
|
|
446
|
+
const battery = {
|
|
447
|
+
charging: CONFIG.batteryCharging,
|
|
448
|
+
chargingTime: 0,
|
|
449
|
+
dischargingTime: Infinity,
|
|
450
|
+
level: CONFIG.batteryLevel,
|
|
451
|
+
addEventListener: () => {},
|
|
452
|
+
removeEventListener: () => {},
|
|
453
|
+
dispatchEvent: () => true,
|
|
454
|
+
onchargingchange: null,
|
|
455
|
+
onchargingtimechange: null,
|
|
456
|
+
ondischargingtimechange: null,
|
|
457
|
+
onlevelchange: null,
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
navigator.getBattery = function() {
|
|
461
|
+
return Promise.resolve(battery);
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
Object.defineProperty(navigator.getBattery, 'toString', {
|
|
465
|
+
value: () => 'function getBattery() { [native code] }',
|
|
466
|
+
configurable: false
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
log('✓ Battery API');
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
// ================================================================
|
|
473
|
+
// 9. PERMISSIONS API
|
|
474
|
+
// ================================================================
|
|
475
|
+
const spoofPermissions = () => {
|
|
476
|
+
if (!navigator.permissions?.query) return;
|
|
477
|
+
|
|
478
|
+
const orig = navigator.permissions.query.bind(navigator.permissions);
|
|
479
|
+
const states = {
|
|
480
|
+
'geolocation': 'prompt',
|
|
481
|
+
'notifications': 'default',
|
|
482
|
+
'push': 'prompt',
|
|
483
|
+
'midi': 'granted',
|
|
484
|
+
'camera': 'prompt',
|
|
485
|
+
'microphone': 'prompt',
|
|
486
|
+
'background-fetch': 'granted',
|
|
487
|
+
'background-sync': 'granted',
|
|
488
|
+
'persistent-storage': 'prompt',
|
|
489
|
+
'accelerometer': 'granted',
|
|
490
|
+
'gyroscope': 'granted',
|
|
491
|
+
'magnetometer': 'granted',
|
|
492
|
+
'clipboard-read': 'prompt',
|
|
493
|
+
'clipboard-write': 'granted',
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
navigator.permissions.query = function(desc) {
|
|
497
|
+
const name = desc?.name;
|
|
498
|
+
if (name && states[name]) {
|
|
499
|
+
return Promise.resolve({
|
|
500
|
+
state: states[name],
|
|
501
|
+
name,
|
|
502
|
+
onchange: null,
|
|
503
|
+
addEventListener: () => {},
|
|
504
|
+
removeEventListener: () => {},
|
|
505
|
+
dispatchEvent: () => true,
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
return orig(desc).catch(() => ({
|
|
509
|
+
state: 'prompt',
|
|
510
|
+
name,
|
|
511
|
+
onchange: null,
|
|
512
|
+
addEventListener: () => {},
|
|
513
|
+
removeEventListener: () => {},
|
|
514
|
+
dispatchEvent: () => true,
|
|
515
|
+
}));
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
Object.defineProperty(navigator.permissions.query, 'toString', {
|
|
519
|
+
value: () => 'function query() { [native code] }',
|
|
520
|
+
configurable: false
|
|
521
|
+
});
|
|
522
|
+
|
|
523
|
+
log('✓ Permissions API');
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
// ================================================================
|
|
527
|
+
// 10. KEYBOARD API
|
|
528
|
+
// ================================================================
|
|
529
|
+
const spoofKeyboard = () => {
|
|
530
|
+
if (!navigator.keyboard) return;
|
|
531
|
+
|
|
532
|
+
const layout = new Map([
|
|
533
|
+
['KeyQ', 'q'], ['KeyW', 'w'], ['KeyE', 'e'], ['KeyR', 'r'], ['KeyT', 't'],
|
|
534
|
+
['KeyY', 'y'], ['KeyU', 'u'], ['KeyI', 'i'], ['KeyO', 'o'], ['KeyP', 'p'],
|
|
535
|
+
['KeyA', 'a'], ['KeyS', 's'], ['KeyD', 'd'], ['KeyF', 'f'], ['KeyG', 'g'],
|
|
536
|
+
['KeyH', 'h'], ['KeyJ', 'j'], ['KeyK', 'k'], ['KeyL', 'l'],
|
|
537
|
+
['KeyZ', 'z'], ['KeyX', 'x'], ['KeyC', 'c'], ['KeyV', 'v'], ['KeyB', 'b'],
|
|
538
|
+
['KeyN', 'n'], ['KeyM', 'm'],
|
|
539
|
+
['Digit1', '1'], ['Digit2', '2'], ['Digit3', '3'], ['Digit4', '4'], ['Digit5', '5'],
|
|
540
|
+
['Digit6', '6'], ['Digit7', '7'], ['Digit8', '8'], ['Digit9', '9'], ['Digit0', '0'],
|
|
541
|
+
['Space', ' '], ['Enter', 'Enter'], ['Backspace', 'Backspace'], ['Tab', 'Tab'],
|
|
542
|
+
]);
|
|
543
|
+
|
|
544
|
+
const layoutMap = {
|
|
545
|
+
entries: () => layout.entries(),
|
|
546
|
+
keys: () => layout.keys(),
|
|
547
|
+
values: () => layout.values(),
|
|
548
|
+
get: (k) => layout.get(k),
|
|
549
|
+
has: (k) => layout.has(k),
|
|
550
|
+
forEach: (cb, t) => layout.forEach(cb, t),
|
|
551
|
+
size: layout.size,
|
|
552
|
+
[Symbol.iterator]: () => layout[Symbol.iterator](),
|
|
553
|
+
[Symbol.toStringTag]: 'KeyboardLayoutMap',
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
navigator.keyboard.getLayoutMap = function() {
|
|
557
|
+
return Promise.resolve(layoutMap);
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
Object.defineProperty(navigator.keyboard.getLayoutMap, 'toString', {
|
|
561
|
+
value: () => 'function getLayoutMap() { [native code] }',
|
|
562
|
+
configurable: false
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
log('✓ Keyboard API');
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
// ================================================================
|
|
569
|
+
// 11. MEDIA DEVICES
|
|
570
|
+
// NOTE: Removed - webrtc-spoofing.ts now handles enumerateDevices with
|
|
571
|
+
// crypto-random device IDs that change per session. Having two overrides
|
|
572
|
+
// for the same API creates inconsistency and double-wrapping detection.
|
|
573
|
+
const spoofMediaDevices = () => {
|
|
574
|
+
log('⊘ MediaDevices (handled by webrtc-spoofing module)');
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
// ================================================================
|
|
578
|
+
// 12. STORAGE QUOTA
|
|
579
|
+
// ================================================================
|
|
580
|
+
const spoofStorage = () => {
|
|
581
|
+
if (navigator.storage?.estimate) {
|
|
582
|
+
navigator.storage.estimate = function() {
|
|
583
|
+
return Promise.resolve({
|
|
584
|
+
quota: 2147483648000,
|
|
585
|
+
usage: 50 * 1024 * 1024 + Math.floor(stableRand(0, 10 * 1024 * 1024)),
|
|
586
|
+
usageDetails: { indexedDB: 30 * 1024 * 1024, caches: 15 * 1024 * 1024 }
|
|
587
|
+
});
|
|
588
|
+
};
|
|
589
|
+
Object.defineProperty(navigator.storage.estimate, 'toString', {
|
|
590
|
+
value: () => 'function estimate() { [native code] }',
|
|
591
|
+
configurable: false
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
log('✓ Storage quota');
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
// ================================================================
|
|
599
|
+
// 13. PLUGINS & MIMETYPES
|
|
600
|
+
// ================================================================
|
|
601
|
+
const spoofPlugins = () => {
|
|
602
|
+
const pdf = { type: 'application/pdf', suffixes: 'pdf', description: 'PDF', enabledPlugin: null };
|
|
603
|
+
const plugins = [
|
|
604
|
+
{ name: 'PDF Viewer', filename: 'internal-pdf-viewer', description: 'PDF', length: 1, 0: pdf, [Symbol.iterator]: function*() { yield pdf; } },
|
|
605
|
+
{ name: 'Chrome PDF Viewer', filename: 'internal-pdf-viewer', description: 'PDF', length: 1, 0: pdf, [Symbol.iterator]: function*() { yield pdf; } },
|
|
606
|
+
];
|
|
607
|
+
|
|
608
|
+
const pluginArray = {
|
|
609
|
+
length: plugins.length,
|
|
610
|
+
item: (i) => plugins[i],
|
|
611
|
+
namedItem: (n) => plugins.find(p => p.name === n),
|
|
612
|
+
refresh: () => {},
|
|
613
|
+
[Symbol.iterator]: function*() { for (const p of plugins) yield p; },
|
|
614
|
+
};
|
|
615
|
+
plugins.forEach((p, i) => { pluginArray[i] = p; });
|
|
616
|
+
|
|
617
|
+
try {
|
|
618
|
+
Object.defineProperty(navigator, 'plugins', { get: () => pluginArray, configurable: true });
|
|
619
|
+
} catch {}
|
|
620
|
+
|
|
621
|
+
const mimes = [pdf];
|
|
622
|
+
const mimeArray = {
|
|
623
|
+
length: mimes.length,
|
|
624
|
+
item: (i) => mimes[i],
|
|
625
|
+
namedItem: (n) => mimes.find(m => m.type === n),
|
|
626
|
+
[Symbol.iterator]: function*() { for (const m of mimes) yield m; },
|
|
627
|
+
};
|
|
628
|
+
mimes.forEach((m, i) => { mimeArray[i] = m; });
|
|
629
|
+
|
|
630
|
+
try {
|
|
631
|
+
Object.defineProperty(navigator, 'mimeTypes', { get: () => mimeArray, configurable: true });
|
|
632
|
+
} catch {}
|
|
633
|
+
|
|
634
|
+
log('✓ Plugins/MimeTypes');
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
// ================================================================
|
|
638
|
+
// 14. CONNECTION API
|
|
639
|
+
// ================================================================
|
|
640
|
+
const spoofConnection = () => {
|
|
641
|
+
if (!navigator.connection) return;
|
|
642
|
+
|
|
643
|
+
const props = {
|
|
644
|
+
effectiveType: CONFIG.effectiveType,
|
|
645
|
+
rtt: CONFIG.rtt,
|
|
646
|
+
downlink: CONFIG.downlink,
|
|
647
|
+
saveData: false,
|
|
648
|
+
type: 'wifi',
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
for (const [k, v] of Object.entries(props)) {
|
|
652
|
+
try {
|
|
653
|
+
Object.defineProperty(navigator.connection, k, { get: () => v, configurable: true });
|
|
654
|
+
} catch {}
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
log('✓ Connection API');
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
// ================================================================
|
|
661
|
+
// 15. SERVICE WORKER
|
|
662
|
+
// ================================================================
|
|
663
|
+
const protectServiceWorker = () => {
|
|
664
|
+
if (!navigator.serviceWorker) return;
|
|
665
|
+
|
|
666
|
+
const orig = navigator.serviceWorker.register;
|
|
667
|
+
if (orig) {
|
|
668
|
+
navigator.serviceWorker.register = function(url, opts) {
|
|
669
|
+
return orig.call(this, url, opts);
|
|
670
|
+
};
|
|
671
|
+
Object.defineProperty(navigator.serviceWorker.register, 'toString', {
|
|
672
|
+
value: () => 'function register() { [native code] }',
|
|
673
|
+
configurable: false
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
log('✓ ServiceWorker');
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
// ================================================================
|
|
681
|
+
// 16. HISTORY API
|
|
682
|
+
// ================================================================
|
|
683
|
+
const protectHistory = () => {
|
|
684
|
+
const wrap = (m, n) => {
|
|
685
|
+
const o = history[m];
|
|
686
|
+
if (!o) return;
|
|
687
|
+
history[m] = function(...a) { return o.apply(this, a); };
|
|
688
|
+
Object.defineProperty(history[m], 'toString', {
|
|
689
|
+
value: () => \`function \${n}() { [native code] }\`,
|
|
690
|
+
configurable: false
|
|
691
|
+
});
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
wrap('pushState', 'pushState');
|
|
695
|
+
wrap('replaceState', 'replaceState');
|
|
696
|
+
wrap('go', 'go');
|
|
697
|
+
wrap('back', 'back');
|
|
698
|
+
wrap('forward', 'forward');
|
|
699
|
+
|
|
700
|
+
try {
|
|
701
|
+
let sr = 'auto';
|
|
702
|
+
Object.defineProperty(history, 'scrollRestoration', {
|
|
703
|
+
get: () => sr,
|
|
704
|
+
set: (v) => { if (v === 'auto' || v === 'manual') sr = v; },
|
|
705
|
+
configurable: true
|
|
706
|
+
});
|
|
707
|
+
} catch {}
|
|
708
|
+
|
|
709
|
+
log('✓ History API');
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
// ================================================================
|
|
713
|
+
// 17. DOCUMENT PROPERTIES
|
|
714
|
+
// ================================================================
|
|
715
|
+
const protectDocument = () => {
|
|
716
|
+
try {
|
|
717
|
+
Object.defineProperty(document, 'hidden', { get: () => false, configurable: true });
|
|
718
|
+
Object.defineProperty(document, 'visibilityState', { get: () => 'visible', configurable: true });
|
|
719
|
+
} catch {}
|
|
720
|
+
|
|
721
|
+
const origHasFocus = document.hasFocus;
|
|
722
|
+
document.hasFocus = function() { return true; };
|
|
723
|
+
Object.defineProperty(document.hasFocus, 'toString', {
|
|
724
|
+
value: () => 'function hasFocus() { [native code] }',
|
|
725
|
+
configurable: false
|
|
726
|
+
});
|
|
727
|
+
|
|
728
|
+
// Referrer
|
|
729
|
+
const ref = document.referrer;
|
|
730
|
+
try {
|
|
731
|
+
Object.defineProperty(document, 'referrer', { get: () => ref || '', configurable: true });
|
|
732
|
+
} catch {}
|
|
733
|
+
|
|
734
|
+
// Title
|
|
735
|
+
try {
|
|
736
|
+
const origTitle = document.title;
|
|
737
|
+
Object.defineProperty(document, 'title', {
|
|
738
|
+
get: () => origTitle,
|
|
739
|
+
set: (v) => { document.querySelector('title')?.textContent && (document.querySelector('title').textContent = v); },
|
|
740
|
+
configurable: true
|
|
741
|
+
});
|
|
742
|
+
} catch {}
|
|
743
|
+
|
|
744
|
+
log('✓ Document');
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
// ================================================================
|
|
748
|
+
// 18. IFRAME FINGERPRINT CONSISTENCY
|
|
749
|
+
// ================================================================
|
|
750
|
+
const protectIframes = () => {
|
|
751
|
+
const origDesc = Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype, 'contentWindow');
|
|
752
|
+
if (!origDesc) return;
|
|
753
|
+
|
|
754
|
+
Object.defineProperty(HTMLIFrameElement.prototype, 'contentWindow', {
|
|
755
|
+
get() {
|
|
756
|
+
const cw = origDesc.get.call(this);
|
|
757
|
+
if (!cw) return cw;
|
|
758
|
+
|
|
759
|
+
try {
|
|
760
|
+
const _ = cw.document;
|
|
761
|
+
return new Proxy(cw, {
|
|
762
|
+
get(t, p) {
|
|
763
|
+
if (p === 'navigator') {
|
|
764
|
+
return new Proxy(t.navigator, {
|
|
765
|
+
get(n, np) {
|
|
766
|
+
if (np === 'webdriver') return false;
|
|
767
|
+
if (np === 'platform') return CONFIG.platform;
|
|
768
|
+
if (np === 'hardwareConcurrency') return CONFIG.hardwareConcurrency;
|
|
769
|
+
if (np === 'deviceMemory') return CONFIG.deviceMemory;
|
|
770
|
+
if (np === 'languages') return CONFIG.languages;
|
|
771
|
+
if (np === 'language') return CONFIG.language;
|
|
772
|
+
const v = n[np];
|
|
773
|
+
return typeof v === 'function' ? v.bind(n) : v;
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
if (p === 'screen') {
|
|
778
|
+
return new Proxy(t.screen, {
|
|
779
|
+
get(s, sp) {
|
|
780
|
+
if (sp === 'width') return CONFIG.screenWidth;
|
|
781
|
+
if (sp === 'height') return CONFIG.screenHeight;
|
|
782
|
+
if (sp === 'availWidth') return CONFIG.availWidth;
|
|
783
|
+
if (sp === 'availHeight') return CONFIG.availHeight;
|
|
784
|
+
if (sp === 'colorDepth') return CONFIG.colorDepth;
|
|
785
|
+
if (sp === 'pixelDepth') return CONFIG.pixelDepth;
|
|
786
|
+
const v = s[sp];
|
|
787
|
+
return typeof v === 'function' ? v.bind(s) : v;
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
const v = t[p];
|
|
792
|
+
return typeof v === 'function' ? v.bind(t) : v;
|
|
793
|
+
}
|
|
794
|
+
});
|
|
795
|
+
} catch {
|
|
796
|
+
return cw;
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
configurable: true
|
|
800
|
+
});
|
|
801
|
+
|
|
802
|
+
log('✓ Iframe consistency');
|
|
803
|
+
};
|
|
804
|
+
|
|
805
|
+
// ================================================================
|
|
806
|
+
// 19. WEBGL PROTECTION
|
|
807
|
+
// ================================================================
|
|
808
|
+
const protectWebGL = () => {
|
|
809
|
+
let vendor = null, renderer = null;
|
|
810
|
+
|
|
811
|
+
const patch = (proto) => {
|
|
812
|
+
if (!proto) return;
|
|
813
|
+
const orig = proto.getParameter;
|
|
814
|
+
proto.getParameter = function(p) {
|
|
815
|
+
if (p === 0x9245) { if (!vendor) vendor = orig.call(this, p); return vendor; }
|
|
816
|
+
if (p === 0x9246) { if (!renderer) renderer = orig.call(this, p); return renderer; }
|
|
817
|
+
return orig.call(this, p);
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
patch(WebGLRenderingContext?.prototype);
|
|
822
|
+
if (typeof WebGL2RenderingContext !== 'undefined') patch(WebGL2RenderingContext.prototype);
|
|
823
|
+
|
|
824
|
+
log('✓ WebGL');
|
|
825
|
+
};
|
|
826
|
+
|
|
827
|
+
// ================================================================
|
|
828
|
+
// 20. CANVAS PROTECTION
|
|
829
|
+
// ================================================================
|
|
830
|
+
const protectCanvas = () => {
|
|
831
|
+
const cache = new WeakMap();
|
|
832
|
+
const orig = HTMLCanvasElement.prototype.toDataURL;
|
|
833
|
+
|
|
834
|
+
HTMLCanvasElement.prototype.toDataURL = function(...a) {
|
|
835
|
+
const k = this.width + 'x' + this.height + (a[0] || '');
|
|
836
|
+
if (cache.has(this)) {
|
|
837
|
+
const c = cache.get(this);
|
|
838
|
+
if (c.k === k) return c.r;
|
|
839
|
+
}
|
|
840
|
+
const r = orig.apply(this, a);
|
|
841
|
+
cache.set(this, { k, r });
|
|
842
|
+
return r;
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
log('✓ Canvas');
|
|
846
|
+
};
|
|
847
|
+
|
|
848
|
+
// ================================================================
|
|
849
|
+
// 21. REQUESTANIMATIONFRAME TIMING
|
|
850
|
+
// ================================================================
|
|
851
|
+
const protectRAF = () => {
|
|
852
|
+
const origRAF = window.requestAnimationFrame;
|
|
853
|
+
const origCAF = window.cancelAnimationFrame;
|
|
854
|
+
const pending = new Map();
|
|
855
|
+
let nextId = 1;
|
|
856
|
+
|
|
857
|
+
window.requestAnimationFrame = function(cb) {
|
|
858
|
+
const id = nextId++;
|
|
859
|
+
const jitter = Math.random() * 2;
|
|
860
|
+
const realId = origRAF.call(this, (ts) => {
|
|
861
|
+
pending.delete(id);
|
|
862
|
+
cb(ts + jitter);
|
|
863
|
+
});
|
|
864
|
+
pending.set(id, realId);
|
|
865
|
+
return id;
|
|
866
|
+
};
|
|
867
|
+
|
|
868
|
+
window.cancelAnimationFrame = function(id) {
|
|
869
|
+
const realId = pending.get(id);
|
|
870
|
+
if (realId !== undefined) {
|
|
871
|
+
pending.delete(id);
|
|
872
|
+
return origCAF.call(this, realId);
|
|
873
|
+
}
|
|
874
|
+
return origCAF.call(this, id);
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
Object.defineProperty(window.requestAnimationFrame, 'toString', {
|
|
878
|
+
value: () => 'function requestAnimationFrame() { [native code] }',
|
|
879
|
+
configurable: false
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
log('✓ RAF timing');
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
// ================================================================
|
|
886
|
+
// 22. NATIVE FUNCTION TOSTRING (50+ constructors)
|
|
887
|
+
// ================================================================
|
|
888
|
+
const protectToString = () => {
|
|
889
|
+
const ctors = [
|
|
890
|
+
'Proxy', 'Reflect', 'Promise', 'Map', 'Set', 'WeakMap', 'WeakSet',
|
|
891
|
+
'Symbol', 'ArrayBuffer', 'DataView', 'Date', 'Error', 'TypeError',
|
|
892
|
+
'ReferenceError', 'SyntaxError', 'RangeError', 'URIError', 'EvalError',
|
|
893
|
+
'MutationObserver', 'IntersectionObserver', 'ResizeObserver',
|
|
894
|
+
'PerformanceObserver', 'Worker', 'SharedWorker',
|
|
895
|
+
'CompressionStream', 'DecompressionStream', 'ReadableStream',
|
|
896
|
+
'WritableStream', 'TransformStream', 'TextEncoder', 'TextDecoder',
|
|
897
|
+
'Blob', 'File', 'FileReader', 'URL', 'URLSearchParams',
|
|
898
|
+
'WebSocket', 'EventSource', 'XMLHttpRequest',
|
|
899
|
+
'Request', 'Response', 'Headers', 'FormData',
|
|
900
|
+
'AudioContext', 'OfflineAudioContext',
|
|
901
|
+
'RTCPeerConnection', 'MediaStream', 'MediaRecorder',
|
|
902
|
+
'Notification', 'BroadcastChannel', 'MessageChannel',
|
|
903
|
+
'Intl', 'JSON', 'Math', 'console',
|
|
904
|
+
];
|
|
905
|
+
|
|
906
|
+
for (const n of ctors) {
|
|
907
|
+
const c = window[n];
|
|
908
|
+
if (!c) continue;
|
|
909
|
+
try {
|
|
910
|
+
Object.defineProperty(c, 'toString', {
|
|
911
|
+
value: function() { return \`function \${n}() { [native code] }\`; },
|
|
912
|
+
writable: true, configurable: true
|
|
913
|
+
});
|
|
914
|
+
} catch {}
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
// NOTE: Function.prototype.toString is already patched by utils.ts
|
|
918
|
+
// with a comprehensive WeakMap-based system. Do NOT override it again -
|
|
919
|
+
// clobbering it breaks toString masking for ALL other modules.
|
|
920
|
+
// Instead, register our overridden functions with the stealth utils system.
|
|
921
|
+
const _s = typeof __stealth !== 'undefined' ? __stealth : {};
|
|
922
|
+
if (_s.utils) {
|
|
923
|
+
ctors.forEach(name => {
|
|
924
|
+
try {
|
|
925
|
+
const ctor = window[name];
|
|
926
|
+
if (typeof ctor === 'function') {
|
|
927
|
+
_s.utils.registerNativeFunction(ctor, name);
|
|
928
|
+
}
|
|
929
|
+
} catch {}
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
log('✓ toString (registered with stealth utils)');
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
// ================================================================
|
|
937
|
+
// 23. CSS.SUPPORTS & GETCOMPUTEDSTYLE
|
|
938
|
+
// ================================================================
|
|
939
|
+
const protectCSS = () => {
|
|
940
|
+
if (typeof CSS !== 'undefined' && CSS.supports) {
|
|
941
|
+
const orig = CSS.supports;
|
|
942
|
+
CSS.supports = function(...a) { return orig.apply(this, a); };
|
|
943
|
+
Object.defineProperty(CSS.supports, 'toString', {
|
|
944
|
+
value: () => 'function supports() { [native code] }',
|
|
945
|
+
configurable: false
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
const origGCS = window.getComputedStyle;
|
|
950
|
+
window.getComputedStyle = function(...a) { return origGCS.apply(this, a); };
|
|
951
|
+
Object.defineProperty(window.getComputedStyle, 'toString', {
|
|
952
|
+
value: () => 'function getComputedStyle() { [native code] }',
|
|
953
|
+
configurable: false
|
|
954
|
+
});
|
|
955
|
+
|
|
956
|
+
log('✓ CSS');
|
|
957
|
+
};
|
|
958
|
+
|
|
959
|
+
// ================================================================
|
|
960
|
+
// 24. MATCHMEDIA
|
|
961
|
+
// ================================================================
|
|
962
|
+
const protectMatchMedia = () => {
|
|
963
|
+
const orig = window.matchMedia;
|
|
964
|
+
const overrides = {
|
|
965
|
+
'(hover: hover)': true,
|
|
966
|
+
'(hover: none)': false,
|
|
967
|
+
'(pointer: fine)': true,
|
|
968
|
+
'(pointer: coarse)': false,
|
|
969
|
+
'(any-pointer: fine)': true,
|
|
970
|
+
'(any-pointer: coarse)': false,
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
window.matchMedia = function(q) {
|
|
974
|
+
const r = orig.call(this, q);
|
|
975
|
+
if (q in overrides) return { ...r, matches: overrides[q] };
|
|
976
|
+
return r;
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
Object.defineProperty(window.matchMedia, 'toString', {
|
|
980
|
+
value: () => 'function matchMedia() { [native code] }',
|
|
981
|
+
configurable: false
|
|
982
|
+
});
|
|
983
|
+
|
|
984
|
+
log('✓ matchMedia');
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
// ================================================================
|
|
988
|
+
// 25. FETCH PROTECTION
|
|
989
|
+
// ================================================================
|
|
990
|
+
const protectFetch = () => {
|
|
991
|
+
const orig = window.fetch;
|
|
992
|
+
|
|
993
|
+
window.fetch = function(input, init = {}) {
|
|
994
|
+
if (!init.headers) init.headers = {};
|
|
995
|
+
if (init.headers instanceof Headers) {
|
|
996
|
+
const obj = {};
|
|
997
|
+
init.headers.forEach((v, k) => { obj[k] = v; });
|
|
998
|
+
init.headers = obj;
|
|
999
|
+
}
|
|
1000
|
+
if (!init.headers['Accept-Language']) {
|
|
1001
|
+
init.headers['Accept-Language'] = CONFIG.language + ',' + CONFIG.language.split('-')[0] + ';q=0.9';
|
|
1002
|
+
}
|
|
1003
|
+
return orig.call(this, input, init);
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
Object.defineProperty(window.fetch, 'toString', {
|
|
1007
|
+
value: () => 'function fetch() { [native code] }',
|
|
1008
|
+
configurable: false
|
|
1009
|
+
});
|
|
1010
|
+
|
|
1011
|
+
log('✓ Fetch');
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
// ================================================================
|
|
1015
|
+
// 26. LOCALSTORAGE/SESSIONSTORAGE PROTECTION
|
|
1016
|
+
// ================================================================
|
|
1017
|
+
const protectLocalStorage = () => {
|
|
1018
|
+
// Wrap storage methods to look native
|
|
1019
|
+
['localStorage', 'sessionStorage'].forEach(storageName => {
|
|
1020
|
+
const storage = window[storageName];
|
|
1021
|
+
if (!storage) return;
|
|
1022
|
+
|
|
1023
|
+
['getItem', 'setItem', 'removeItem', 'clear', 'key'].forEach(method => {
|
|
1024
|
+
const orig = storage[method];
|
|
1025
|
+
if (!orig) return;
|
|
1026
|
+
storage[method] = function(...args) {
|
|
1027
|
+
return orig.apply(this, args);
|
|
1028
|
+
};
|
|
1029
|
+
Object.defineProperty(storage[method], 'toString', {
|
|
1030
|
+
value: () => \`function \${method}() { [native code] }\`,
|
|
1031
|
+
configurable: false
|
|
1032
|
+
});
|
|
1033
|
+
});
|
|
1034
|
+
});
|
|
1035
|
+
|
|
1036
|
+
log('✓ Storage');
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
// ================================================================
|
|
1040
|
+
// 27. INTL API
|
|
1041
|
+
// ================================================================
|
|
1042
|
+
const protectIntl = () => {
|
|
1043
|
+
if (typeof Intl === 'undefined') return;
|
|
1044
|
+
|
|
1045
|
+
['DateTimeFormat', 'NumberFormat', 'Collator', 'PluralRules', 'RelativeTimeFormat'].forEach(name => {
|
|
1046
|
+
const Ctor = Intl[name];
|
|
1047
|
+
if (!Ctor) return;
|
|
1048
|
+
|
|
1049
|
+
try {
|
|
1050
|
+
Object.defineProperty(Ctor, 'toString', {
|
|
1051
|
+
value: () => \`function \${name}() { [native code] }\`,
|
|
1052
|
+
configurable: true
|
|
1053
|
+
});
|
|
1054
|
+
} catch {}
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
log('✓ Intl');
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
// ================================================================
|
|
1061
|
+
// 28. SETTIMEOUT TIMING VARIANCE
|
|
1062
|
+
// ================================================================
|
|
1063
|
+
const protectSetTimeout = () => {
|
|
1064
|
+
const orig = window.setTimeout;
|
|
1065
|
+
|
|
1066
|
+
window.setTimeout = function(cb, delay, ...args) {
|
|
1067
|
+
// Add variance to short delays (DataDome detection)
|
|
1068
|
+
if (delay !== undefined && delay < 100) {
|
|
1069
|
+
delay = delay + Math.floor(Math.random() * 30);
|
|
1070
|
+
}
|
|
1071
|
+
return orig.call(this, cb, delay, ...args);
|
|
1072
|
+
};
|
|
1073
|
+
|
|
1074
|
+
Object.defineProperty(window.setTimeout, 'toString', {
|
|
1075
|
+
value: () => 'function setTimeout() { [native code] }',
|
|
1076
|
+
configurable: false
|
|
1077
|
+
});
|
|
1078
|
+
|
|
1079
|
+
log('✓ setTimeout');
|
|
1080
|
+
};
|
|
1081
|
+
|
|
1082
|
+
// ================================================================
|
|
1083
|
+
// 29. ELEMENT DIMENSIONS (clientWidth, scrollWidth, etc)
|
|
1084
|
+
// ================================================================
|
|
1085
|
+
const protectElementDimensions = () => {
|
|
1086
|
+
// These are heavily accessed - ensure they look consistent
|
|
1087
|
+
// We don't override actual values, just ensure getter looks native
|
|
1088
|
+
const props = ['clientWidth', 'clientHeight', 'scrollWidth', 'scrollHeight',
|
|
1089
|
+
'offsetWidth', 'offsetHeight', 'scrollTop', 'scrollLeft'];
|
|
1090
|
+
|
|
1091
|
+
props.forEach(prop => {
|
|
1092
|
+
const desc = Object.getOwnPropertyDescriptor(Element.prototype, prop);
|
|
1093
|
+
if (desc && desc.get) {
|
|
1094
|
+
// Already has getter, make it look more native
|
|
1095
|
+
Object.defineProperty(desc.get, 'toString', {
|
|
1096
|
+
value: () => \`function \${prop}() { [native code] }\`,
|
|
1097
|
+
configurable: false
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
|
|
1102
|
+
log('✓ Element dimensions');
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1105
|
+
// ================================================================
|
|
1106
|
+
// 30. DATADOME CHALLENGE MONITOR
|
|
1107
|
+
// ================================================================
|
|
1108
|
+
const monitorChallenges = () => {
|
|
1109
|
+
const obs = new MutationObserver((muts) => {
|
|
1110
|
+
for (const m of muts) {
|
|
1111
|
+
for (const n of m.addedNodes) {
|
|
1112
|
+
if (n.nodeName === 'SCRIPT') {
|
|
1113
|
+
const src = n.src || '';
|
|
1114
|
+
if (src.includes('datadome') || src.includes('captcha-delivery')) {
|
|
1115
|
+
// Challenge detected
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
if (n.nodeName === 'IFRAME') {
|
|
1119
|
+
const src = n.src || '';
|
|
1120
|
+
if (src.includes('captcha-delivery') || src.includes('datadome')) {
|
|
1121
|
+
// Captcha iframe detected
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1127
|
+
|
|
1128
|
+
if (document.documentElement) {
|
|
1129
|
+
obs.observe(document.documentElement, { childList: true, subtree: true });
|
|
1130
|
+
} else {
|
|
1131
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
1132
|
+
obs.observe(document.documentElement, { childList: true, subtree: true });
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
log('✓ Challenge monitor');
|
|
1137
|
+
};
|
|
1138
|
+
|
|
1139
|
+
// ================================================================
|
|
1140
|
+
// INITIALIZE ALL 30 BYPASSES
|
|
1141
|
+
// ================================================================
|
|
1142
|
+
try {
|
|
1143
|
+
sanitizeStacks(); // 1
|
|
1144
|
+
// Date protection handled by timing-consistency.ts
|
|
1145
|
+
spoofUserAgentData(); // 2
|
|
1146
|
+
spoofNavigator(); // 3
|
|
1147
|
+
spoofScreen(); // 4
|
|
1148
|
+
spoofWindow(); // 5
|
|
1149
|
+
spoofPerformanceMemory(); // 6
|
|
1150
|
+
spoofBattery(); // 7
|
|
1151
|
+
spoofPermissions(); // 8
|
|
1152
|
+
spoofKeyboard(); // 9
|
|
1153
|
+
spoofMediaDevices(); // 10
|
|
1154
|
+
spoofStorage(); // 11
|
|
1155
|
+
spoofPlugins(); // 12
|
|
1156
|
+
spoofConnection(); // 13
|
|
1157
|
+
protectServiceWorker(); // 14
|
|
1158
|
+
protectHistory(); // 15
|
|
1159
|
+
protectDocument(); // 16
|
|
1160
|
+
protectIframes(); // 17
|
|
1161
|
+
protectWebGL(); // 18
|
|
1162
|
+
protectCanvas(); // 19
|
|
1163
|
+
protectRAF(); // 20
|
|
1164
|
+
protectToString(); // 21
|
|
1165
|
+
protectCSS(); // 22
|
|
1166
|
+
protectMatchMedia(); // 23
|
|
1167
|
+
protectFetch(); // 24
|
|
1168
|
+
protectLocalStorage(); // 25
|
|
1169
|
+
protectIntl(); // 26
|
|
1170
|
+
protectSetTimeout(); // 27
|
|
1171
|
+
protectElementDimensions();// 28
|
|
1172
|
+
monitorChallenges(); // 29
|
|
1173
|
+
|
|
1174
|
+
log('=== ALL 29 DATADOME BYPASSES ACTIVE ===');
|
|
1175
|
+
} catch (e) {
|
|
1176
|
+
console.error('[DD-BYPASS] Error:', e);
|
|
1177
|
+
throw e;
|
|
1178
|
+
}
|
|
1179
|
+
})();`;
|
|
1180
|
+
};
|
|
1181
|
+
//# sourceMappingURL=datadome-bypass.js.map
|