jumpy-lion 0.0.41 → 0.0.43

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.
Files changed (127) hide show
  1. package/dist/browser-controller.d.ts.map +1 -1
  2. package/dist/browser-controller.js +102 -16
  3. package/dist/browser-controller.js.map +1 -1
  4. package/dist/browser-plugin.d.ts +20 -1
  5. package/dist/browser-plugin.d.ts.map +1 -1
  6. package/dist/browser-plugin.js +21 -1
  7. package/dist/browser-plugin.js.map +1 -1
  8. package/dist/browser-process/browser.d.ts +22 -1
  9. package/dist/browser-process/browser.d.ts.map +1 -1
  10. package/dist/browser-process/browser.js +77 -5
  11. package/dist/browser-process/browser.js.map +1 -1
  12. package/dist/browser-profiles/chrome/default.d.ts +116 -0
  13. package/dist/browser-profiles/chrome/default.d.ts.map +1 -1
  14. package/dist/browser-profiles/chrome/default.js +118 -1
  15. package/dist/browser-profiles/chrome/default.js.map +1 -1
  16. package/dist/browser-profiles/chrome/populate-profile.d.ts +76 -0
  17. package/dist/browser-profiles/chrome/populate-profile.d.ts.map +1 -0
  18. package/dist/browser-profiles/chrome/populate-profile.js +300 -0
  19. package/dist/browser-profiles/chrome/populate-profile.js.map +1 -0
  20. package/dist/browser-profiles/index.d.ts +1 -0
  21. package/dist/browser-profiles/index.d.ts.map +1 -1
  22. package/dist/browser-profiles/index.js +2 -0
  23. package/dist/browser-profiles/index.js.map +1 -1
  24. package/dist/crawler.d.ts +32 -1
  25. package/dist/crawler.d.ts.map +1 -1
  26. package/dist/crawler.js +7 -0
  27. package/dist/crawler.js.map +1 -1
  28. package/dist/fingerprinting/custom-fingerprint-injector.d.ts +87 -0
  29. package/dist/fingerprinting/custom-fingerprint-injector.d.ts.map +1 -0
  30. package/dist/fingerprinting/custom-fingerprint-injector.js +342 -0
  31. package/dist/fingerprinting/custom-fingerprint-injector.js.map +1 -0
  32. package/dist/fingerprinting/fingerprint-injector.d.ts +40 -2
  33. package/dist/fingerprinting/fingerprint-injector.d.ts.map +1 -1
  34. package/dist/fingerprinting/fingerprint-injector.js +452 -44
  35. package/dist/fingerprinting/fingerprint-injector.js.map +1 -1
  36. package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.d.ts.map +1 -1
  37. package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.js +11 -1
  38. package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.js.map +1 -1
  39. package/dist/fingerprinting/fingerprint-overrides/canvas-protection.d.ts.map +1 -1
  40. package/dist/fingerprinting/fingerprint-overrides/canvas-protection.js +11 -1
  41. package/dist/fingerprinting/fingerprint-overrides/canvas-protection.js.map +1 -1
  42. package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.d.ts +14 -0
  43. package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.d.ts.map +1 -0
  44. package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.js +776 -0
  45. package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.js.map +1 -0
  46. package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.d.ts.map +1 -1
  47. package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.js +11 -1
  48. package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.js.map +1 -1
  49. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts +14 -0
  50. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts.map +1 -0
  51. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js +643 -0
  52. package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js.map +1 -0
  53. package/dist/fingerprinting/fingerprint-overrides/font-spoofing.d.ts.map +1 -1
  54. package/dist/fingerprinting/fingerprint-overrides/font-spoofing.js +11 -1
  55. package/dist/fingerprinting/fingerprint-overrides/font-spoofing.js.map +1 -1
  56. package/dist/fingerprinting/fingerprint-overrides/index.d.ts +17 -1
  57. package/dist/fingerprinting/fingerprint-overrides/index.d.ts.map +1 -1
  58. package/dist/fingerprinting/fingerprint-overrides/index.js +21 -1
  59. package/dist/fingerprinting/fingerprint-overrides/index.js.map +1 -1
  60. package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.d.ts +45 -0
  61. package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.d.ts.map +1 -0
  62. package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js +291 -0
  63. package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js.map +1 -0
  64. package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.d.ts.map +1 -1
  65. package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.js +153 -90
  66. package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.js.map +1 -1
  67. package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.d.ts.map +1 -1
  68. package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.js +4 -5
  69. package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.js.map +1 -1
  70. package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.d.ts.map +1 -1
  71. package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.js +11 -1
  72. package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.js.map +1 -1
  73. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts +13 -0
  74. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts.map +1 -1
  75. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js +413 -70
  76. package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js.map +1 -1
  77. package/dist/fingerprinting/fingerprint-overrides/prototype-integrity.d.ts +13 -0
  78. package/dist/fingerprinting/fingerprint-overrides/prototype-integrity.d.ts.map +1 -0
  79. package/dist/fingerprinting/fingerprint-overrides/prototype-integrity.js +355 -0
  80. package/dist/fingerprinting/fingerprint-overrides/prototype-integrity.js.map +1 -0
  81. package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.d.ts +12 -3
  82. package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.d.ts.map +1 -1
  83. package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.js +261 -71
  84. package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.js.map +1 -1
  85. package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.d.ts +55 -0
  86. package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.d.ts.map +1 -0
  87. package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js +380 -0
  88. package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js.map +1 -0
  89. package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts +8 -0
  90. package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts.map +1 -1
  91. package/dist/fingerprinting/fingerprint-overrides/stealth-script.js +756 -71
  92. package/dist/fingerprinting/fingerprint-overrides/stealth-script.js.map +1 -1
  93. package/dist/fingerprinting/fingerprint-overrides/storage-consistency.d.ts +13 -0
  94. package/dist/fingerprinting/fingerprint-overrides/storage-consistency.d.ts.map +1 -0
  95. package/dist/fingerprinting/fingerprint-overrides/storage-consistency.js +368 -0
  96. package/dist/fingerprinting/fingerprint-overrides/storage-consistency.js.map +1 -0
  97. package/dist/fingerprinting/fingerprint-overrides/timing-consistency.d.ts +13 -0
  98. package/dist/fingerprinting/fingerprint-overrides/timing-consistency.d.ts.map +1 -0
  99. package/dist/fingerprinting/fingerprint-overrides/timing-consistency.js +438 -0
  100. package/dist/fingerprinting/fingerprint-overrides/timing-consistency.js.map +1 -0
  101. package/dist/fingerprinting/fingerprint-overrides/ua-ch.d.ts +7 -1
  102. package/dist/fingerprinting/fingerprint-overrides/ua-ch.d.ts.map +1 -1
  103. package/dist/fingerprinting/fingerprint-overrides/ua-ch.js +158 -58
  104. package/dist/fingerprinting/fingerprint-overrides/ua-ch.js.map +1 -1
  105. package/dist/fingerprinting/fingerprint-overrides/utils.d.ts +12 -0
  106. package/dist/fingerprinting/fingerprint-overrides/utils.d.ts.map +1 -0
  107. package/dist/fingerprinting/fingerprint-overrides/utils.js +517 -0
  108. package/dist/fingerprinting/fingerprint-overrides/utils.js.map +1 -0
  109. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.d.ts.map +1 -1
  110. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js +51 -10
  111. package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js.map +1 -1
  112. package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.d.ts.map +1 -1
  113. package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.js +11 -1
  114. package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.js.map +1 -1
  115. package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.d.ts.map +1 -1
  116. package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js +11 -1
  117. package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js.map +1 -1
  118. package/dist/page.d.ts +12 -0
  119. package/dist/page.d.ts.map +1 -1
  120. package/dist/page.js +35 -3
  121. package/dist/page.js.map +1 -1
  122. package/dist/tsconfig.build.tsbuildinfo +1 -1
  123. package/package.json +4 -4
  124. package/dist/fingerprinting/canvas-fingerprint.d.ts +0 -4
  125. package/dist/fingerprinting/canvas-fingerprint.d.ts.map +0 -1
  126. package/dist/fingerprinting/canvas-fingerprint.js +0 -60
  127. package/dist/fingerprinting/canvas-fingerprint.js.map +0 -1
