jumpy-lion 0.1.0 → 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 +319 -28
- 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 -18
- 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 +161 -7
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +1034 -23
- package/dist/page.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locale Spoofing
|
|
3
|
+
* Ensures consistent Windows-style locale formatting for dates, numbers, and currencies
|
|
4
|
+
*/
|
|
5
|
+
export const createLocaleSpoofingScript = () => {
|
|
6
|
+
return `
|
|
7
|
+
(() => {
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
// Locale Spoofing for 2025 - Windows-consistent formatting
|
|
11
|
+
const spoofLocale = () => {
|
|
12
|
+
// Platform-specific locale configurations
|
|
13
|
+
const platform = navigator.platform || 'Win32';
|
|
14
|
+
|
|
15
|
+
// Windows-specific locale settings
|
|
16
|
+
const windowsLocaleConfig = {
|
|
17
|
+
dateFormat: {
|
|
18
|
+
weekday: 'long',
|
|
19
|
+
year: 'numeric',
|
|
20
|
+
month: 'long',
|
|
21
|
+
day: 'numeric'
|
|
22
|
+
},
|
|
23
|
+
timeFormat: {
|
|
24
|
+
hour: '2-digit',
|
|
25
|
+
minute: '2-digit',
|
|
26
|
+
second: '2-digit',
|
|
27
|
+
hour12: true
|
|
28
|
+
},
|
|
29
|
+
numberFormat: {
|
|
30
|
+
minimumFractionDigits: 0,
|
|
31
|
+
maximumFractionDigits: 3,
|
|
32
|
+
useGrouping: true
|
|
33
|
+
},
|
|
34
|
+
currencyFormat: {
|
|
35
|
+
style: 'currency',
|
|
36
|
+
currency: 'USD',
|
|
37
|
+
currencyDisplay: 'symbol'
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Override Intl.DateTimeFormat to use Windows-consistent formatting
|
|
42
|
+
// CRITICAL: Store reference BEFORE override and use recursion guard
|
|
43
|
+
const OriginalDateTimeFormat = Intl.DateTimeFormat;
|
|
44
|
+
let isCreatingDateTimeFormat = false; // Recursion guard
|
|
45
|
+
let cachedTimeZone = 'UTC';
|
|
46
|
+
try {
|
|
47
|
+
cachedTimeZone = new OriginalDateTimeFormat().resolvedOptions().timeZone;
|
|
48
|
+
} catch (e) {
|
|
49
|
+
// Fallback to UTC if timezone detection fails
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
Intl.DateTimeFormat = function(locales, options) {
|
|
53
|
+
// CRITICAL: Recursion guard - if we're already inside this function, use original directly
|
|
54
|
+
if (isCreatingDateTimeFormat) {
|
|
55
|
+
return Reflect.construct(OriginalDateTimeFormat, [locales, options], OriginalDateTimeFormat);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
isCreatingDateTimeFormat = true;
|
|
59
|
+
try {
|
|
60
|
+
// Ensure Windows-like date formatting regardless of actual locale
|
|
61
|
+
const windowsOptions = Object.assign({}, windowsLocaleConfig.dateFormat, options);
|
|
62
|
+
|
|
63
|
+
// Force specific Windows locale patterns
|
|
64
|
+
if (platform === 'Win32' || !platform.includes('Linux')) {
|
|
65
|
+
if (!options || !options.timeZone) {
|
|
66
|
+
windowsOptions.timeZone = cachedTimeZone;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Use Reflect.construct to properly create instance with original constructor
|
|
71
|
+
const formatter = Reflect.construct(OriginalDateTimeFormat, [locales, windowsOptions], OriginalDateTimeFormat);
|
|
72
|
+
|
|
73
|
+
return formatter;
|
|
74
|
+
} finally {
|
|
75
|
+
isCreatingDateTimeFormat = false;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// Override Intl.NumberFormat for Windows-consistent number formatting
|
|
80
|
+
const OriginalNumberFormat = Intl.NumberFormat;
|
|
81
|
+
let isCreatingNumberFormat = false; // Recursion guard
|
|
82
|
+
|
|
83
|
+
Intl.NumberFormat = function(locales, options) {
|
|
84
|
+
// CRITICAL: Recursion guard
|
|
85
|
+
if (isCreatingNumberFormat) {
|
|
86
|
+
return Reflect.construct(OriginalNumberFormat, [locales, options], OriginalNumberFormat);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
isCreatingNumberFormat = true;
|
|
90
|
+
try {
|
|
91
|
+
const windowsOptions = Object.assign({}, windowsLocaleConfig.numberFormat, options);
|
|
92
|
+
|
|
93
|
+
// Windows-specific number formatting
|
|
94
|
+
if (platform === 'Win32') {
|
|
95
|
+
windowsOptions.useGrouping = true;
|
|
96
|
+
if (options && options.style === 'currency') {
|
|
97
|
+
Object.assign(windowsOptions, windowsLocaleConfig.currencyFormat, options);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Use Reflect.construct to properly create instance with original constructor
|
|
102
|
+
return Reflect.construct(OriginalNumberFormat, [locales, windowsOptions], OriginalNumberFormat);
|
|
103
|
+
} finally {
|
|
104
|
+
isCreatingNumberFormat = false;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// Override Date.prototype methods for consistent formatting
|
|
109
|
+
const originalToLocaleString = Date.prototype.toLocaleString;
|
|
110
|
+
const originalToLocaleDateString = Date.prototype.toLocaleDateString;
|
|
111
|
+
const originalToLocaleTimeString = Date.prototype.toLocaleTimeString;
|
|
112
|
+
|
|
113
|
+
Date.prototype.toLocaleString = function(locales, options) {
|
|
114
|
+
const windowsOptions = Object.assign({}, windowsLocaleConfig.dateFormat, windowsLocaleConfig.timeFormat, options);
|
|
115
|
+
return originalToLocaleString.call(this, locales || 'en-US', windowsOptions);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
Date.prototype.toLocaleDateString = function(locales, options) {
|
|
119
|
+
const windowsOptions = Object.assign({}, windowsLocaleConfig.dateFormat, options);
|
|
120
|
+
return originalToLocaleDateString.call(this, locales || 'en-US', windowsOptions);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
Date.prototype.toLocaleTimeString = function(locales, options) {
|
|
124
|
+
const windowsOptions = Object.assign({}, windowsLocaleConfig.timeFormat, options);
|
|
125
|
+
return originalToLocaleTimeString.call(this, locales || 'en-US', windowsOptions);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// Override Number.prototype methods for consistent formatting
|
|
129
|
+
const originalNumberToLocaleString = Number.prototype.toLocaleString;
|
|
130
|
+
Number.prototype.toLocaleString = function(locales, options) {
|
|
131
|
+
let windowsOptions = Object.assign({}, windowsLocaleConfig.numberFormat, options);
|
|
132
|
+
|
|
133
|
+
if (options && options.style === 'currency') {
|
|
134
|
+
windowsOptions = Object.assign({}, windowsLocaleConfig.currencyFormat, options);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return originalNumberToLocaleString.call(this, locales || 'en-US', windowsOptions);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
// Spoof timezone-related methods for consistency
|
|
141
|
+
const originalGetTimezoneOffset = Date.prototype.getTimezoneOffset;
|
|
142
|
+
// Cache winter/summer offsets at init time to prevent recursion
|
|
143
|
+
let cachedWinterOffset = null;
|
|
144
|
+
let cachedSummerOffset = null;
|
|
145
|
+
try {
|
|
146
|
+
const now = new Date();
|
|
147
|
+
cachedWinterOffset = originalGetTimezoneOffset.call(new Date(now.getFullYear(), 0, 1));
|
|
148
|
+
cachedSummerOffset = originalGetTimezoneOffset.call(new Date(now.getFullYear(), 6, 1));
|
|
149
|
+
} catch (e) {
|
|
150
|
+
// Fallback - no DST adjustment
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
Date.prototype.getTimezoneOffset = function() {
|
|
154
|
+
const offset = originalGetTimezoneOffset.call(this);
|
|
155
|
+
|
|
156
|
+
// Ensure timezone offset is reported consistently
|
|
157
|
+
// Windows tends to handle DST slightly differently
|
|
158
|
+
if (platform === 'Win32' && cachedWinterOffset !== null && cachedSummerOffset !== null) {
|
|
159
|
+
// Apply Windows-style DST calculation if needed
|
|
160
|
+
if (cachedWinterOffset !== cachedSummerOffset) {
|
|
161
|
+
const isDST = offset === Math.min(cachedWinterOffset, cachedSummerOffset);
|
|
162
|
+
return isDST ? cachedSummerOffset : cachedWinterOffset;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return offset;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
// Override Intl.Collator for Windows-consistent string comparison
|
|
170
|
+
if (typeof Intl.Collator !== 'undefined') {
|
|
171
|
+
const OriginalCollator = Intl.Collator;
|
|
172
|
+
let isCreatingCollator = false;
|
|
173
|
+
Intl.Collator = function(locales, options) {
|
|
174
|
+
if (isCreatingCollator) {
|
|
175
|
+
return Reflect.construct(OriginalCollator, [locales, options], OriginalCollator);
|
|
176
|
+
}
|
|
177
|
+
isCreatingCollator = true;
|
|
178
|
+
try {
|
|
179
|
+
const windowsOptions = Object.assign({
|
|
180
|
+
sensitivity: 'base',
|
|
181
|
+
usage: 'sort',
|
|
182
|
+
caseFirst: 'upper'
|
|
183
|
+
}, options);
|
|
184
|
+
return Reflect.construct(OriginalCollator, [locales, windowsOptions], OriginalCollator);
|
|
185
|
+
} finally {
|
|
186
|
+
isCreatingCollator = false;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Override Intl.PluralRules for consistency
|
|
192
|
+
if (typeof Intl.PluralRules !== 'undefined') {
|
|
193
|
+
const OriginalPluralRules = Intl.PluralRules;
|
|
194
|
+
let isCreatingPluralRules = false;
|
|
195
|
+
Intl.PluralRules = function(locales, options) {
|
|
196
|
+
if (isCreatingPluralRules) {
|
|
197
|
+
return Reflect.construct(OriginalPluralRules, [locales, options], OriginalPluralRules);
|
|
198
|
+
}
|
|
199
|
+
isCreatingPluralRules = true;
|
|
200
|
+
try {
|
|
201
|
+
return Reflect.construct(OriginalPluralRules, [locales || 'en-US', options], OriginalPluralRules);
|
|
202
|
+
} finally {
|
|
203
|
+
isCreatingPluralRules = false;
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Override Intl.RelativeTimeFormat if available
|
|
209
|
+
if (typeof Intl.RelativeTimeFormat !== 'undefined') {
|
|
210
|
+
const OriginalRelativeTimeFormat = Intl.RelativeTimeFormat;
|
|
211
|
+
let isCreatingRelativeTimeFormat = false;
|
|
212
|
+
Intl.RelativeTimeFormat = function(locales, options) {
|
|
213
|
+
if (isCreatingRelativeTimeFormat) {
|
|
214
|
+
return Reflect.construct(OriginalRelativeTimeFormat, [locales, options], OriginalRelativeTimeFormat);
|
|
215
|
+
}
|
|
216
|
+
isCreatingRelativeTimeFormat = true;
|
|
217
|
+
try {
|
|
218
|
+
const windowsOptions = Object.assign({
|
|
219
|
+
style: 'long',
|
|
220
|
+
numeric: 'auto'
|
|
221
|
+
}, options);
|
|
222
|
+
return Reflect.construct(OriginalRelativeTimeFormat, [locales || 'en-US', windowsOptions], OriginalRelativeTimeFormat);
|
|
223
|
+
} finally {
|
|
224
|
+
isCreatingRelativeTimeFormat = false;
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Spoof locale-specific string methods
|
|
230
|
+
const originalLocaleCompare = String.prototype.localeCompare;
|
|
231
|
+
String.prototype.localeCompare = function(compareString, locales, options) {
|
|
232
|
+
const windowsOptions = Object.assign({
|
|
233
|
+
sensitivity: 'base',
|
|
234
|
+
caseFirst: 'upper'
|
|
235
|
+
}, options);
|
|
236
|
+
|
|
237
|
+
return originalLocaleCompare.call(this, compareString, locales || 'en-US', windowsOptions);
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
// Helper to check if property can be redefined
|
|
241
|
+
const canRedefineProperty = (obj, prop) => {
|
|
242
|
+
try {
|
|
243
|
+
const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
|
|
244
|
+
return !descriptor || descriptor.configurable !== false;
|
|
245
|
+
} catch (e) {
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
// IMPORTANT: Cache original values BEFORE any override to prevent infinite recursion
|
|
251
|
+
const originalLanguage = navigator.language;
|
|
252
|
+
const originalLanguages = navigator.languages ? [...navigator.languages] : ['en-US'];
|
|
253
|
+
|
|
254
|
+
// Ensure consistent navigator.language reporting
|
|
255
|
+
if (canRedefineProperty(navigator, 'language')) {
|
|
256
|
+
try {
|
|
257
|
+
Object.defineProperty(navigator, 'language', {
|
|
258
|
+
get: function() {
|
|
259
|
+
// Use cached value to prevent infinite recursion
|
|
260
|
+
return platform === 'Win32' ? 'en-US' : originalLanguage;
|
|
261
|
+
},
|
|
262
|
+
configurable: true // Allow other scripts to modify if needed
|
|
263
|
+
});
|
|
264
|
+
} catch (e) {
|
|
265
|
+
// Property already defined, skip
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (canRedefineProperty(navigator, 'languages')) {
|
|
270
|
+
try {
|
|
271
|
+
Object.defineProperty(navigator, 'languages', {
|
|
272
|
+
get: function() {
|
|
273
|
+
// Use cached value to prevent infinite recursion
|
|
274
|
+
if (platform === 'Win32') {
|
|
275
|
+
return ['en-US', 'en'];
|
|
276
|
+
}
|
|
277
|
+
return originalLanguages;
|
|
278
|
+
},
|
|
279
|
+
configurable: true // Allow other scripts to modify if needed
|
|
280
|
+
});
|
|
281
|
+
} catch (e) {
|
|
282
|
+
// Property already defined, skip
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
|
|
288
|
+
const ERROR_PREFIX = '[CDP-FP-ERROR]';
|
|
289
|
+
|
|
290
|
+
try {
|
|
291
|
+
console.log(DEBUG_PREFIX, 'Starting locale spoofing...');
|
|
292
|
+
spoofLocale();
|
|
293
|
+
console.log(DEBUG_PREFIX, '✓ Locale spoofing applied');
|
|
294
|
+
} catch (e) {
|
|
295
|
+
console.error(ERROR_PREFIX, '✗ Failed to apply locale spoofing:', e);
|
|
296
|
+
throw e;
|
|
297
|
+
}
|
|
298
|
+
})();
|
|
299
|
+
`;
|
|
300
|
+
};
|
|
301
|
+
//# sourceMappingURL=locale-spoofing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/locale-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAW,EAAE;IACnD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqSV,CAAC;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mouse Movement Humanization
|
|
3
|
+
* Generates bezier curve movements instead of straight lines
|
|
4
|
+
* Stores the utility in the __stealth store for internal use only
|
|
5
|
+
*/
|
|
6
|
+
export declare const setupMouseMovementHumanization: (client: any) => Promise<void>;
|
|
7
|
+
//# sourceMappingURL=mouse-humanization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mouse-humanization.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/mouse-humanization.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,8BAA8B,WAAkB,GAAG,KAAG,OAAO,CAAC,IAAI,CAmD9E,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mouse Movement Humanization
|
|
3
|
+
* Generates bezier curve movements instead of straight lines
|
|
4
|
+
* Stores the utility in the __stealth store for internal use only
|
|
5
|
+
*/
|
|
6
|
+
export const setupMouseMovementHumanization = async (client) => {
|
|
7
|
+
// NOTE: Using addScriptToEvaluateOnNewDocument instead of Runtime.evaluate
|
|
8
|
+
// Runtime.evaluate is a CDP detection vector - it modifies console bindings and Error stacks
|
|
9
|
+
await client.Page.addScriptToEvaluateOnNewDocument({ source: `
|
|
10
|
+
(() => {
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
const _s = typeof __stealth !== 'undefined' ? __stealth : {};
|
|
14
|
+
|
|
15
|
+
// Seeded PRNG (mulberry32) for deterministic curves
|
|
16
|
+
const createSeededRNG = (seed) => {
|
|
17
|
+
let s = seed | 0;
|
|
18
|
+
return () => {
|
|
19
|
+
s = s + 0x6D2B79F5 | 0;
|
|
20
|
+
let t = Math.imul(s ^ s >>> 15, 1 | s);
|
|
21
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
22
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const sessionSeed = Date.now() ^ (Math.random() * 0xFFFFFFFF >>> 0);
|
|
26
|
+
const seededRandom = createSeededRNG(sessionSeed);
|
|
27
|
+
|
|
28
|
+
// Bezier curve movement generator
|
|
29
|
+
_s.humanizeMouse = (fromX, fromY, toX, toY) => {
|
|
30
|
+
const steps = 20 + Math.floor(seededRandom() * 10);
|
|
31
|
+
const points = [];
|
|
32
|
+
|
|
33
|
+
// Generate control points for bezier curve
|
|
34
|
+
const cp1x = fromX + (toX - fromX) * 0.25 + (seededRandom() - 0.5) * 50;
|
|
35
|
+
const cp1y = fromY + (toY - fromY) * 0.25 + (seededRandom() - 0.5) * 50;
|
|
36
|
+
const cp2x = fromX + (toX - fromX) * 0.75 + (seededRandom() - 0.5) * 50;
|
|
37
|
+
const cp2y = fromY + (toY - fromY) * 0.75 + (seededRandom() - 0.5) * 50;
|
|
38
|
+
|
|
39
|
+
// Calculate bezier curve points
|
|
40
|
+
for (let i = 0; i <= steps; i++) {
|
|
41
|
+
const t = i / steps;
|
|
42
|
+
const t2 = t * t;
|
|
43
|
+
const t3 = t2 * t;
|
|
44
|
+
const mt = 1 - t;
|
|
45
|
+
const mt2 = mt * mt;
|
|
46
|
+
const mt3 = mt2 * mt;
|
|
47
|
+
|
|
48
|
+
const x = mt3 * fromX + 3 * mt2 * t * cp1x + 3 * mt * t2 * cp2x + t3 * toX;
|
|
49
|
+
const y = mt3 * fromY + 3 * mt2 * t * cp1y + 3 * mt * t2 * cp2y + t3 * toY;
|
|
50
|
+
|
|
51
|
+
points.push({ x: Math.round(x), y: Math.round(y) });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return points;
|
|
55
|
+
};
|
|
56
|
+
})();` });
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=mouse-humanization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mouse-humanization.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/mouse-humanization.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,EAAE,MAAW,EAAiB,EAAE;IAC/E,2EAA2E;IAC3E,6FAA6F;IAC7F,MAAM,MAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,EAAE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+C3D,EAAE,CAAC,CAAC;AACV,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/performance-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,+BAA+B,QAAO,MAmPlD,CAAC"}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performance Spoofing
|
|
3
|
+
* Adjusts timing and memory characteristics to match Windows systems
|
|
4
|
+
*/
|
|
5
|
+
export const createPerformanceSpoofingScript = () => {
|
|
6
|
+
return `
|
|
7
|
+
(() => {
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
// Performance Spoofing for 2025 - Windows-like characteristics
|
|
11
|
+
const spoofPerformance = () => {
|
|
12
|
+
const createSeededRNG = (seed) => {
|
|
13
|
+
let s = seed | 0;
|
|
14
|
+
return () => {
|
|
15
|
+
s = s + 0x6D2B79F5 | 0;
|
|
16
|
+
let t = Math.imul(s ^ s >>> 15, 1 | s);
|
|
17
|
+
t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
|
|
18
|
+
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
const sessionSeed = Date.now() ^ 0xE7A31B49;
|
|
22
|
+
const seededRandom = createSeededRNG(sessionSeed);
|
|
23
|
+
|
|
24
|
+
// Store original methods
|
|
25
|
+
const originalNow = performance.now;
|
|
26
|
+
const originalGetEntries = performance.getEntries;
|
|
27
|
+
const originalGetEntriesByType = performance.getEntriesByType;
|
|
28
|
+
const originalGetEntriesByName = performance.getEntriesByName;
|
|
29
|
+
|
|
30
|
+
// Platform-specific timing characteristics
|
|
31
|
+
const platform = navigator.platform || 'Win32';
|
|
32
|
+
let timingOffset = 0;
|
|
33
|
+
let baseTime = originalNow.call(performance);
|
|
34
|
+
|
|
35
|
+
// Windows tends to have slightly different timing precision
|
|
36
|
+
const timingConfig = {
|
|
37
|
+
'Win32': {
|
|
38
|
+
precision: 0.1, // Windows has 0.1ms precision in many cases
|
|
39
|
+
jitter: 0.05, // Small random variation
|
|
40
|
+
baseOffset: 0 // No offset needed
|
|
41
|
+
},
|
|
42
|
+
'MacIntel': {
|
|
43
|
+
precision: 0.1,
|
|
44
|
+
jitter: 0.03,
|
|
45
|
+
baseOffset: 1.2
|
|
46
|
+
},
|
|
47
|
+
'Linux x86_64': {
|
|
48
|
+
precision: 0.001,
|
|
49
|
+
jitter: 0.02,
|
|
50
|
+
baseOffset: 0.8
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const config = timingConfig[platform] || timingConfig['Win32'];
|
|
55
|
+
|
|
56
|
+
// Spoof performance.now() with Windows-like characteristics
|
|
57
|
+
performance.now = function() {
|
|
58
|
+
const realTime = originalNow.call(performance) - baseTime;
|
|
59
|
+
const adjustedTime = realTime * (1 + config.baseOffset / 100);
|
|
60
|
+
|
|
61
|
+
// Add Windows-like timing jitter and precision
|
|
62
|
+
const jitter = (seededRandom() - 0.5) * config.jitter;
|
|
63
|
+
const timeWithJitter = adjustedTime + jitter;
|
|
64
|
+
|
|
65
|
+
// Round to Windows-like precision
|
|
66
|
+
const rounded = Math.round(timeWithJitter / config.precision) * config.precision;
|
|
67
|
+
|
|
68
|
+
return baseTime + rounded;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// Spoof memory information to look like Windows
|
|
72
|
+
if (performance.memory) {
|
|
73
|
+
// Windows Chrome typically reports different memory values
|
|
74
|
+
const memoryConfig = {
|
|
75
|
+
'Win32': {
|
|
76
|
+
usedJSHeapSize: { min: 25000000, variance: 15000000 },
|
|
77
|
+
totalJSHeapSize: { min: 45000000, variance: 25000000 },
|
|
78
|
+
jsHeapSizeLimit: 2172649472 // Typical Windows limit
|
|
79
|
+
},
|
|
80
|
+
'MacIntel': {
|
|
81
|
+
usedJSHeapSize: { min: 20000000, variance: 12000000 },
|
|
82
|
+
totalJSHeapSize: { min: 40000000, variance: 20000000 },
|
|
83
|
+
jsHeapSizeLimit: 4294705152 // Mac typically has higher limits
|
|
84
|
+
},
|
|
85
|
+
'Linux x86_64': {
|
|
86
|
+
usedJSHeapSize: { min: 18000000, variance: 10000000 },
|
|
87
|
+
totalJSHeapSize: { min: 35000000, variance: 18000000 },
|
|
88
|
+
jsHeapSizeLimit: 2147483648 // Linux varies more
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const memConfig = memoryConfig[platform] || memoryConfig['Win32'];
|
|
93
|
+
|
|
94
|
+
// Generate consistent but realistic memory values
|
|
95
|
+
const pseudoRandom = seededRandom();
|
|
96
|
+
|
|
97
|
+
const fakeMemory = {
|
|
98
|
+
usedJSHeapSize: Math.floor(memConfig.usedJSHeapSize.min +
|
|
99
|
+
pseudoRandom * memConfig.usedJSHeapSize.variance),
|
|
100
|
+
totalJSHeapSize: Math.floor(memConfig.totalJSHeapSize.min +
|
|
101
|
+
pseudoRandom * memConfig.totalJSHeapSize.variance),
|
|
102
|
+
jsHeapSizeLimit: memConfig.jsHeapSizeLimit
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// Ensure logical consistency
|
|
106
|
+
if (fakeMemory.usedJSHeapSize > fakeMemory.totalJSHeapSize) {
|
|
107
|
+
fakeMemory.totalJSHeapSize = fakeMemory.usedJSHeapSize + 5000000;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
Object.defineProperty(performance, 'memory', {
|
|
111
|
+
value: fakeMemory,
|
|
112
|
+
writable: false,
|
|
113
|
+
configurable: true
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Spoof navigation timing to appear more like Windows
|
|
118
|
+
if (performance.navigation) {
|
|
119
|
+
Object.defineProperty(performance.navigation, 'type', {
|
|
120
|
+
value: 0, // TYPE_NAVIGATE - most common on Windows
|
|
121
|
+
writable: false
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
Object.defineProperty(performance.navigation, 'redirectCount', {
|
|
125
|
+
value: 0,
|
|
126
|
+
writable: false
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Spoof timing entries to have Windows-like characteristics
|
|
131
|
+
performance.getEntries = function() {
|
|
132
|
+
const entries = originalGetEntries.call(this);
|
|
133
|
+
return entries.map(entry => spoofTimingEntry(entry));
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
performance.getEntriesByType = function(type) {
|
|
137
|
+
const entries = originalGetEntriesByType.call(this, type);
|
|
138
|
+
return entries.map(entry => spoofTimingEntry(entry));
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
performance.getEntriesByName = function(name, type) {
|
|
142
|
+
const entries = originalGetEntriesByName.call(this, name, type);
|
|
143
|
+
return entries.map(entry => spoofTimingEntry(entry));
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
function spoofTimingEntry(entry) {
|
|
147
|
+
if (!entry) return entry;
|
|
148
|
+
|
|
149
|
+
// Create a copy of the entry with adjusted timings
|
|
150
|
+
const spoofedEntry = Object.assign({}, entry);
|
|
151
|
+
|
|
152
|
+
// Adjust timing values to be more Windows-like
|
|
153
|
+
const timingProps = [
|
|
154
|
+
'startTime', 'duration', 'fetchStart', 'domainLookupStart',
|
|
155
|
+
'domainLookupEnd', 'connectStart', 'connectEnd', 'requestStart',
|
|
156
|
+
'responseStart', 'responseEnd', 'domLoading', 'domInteractive',
|
|
157
|
+
'domContentLoadedEventStart', 'domContentLoadedEventEnd',
|
|
158
|
+
'domComplete', 'loadEventStart', 'loadEventEnd'
|
|
159
|
+
];
|
|
160
|
+
|
|
161
|
+
timingProps.forEach(prop => {
|
|
162
|
+
if (typeof spoofedEntry[prop] === 'number' && spoofedEntry[prop] > 0) {
|
|
163
|
+
// Apply Windows-like timing adjustments
|
|
164
|
+
const adjustment = 1 + (config.baseOffset / 100) +
|
|
165
|
+
(seededRandom() - 0.5) * config.jitter / 10;
|
|
166
|
+
spoofedEntry[prop] = Math.round(spoofedEntry[prop] * adjustment / config.precision) * config.precision;
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
return spoofedEntry;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Spoof requestIdleCallback timing (if available)
|
|
174
|
+
if ('requestIdleCallback' in window) {
|
|
175
|
+
const originalRequestIdleCallback = window.requestIdleCallback;
|
|
176
|
+
window.requestIdleCallback = function(callback, options) {
|
|
177
|
+
// Windows systems typically have different idle characteristics
|
|
178
|
+
const windowsOptions = Object.assign({}, options, {
|
|
179
|
+
timeout: options?.timeout ? Math.min(options.timeout, 5000) : 5000
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
return originalRequestIdleCallback.call(this, function(deadline) {
|
|
183
|
+
// Modify deadline to appear more Windows-like
|
|
184
|
+
const modifiedDeadline = {
|
|
185
|
+
didTimeout: deadline.didTimeout,
|
|
186
|
+
timeRemaining: function() {
|
|
187
|
+
const remaining = deadline.timeRemaining();
|
|
188
|
+
// Windows tends to report slightly less remaining time
|
|
189
|
+
return Math.max(0, remaining * 0.95 - seededRandom() * 2);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
return callback.call(this, modifiedDeadline);
|
|
194
|
+
}, windowsOptions);
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Spoof scheduler API (if available)
|
|
199
|
+
if ('scheduler' in window && window.scheduler) {
|
|
200
|
+
const originalPostTask = window.scheduler.postTask;
|
|
201
|
+
if (originalPostTask) {
|
|
202
|
+
window.scheduler.postTask = function(callback, options) {
|
|
203
|
+
// Windows scheduling tends to be slightly different
|
|
204
|
+
const windowsOptions = Object.assign({}, options);
|
|
205
|
+
if (windowsOptions.delay) {
|
|
206
|
+
windowsOptions.delay = Math.max(0, windowsOptions.delay - seededRandom() * 2);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return originalPostTask.call(this, callback, windowsOptions);
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Spoof performance observer timing
|
|
215
|
+
if ('PerformanceObserver' in window) {
|
|
216
|
+
const OriginalPerformanceObserver = PerformanceObserver;
|
|
217
|
+
window.PerformanceObserver = class extends OriginalPerformanceObserver {
|
|
218
|
+
constructor(callback) {
|
|
219
|
+
super(function(list, observer) {
|
|
220
|
+
const entries = list.getEntries().map(entry => spoofTimingEntry(entry));
|
|
221
|
+
const modifiedList = {
|
|
222
|
+
getEntries: () => entries,
|
|
223
|
+
getEntriesByType: (type) => entries.filter(e => e.entryType === type),
|
|
224
|
+
getEntriesByName: (name, type) => entries.filter(e =>
|
|
225
|
+
e.name === name && (!type || e.entryType === type)
|
|
226
|
+
)
|
|
227
|
+
};
|
|
228
|
+
return callback.call(this, modifiedList, observer);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
|
|
236
|
+
const ERROR_PREFIX = '[CDP-FP-ERROR]';
|
|
237
|
+
|
|
238
|
+
try {
|
|
239
|
+
console.log(DEBUG_PREFIX, 'Starting performance spoofing...');
|
|
240
|
+
spoofPerformance();
|
|
241
|
+
console.log(DEBUG_PREFIX, '✓ Performance spoofing applied');
|
|
242
|
+
} catch (e) {
|
|
243
|
+
console.error(ERROR_PREFIX, '✗ Failed to apply performance spoofing:', e);
|
|
244
|
+
throw e;
|
|
245
|
+
}
|
|
246
|
+
})();
|
|
247
|
+
`;
|
|
248
|
+
};
|
|
249
|
+
//# sourceMappingURL=performance-spoofing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/performance-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAW,EAAE;IACxD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiPV,CAAC;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform Consistency Script
|
|
3
|
+
* Ensures all browser properties match the specified platform (1:1 fingerprinting)
|
|
4
|
+
*
|
|
5
|
+
* 2024-2025 Enhancements:
|
|
6
|
+
* - Screen orientation API consistency
|
|
7
|
+
* - screen.availLeft/availTop for Windows
|
|
8
|
+
* - visualViewport properties consistency
|
|
9
|
+
* - window.outerWidth/outerHeight ratios
|
|
10
|
+
* - window.screenX/screenY typical values
|
|
11
|
+
* - matchMedia() platform-appropriate results
|
|
12
|
+
*/
|
|
13
|
+
export interface PlatformConfig {
|
|
14
|
+
platform?: string;
|
|
15
|
+
devicePixelRatio?: number;
|
|
16
|
+
screenDepth?: number;
|
|
17
|
+
colorDepth?: number;
|
|
18
|
+
hardwareConcurrency?: number;
|
|
19
|
+
maxTouchPoints?: number;
|
|
20
|
+
vendor?: string;
|
|
21
|
+
vendorSub?: string;
|
|
22
|
+
productSub?: string;
|
|
23
|
+
language?: string;
|
|
24
|
+
languages?: string[];
|
|
25
|
+
oscpu?: string;
|
|
26
|
+
userAgent?: string;
|
|
27
|
+
appVersion?: string;
|
|
28
|
+
appName?: string;
|
|
29
|
+
appCodeName?: string;
|
|
30
|
+
product?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const createPlatformConsistencyScript: (platform: string, fingerprintData?: PlatformConfig) => string;
|
|
33
|
+
//# sourceMappingURL=platform-consistency.d.ts.map
|