jumpy-lion 0.0.40 → 0.0.42
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.map +1 -1
- package/dist/browser-controller.js +102 -16
- package/dist/browser-controller.js.map +1 -1
- package/dist/browser-plugin.d.ts +26 -1
- package/dist/browser-plugin.d.ts.map +1 -1
- package/dist/browser-plugin.js +25 -2
- package/dist/browser-plugin.js.map +1 -1
- package/dist/browser-process/browser.d.ts +24 -1
- package/dist/browser-process/browser.d.ts.map +1 -1
- package/dist/browser-process/browser.js +79 -6
- package/dist/browser-process/browser.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 +34 -1
- package/dist/crawler.d.ts.map +1 -1
- package/dist/crawler.js +7 -0
- package/dist/crawler.js.map +1 -1
- 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 +40 -2
- package/dist/fingerprinting/fingerprint-injector.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-injector.js +449 -44
- package/dist/fingerprinting/fingerprint-injector.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.js +11 -1
- package/dist/fingerprinting/fingerprint-overrides/audio-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/canvas-protection.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/canvas-protection.js +11 -1
- package/dist/fingerprinting/fingerprint-overrides/canvas-protection.js.map +1 -1
- 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 +497 -0
- package/dist/fingerprinting/fingerprint-overrides/cdp-detection-bypass.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.js +11 -1
- package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts +14 -0
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js +536 -0
- package/dist/fingerprinting/fingerprint-overrides/datadome-bypass.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/font-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/font-spoofing.js +11 -1
- package/dist/fingerprinting/fingerprint-overrides/font-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/index.d.ts +16 -1
- package/dist/fingerprinting/fingerprint-overrides/index.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/index.js +19 -1
- package/dist/fingerprinting/fingerprint-overrides/index.js.map +1 -1
- 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 +291 -0
- package/dist/fingerprinting/fingerprint-overrides/keyboard-humanization.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.js +54 -22
- package/dist/fingerprinting/fingerprint-overrides/locale-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.js +4 -5
- package/dist/fingerprinting/fingerprint-overrides/mouse-humanization.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.js +11 -1
- package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts +13 -0
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js +413 -70
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.d.ts +10 -3
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.js +132 -73
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.js.map +1 -1
- 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 +380 -0
- package/dist/fingerprinting/fingerprint-overrides/scroll-humanization.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts +8 -0
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.js +417 -71
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.js.map +1 -1
- 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 +368 -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 +438 -0
- package/dist/fingerprinting/fingerprint-overrides/timing-consistency.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 +315 -0
- package/dist/fingerprinting/fingerprint-overrides/utils.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js +13 -1
- package/dist/fingerprinting/fingerprint-overrides/webgl-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.js +11 -1
- package/dist/fingerprinting/fingerprint-overrides/webgpu-spoofing.js.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js +11 -1
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js.map +1 -1
- package/dist/page.d.ts +12 -0
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +35 -3
- package/dist/page.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/fingerprinting/canvas-fingerprint.d.ts +0 -4
- package/dist/fingerprinting/canvas-fingerprint.d.ts.map +0 -1
- package/dist/fingerprinting/canvas-fingerprint.js +0 -60
- package/dist/fingerprinting/canvas-fingerprint.js.map +0 -1
|
@@ -81,7 +81,17 @@ export const createAudioFingerprintSpoofingScript = () => {
|
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
|
|
85
|
+
const ERROR_PREFIX = '[CDP-FP-ERROR]';
|
|
86
|
+
|
|
87
|
+
try {
|
|
88
|
+
console.log(DEBUG_PREFIX, 'Starting audio context spoofing...');
|
|
89
|
+
spoofAudioContext();
|
|
90
|
+
console.log(DEBUG_PREFIX, '✓ Audio context spoofing applied');
|
|
91
|
+
} catch (e) {
|
|
92
|
+
console.error(ERROR_PREFIX, '✗ Failed to apply audio context spoofing:', e);
|
|
93
|
+
throw e; // Rethrow to make errors visible
|
|
94
|
+
}
|
|
85
95
|
})();`;
|
|
86
96
|
};
|
|
87
97
|
//# sourceMappingURL=audio-spoofing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/audio-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAW,EAAE;IAC7D,OAAO
|
|
1
|
+
{"version":3,"file":"audio-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/audio-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAW,EAAE;IAC7D,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyFL,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-protection.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/canvas-protection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,oCAAoC,QAAO,
|
|
1
|
+
{"version":3,"file":"canvas-protection.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/canvas-protection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,oCAAoC,QAAO,MAmGvD,CAAC"}
|
|
@@ -89,7 +89,17 @@ export const createAdvancedCanvasProtectionScript = () => {
|
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
|
|
93
|
+
const ERROR_PREFIX = '[CDP-FP-ERROR]';
|
|
94
|
+
|
|
95
|
+
try {
|
|
96
|
+
console.log(DEBUG_PREFIX, 'Starting canvas protection...');
|
|
97
|
+
protectCanvas();
|
|
98
|
+
console.log(DEBUG_PREFIX, '✓ Canvas protection applied');
|
|
99
|
+
} catch (e) {
|
|
100
|
+
console.error(ERROR_PREFIX, '✗ Failed to apply canvas protection:', e);
|
|
101
|
+
throw e; // Rethrow to make errors visible
|
|
102
|
+
}
|
|
93
103
|
})();`;
|
|
94
104
|
};
|
|
95
105
|
//# sourceMappingURL=canvas-protection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas-protection.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/canvas-protection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAW,EAAE;IAC7D,OAAO
|
|
1
|
+
{"version":3,"file":"canvas-protection.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/canvas-protection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,oCAAoC,GAAG,GAAW,EAAE;IAC7D,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiGL,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDP Detection Bypass
|
|
3
|
+
* Comprehensive CDP and automation detection bypass for 2024-2025
|
|
4
|
+
*
|
|
5
|
+
* Handles:
|
|
6
|
+
* - Iframe contentWindow access hiding
|
|
7
|
+
* - Puppeteer/Playwright evaluation script traces
|
|
8
|
+
* - Error.captureStackTrace patching
|
|
9
|
+
* - Storage access API spoofing
|
|
10
|
+
* - SourceURL/SourceMap hiding
|
|
11
|
+
* - Chrome DevTools property removal
|
|
12
|
+
*/
|
|
13
|
+
export declare const createCDPDetectionBypassScript: () => string;
|
|
14
|
+
//# sourceMappingURL=cdp-detection-bypass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdp-detection-bypass.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/cdp-detection-bypass.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,8BAA8B,QAAO,MAmejD,CAAC"}
|
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDP Detection Bypass
|
|
3
|
+
* Comprehensive CDP and automation detection bypass for 2024-2025
|
|
4
|
+
*
|
|
5
|
+
* Handles:
|
|
6
|
+
* - Iframe contentWindow access hiding
|
|
7
|
+
* - Puppeteer/Playwright evaluation script traces
|
|
8
|
+
* - Error.captureStackTrace patching
|
|
9
|
+
* - Storage access API spoofing
|
|
10
|
+
* - SourceURL/SourceMap hiding
|
|
11
|
+
* - Chrome DevTools property removal
|
|
12
|
+
*/
|
|
13
|
+
export const createCDPDetectionBypassScript = () => {
|
|
14
|
+
return `
|
|
15
|
+
(() => {
|
|
16
|
+
'use strict';
|
|
17
|
+
|
|
18
|
+
// CDP Detection Bypass for 2025
|
|
19
|
+
const bypassCDPDetection = () => {
|
|
20
|
+
|
|
21
|
+
// 1. Remove Chrome DevTools / Selenium / Puppeteer specific properties
|
|
22
|
+
const removeAutomationProperties = () => {
|
|
23
|
+
const cdcProperties = Object.getOwnPropertyNames(window).filter(prop =>
|
|
24
|
+
prop.startsWith('cdc_') ||
|
|
25
|
+
prop.startsWith('$cdc_') ||
|
|
26
|
+
prop.includes('webdriver') ||
|
|
27
|
+
prop.includes('selenium') ||
|
|
28
|
+
prop.includes('puppeteer') ||
|
|
29
|
+
prop.includes('playwright')
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
cdcProperties.forEach(prop => {
|
|
33
|
+
try {
|
|
34
|
+
delete window[prop];
|
|
35
|
+
} catch (e) {
|
|
36
|
+
try {
|
|
37
|
+
Object.defineProperty(window, prop, {
|
|
38
|
+
get: () => undefined,
|
|
39
|
+
configurable: true
|
|
40
|
+
});
|
|
41
|
+
} catch (e2) {}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Remove from document as well
|
|
46
|
+
const docProperties = Object.getOwnPropertyNames(document).filter(prop =>
|
|
47
|
+
prop.startsWith('$') ||
|
|
48
|
+
prop.includes('webdriver') ||
|
|
49
|
+
prop.includes('selenium')
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
docProperties.forEach(prop => {
|
|
53
|
+
try {
|
|
54
|
+
delete document[prop];
|
|
55
|
+
} catch (e) {}
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// 2. Override HTMLIFrameElement.prototype.contentWindow to hide CDP access
|
|
60
|
+
const protectIframeContentWindow = () => {
|
|
61
|
+
const originalContentWindowDescriptor = Object.getOwnPropertyDescriptor(
|
|
62
|
+
HTMLIFrameElement.prototype,
|
|
63
|
+
'contentWindow'
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
if (originalContentWindowDescriptor) {
|
|
67
|
+
Object.defineProperty(HTMLIFrameElement.prototype, 'contentWindow', {
|
|
68
|
+
get() {
|
|
69
|
+
const contentWindow = originalContentWindowDescriptor.get.call(this);
|
|
70
|
+
|
|
71
|
+
if (!contentWindow) return contentWindow;
|
|
72
|
+
|
|
73
|
+
// Check if the iframe is same-origin
|
|
74
|
+
try {
|
|
75
|
+
// Access a property to check if we have access
|
|
76
|
+
const _ = contentWindow.document;
|
|
77
|
+
|
|
78
|
+
// If accessible, wrap it to hide automation traces
|
|
79
|
+
return new Proxy(contentWindow, {
|
|
80
|
+
get(target, prop) {
|
|
81
|
+
// Hide automation-related properties
|
|
82
|
+
if (prop === 'webdriver' ||
|
|
83
|
+
prop === '__webdriver_evaluate' ||
|
|
84
|
+
prop === '__selenium_evaluate' ||
|
|
85
|
+
prop === '__driver_evaluate' ||
|
|
86
|
+
prop === '__webdriver_script_function' ||
|
|
87
|
+
prop === '__webdriver_script_fn' ||
|
|
88
|
+
prop === '__fxdriver_evaluate' ||
|
|
89
|
+
prop === '__webdriver_unwrapped' ||
|
|
90
|
+
String(prop).startsWith('cdc_') ||
|
|
91
|
+
String(prop).startsWith('$cdc_')) {
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const value = target[prop];
|
|
96
|
+
if (typeof value === 'function') {
|
|
97
|
+
return value.bind(target);
|
|
98
|
+
}
|
|
99
|
+
return value;
|
|
100
|
+
},
|
|
101
|
+
has(target, prop) {
|
|
102
|
+
if (String(prop).startsWith('cdc_') ||
|
|
103
|
+
String(prop).startsWith('$cdc_') ||
|
|
104
|
+
prop === 'webdriver') {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
return prop in target;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
} catch (e) {
|
|
111
|
+
// Cross-origin, return as-is
|
|
112
|
+
return contentWindow;
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
configurable: true,
|
|
116
|
+
enumerable: true
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// 3. Patch Error.captureStackTrace to hide automation stack frames
|
|
122
|
+
const patchErrorCaptureStackTrace = () => {
|
|
123
|
+
if (Error.captureStackTrace) {
|
|
124
|
+
const originalCaptureStackTrace = Error.captureStackTrace;
|
|
125
|
+
|
|
126
|
+
Error.captureStackTrace = function(targetObject, constructorOpt) {
|
|
127
|
+
originalCaptureStackTrace.call(this, targetObject, constructorOpt);
|
|
128
|
+
|
|
129
|
+
// Clean the stack trace of automation markers
|
|
130
|
+
if (targetObject.stack) {
|
|
131
|
+
const cleanStack = targetObject.stack
|
|
132
|
+
.split('\\n')
|
|
133
|
+
.filter(line => {
|
|
134
|
+
const lowerLine = line.toLowerCase();
|
|
135
|
+
return !lowerLine.includes('puppeteer') &&
|
|
136
|
+
!lowerLine.includes('playwright') &&
|
|
137
|
+
!lowerLine.includes('selenium') &&
|
|
138
|
+
!lowerLine.includes('webdriver') &&
|
|
139
|
+
!lowerLine.includes('__puppeteer_evaluation_script__') &&
|
|
140
|
+
!lowerLine.includes('__playwright_evaluation_script__') &&
|
|
141
|
+
!lowerLine.includes('evaluateonNewDocument') &&
|
|
142
|
+
!lowerLine.includes('pptr:') &&
|
|
143
|
+
!lowerLine.includes('devtools://');
|
|
144
|
+
})
|
|
145
|
+
.join('\\n');
|
|
146
|
+
|
|
147
|
+
Object.defineProperty(targetObject, 'stack', {
|
|
148
|
+
value: cleanStack,
|
|
149
|
+
writable: true,
|
|
150
|
+
configurable: true
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// 4. Override Function constructor to hide sourceURL
|
|
158
|
+
const protectFunctionConstructor = () => {
|
|
159
|
+
const OriginalFunction = Function;
|
|
160
|
+
|
|
161
|
+
const FunctionProxy = new Proxy(OriginalFunction, {
|
|
162
|
+
construct(target, args) {
|
|
163
|
+
// Remove sourceURL comments from function body
|
|
164
|
+
if (args.length > 0) {
|
|
165
|
+
const lastArg = args[args.length - 1];
|
|
166
|
+
if (typeof lastArg === 'string') {
|
|
167
|
+
args[args.length - 1] = lastArg
|
|
168
|
+
.replace(/\\/\\/# sourceURL=[^\\n]*/g, '')
|
|
169
|
+
.replace(/\\/\\/# sourceMappingURL=[^\\n]*/g, '')
|
|
170
|
+
.replace(/__puppeteer_evaluation_script__/g, 'anonymous')
|
|
171
|
+
.replace(/__playwright_evaluation_script__/g, 'anonymous')
|
|
172
|
+
.replace(/pptr:[^\\n]*/g, '');
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return Reflect.construct(target, args);
|
|
177
|
+
},
|
|
178
|
+
apply(target, thisArg, args) {
|
|
179
|
+
if (args.length > 0) {
|
|
180
|
+
const lastArg = args[args.length - 1];
|
|
181
|
+
if (typeof lastArg === 'string') {
|
|
182
|
+
args[args.length - 1] = lastArg
|
|
183
|
+
.replace(/\\/\\/# sourceURL=[^\\n]*/g, '')
|
|
184
|
+
.replace(/\\/\\/# sourceMappingURL=[^\\n]*/g, '')
|
|
185
|
+
.replace(/__puppeteer_evaluation_script__/g, 'anonymous')
|
|
186
|
+
.replace(/__playwright_evaluation_script__/g, 'anonymous');
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return Reflect.apply(target, thisArg, args);
|
|
191
|
+
},
|
|
192
|
+
get(target, prop) {
|
|
193
|
+
// Return the original prototype when accessing .prototype
|
|
194
|
+
if (prop === 'prototype') {
|
|
195
|
+
return OriginalFunction.prototype;
|
|
196
|
+
}
|
|
197
|
+
return Reflect.get(target, prop);
|
|
198
|
+
},
|
|
199
|
+
set(target, prop, value) {
|
|
200
|
+
// Prevent setting prototype or other frozen properties
|
|
201
|
+
if (prop === 'prototype') {
|
|
202
|
+
return true; // Silently ignore
|
|
203
|
+
}
|
|
204
|
+
return Reflect.set(target, prop, value);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
// Use defineProperty to replace Function without modifying frozen prototype
|
|
209
|
+
try {
|
|
210
|
+
Object.defineProperty(window, 'Function', {
|
|
211
|
+
value: FunctionProxy,
|
|
212
|
+
writable: true,
|
|
213
|
+
enumerable: false,
|
|
214
|
+
configurable: true
|
|
215
|
+
});
|
|
216
|
+
} catch (e) {
|
|
217
|
+
// If we can't redefine, just assign
|
|
218
|
+
window.Function = FunctionProxy;
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// 5. Override eval to hide sourceURL
|
|
223
|
+
const protectEval = () => {
|
|
224
|
+
const originalEval = window.eval;
|
|
225
|
+
|
|
226
|
+
window.eval = function(code) {
|
|
227
|
+
if (typeof code === 'string') {
|
|
228
|
+
code = code
|
|
229
|
+
.replace(/\\/\\/# sourceURL=[^\\n]*/g, '')
|
|
230
|
+
.replace(/\\/\\/# sourceMappingURL=[^\\n]*/g, '')
|
|
231
|
+
.replace(/__puppeteer_evaluation_script__/g, 'anonymous')
|
|
232
|
+
.replace(/__playwright_evaluation_script__/g, 'anonymous')
|
|
233
|
+
.replace(/pptr:[^)\\n]*/g, 'eval');
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return originalEval.call(this, code);
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
// Make eval look native
|
|
240
|
+
Object.defineProperty(window.eval, 'toString', {
|
|
241
|
+
value: function() { return 'function eval() { [native code] }'; },
|
|
242
|
+
configurable: false
|
|
243
|
+
});
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
// 6. Override document.hasStorageAccess for sandbox detection
|
|
247
|
+
const protectStorageAccess = () => {
|
|
248
|
+
if (document.hasStorageAccess) {
|
|
249
|
+
const originalHasStorageAccess = document.hasStorageAccess;
|
|
250
|
+
|
|
251
|
+
document.hasStorageAccess = function() {
|
|
252
|
+
// Always return a promise that resolves to true for same-origin
|
|
253
|
+
return Promise.resolve(true);
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
// Make it look native
|
|
257
|
+
Object.defineProperty(document.hasStorageAccess, 'toString', {
|
|
258
|
+
value: function() { return 'function hasStorageAccess() { [native code] }'; }
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (document.requestStorageAccess) {
|
|
263
|
+
document.requestStorageAccess = function() {
|
|
264
|
+
return Promise.resolve();
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
// 7. Protect window.name from automation markers
|
|
270
|
+
const protectWindowName = () => {
|
|
271
|
+
let windowName = window.name;
|
|
272
|
+
|
|
273
|
+
Object.defineProperty(window, 'name', {
|
|
274
|
+
get() {
|
|
275
|
+
// Filter out automation-related markers from window name
|
|
276
|
+
if (windowName && typeof windowName === 'string') {
|
|
277
|
+
if (windowName.includes('puppeteer') ||
|
|
278
|
+
windowName.includes('playwright') ||
|
|
279
|
+
windowName.includes('selenium') ||
|
|
280
|
+
windowName.includes('webdriver')) {
|
|
281
|
+
return '';
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return windowName;
|
|
285
|
+
},
|
|
286
|
+
set(value) {
|
|
287
|
+
windowName = value;
|
|
288
|
+
},
|
|
289
|
+
configurable: true,
|
|
290
|
+
enumerable: true
|
|
291
|
+
});
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
// 8. Override Object.getOwnPropertyDescriptor to hide automation properties
|
|
295
|
+
const protectPropertyDescriptor = () => {
|
|
296
|
+
const originalGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
297
|
+
|
|
298
|
+
Object.getOwnPropertyDescriptor = function(obj, prop) {
|
|
299
|
+
// Hide automation-related properties
|
|
300
|
+
if (obj === navigator && prop === 'webdriver') {
|
|
301
|
+
return undefined;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (typeof prop === 'string' &&
|
|
305
|
+
(prop.startsWith('cdc_') ||
|
|
306
|
+
prop.startsWith('$cdc_') ||
|
|
307
|
+
prop.includes('__webdriver') ||
|
|
308
|
+
prop.includes('__selenium') ||
|
|
309
|
+
prop.includes('__puppeteer') ||
|
|
310
|
+
prop.includes('__playwright'))) {
|
|
311
|
+
return undefined;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return originalGetOwnPropertyDescriptor.call(this, obj, prop);
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
// 9. Override Object.getOwnPropertyNames to hide automation properties
|
|
319
|
+
const protectPropertyNames = () => {
|
|
320
|
+
const originalGetOwnPropertyNames = Object.getOwnPropertyNames;
|
|
321
|
+
|
|
322
|
+
Object.getOwnPropertyNames = function(obj) {
|
|
323
|
+
const names = originalGetOwnPropertyNames.call(this, obj);
|
|
324
|
+
|
|
325
|
+
return names.filter(name => {
|
|
326
|
+
const lowerName = name.toLowerCase();
|
|
327
|
+
return !name.startsWith('cdc_') &&
|
|
328
|
+
!name.startsWith('$cdc_') &&
|
|
329
|
+
!lowerName.includes('webdriver') &&
|
|
330
|
+
!lowerName.includes('selenium') &&
|
|
331
|
+
!lowerName.includes('puppeteer') &&
|
|
332
|
+
!lowerName.includes('playwright') &&
|
|
333
|
+
!name.startsWith('__driver') &&
|
|
334
|
+
!name.startsWith('__selenium') &&
|
|
335
|
+
!name.startsWith('__webdriver');
|
|
336
|
+
});
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
// 10. Override Object.keys similarly
|
|
341
|
+
const protectObjectKeys = () => {
|
|
342
|
+
const originalKeys = Object.keys;
|
|
343
|
+
|
|
344
|
+
Object.keys = function(obj) {
|
|
345
|
+
const keys = originalKeys.call(this, obj);
|
|
346
|
+
|
|
347
|
+
return keys.filter(key => {
|
|
348
|
+
const lowerKey = key.toLowerCase();
|
|
349
|
+
return !key.startsWith('cdc_') &&
|
|
350
|
+
!key.startsWith('$cdc_') &&
|
|
351
|
+
!lowerKey.includes('webdriver') &&
|
|
352
|
+
!lowerKey.includes('selenium') &&
|
|
353
|
+
!lowerKey.includes('puppeteer');
|
|
354
|
+
});
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
// 11. Protect against Reflect.ownKeys detection
|
|
359
|
+
const protectReflectOwnKeys = () => {
|
|
360
|
+
const originalOwnKeys = Reflect.ownKeys;
|
|
361
|
+
|
|
362
|
+
Reflect.ownKeys = function(obj) {
|
|
363
|
+
const keys = originalOwnKeys.call(this, obj);
|
|
364
|
+
|
|
365
|
+
return keys.filter(key => {
|
|
366
|
+
const keyStr = String(key).toLowerCase();
|
|
367
|
+
return !keyStr.startsWith('cdc_') &&
|
|
368
|
+
!keyStr.startsWith('$cdc_') &&
|
|
369
|
+
!keyStr.includes('webdriver') &&
|
|
370
|
+
!keyStr.includes('selenium') &&
|
|
371
|
+
!keyStr.includes('puppeteer');
|
|
372
|
+
});
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
// 12. Protect navigator.permissions.query for automation detection
|
|
377
|
+
const protectPermissionsQuery = () => {
|
|
378
|
+
if (navigator.permissions && navigator.permissions.query) {
|
|
379
|
+
const originalQuery = navigator.permissions.query;
|
|
380
|
+
|
|
381
|
+
navigator.permissions.query = function(descriptor) {
|
|
382
|
+
// Handle notifications permission specifically
|
|
383
|
+
if (descriptor && descriptor.name === 'notifications') {
|
|
384
|
+
return Promise.resolve({
|
|
385
|
+
state: 'prompt',
|
|
386
|
+
name: 'notifications',
|
|
387
|
+
onchange: null,
|
|
388
|
+
addEventListener: () => {},
|
|
389
|
+
removeEventListener: () => {},
|
|
390
|
+
dispatchEvent: () => true
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
return originalQuery.apply(this, arguments);
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
// 13. Protect MediaSession API
|
|
400
|
+
const protectMediaSession = () => {
|
|
401
|
+
if (navigator.mediaSession) {
|
|
402
|
+
// Ensure mediaSession appears properly configured
|
|
403
|
+
try {
|
|
404
|
+
Object.defineProperty(navigator.mediaSession, 'playbackState', {
|
|
405
|
+
get: () => 'none',
|
|
406
|
+
configurable: true
|
|
407
|
+
});
|
|
408
|
+
} catch (e) {}
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
// 14. Protect against CDP Runtime detection via timing
|
|
413
|
+
const protectRuntimeTiming = () => {
|
|
414
|
+
// Detect CDP calls that happen synchronously
|
|
415
|
+
const originalDateNow = Date.now;
|
|
416
|
+
let lastCallTime = 0;
|
|
417
|
+
|
|
418
|
+
Date.now = function() {
|
|
419
|
+
const now = originalDateNow.call(this);
|
|
420
|
+
|
|
421
|
+
// Ensure minimum 1ms between calls to appear human
|
|
422
|
+
if (now - lastCallTime < 1) {
|
|
423
|
+
lastCallTime = now + 1;
|
|
424
|
+
return lastCallTime;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
lastCallTime = now;
|
|
428
|
+
return now;
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
// 15. Clean up any existing automation markers in the DOM
|
|
433
|
+
const cleanDOMAutomationMarkers = () => {
|
|
434
|
+
// Remove data attributes that might indicate automation
|
|
435
|
+
const elements = document.querySelectorAll('[data-webdriver], [data-selenium], [data-puppeteer]');
|
|
436
|
+
elements.forEach(el => {
|
|
437
|
+
el.removeAttribute('data-webdriver');
|
|
438
|
+
el.removeAttribute('data-selenium');
|
|
439
|
+
el.removeAttribute('data-puppeteer');
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
// Clean script tags with automation-related src
|
|
443
|
+
const scripts = document.querySelectorAll('script');
|
|
444
|
+
scripts.forEach(script => {
|
|
445
|
+
if (script.src && (
|
|
446
|
+
script.src.includes('puppeteer') ||
|
|
447
|
+
script.src.includes('playwright') ||
|
|
448
|
+
script.src.includes('selenium')
|
|
449
|
+
)) {
|
|
450
|
+
script.remove();
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
// Initialize all protections
|
|
456
|
+
try {
|
|
457
|
+
removeAutomationProperties();
|
|
458
|
+
protectIframeContentWindow();
|
|
459
|
+
patchErrorCaptureStackTrace();
|
|
460
|
+
protectFunctionConstructor();
|
|
461
|
+
protectEval();
|
|
462
|
+
protectStorageAccess();
|
|
463
|
+
protectWindowName();
|
|
464
|
+
protectPropertyDescriptor();
|
|
465
|
+
protectPropertyNames();
|
|
466
|
+
protectObjectKeys();
|
|
467
|
+
protectReflectOwnKeys();
|
|
468
|
+
protectPermissionsQuery();
|
|
469
|
+
protectMediaSession();
|
|
470
|
+
protectRuntimeTiming();
|
|
471
|
+
|
|
472
|
+
// Clean DOM after a short delay to catch dynamically added elements
|
|
473
|
+
if (document.readyState === 'loading') {
|
|
474
|
+
document.addEventListener('DOMContentLoaded', cleanDOMAutomationMarkers);
|
|
475
|
+
} else {
|
|
476
|
+
cleanDOMAutomationMarkers();
|
|
477
|
+
}
|
|
478
|
+
} catch (e) {
|
|
479
|
+
console.error('[CDP-DETECTION-BYPASS] Failed to apply CDP detection bypass:', e);
|
|
480
|
+
throw e; // Rethrow to make errors visible
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
|
|
485
|
+
const ERROR_PREFIX = '[CDP-FP-ERROR]';
|
|
486
|
+
|
|
487
|
+
try {
|
|
488
|
+
console.log(DEBUG_PREFIX, 'Starting CDP detection bypass...');
|
|
489
|
+
bypassCDPDetection();
|
|
490
|
+
console.log(DEBUG_PREFIX, '✓ CDP detection bypass applied');
|
|
491
|
+
} catch (e) {
|
|
492
|
+
console.error(ERROR_PREFIX, '✗ Failed to apply CDP detection bypass:', e);
|
|
493
|
+
throw e;
|
|
494
|
+
}
|
|
495
|
+
})();`;
|
|
496
|
+
};
|
|
497
|
+
//# sourceMappingURL=cdp-detection-bypass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdp-detection-bypass.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/cdp-detection-bypass.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAW,EAAE;IACvD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAieL,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-rect-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/client-rect-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,8BAA8B,QAAO,
|
|
1
|
+
{"version":3,"file":"client-rect-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/client-rect-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,8BAA8B,QAAO,MAoGjD,CAAC"}
|
|
@@ -90,7 +90,17 @@ export const createClientRectSpoofingScript = () => {
|
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
|
|
94
|
+
const ERROR_PREFIX = '[CDP-FP-ERROR]';
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
console.log(DEBUG_PREFIX, 'Starting client rect spoofing...');
|
|
98
|
+
spoofClientRects();
|
|
99
|
+
console.log(DEBUG_PREFIX, '✓ Client rect spoofing applied');
|
|
100
|
+
} catch (e) {
|
|
101
|
+
console.error(ERROR_PREFIX, '✗ Failed to apply client rect spoofing:', e);
|
|
102
|
+
throw e;
|
|
103
|
+
}
|
|
94
104
|
})();`;
|
|
95
105
|
};
|
|
96
106
|
//# sourceMappingURL=client-rect-spoofing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-rect-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/client-rect-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAW,EAAE;IACvD,OAAO
|
|
1
|
+
{"version":3,"file":"client-rect-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/client-rect-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAW,EAAE;IACvD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkGL,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DataDome-Specific Bypass Module
|
|
3
|
+
* Targeted countermeasures for DataDome bot detection 2024-2025
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - JavaScript challenge response handling
|
|
7
|
+
* - Proof-of-work computation timing spoofing
|
|
8
|
+
* - eval() and Function() source hiding
|
|
9
|
+
* - DataDome cookie consistency
|
|
10
|
+
* - dd-* header handling
|
|
11
|
+
* - Device Check signal spoofing
|
|
12
|
+
*/
|
|
13
|
+
export declare const createDataDomeBypassScript: () => string;
|
|
14
|
+
//# sourceMappingURL=datadome-bypass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datadome-bypass.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/datadome-bypass.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,0BAA0B,QAAO,MA0gB7C,CAAC"}
|