@@ -39,71 +39,70 @@ export const createLocaleSpoofingScript = () => {
39
39
  };
40
40
 
41
41
  // Override Intl.DateTimeFormat to use Windows-consistent formatting
42
+ // CRITICAL: Store reference BEFORE override and use recursion guard
42
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
+
43
52
  Intl.DateTimeFormat = function(locales, options) {
44
- // Ensure Windows-like date formatting regardless of actual locale
45
- const windowsOptions = Object.assign({}, windowsLocaleConfig.dateFormat, options);
46
-
47
- // Force specific Windows locale patterns
48
- if (platform === 'Win32' || !platform.includes('Linux')) {
49
- if (!options || !options.timeZone) {
50
- // Use common Windows timezone handling
51
- windowsOptions.timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
52
- }
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);
53
56
  }
54
57
 
55
- const formatter = new OriginalDateTimeFormat(locales, windowsOptions);
56
-
57
- // Override format method to ensure Windows-style output
58
- const originalFormat = formatter.format;
59
- formatter.format = function(date) {
60
- let result = originalFormat.call(this, date);
58
+ isCreatingDateTimeFormat = true;
59
+ try {
60
+ // Ensure Windows-like date formatting regardless of actual locale
61
+ const windowsOptions = Object.assign({}, windowsLocaleConfig.dateFormat, options);
61
62
 
62
- // Apply Windows-specific formatting adjustments
63
- if (platform === 'Win32') {
64
- // Windows often uses specific date separators and formats
65
- result = result.replace(/\\b(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})\\b/, '$1/$2/$3');
66
- result = result.replace(/\\b(\\d{4})-(\\d{2})-(\\d{2})\\b/, '$2/$3/$1');
63
+ // Force specific Windows locale patterns
64
+ if (platform === 'Win32' || !platform.includes('Linux')) {
65
+ if (!options || !options.timeZone) {
66
+ windowsOptions.timeZone = cachedTimeZone;
67
+ }
67
68
  }
68
69
 
69
- return result;
70
- };
71
-
72
- return formatter;
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
+ }
73
77
  };
