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,632 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enhanced CDP Fingerprint Injector for 2025
|
|
3
|
+
*
|
|
4
|
+
* This module provides advanced fingerprint spoofing and anti-detection capabilities
|
|
5
|
+
* specifically designed to bypass hardcore fingerprinting techniques used in 2025.
|
|
6
|
+
*
|
|
7
|
+
* Key Features:
|
|
8
|
+
*
|
|
9
|
+
* 1. **WebGPU Fingerprinting Protection**:
|
|
10
|
+
* - Spoofs GPU adapter information and capabilities
|
|
11
|
+
* - Fakes GPU uptime to appear as if the GPU has been running for 24-72 hours
|
|
12
|
+
* - Intercepts timestamp queries to prevent timing-based detection
|
|
13
|
+
*
|
|
14
|
+
* 2. **Platform Consistency (1:1 Fingerprinting)**:
|
|
15
|
+
* - Ensures all browser properties match the specified platform (Win32, MacIntel, Linux)
|
|
16
|
+
* - Synchronizes navigator properties, screen metrics, and WebGL/WebGPU values
|
|
17
|
+
* - Platform-specific GPU configurations for realistic fingerprints
|
|
18
|
+
*
|
|
19
|
+
* 3. **Runtime.enable Bypass**:
|
|
20
|
+
* - Prevents CDP detection through console.log(Error) technique
|
|
21
|
+
* - Intercepts and blocks Runtime.enable calls
|
|
22
|
+
* - Modifies Error stack traces to hide automation
|
|
23
|
+
*
|
|
24
|
+
* 4. **Advanced Canvas Protection**:
|
|
25
|
+
* - Adds controlled noise to canvas operations
|
|
26
|
+
* - Protects against both 2D and WebGL canvas fingerprinting
|
|
27
|
+
* - Includes font measurement variations
|
|
28
|
+
*
|
|
29
|
+
* 5. **WebRTC IP Leak Prevention**:
|
|
30
|
+
* - Filters STUN servers to prevent IP leaks
|
|
31
|
+
* - Provides fake but consistent device IDs
|
|
32
|
+
* - Modifies ICE candidates and statistics
|
|
33
|
+
*
|
|
34
|
+
* 6. **Audio Context Spoofing**:
|
|
35
|
+
* - Adds noise to audio processing to prevent fingerprinting
|
|
36
|
+
* - Works with both AudioContext and OfflineAudioContext
|
|
37
|
+
*
|
|
38
|
+
* 7. **Client Rect Variations**:
|
|
39
|
+
* - Adds small variations to getBoundingClientRect results
|
|
40
|
+
* - Makes automation harder to detect through DOM measurements
|
|
41
|
+
*
|
|
42
|
+
* 8. **Mouse Movement Humanization**:
|
|
43
|
+
* - Generates bezier curve movements instead of straight lines
|
|
44
|
+
* - Adds random variations to mouse paths
|
|
45
|
+
*
|
|
46
|
+
* Usage:
|
|
47
|
+
* ```typescript
|
|
48
|
+
* await CdpFingerprintInjector.injectFingerprint(page, fingerprint, {
|
|
49
|
+
* enableAdvancedStealth: true,
|
|
50
|
+
* bypassRuntimeEnable: true,
|
|
51
|
+
* platform: 'Win32', // Spoof as Windows for better evasion on Apify Linux
|
|
52
|
+
* spoofWebGL: true,
|
|
53
|
+
* spoofAudioContext: true,
|
|
54
|
+
* spoofClientRects: true,
|
|
55
|
+
* humanizeInteractions: true,
|
|
56
|
+
* spoofFonts: true, // New: Hide Linux-specific fonts
|
|
57
|
+
* spoofPerformance: true, // New: Windows-like timing characteristics
|
|
58
|
+
* spoofLocale: true, // New: Consistent Windows locale formatting
|
|
59
|
+
* useFingerprintDefaults: true // Use fingerprint-generator Windows values
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
import { log } from 'crawlee';
|
|
64
|
+
import { gotScraping } from 'got-scraping';
|
|
65
|
+
import { createCustomFingerprintInjection } from './custom-fingerprint-injector.js';
|
|
66
|
+
import { createStealthScript, createWebGLSpoofingScript, createAudioFingerprintSpoofingScript, createAdvancedCanvasProtectionScript, createClientRectSpoofingScript, createWebRTCSpoofingScript, createWebGPUSpoofingScript, createPlatformConsistencyScript, setupMouseMovementHumanization, createRuntimeEnableBypassScript, createFontSpoofingScript, createPerformanceSpoofingScript, createLocaleSpoofingScript, createUAClientHintsSpoofingScript,
|
|
67
|
+
// Stealth utilities (must be injected first)
|
|
68
|
+
createStealthUtilsScript,
|
|
69
|
+
// Prototype integrity (must be injected early)
|
|
70
|
+
createPrototypeIntegrityScript,
|
|
71
|
+
// 2024-2025 New modules
|
|
72
|
+
createCDPDetectionBypassScript, createStorageConsistencyScript, createTimingConsistencyScript, createKeyboardHumanizationScript, createScrollHumanizationScript, createDataDomeBypassScript, createCoalescedEventsSpoofingScript, setupKeyboardHumanization, setupScrollHumanization, } from './fingerprint-overrides/index.js';
|
|
73
|
+
export class CdpFingerprintInjector {
|
|
74
|
+
constructor(page) {
|
|
75
|
+
Object.defineProperty(this, "page", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
configurable: true,
|
|
78
|
+
writable: true,
|
|
79
|
+
value: void 0
|
|
80
|
+
});
|
|
81
|
+
this.page = page;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get recommended settings for Apify platform
|
|
85
|
+
* These settings are optimized for running headful Chrome on Apify (Linux)
|
|
86
|
+
* but spoofed to appear as Windows for better anti-bot evasion.
|
|
87
|
+
*
|
|
88
|
+
* Note: Humanization is disabled by default for performance.
|
|
89
|
+
* Use getDataDomeSettings() or enable humanization manually for anti-bot sites.
|
|
90
|
+
*/
|
|
91
|
+
static getApifyRecommendedSettings() {
|
|
92
|
+
return {
|
|
93
|
+
debug: true, // Enable debug logging by default
|
|
94
|
+
enableAdvancedStealth: true,
|
|
95
|
+
bypassRuntimeEnable: true,
|
|
96
|
+
platform: 'Win32', // Spoof as Windows instead of Linux for better evasion
|
|
97
|
+
spoofWebGL: true,
|
|
98
|
+
spoofAudioContext: true,
|
|
99
|
+
spoofClientRects: true,
|
|
100
|
+
detectTimezone: true, // Auto-detect timezone from proxy
|
|
101
|
+
// New advanced spoofing options for 2025
|
|
102
|
+
spoofFonts: true,
|
|
103
|
+
spoofPerformance: true,
|
|
104
|
+
spoofLocale: true,
|
|
105
|
+
useFingerprintDefaults: true, // Use fingerprint-generator Windows values
|
|
106
|
+
// 2024-2025 DataDome bypass options
|
|
107
|
+
bypassCDPDetection: true,
|
|
108
|
+
spoofStorage: true,
|
|
109
|
+
spoofTiming: true,
|
|
110
|
+
enableDataDomeBypass: false, // Enable only when needed
|
|
111
|
+
// Humanization disabled by default for performance
|
|
112
|
+
humanization: {
|
|
113
|
+
mouse: false,
|
|
114
|
+
keyboard: false,
|
|
115
|
+
scroll: false,
|
|
116
|
+
},
|
|
117
|
+
viewport: {
|
|
118
|
+
width: 1920,
|
|
119
|
+
height: 1080,
|
|
120
|
+
deviceScaleFactor: 1,
|
|
121
|
+
mobile: false,
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get settings specifically optimized for DataDome-protected sites.
|
|
127
|
+
* Enables all humanization features for maximum anti-bot evasion.
|
|
128
|
+
*/
|
|
129
|
+
static getDataDomeSettings() {
|
|
130
|
+
return {
|
|
131
|
+
...this.getApifyRecommendedSettings(),
|
|
132
|
+
debug: true, // Enable debug logging by default
|
|
133
|
+
// DataDome-specific optimizations (use both for compatibility)
|
|
134
|
+
enableDataDomeBypass: true,
|
|
135
|
+
bypassDatadome: true, // New alias - enables early injection
|
|
136
|
+
bypassCDPDetection: true,
|
|
137
|
+
spoofStorage: true,
|
|
138
|
+
spoofTiming: true,
|
|
139
|
+
// Enable all humanization for DataDome bypass
|
|
140
|
+
humanization: {
|
|
141
|
+
mouse: true,
|
|
142
|
+
keyboard: true,
|
|
143
|
+
scroll: true,
|
|
144
|
+
},
|
|
145
|
+
// Ensure all fingerprint attributes are consistent
|
|
146
|
+
spoofWebGL: true,
|
|
147
|
+
spoofAudioContext: true,
|
|
148
|
+
spoofClientRects: true,
|
|
149
|
+
spoofFonts: true,
|
|
150
|
+
spoofPerformance: true,
|
|
151
|
+
spoofLocale: true,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
static async injectFingerprint(page, fingerprint, options) {
|
|
155
|
+
const handler = new CdpFingerprintInjector(page);
|
|
156
|
+
return handler.attachToPage(fingerprint, options);
|
|
157
|
+
}
|
|
158
|
+
async setViewport(viewport, fingerprint) {
|
|
159
|
+
// IMPORTANT: In headful mode, don't override viewport - it creates weird compressed layouts
|
|
160
|
+
// The browser window already has natural dimensions from the OS
|
|
161
|
+
// Only override viewport in headless mode where window size needs to be set
|
|
162
|
+
// Check if we're in headless mode
|
|
163
|
+
// In headful mode, we skip viewport override to avoid layout issues
|
|
164
|
+
const isHeadless = process.env.APIFY_HEADLESS === '1' ||
|
|
165
|
+
process.env.CRAWLEE_HEADLESS === '1' ||
|
|
166
|
+
process.env.HEADLESS === 'true';
|
|
167
|
+
if (!isHeadless) {
|
|
168
|
+
log.info('⚠️ Headful mode detected - SKIPPING viewport override to preserve natural window behavior');
|
|
169
|
+
log.info('✅ Browser will use OS window dimensions - scrolling will work naturally');
|
|
170
|
+
return; // Skip viewport override in headful mode
|
|
171
|
+
}
|
|
172
|
+
// Only apply viewport override in headless mode
|
|
173
|
+
log.info('Headless mode detected - applying viewport override');
|
|
174
|
+
let defaultViewport = {
|
|
175
|
+
width: 1920,
|
|
176
|
+
height: 1080,
|
|
177
|
+
deviceScaleFactor: 1,
|
|
178
|
+
mobile: false,
|
|
179
|
+
};
|
|
180
|
+
// Extract from fingerprint if available
|
|
181
|
+
if (fingerprint?.screen) {
|
|
182
|
+
// IMPORTANT: Set viewport height SMALLER than screen height to allow scrolling
|
|
183
|
+
// Reserve 150px for browser chrome, URL bar, and overflow space
|
|
184
|
+
const screenHeight = fingerprint.screen.height || 1080;
|
|
185
|
+
const viewportHeight = screenHeight - 150;
|
|
186
|
+
defaultViewport = {
|
|
187
|
+
width: fingerprint.screen.width || 1920,
|
|
188
|
+
height: viewportHeight,
|
|
189
|
+
deviceScaleFactor: fingerprint.screen.devicePixelRatio || 1,
|
|
190
|
+
mobile: false,
|
|
191
|
+
};
|
|
192
|
+
log.info('Viewport configured for scrolling', {
|
|
193
|
+
screenHeight,
|
|
194
|
+
viewportHeight,
|
|
195
|
+
reservedSpace: 150,
|
|
196
|
+
width: defaultViewport.width,
|
|
197
|
+
deviceScaleFactor: defaultViewport.deviceScaleFactor,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
const finalViewport = Object.assign(defaultViewport, viewport);
|
|
201
|
+
log.info('Final viewport settings (headless mode)', finalViewport);
|
|
202
|
+
// CDP call to override device metrics (headless mode only)
|
|
203
|
+
await this.page.client.Emulation.setDeviceMetricsOverride(finalViewport);
|
|
204
|
+
log.info('setDeviceMetricsOverride completed (headless mode)');
|
|
205
|
+
}
|
|
206
|
+
async setExtraHTTPHeaders(headers) {
|
|
207
|
+
await this.page.client.Network.setExtraHTTPHeaders({ headers });
|
|
208
|
+
}
|
|
209
|
+
async getTimezoneFromIp(proxyUrl) {
|
|
210
|
+
try {
|
|
211
|
+
const response = await gotScraping({
|
|
212
|
+
url: 'https://ipinfo.io/json',
|
|
213
|
+
proxyUrl,
|
|
214
|
+
responseType: 'json',
|
|
215
|
+
});
|
|
216
|
+
return response.body.timezone;
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
log.error('Failed to get timezone from IP:', { error });
|
|
220
|
+
return 'UTC';
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
async setTimezoneOverride(timezone) {
|
|
224
|
+
await this.page.client.Emulation.setTimezoneOverride({
|
|
225
|
+
timezoneId: timezone,
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
async injectStealthProtections() {
|
|
229
|
+
const stealthScript = createStealthScript();
|
|
230
|
+
await this.page.client.Page.addScriptToEvaluateOnNewDocument({ source: stealthScript });
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Create a debug script that logs fingerprint override status to the console
|
|
234
|
+
*/
|
|
235
|
+
createDebugScript(options) {
|
|
236
|
+
return `
|
|
237
|
+
(() => {
|
|
238
|
+
// CDP Fingerprint Override Debug Logs
|
|
239
|
+
const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
|
|
240
|
+
|
|
241
|
+
console.log(DEBUG_PREFIX, '=== Fingerprint Override Status ===');
|
|
242
|
+
console.log(DEBUG_PREFIX, 'Timestamp:', new Date().toISOString());
|
|
243
|
+
|
|
244
|
+
// Check navigator properties
|
|
245
|
+
console.log(DEBUG_PREFIX, 'Navigator Checks:');
|
|
246
|
+
console.log(DEBUG_PREFIX, ' - platform:', navigator.platform);
|
|
247
|
+
console.log(DEBUG_PREFIX, ' - userAgent:', navigator.userAgent.substring(0, 80) + '...');
|
|
248
|
+
console.log(DEBUG_PREFIX, ' - webdriver:', navigator.webdriver);
|
|
249
|
+
console.log(DEBUG_PREFIX, ' - hardwareConcurrency:', navigator.hardwareConcurrency);
|
|
250
|
+
console.log(DEBUG_PREFIX, ' - deviceMemory:', navigator.deviceMemory);
|
|
251
|
+
console.log(DEBUG_PREFIX, ' - language:', navigator.language);
|
|
252
|
+
console.log(DEBUG_PREFIX, ' - languages:', navigator.languages);
|
|
253
|
+
console.log(DEBUG_PREFIX, ' - maxTouchPoints:', navigator.maxTouchPoints);
|
|
254
|
+
console.log(DEBUG_PREFIX, ' - pdfViewerEnabled:', navigator.pdfViewerEnabled);
|
|
255
|
+
console.log(DEBUG_PREFIX, ' - plugins.length:', navigator.plugins?.length);
|
|
256
|
+
|
|
257
|
+
// Check screen properties
|
|
258
|
+
console.log(DEBUG_PREFIX, 'Screen Checks:');
|
|
259
|
+
console.log(DEBUG_PREFIX, ' - colorDepth:', screen.colorDepth);
|
|
260
|
+
console.log(DEBUG_PREFIX, ' - pixelDepth:', screen.pixelDepth);
|
|
261
|
+
console.log(DEBUG_PREFIX, ' - availWidth:', screen.availWidth);
|
|
262
|
+
console.log(DEBUG_PREFIX, ' - availHeight:', screen.availHeight);
|
|
263
|
+
console.log(DEBUG_PREFIX, ' - devicePixelRatio:', window.devicePixelRatio);
|
|
264
|
+
|
|
265
|
+
// Check window properties
|
|
266
|
+
console.log(DEBUG_PREFIX, 'Window Checks:');
|
|
267
|
+
console.log(DEBUG_PREFIX, ' - outerWidth:', window.outerWidth);
|
|
268
|
+
console.log(DEBUG_PREFIX, ' - outerHeight:', window.outerHeight);
|
|
269
|
+
console.log(DEBUG_PREFIX, ' - screenX:', window.screenX);
|
|
270
|
+
console.log(DEBUG_PREFIX, ' - screenY:', window.screenY);
|
|
271
|
+
|
|
272
|
+
// Check chrome object
|
|
273
|
+
console.log(DEBUG_PREFIX, 'Chrome Object:');
|
|
274
|
+
console.log(DEBUG_PREFIX, ' - chrome exists:', typeof window.chrome !== 'undefined');
|
|
275
|
+
console.log(DEBUG_PREFIX, ' - chrome.runtime exists:', typeof window.chrome?.runtime !== 'undefined');
|
|
276
|
+
|
|
277
|
+
// Check WebGL
|
|
278
|
+
try {
|
|
279
|
+
const canvas = document.createElement('canvas');
|
|
280
|
+
const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
|
|
281
|
+
if (gl) {
|
|
282
|
+
const debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
|
|
283
|
+
if (debugInfo) {
|
|
284
|
+
console.log(DEBUG_PREFIX, 'WebGL Checks:');
|
|
285
|
+
console.log(DEBUG_PREFIX, ' - vendor:', gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL));
|
|
286
|
+
console.log(DEBUG_PREFIX, ' - renderer:', gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL));
|
|
287
|
+
} else {
|
|
288
|
+
console.log(DEBUG_PREFIX, 'WebGL debug extension not available');
|
|
289
|
+
}
|
|
290
|
+
} else {
|
|
291
|
+
console.log(DEBUG_PREFIX, 'WebGL context not available');
|
|
292
|
+
}
|
|
293
|
+
} catch (e) {
|
|
294
|
+
console.log(DEBUG_PREFIX, 'WebGL check failed:', e.message);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// Check automation markers
|
|
298
|
+
console.log(DEBUG_PREFIX, 'Automation Marker Checks:');
|
|
299
|
+
console.log(DEBUG_PREFIX, ' - $cdc_ properties:', Object.keys(window).filter(k => k.startsWith('$cdc_') || k.startsWith('cdc_')).length === 0 ? 'CLEAN' : 'DETECTED');
|
|
300
|
+
console.log(DEBUG_PREFIX, ' - webdriver properties:', Object.keys(window).filter(k => k.toLowerCase().includes('webdriver')).length === 0 ? 'CLEAN' : 'DETECTED');
|
|
301
|
+
|
|
302
|
+
// Check permissions API
|
|
303
|
+
if (navigator.permissions) {
|
|
304
|
+
navigator.permissions.query({ name: 'notifications' }).then(result => {
|
|
305
|
+
console.log(DEBUG_PREFIX, 'Permissions:');
|
|
306
|
+
console.log(DEBUG_PREFIX, ' - notifications:', result.state);
|
|
307
|
+
}).catch(e => {
|
|
308
|
+
console.log(DEBUG_PREFIX, 'Permissions check failed:', e.message);
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Check storage estimate
|
|
313
|
+
if (navigator.storage && navigator.storage.estimate) {
|
|
314
|
+
navigator.storage.estimate().then(estimate => {
|
|
315
|
+
console.log(DEBUG_PREFIX, 'Storage:');
|
|
316
|
+
console.log(DEBUG_PREFIX, ' - quota:', Math.round(estimate.quota / 1024 / 1024 / 1024) + ' GB');
|
|
317
|
+
console.log(DEBUG_PREFIX, ' - usage:', Math.round(estimate.usage / 1024) + ' KB');
|
|
318
|
+
}).catch(e => {
|
|
319
|
+
console.log(DEBUG_PREFIX, 'Storage check failed:', e.message);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Log applied options
|
|
324
|
+
console.log(DEBUG_PREFIX, 'Applied Options:');
|
|
325
|
+
console.log(DEBUG_PREFIX, ' - platform:', '${options.platform || "auto"}');
|
|
326
|
+
console.log(DEBUG_PREFIX, ' - enableAdvancedStealth:', ${options.enableAdvancedStealth !== false});
|
|
327
|
+
console.log(DEBUG_PREFIX, ' - bypassCDPDetection:', ${options.bypassCDPDetection !== false});
|
|
328
|
+
console.log(DEBUG_PREFIX, ' - spoofStorage:', ${options.spoofStorage !== false});
|
|
329
|
+
console.log(DEBUG_PREFIX, ' - spoofTiming:', ${options.spoofTiming !== false});
|
|
330
|
+
console.log(DEBUG_PREFIX, ' - enableDataDomeBypass:', ${options.enableDataDomeBypass || false});
|
|
331
|
+
console.log(DEBUG_PREFIX, ' - humanization.mouse:', ${options.humanization?.mouse || false});
|
|
332
|
+
console.log(DEBUG_PREFIX, ' - humanization.keyboard:', ${options.humanization?.keyboard || false});
|
|
333
|
+
console.log(DEBUG_PREFIX, ' - humanization.scroll:', ${options.humanization?.scroll || false});
|
|
334
|
+
|
|
335
|
+
console.log(DEBUG_PREFIX, '=== End Fingerprint Override Status ===');
|
|
336
|
+
})();
|
|
337
|
+
`;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Extract relevant data from fingerprint for overrides
|
|
341
|
+
*/
|
|
342
|
+
extractFingerprintData(fingerprint) {
|
|
343
|
+
const webglConfig = {};
|
|
344
|
+
const platformConfig = {};
|
|
345
|
+
let uaClientHints;
|
|
346
|
+
// Extract WebGL data from videoCard if available
|
|
347
|
+
if (fingerprint.videoCard) {
|
|
348
|
+
webglConfig.vendor = fingerprint.videoCard.vendor;
|
|
349
|
+
webglConfig.renderer = fingerprint.videoCard.renderer;
|
|
350
|
+
webglConfig.vendorUnmasked = fingerprint.videoCard.vendor;
|
|
351
|
+
webglConfig.rendererUnmasked = fingerprint.videoCard.renderer;
|
|
352
|
+
}
|
|
353
|
+
// Extract platform data if available
|
|
354
|
+
if (fingerprint.navigator) {
|
|
355
|
+
platformConfig.platform = fingerprint.navigator.platform;
|
|
356
|
+
platformConfig.vendor = fingerprint.navigator.vendor;
|
|
357
|
+
platformConfig.vendorSub = fingerprint.navigator.vendorSub;
|
|
358
|
+
platformConfig.productSub = fingerprint.navigator.productSub;
|
|
359
|
+
platformConfig.hardwareConcurrency = fingerprint.navigator.hardwareConcurrency;
|
|
360
|
+
platformConfig.maxTouchPoints = fingerprint.navigator.maxTouchPoints;
|
|
361
|
+
platformConfig.language = fingerprint.navigator.language;
|
|
362
|
+
platformConfig.languages = fingerprint.navigator.languages;
|
|
363
|
+
platformConfig.oscpu = fingerprint.navigator.oscpu;
|
|
364
|
+
platformConfig.userAgent = fingerprint.navigator.userAgent;
|
|
365
|
+
platformConfig.appVersion = fingerprint.navigator.appVersion;
|
|
366
|
+
platformConfig.appName = fingerprint.navigator.appName;
|
|
367
|
+
platformConfig.appCodeName = fingerprint.navigator.appCodeName;
|
|
368
|
+
platformConfig.product = fingerprint.navigator.product;
|
|
369
|
+
// Extract UA-CH data from generated fingerprint
|
|
370
|
+
// This ensures navigator.userAgentData brands/versions match the UA string
|
|
371
|
+
if (fingerprint.navigator.userAgentData) {
|
|
372
|
+
const uad = fingerprint.navigator.userAgentData;
|
|
373
|
+
uaClientHints = {
|
|
374
|
+
brands: uad.brands,
|
|
375
|
+
fullVersionList: uad.fullVersionList,
|
|
376
|
+
mobile: uad.mobile,
|
|
377
|
+
platform: uad.platform,
|
|
378
|
+
architecture: uad.architecture,
|
|
379
|
+
bitness: uad.bitness,
|
|
380
|
+
model: uad.model,
|
|
381
|
+
platformVersion: uad.platformVersion,
|
|
382
|
+
uaFullVersion: uad.uaFullVersion,
|
|
383
|
+
wow64: uad.wow64,
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
if (fingerprint.screen) {
|
|
388
|
+
platformConfig.devicePixelRatio = fingerprint.screen.devicePixelRatio;
|
|
389
|
+
platformConfig.screenDepth = fingerprint.screen.pixelDepth;
|
|
390
|
+
platformConfig.colorDepth = fingerprint.screen.colorDepth;
|
|
391
|
+
}
|
|
392
|
+
return { webglConfig, platformConfig, uaClientHints };
|
|
393
|
+
}
|
|
394
|
+
async attachToPage(browserFingerprintWithHeaders, options) {
|
|
395
|
+
const { fingerprint, headers } = browserFingerprintWithHeaders;
|
|
396
|
+
const shouldFetchTimezone = options?.timezone || options?.detectTimezone;
|
|
397
|
+
const timezone = shouldFetchTimezone
|
|
398
|
+
? await this.getTimezoneFromIp(options?.proxyUrl)
|
|
399
|
+
: undefined;
|
|
400
|
+
if (timezone) {
|
|
401
|
+
await this.setTimezoneOverride(timezone);
|
|
402
|
+
}
|
|
403
|
+
// NOTE: Page.enable() is required for addScriptToEvaluateOnNewDocument to work
|
|
404
|
+
// We enable it lazily just before script injection to minimize detection surface
|
|
405
|
+
await this.page.ensurePageEnabled();
|
|
406
|
+
// Filter headers to only include those that can be injected via CDP
|
|
407
|
+
const filteredHeaders = {};
|
|
408
|
+
const allowedHeaders = ['accept', 'accept-encoding', 'accept-language', 'user-agent', 'referer', 'sec-ch-ua', 'sec-ch-ua-mobile', 'sec-ch-ua-platform'];
|
|
409
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
410
|
+
if (allowedHeaders.includes(key.toLowerCase()) && typeof value === 'string') {
|
|
411
|
+
filteredHeaders[key] = value;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
// Create custom fingerprint injection scripts
|
|
415
|
+
log.info('Creating custom fingerprint injection scripts');
|
|
416
|
+
const customFingerprintScripts = createCustomFingerprintInjection(fingerprint, {
|
|
417
|
+
debug: options?.debug !== false,
|
|
418
|
+
throwOnError: true,
|
|
419
|
+
});
|
|
420
|
+
// Prepare all scripts to inject - stealth utils and runtime bypass MUST be first
|
|
421
|
+
// These scripts set up protections BEFORE page JavaScript runs
|
|
422
|
+
// Check if DataDome bypass is enabled (via either option name)
|
|
423
|
+
const isDataDomeBypassEnabled = options?.enableDataDomeBypass || options?.bypassDatadome;
|
|
424
|
+
const scriptsToInject = [
|
|
425
|
+
createStealthUtilsScript(), // Must be first - provides guards and toString spoofing
|
|
426
|
+
createPrototypeIntegrityScript(), // Second - provides native-like property descriptor masking
|
|
427
|
+
createRuntimeEnableBypassScript(), // Third - protects against CDP detection via Error stack analysis
|
|
428
|
+
];
|
|
429
|
+
// CRITICAL: DataDome bypass must be injected early for stack trace sanitization
|
|
430
|
+
// and performance.memory spoofing to work before other scripts run
|
|
431
|
+
if (isDataDomeBypassEnabled) {
|
|
432
|
+
scriptsToInject.push(createDataDomeBypassScript());
|
|
433
|
+
log.info('DataDome bypass enabled - injected early in script chain');
|
|
434
|
+
}
|
|
435
|
+
// Add custom fingerprint scripts
|
|
436
|
+
scriptsToInject.push(...customFingerprintScripts);
|
|
437
|
+
// Always inject base stealth protections
|
|
438
|
+
await this.injectStealthProtections();
|
|
439
|
+
// Extract fingerprint data if we should use it
|
|
440
|
+
// When useFingerprintDefaults is true (or undefined), use hardcoded defaults
|
|
441
|
+
// When useFingerprintDefaults is false, use the generated fingerprint data
|
|
442
|
+
const shouldUseFingerprintData = options?.useFingerprintDefaults === false;
|
|
443
|
+
const { webglConfig, platformConfig, uaClientHints } = shouldUseFingerprintData
|
|
444
|
+
? this.extractFingerprintData(fingerprint)
|
|
445
|
+
: { webglConfig: undefined, platformConfig: undefined, uaClientHints: undefined };
|
|
446
|
+
// Add advanced features based on options
|
|
447
|
+
if (options?.enableAdvancedStealth !== false) {
|
|
448
|
+
// UA Client Hints spoofing - pass generated data when available
|
|
449
|
+
// to ensure brands/versions match the generated userAgent string
|
|
450
|
+
scriptsToInject.push(createUAClientHintsSpoofingScript(options?.platform, shouldUseFingerprintData ? uaClientHints : undefined));
|
|
451
|
+
// WebGL spoofing
|
|
452
|
+
if (options?.spoofWebGL !== false) {
|
|
453
|
+
scriptsToInject.push(createWebGLSpoofingScript(shouldUseFingerprintData ? webglConfig : undefined));
|
|
454
|
+
}
|
|
455
|
+
// Audio fingerprint spoofing
|
|
456
|
+
if (options?.spoofAudioContext !== false) {
|
|
457
|
+
scriptsToInject.push(createAudioFingerprintSpoofingScript());
|
|
458
|
+
}
|
|
459
|
+
// Canvas protection
|
|
460
|
+
scriptsToInject.push(createAdvancedCanvasProtectionScript());
|
|
461
|
+
// Client rect spoofing
|
|
462
|
+
if (options?.spoofClientRects !== false) {
|
|
463
|
+
scriptsToInject.push(createClientRectSpoofingScript());
|
|
464
|
+
}
|
|
465
|
+
// Coalesced events spoofing (makes CDP mouse events look real)
|
|
466
|
+
scriptsToInject.push(createCoalescedEventsSpoofingScript());
|
|
467
|
+
// WebRTC spoofing
|
|
468
|
+
scriptsToInject.push(createWebRTCSpoofingScript());
|
|
469
|
+
// WebGPU spoofing (more aggressive when experimental fingerprints enabled)
|
|
470
|
+
scriptsToInject.push(createWebGPUSpoofingScript(options?.useExperimentalFingerprints));
|
|
471
|
+
// Font spoofing (2025)
|
|
472
|
+
if (options?.spoofFonts !== false) {
|
|
473
|
+
scriptsToInject.push(createFontSpoofingScript());
|
|
474
|
+
}
|
|
475
|
+
// Performance spoofing (2025)
|
|
476
|
+
if (options?.spoofPerformance !== false) {
|
|
477
|
+
scriptsToInject.push(createPerformanceSpoofingScript());
|
|
478
|
+
}
|
|
479
|
+
// Locale spoofing (2025)
|
|
480
|
+
if (options?.spoofLocale !== false) {
|
|
481
|
+
scriptsToInject.push(createLocaleSpoofingScript());
|
|
482
|
+
}
|
|
483
|
+
// 2024-2025 New protections
|
|
484
|
+
// CDP Detection Bypass
|
|
485
|
+
if (options?.bypassCDPDetection !== false) {
|
|
486
|
+
scriptsToInject.push(createCDPDetectionBypassScript());
|
|
487
|
+
}
|
|
488
|
+
// Storage consistency
|
|
489
|
+
if (options?.spoofStorage !== false) {
|
|
490
|
+
scriptsToInject.push(createStorageConsistencyScript());
|
|
491
|
+
}
|
|
492
|
+
// Timing consistency
|
|
493
|
+
if (options?.spoofTiming !== false) {
|
|
494
|
+
scriptsToInject.push(createTimingConsistencyScript());
|
|
495
|
+
}
|
|
496
|
+
// DataDome-specific bypass - already injected early if enabled
|
|
497
|
+
// (see isDataDomeBypassEnabled check at the beginning of scriptsToInject)
|
|
498
|
+
// Keyboard humanization (browser context) - disabled by default
|
|
499
|
+
if (options?.humanization?.keyboard) {
|
|
500
|
+
scriptsToInject.push(createKeyboardHumanizationScript());
|
|
501
|
+
}
|
|
502
|
+
// Scroll humanization (browser context) - disabled by default
|
|
503
|
+
if (options?.humanization?.scroll) {
|
|
504
|
+
scriptsToInject.push(createScrollHumanizationScript());
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
// Apply platform consistency script
|
|
508
|
+
if (options?.platform) {
|
|
509
|
+
scriptsToInject.push(createPlatformConsistencyScript(options.platform, shouldUseFingerprintData ? platformConfig : undefined));
|
|
510
|
+
}
|
|
511
|
+
// CRITICAL: Clean scripts to remove CDP detection patterns
|
|
512
|
+
const isDebug = options?.debug === true;
|
|
513
|
+
const cleanScript = (script) => {
|
|
514
|
+
let cleaned = script
|
|
515
|
+
// Remove sourceURL patterns that reveal CDP injection
|
|
516
|
+
.replace(/\/\/# sourceURL=[^\n]*/g, '')
|
|
517
|
+
.replace(/\/\/@ sourceURL=[^\n]*/g, '')
|
|
518
|
+
// Remove sourceMappingURL patterns
|
|
519
|
+
.replace(/\/\/# sourceMappingURL=[^\n]*/g, '')
|
|
520
|
+
// Remove puppeteer/playwright markers
|
|
521
|
+
.replace(/__puppeteer_evaluation_script__/g, 'anonymous')
|
|
522
|
+
.replace(/__playwright_evaluation_script__/g, 'anonymous')
|
|
523
|
+
// Remove CDP-specific comments
|
|
524
|
+
.replace(/\/\*\s*__CDP_[A-Z_]+__\s*\*\//g, '');
|
|
525
|
+
// CRITICAL: Strip ALL console output from injected scripts in production.
|
|
526
|
+
// Anti-bot services hook console.log and detect debug prefixes like
|
|
527
|
+
// [CDP-FP-DEBUG], [DD-BYPASS], [RUNTIME-ENABLE-BYPASS], etc.
|
|
528
|
+
if (!isDebug) {
|
|
529
|
+
cleaned = cleaned
|
|
530
|
+
.replace(/^\s*console\.(log|warn|info|debug)\s*\([^;]*\);?\s*$/gm, '')
|
|
531
|
+
.replace(/^\s*const\s+(DEBUG_PREFIX|ERROR_PREFIX)\s*=\s*[^;]*;\s*$/gm, '');
|
|
532
|
+
}
|
|
533
|
+
return cleaned;
|
|
534
|
+
};
|
|
535
|
+
// Add debug scripts into the bundle only when explicitly enabled
|
|
536
|
+
if (isDebug) {
|
|
537
|
+
scriptsToInject.push(this.createDebugScript(options || {}));
|
|
538
|
+
}
|
|
539
|
+
// BUNDLE ALL SCRIPTS INTO ONE to minimize CDP interactions
|
|
540
|
+
log.info(`Bundling ${scriptsToInject.length} fingerprint scripts into single injection`);
|
|
541
|
+
// Preamble: create shared stealth store accessible by all module IIFEs via closure
|
|
542
|
+
const preamble = `var __stealth = { debug: ${isDebug} };`;
|
|
543
|
+
const bundledScript = preamble + '\n\n' + scriptsToInject
|
|
544
|
+
.map(script => cleanScript(script))
|
|
545
|
+
.join('\n\n');
|
|
546
|
+
// Validate bundled script for syntax errors
|
|
547
|
+
try {
|
|
548
|
+
new Function(bundledScript);
|
|
549
|
+
log.info('✓ Bundled script passed syntax validation');
|
|
550
|
+
}
|
|
551
|
+
catch (error) {
|
|
552
|
+
log.error('✗ Bundled script has syntax error:', { error });
|
|
553
|
+
// Fall back to individual script validation to find the culprit
|
|
554
|
+
scriptsToInject.forEach((script, index) => {
|
|
555
|
+
try {
|
|
556
|
+
new Function(script);
|
|
557
|
+
}
|
|
558
|
+
catch (e) {
|
|
559
|
+
const scriptPreview = script.substring(0, 300);
|
|
560
|
+
log.error(`✗ Error in script ${index + 1}:`, { error: e, scriptPreview });
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
throw new Error(`Bundled script has syntax error: ${error}`);
|
|
564
|
+
}
|
|
565
|
+
// Inject SINGLE bundled script - reduces CDP detection surface
|
|
566
|
+
try {
|
|
567
|
+
log.info('Injecting single bundled fingerprint script (minimizes CDP detection)');
|
|
568
|
+
await Promise.all([
|
|
569
|
+
this.setViewport(options?.viewport, fingerprint),
|
|
570
|
+
this.setExtraHTTPHeaders(filteredHeaders),
|
|
571
|
+
// Single script injection instead of many - reduces CDP detection surface
|
|
572
|
+
(async () => {
|
|
573
|
+
try {
|
|
574
|
+
await this.page.client.Page.addScriptToEvaluateOnNewDocument({
|
|
575
|
+
source: bundledScript,
|
|
576
|
+
});
|
|
577
|
+
log.info('✓ Bundled script injected successfully');
|
|
578
|
+
}
|
|
579
|
+
catch (error) {
|
|
580
|
+
const scriptPreview = bundledScript.substring(0, 200).split('\n')[0];
|
|
581
|
+
log.error('✗ Failed to inject bundled script:', {
|
|
582
|
+
error,
|
|
583
|
+
scriptPreview,
|
|
584
|
+
});
|
|
585
|
+
throw error; // Rethrow to fail the entire injection
|
|
586
|
+
}
|
|
587
|
+
})(),
|
|
588
|
+
]);
|
|
589
|
+
log.info('✓ Fingerprint injection complete (single bundled script)');
|
|
590
|
+
}
|
|
591
|
+
catch (error) {
|
|
592
|
+
log.error('✗ Failed to inject fingerprint scripts:', { error });
|
|
593
|
+
throw error; // Rethrow to make injection failures visible
|
|
594
|
+
}
|
|
595
|
+
// Setup mouse movement humanization if requested (disabled by default)
|
|
596
|
+
// Support both legacy humanizeInteractions and new humanization.mouse
|
|
597
|
+
const enableMouseHumanization = options?.humanization?.mouse || options?.humanizeInteractions;
|
|
598
|
+
if (enableMouseHumanization) {
|
|
599
|
+
await setupMouseMovementHumanization(this.page.client);
|
|
600
|
+
}
|
|
601
|
+
// NOTE: setupRuntimeEnableBypass REMOVED - it uses Runtime.evaluate which is itself a detection vector!
|
|
602
|
+
// The bypass script is now included in the bundled stealth scripts injected via addScriptToEvaluateOnNewDocument
|
|
603
|
+
// This runs BEFORE page JavaScript, avoiding Runtime domain activation
|
|
604
|
+
// 2024-2025: CDP-level keyboard humanization (disabled by default)
|
|
605
|
+
if (options?.humanization?.keyboard) {
|
|
606
|
+
await setupKeyboardHumanization(this.page.client);
|
|
607
|
+
}
|
|
608
|
+
// 2024-2025: CDP-level scroll humanization (disabled by default)
|
|
609
|
+
if (options?.humanization?.scroll) {
|
|
610
|
+
await setupScrollHumanization(this.page.client);
|
|
611
|
+
}
|
|
612
|
+
// Debug and viewport debug scripts are now bundled into the main injection above
|
|
613
|
+
log.info('Enhanced fingerprint attached with settings:', {
|
|
614
|
+
proxy: options?.proxyUrl,
|
|
615
|
+
timezone,
|
|
616
|
+
advancedStealth: options?.enableAdvancedStealth !== false,
|
|
617
|
+
bypassRuntimeEnable: options?.bypassRuntimeEnable,
|
|
618
|
+
platform: options?.platform,
|
|
619
|
+
useFingerprintDefaults: options?.useFingerprintDefaults,
|
|
620
|
+
bypassCDPDetection: options?.bypassCDPDetection !== false,
|
|
621
|
+
spoofStorage: options?.spoofStorage !== false,
|
|
622
|
+
spoofTiming: options?.spoofTiming !== false,
|
|
623
|
+
enableDataDomeBypass: options?.enableDataDomeBypass,
|
|
624
|
+
humanization: {
|
|
625
|
+
mouse: enableMouseHumanization || false,
|
|
626
|
+
keyboard: options?.humanization?.keyboard || false,
|
|
627
|
+
scroll: options?.humanization?.scroll || false,
|
|
628
|
+
},
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
//# sourceMappingURL=fingerprint-injector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fingerprint-injector.js","sourceRoot":"","sources":["../../src/fingerprinting/fingerprint-injector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EACH,mBAAmB,EACnB,yBAAyB,EACzB,oCAAoC,EACpC,oCAAoC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