74
78
 
75
79
  // Override Intl.NumberFormat for Windows-consistent number formatting
76
80
  const OriginalNumberFormat = Intl.NumberFormat;
81
+ let isCreatingNumberFormat = false; // Recursion guard
82
+
77
83
  Intl.NumberFormat = function(locales, options) {
78
- const windowsOptions = Object.assign({}, windowsLocaleConfig.numberFormat, options);
79
-
80
- // Windows-specific number formatting
81
- if (platform === 'Win32') {
82
- windowsOptions.useGrouping = true;
83
- if (options && options.style === 'currency') {
84
- Object.assign(windowsOptions, windowsLocaleConfig.currencyFormat, options);
85
- }
84
+ // CRITICAL: Recursion guard
85
+ if (isCreatingNumberFormat) {
86
+ return Reflect.construct(OriginalNumberFormat, [locales, options], OriginalNumberFormat);
86
87
  }
87
88
 
88
- const formatter = new OriginalNumberFormat(locales, windowsOptions);
89
-
90
- // Override format method for Windows-style numbers
91
- const originalFormat = formatter.format;
92
- formatter.format = function(number) {
93
- let result = originalFormat.call(this, number);
89
+ isCreatingNumberFormat = true;
90
+ try {
91
+ const windowsOptions = Object.assign({}, windowsLocaleConfig.numberFormat, options);
94
92
 
95
- // Windows-specific formatting adjustments
93
+ // Windows-specific number formatting
96
94
  if (platform === 'Win32') {
97
- // Ensure Windows-style thousand separators and decimal points
98
- if (typeof number === 'number' && Math.abs(number) >= 1000) {
99
- result = result.replace(/\\s/g, ','); // Replace spaces with commas for thousands
95
+ windowsOptions.useGrouping = true;
96
+ if (options && options.style === 'currency') {
97
+ Object.assign(windowsOptions, windowsLocaleConfig.currencyFormat, options);
100
98
  }
101
99
  }
102
100
 
103
- return result;
104
- };
105
-
106
- return formatter;
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
+ }
107
106
  };
108
107
 
109
108
  // Override Date.prototype methods for consistent formatting
@@ -127,7 +126,7 @@ export const createLocaleSpoofingScript = () => {
127
126
  };
128
127
 
129
128
  // Override Number.prototype methods for consistent formatting
130
- const originalToLocaleString = Number.prototype.toLocaleString;
129
+ const originalNumberToLocaleString = Number.prototype.toLocaleString;
131
130
  Number.prototype.toLocaleString = function(locales, options) {
132
131
  let windowsOptions = Object.assign({}, windowsLocaleConfig.numberFormat, options);
133
132
 
@@ -135,25 +134,32 @@ export const createLocaleSpoofingScript = () => {
135
134
  windowsOptions = Object.assign({}, windowsLocaleConfig.currencyFormat, options);
136
135
  }
137
136
 
138
- return originalToLocaleString.call(this, locales || 'en-US', windowsOptions);
137
+ return originalNumberToLocaleString.call(this, locales || 'en-US', windowsOptions);
139
138
  };
140
139
 
141
140
  // Spoof timezone-related methods for consistency
142
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
+
143
153
  Date.prototype.getTimezoneOffset = function() {
144
154
  const offset = originalGetTimezoneOffset.call(this);
145
155
 
146
156
  // Ensure timezone offset is reported consistently
147
157
  // Windows tends to handle DST slightly differently
148
- if (platform === 'Win32') {
149
- const now = new Date();
150
- const winterOffset = new Date(now.getFullYear(), 0, 1).getTimezoneOffset();
151
- const summerOffset = new Date(now.getFullYear(), 6, 1).getTimezoneOffset();
152
-
158
+ if (platform === 'Win32' && cachedWinterOffset !== null && cachedSummerOffset !== null) {
153
159
  // Apply Windows-style DST calculation if needed
154
- if (winterOffset !== summerOffset) {
155
- const isDST = offset === Math.min(winterOffset, summerOffset);
156
- return isDST ? summerOffset : winterOffset;
160
+ if (cachedWinterOffset !== cachedSummerOffset) {
161
+ const isDST = offset === Math.min(cachedWinterOffset, cachedSummerOffset);
162
+ return isDST ? cachedSummerOffset : cachedWinterOffset;
157
163
  }
158
164
  }
159
165
 
@@ -163,35 +169,60 @@ export const createLocaleSpoofingScript = () => {
163
169
  // Override Intl.Collator for Windows-consistent string comparison
164
170
  if (typeof Intl.Collator !== 'undefined') {
165
171
  const OriginalCollator = Intl.Collator;
172
+ let isCreatingCollator = false;
166
173
  Intl.Collator = function(locales, options) {
167
- const windowsOptions = Object.assign({
168
- sensitivity: 'base',
169
- usage: 'sort',
170
- caseFirst: 'upper' // Windows typically sorts uppercase first
171
- }, options);
172
-
173
- return new OriginalCollator(locales, windowsOptions);
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
+ }
174
188
  };
175
189
  }
176
190
 
177
191
  // Override Intl.PluralRules for consistency
178
192
  if (typeof Intl.PluralRules !== 'undefined') {
179
193
  const OriginalPluralRules = Intl.PluralRules;
194
+ let isCreatingPluralRules = false;
180
195
  Intl.PluralRules = function(locales, options) {
181
- return new OriginalPluralRules(locales || 'en-US', 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
+ }
182
205
  };
183
206
  }
184
207
 
185
208
  // Override Intl.RelativeTimeFormat if available
186
209
  if (typeof Intl.RelativeTimeFormat !== 'undefined') {
187
210
  const OriginalRelativeTimeFormat = Intl.RelativeTimeFormat;
211
+ let isCreatingRelativeTimeFormat = false;
188
212
  Intl.RelativeTimeFormat = function(locales, options) {
189
- const windowsOptions = Object.assign({
190
- style: 'long',
191
- numeric: 'auto'
192
- }, options);
193
-
194
- return new OriginalRelativeTimeFormat(locales || 'en-US', windowsOptions);
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
+ }
195
226
  };
196
227
  }
197
228
 
@@ -230,32 +261,64 @@ export const createLocaleSpoofingScript = () => {
230
261
  };
231
262
  }
232
263
 
264
+ // Helper to check if property can be redefined
265
+ const canRedefineProperty = (obj, prop) => {
266
+ try {
267
+ const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
268
+ return !descriptor || descriptor.configurable !== false;
269
+ } catch (e) {
270
+ return false;
271
+ }
272
+ };
273
+
274
+ // IMPORTANT: Cache original values BEFORE any override to prevent infinite recursion
275
+ const originalLanguage = navigator.language;
276
+ const originalLanguages = navigator.languages ? [...navigator.languages] : ['en-US'];
277
+
233
278
  // Ensure consistent navigator.language reporting
234
- if (navigator.language) {
235
- Object.defineProperty(navigator, 'language', {
236
- get: function() {
237
- // Return Windows-common locale
238
- return platform === 'Win32' ? 'en-US' : navigator.language;
239
- },
240
- configurable: false
241
- });
279
+ if (canRedefineProperty(navigator, 'language')) {
280
+ try {
281
+ Object.defineProperty(navigator, 'language', {
282
+ get: function() {
283
+ // Use cached value to prevent infinite recursion
284
+ return platform === 'Win32' ? 'en-US' : originalLanguage;
285
+ },
286
+ configurable: true // Allow other scripts to modify if needed
287
+ });
288
+ } catch (e) {
289
+ // Property already defined, skip
290
+ }
242
291
  }
243
292
 
244
- if (navigator.languages) {
245
- Object.defineProperty(navigator, 'languages', {
246
- get: function() {
247
- // Return Windows-typical language array
248
- if (platform === 'Win32') {
249
- return ['en-US', 'en'];
250
- }
251
- return navigator.languages;
252
- },
253
- configurable: false
254
- });
293
+ if (canRedefineProperty(navigator, 'languages')) {
294
+ try {
295
+ Object.defineProperty(navigator, 'languages', {
296
+ get: function() {
297
+ // Use cached value to prevent infinite recursion
298
+ if (platform === 'Win32') {
299
+ return ['en-US', 'en'];
300
+ }
301
+ return originalLanguages;
302
+ },
303
+ configurable: true // Allow other scripts to modify if needed
304
+ });
305
+ } catch (e) {
306
+ // Property already defined, skip
307
+ }
255
308
  }
256
309
  };
257
310
 
258
- spoofLocale();
311
+ const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
312
+ const ERROR_PREFIX = '[CDP-FP-ERROR]';
313
+
314
+ try {
315
+ console.log(DEBUG_PREFIX, 'Starting locale spoofing...');
316
+ spoofLocale();
317
+ console.log(DEBUG_PREFIX, '✓ Locale spoofing applied');
318
+ } catch (e) {
319
+ console.error(ERROR_PREFIX, '✗ Failed to apply locale spoofing:', e);
320
+ throw e;
321
+ }
259
322
  })();
260
323
  `;
261
324
  };
@@ -1 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8PV,CAAC;AACF,CAAC,CAAC"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6TV,CAAC;AACF,CAAC,CAAC"}
@@ -1 +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,CAgG9E,CAAC"}
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,CA+F9E,CAAC"}
@@ -4,9 +4,9 @@
4
4
  * Includes automatic human-like interactions after page load
5
5
  */
6
6
  export const setupMouseMovementHumanization = async (client) => {
7
- // Override CDP Input domain to add human-like variations
8
- await client.send('Runtime.evaluate', {
9
- expression: `
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
10
  (() => {
11
11
  'use strict';
12
12
 
@@ -97,7 +97,6 @@ export const setupMouseMovementHumanization = async (client) => {
97
97
  // Storage might be disabled
98
98
  }
99
99
  });
100
- })();`,
101
- });
100
+ })();` });
102
101
  };
103
102
  //# sourceMappingURL=mouse-humanization.js.map
@@ -1 +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,yDAAyD;IACzD,MAAM,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE;QAClC,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2Fd;KACD,CAAC,CAAC;AACP,CAAC,CAAC"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2F3D,EAAE,CAAC,CAAC;AACV,CAAC,CAAC"}
@@ -1 +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,MA8NlD,CAAC"}
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,MAwOlD,CAAC"}
@@ -221,7 +221,17 @@ export const createPerformanceSpoofingScript = () => {
221
221
  }
222
222
  };
223
223
 
224
- spoofPerformance();
224
+ const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
225
+ const ERROR_PREFIX = '[CDP-FP-ERROR]';
226
+
227
+ try {
228
+ console.log(DEBUG_PREFIX, 'Starting performance spoofing...');
229
+ spoofPerformance();
230
+ console.log(DEBUG_PREFIX, '✓ Performance spoofing applied');
231
+ } catch (e) {
232
+ console.error(ERROR_PREFIX, '✗ Failed to apply performance spoofing:', e);
233
+ throw e;
234
+ }
225
235
  })();
226
236
  `;
227
237
  };
@@ -1 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4NV,CAAC;AACF,CAAC,CAAC"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsOV,CAAC;AACF,CAAC,CAAC"}
@@ -1,6 +1,14 @@
1
1
  /**
2
2
  * Platform Consistency Script
3
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
4
12
  */
5
13
  export interface PlatformConfig {
6
14
  platform?: string;
@@ -15,6 +23,11 @@ export interface PlatformConfig {
15
23
  language?: string;
16
24
  languages?: string[];
17
25
  oscpu?: string;
26
+ userAgent?: string;
27
+ appVersion?: string;
28
+ appName?: string;
29
+ appCodeName?: string;
30
+ product?: string;
18
31
  }
19
32
  export declare const createPlatformConsistencyScript: (platform: string, fingerprintData?: PlatformConfig) => string;
20
33
  //# sourceMappingURL=platform-consistency.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-consistency.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/platform-consistency.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,+BAA+B,aAAc,MAAM,oBAAoB,cAAc,KAAG,MAgOpG,CAAC"}
1
+ {"version":3,"file":"platform-consistency.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/platform-consistency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,cAAc;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,+BAA+B,aAAc,MAAM,oBAAoB,cAAc,KAAG,MA+iBpG,CAAC"}