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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard Humanization Module
|
|
3
|
+
* Simulates realistic keyboard behavior for 2024-2025
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Variable keystroke timing (faster for common patterns)
|
|
7
|
+
* - Realistic key press/release timing gaps
|
|
8
|
+
* - Shift key timing consistency
|
|
9
|
+
* - Tab/Enter key natural delays
|
|
10
|
+
* - CDP-level typing enhancement
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Keyboard timing configuration
|
|
14
|
+
*/
|
|
15
|
+
interface KeyboardConfig {
|
|
16
|
+
/** Base delay between keystrokes in ms */
|
|
17
|
+
baseDelay: number;
|
|
18
|
+
/** Variance in delay (±ms) */
|
|
19
|
+
delayVariance: number;
|
|
20
|
+
/** Delay between key press and release in ms */
|
|
21
|
+
pressReleaseDelay: number;
|
|
22
|
+
/** Extra delay for special keys (Enter, Tab) */
|
|
23
|
+
specialKeyDelay: number;
|
|
24
|
+
/** Delay when using shift key */
|
|
25
|
+
shiftDelay: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Generate human-like typing delays for a string
|
|
29
|
+
*/
|
|
30
|
+
export declare const generateTypingDelays: (text: string, config?: Partial<KeyboardConfig>) => number[];
|
|
31
|
+
/**
|
|
32
|
+
* Create a script that enhances keyboard events in the browser
|
|
33
|
+
*/
|
|
34
|
+
export declare const createKeyboardHumanizationScript: () => string;
|
|
35
|
+
/**
|
|
36
|
+
* CDP-level keyboard typing helper
|
|
37
|
+
* Returns an async function that types text with human-like delays
|
|
38
|
+
*/
|
|
39
|
+
export declare const createHumanTypingFunction: (client: unknown, config?: Partial<KeyboardConfig>) => Promise<(text: string) => Promise<void>>;
|
|
40
|
+
/**
|
|
41
|
+
* Setup keyboard humanization at CDP level
|
|
42
|
+
*/
|
|
43
|
+
export declare const setupKeyboardHumanization: (client: unknown) => Promise<void>;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=keyboard-humanization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard-humanization.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/keyboard-humanization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,UAAU,cAAc;IACpB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gDAAgD;IAChD,eAAe,EAAE,MAAM,CAAC;IACxB,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;CACtB;AAqBD;;GAEG;AACH,eAAO,MAAM,oBAAoB,SACvB,MAAM,WACJ,OAAO,CAAC,cAAc,CAAC,KAChC,MAAM,EAiDR,CAAC;AA2BF;;GAEG;AACH,eAAO,MAAM,gCAAgC,QAAO,MA+HnD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,WAC1B,OAAO,WACP,OAAO,CAAC,cAAc,CAAC,KAChC,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CA+DzC,CAAC;AAOF;;GAEG;AACH,eAAO,MAAM,yBAAyB,WAAkB,OAAO,KAAG,OAAO,CAAC,IAAI,CAc7E,CAAC"}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard Humanization Module
|
|
3
|
+
* Simulates realistic keyboard behavior for 2024-2025
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Variable keystroke timing (faster for common patterns)
|
|
7
|
+
* - Realistic key press/release timing gaps
|
|
8
|
+
* - Shift key timing consistency
|
|
9
|
+
* - Tab/Enter key natural delays
|
|
10
|
+
* - CDP-level typing enhancement
|
|
11
|
+
*/
|
|
12
|
+
const DEFAULT_CONFIG = {
|
|
13
|
+
baseDelay: 80,
|
|
14
|
+
delayVariance: 40,
|
|
15
|
+
pressReleaseDelay: 30,
|
|
16
|
+
specialKeyDelay: 150,
|
|
17
|
+
shiftDelay: 50,
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Common word patterns that are typed faster
|
|
21
|
+
*/
|
|
22
|
+
const COMMON_PATTERNS = [
|
|
23
|
+
'the', 'and', 'ing', 'ion', 'tion', 'ent', 'ation', 'for',
|
|
24
|
+
'her', 'ter', 'hat', 'tha', 'ere', 'ate', 'his', 'con', 'res',
|
|
25
|
+
'ver', 'all', 'ess', 'not', 'ive', 'was', 'ect', 'rea', 'com',
|
|
26
|
+
'eve', 'per', 'int', 'est', 'sta', 'cti', 'ica', 'ist', 'ear',
|
|
27
|
+
'ain', 'one', 'our', 'iti', 'rat', 'ted', 'men', 'ome', 'man',
|
|
28
|
+
];
|
|
29
|
+
/**
|
|
30
|
+
* Generate human-like typing delays for a string
|
|
31
|
+
*/
|
|
32
|
+
export const generateTypingDelays = (text, config = {}) => {
|
|
33
|
+
const cfg = { ...DEFAULT_CONFIG, ...config };
|
|
34
|
+
const delays = [];
|
|
35
|
+
for (let i = 0; i < text.length; i++) {
|
|
36
|
+
const char = text[i];
|
|
37
|
+
const prevChar = i > 0 ? text[i - 1] : '';
|
|
38
|
+
const nextChars = text.substring(i, i + 3).toLowerCase();
|
|
39
|
+
// Base delay with variance
|
|
40
|
+
let delay = cfg.baseDelay + (Math.random() - 0.5) * cfg.delayVariance * 2;
|
|
41
|
+
// Faster for common patterns
|
|
42
|
+
if (COMMON_PATTERNS.some(pattern => nextChars.startsWith(pattern))) {
|
|
43
|
+
delay *= 0.7;
|
|
44
|
+
}
|
|
45
|
+
// Slower for uppercase (shift key)
|
|
46
|
+
if (char >= 'A' && char <= 'Z') {
|
|
47
|
+
delay += cfg.shiftDelay;
|
|
48
|
+
}
|
|
49
|
+
// Slower for special characters
|
|
50
|
+
if (/[!@#$%^&*()_+{}|:"<>?~`\-=\[\]\\;',./]/.test(char)) {
|
|
51
|
+
delay += cfg.specialKeyDelay * 0.5;
|
|
52
|
+
}
|
|
53
|
+
// Pause after punctuation
|
|
54
|
+
if (/[.!?]/.test(prevChar)) {
|
|
55
|
+
delay += cfg.specialKeyDelay;
|
|
56
|
+
}
|
|
57
|
+
// Slight pause after spaces (word boundary)
|
|
58
|
+
if (prevChar === ' ') {
|
|
59
|
+
delay += cfg.specialKeyDelay * 0.3;
|
|
60
|
+
}
|
|
61
|
+
// Faster when same hand (adjacent keys)
|
|
62
|
+
if (areAdjacentKeys(prevChar, char)) {
|
|
63
|
+
delay *= 0.8;
|
|
64
|
+
}
|
|
65
|
+
// Add minimum delay
|
|
66
|
+
delay = Math.max(20, delay);
|
|
67
|
+
delays.push(Math.round(delay));
|
|
68
|
+
}
|
|
69
|
+
return delays;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Check if two keys are adjacent on a QWERTY keyboard
|
|
73
|
+
*/
|
|
74
|
+
const areAdjacentKeys = (char1, char2) => {
|
|
75
|
+
const rows = [
|
|
76
|
+
'qwertyuiop',
|
|
77
|
+
'asdfghjkl',
|
|
78
|
+
'zxcvbnm',
|
|
79
|
+
];
|
|
80
|
+
const c1 = char1.toLowerCase();
|
|
81
|
+
const c2 = char2.toLowerCase();
|
|
82
|
+
for (const row of rows) {
|
|
83
|
+
const idx1 = row.indexOf(c1);
|
|
84
|
+
const idx2 = row.indexOf(c2);
|
|
85
|
+
if (idx1 !== -1 && idx2 !== -1 && Math.abs(idx1 - idx2) === 1) {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return false;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Create a script that enhances keyboard events in the browser
|
|
93
|
+
*/
|
|
94
|
+
export const createKeyboardHumanizationScript = () => {
|
|
95
|
+
return `
|
|
96
|
+
(() => {
|
|
97
|
+
'use strict';
|
|
98
|
+
|
|
99
|
+
// Keyboard Humanization for 2024-2025
|
|
100
|
+
const humanizeKeyboard = () => {
|
|
101
|
+
// Store original event constructors
|
|
102
|
+
const OriginalKeyboardEvent = KeyboardEvent;
|
|
103
|
+
|
|
104
|
+
// Track key timing for consistency
|
|
105
|
+
let lastKeyTime = 0;
|
|
106
|
+
let lastKeyCode = '';
|
|
107
|
+
|
|
108
|
+
// Generate consistent timing based on key combination
|
|
109
|
+
const getKeyTiming = (key, isShift = false, isPunctuation = false) => {
|
|
110
|
+
const baseDelay = 80;
|
|
111
|
+
let timing = baseDelay + (Math.random() - 0.5) * 40;
|
|
112
|
+
|
|
113
|
+
// Slower for shift combinations
|
|
114
|
+
if (isShift) {
|
|
115
|
+
timing += 50;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Slower for punctuation
|
|
119
|
+
if (isPunctuation) {
|
|
120
|
+
timing += 30;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Ensure minimum gap between keys
|
|
124
|
+
const now = performance.now();
|
|
125
|
+
if (now - lastKeyTime < 30) {
|
|
126
|
+
timing += 30 - (now - lastKeyTime);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
lastKeyTime = now;
|
|
130
|
+
lastKeyCode = key;
|
|
131
|
+
|
|
132
|
+
return Math.round(timing);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// Override KeyboardEvent to include realistic properties
|
|
136
|
+
window.KeyboardEvent = function(type, eventInitDict = {}) {
|
|
137
|
+
// Ensure realistic event properties
|
|
138
|
+
const enhancedInit = { ...eventInitDict };
|
|
139
|
+
|
|
140
|
+
// Add realistic timing properties if not set
|
|
141
|
+
if (!enhancedInit.repeat) {
|
|
142
|
+
enhancedInit.repeat = false;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Ensure proper location for modifier keys
|
|
146
|
+
if (['Shift', 'Control', 'Alt', 'Meta'].includes(enhancedInit.key)) {
|
|
147
|
+
if (!enhancedInit.location) {
|
|
148
|
+
enhancedInit.location = Math.random() > 0.7 ? 2 : 1; // Right or Left
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const event = new OriginalKeyboardEvent(type, enhancedInit);
|
|
153
|
+
|
|
154
|
+
return event;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// Note: Don't assign to prototype - it may be frozen in modern Chrome
|
|
158
|
+
// The Proxy wrapper handles prototype access if needed
|
|
159
|
+
|
|
160
|
+
// Override document.createEvent for legacy support
|
|
161
|
+
const originalCreateEvent = document.createEvent;
|
|
162
|
+
document.createEvent = function(eventType) {
|
|
163
|
+
const event = originalCreateEvent.call(this, eventType);
|
|
164
|
+
|
|
165
|
+
if (eventType.toLowerCase().includes('keyboard')) {
|
|
166
|
+
// Add realistic properties to keyboard events
|
|
167
|
+
const originalInitKeyboardEvent = event.initKeyboardEvent;
|
|
168
|
+
if (originalInitKeyboardEvent) {
|
|
169
|
+
event.initKeyboardEvent = function(...args) {
|
|
170
|
+
// Enhance the initialization
|
|
171
|
+
originalInitKeyboardEvent.apply(this, args);
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return event;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// Track and normalize trusted key events
|
|
180
|
+
const originalAddEventListener = EventTarget.prototype.addEventListener;
|
|
181
|
+
|
|
182
|
+
EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
183
|
+
if (type === 'keydown' || type === 'keyup' || type === 'keypress') {
|
|
184
|
+
const wrappedListener = function(event) {
|
|
185
|
+
// Ensure event has realistic timing
|
|
186
|
+
if (event.timeStamp < lastKeyTime) {
|
|
187
|
+
Object.defineProperty(event, 'timeStamp', {
|
|
188
|
+
value: lastKeyTime + Math.random() * 5,
|
|
189
|
+
writable: false
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return listener.call(this, event);
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
return originalAddEventListener.call(this, type, wrappedListener, options);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return originalAddEventListener.call(this, type, listener, options);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
// Override InputEvent for modern input handling
|
|
203
|
+
if (typeof InputEvent !== 'undefined') {
|
|
204
|
+
const OriginalInputEvent = InputEvent;
|
|
205
|
+
|
|
206
|
+
window.InputEvent = function(type, eventInitDict = {}) {
|
|
207
|
+
// Ensure inputType is set properly
|
|
208
|
+
if (!eventInitDict.inputType && type === 'input') {
|
|
209
|
+
eventInitDict.inputType = 'insertText';
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return new OriginalInputEvent(type, eventInitDict);
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// Note: Don't assign to prototype - it may be frozen in modern Chrome
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
humanizeKeyboard();
|
|
220
|
+
})();`;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* CDP-level keyboard typing helper
|
|
224
|
+
* Returns an async function that types text with human-like delays
|
|
225
|
+
*/
|
|
226
|
+
export const createHumanTypingFunction = async (client, config = {}) => {
|
|
227
|
+
const cfg = { ...DEFAULT_CONFIG, ...config };
|
|
228
|
+
return async (text) => {
|
|
229
|
+
const delays = generateTypingDelays(text, cfg);
|
|
230
|
+
const inputClient = client.Input;
|
|
231
|
+
for (let i = 0; i < text.length; i++) {
|
|
232
|
+
const char = text[i];
|
|
233
|
+
const delay = delays[i];
|
|
234
|
+
const needsShift = char >= 'A' && char <= 'Z' || /[!@#$%^&*()_+{}|:"<>?~]/.test(char);
|
|
235
|
+
// Press shift if needed
|
|
236
|
+
if (needsShift) {
|
|
237
|
+
await inputClient.dispatchKeyEvent({
|
|
238
|
+
type: 'keyDown',
|
|
239
|
+
key: 'Shift',
|
|
240
|
+
code: 'ShiftLeft',
|
|
241
|
+
modifiers: 8,
|
|
242
|
+
});
|
|
243
|
+
await sleep(cfg.shiftDelay * (0.8 + Math.random() * 0.4));
|
|
244
|
+
}
|
|
245
|
+
// Press the key
|
|
246
|
+
await inputClient.dispatchKeyEvent({
|
|
247
|
+
type: 'keyDown',
|
|
248
|
+
key: char,
|
|
249
|
+
text: char,
|
|
250
|
+
});
|
|
251
|
+
// Wait for press-release delay
|
|
252
|
+
await sleep(cfg.pressReleaseDelay * (0.8 + Math.random() * 0.4));
|
|
253
|
+
// Release the key
|
|
254
|
+
await inputClient.dispatchKeyEvent({
|
|
255
|
+
type: 'keyUp',
|
|
256
|
+
key: char,
|
|
257
|
+
});
|
|
258
|
+
// Release shift if it was pressed
|
|
259
|
+
if (needsShift) {
|
|
260
|
+
await sleep(cfg.shiftDelay * 0.5 * (0.8 + Math.random() * 0.4));
|
|
261
|
+
await inputClient.dispatchKeyEvent({
|
|
262
|
+
type: 'keyUp',
|
|
263
|
+
key: 'Shift',
|
|
264
|
+
code: 'ShiftLeft',
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
// Wait before next key
|
|
268
|
+
if (i < text.length - 1) {
|
|
269
|
+
await sleep(delay);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
/**
|
|
275
|
+
* Helper sleep function
|
|
276
|
+
*/
|
|
277
|
+
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
278
|
+
/**
|
|
279
|
+
* Setup keyboard humanization at CDP level
|
|
280
|
+
*/
|
|
281
|
+
export const setupKeyboardHumanization = async (client) => {
|
|
282
|
+
// Inject the keyboard humanization script
|
|
283
|
+
// NOTE: Using Page.addScriptToEvaluateOnNewDocument instead of Runtime.evaluate to avoid CDP detection
|
|
284
|
+
const inputClient = client;
|
|
285
|
+
// NOTE: Using addScriptToEvaluateOnNewDocument instead of Runtime.evaluate
|
|
286
|
+
// Runtime.evaluate is a CDP detection vector
|
|
287
|
+
await inputClient.Page.addScriptToEvaluateOnNewDocument({
|
|
288
|
+
source: createKeyboardHumanizationScript()
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
//# sourceMappingURL=keyboard-humanization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard-humanization.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/keyboard-humanization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAkBH,MAAM,cAAc,GAAmB;IACnC,SAAS,EAAE,EAAE;IACb,aAAa,EAAE,EAAE;IACjB,iBAAiB,EAAE,EAAE;IACrB,eAAe,EAAE,GAAG;IACpB,UAAU,EAAE,EAAE;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,eAAe,GAAG;IACpB,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK;IACzD,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;IAC7D,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;IAC7D,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;IAC7D,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK;CAChE,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAChC,IAAY,EACZ,SAAkC,EAAE,EAC5B,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D,MAAM,EAAE,gCAAgC,EAAE;KAC7C,CAAC,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/locale-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,0BAA0B,QAAO,
|
|
1
|
+
{"version":3,"file":"locale-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/locale-spoofing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,0BAA0B,QAAO,MAgS7C,CAAC"}
|
|
@@ -127,7 +127,7 @@ export const createLocaleSpoofingScript = () => {
|
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
// Override Number.prototype methods for consistent formatting
|
|
130
|
-
const
|
|
130
|
+
const originalNumberToLocaleString = Number.prototype.toLocaleString;
|
|
131
131
|
Number.prototype.toLocaleString = function(locales, options) {
|
|
132
132
|
let windowsOptions = Object.assign({}, windowsLocaleConfig.numberFormat, options);
|
|
133
133
|
|
|
@@ -135,7 +135,7 @@ export const createLocaleSpoofingScript = () => {
|
|
|
135
135
|
windowsOptions = Object.assign({}, windowsLocaleConfig.currencyFormat, options);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
return
|
|
138
|
+
return originalNumberToLocaleString.call(this, locales || 'en-US', windowsOptions);
|
|
139
139
|
};
|
|
140
140
|
|
|
141
141
|
// Spoof timezone-related methods for consistency
|
|
@@ -230,32 +230,64 @@ export const createLocaleSpoofingScript = () => {
|
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
// Helper to check if property can be redefined
|
|
234
|
+
const canRedefineProperty = (obj, prop) => {
|
|
235
|
+
try {
|
|
236
|
+
const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
|
|
237
|
+
return !descriptor || descriptor.configurable !== false;
|
|
238
|
+
} catch (e) {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
// IMPORTANT: Cache original values BEFORE any override to prevent infinite recursion
|
|
244
|
+
const originalLanguage = navigator.language;
|
|
245
|
+
const originalLanguages = navigator.languages ? [...navigator.languages] : ['en-US'];
|
|
246
|
+
|
|
233
247
|
// Ensure consistent navigator.language reporting
|
|
234
|
-
if (navigator
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
248
|
+
if (canRedefineProperty(navigator, 'language')) {
|
|
249
|
+
try {
|
|
250
|
+
Object.defineProperty(navigator, 'language', {
|
|
251
|
+
get: function() {
|
|
252
|
+
// Use cached value to prevent infinite recursion
|
|
253
|
+
return platform === 'Win32' ? 'en-US' : originalLanguage;
|
|
254
|
+
},
|
|
255
|
+
configurable: true // Allow other scripts to modify if needed
|
|
256
|
+
});
|
|
257
|
+
} catch (e) {
|
|
258
|
+
// Property already defined, skip
|
|
259
|
+
}
|
|
242
260
|
}
|
|
243
261
|
|
|
244
|
-
if (navigator
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
262
|
+
if (canRedefineProperty(navigator, 'languages')) {
|
|
263
|
+
try {
|
|
264
|
+
Object.defineProperty(navigator, 'languages', {
|
|
265
|
+
get: function() {
|
|
266
|
+
// Use cached value to prevent infinite recursion
|
|
267
|
+
if (platform === 'Win32') {
|
|
268
|
+
return ['en-US', 'en'];
|
|
269
|
+
}
|
|
270
|
+
return originalLanguages;
|
|
271
|
+
},
|
|
272
|
+
configurable: true // Allow other scripts to modify if needed
|
|
273
|
+
});
|
|
274
|
+
} catch (e) {
|
|
275
|
+
// Property already defined, skip
|
|
276
|
+
}
|
|
255
277
|
}
|
|
256
278
|
};
|
|
257
279
|
|
|
258
|
-
|
|
280
|
+
const DEBUG_PREFIX = '[CDP-FP-DEBUG]';
|
|
281
|
+
const ERROR_PREFIX = '[CDP-FP-ERROR]';
|
|
282
|
+
|
|
283
|
+
try {
|
|
284
|
+
console.log(DEBUG_PREFIX, 'Starting locale spoofing...');
|
|
285
|
+
spoofLocale();
|
|
286
|
+
console.log(DEBUG_PREFIX, '✓ Locale spoofing applied');
|
|
287
|
+
} catch (e) {
|
|
288
|
+
console.error(ERROR_PREFIX, '✗ Failed to apply locale spoofing:', e);
|
|
289
|
+
throw e;
|
|
290
|
+
}
|
|
259
291
|
})();
|
|
260
292
|
`;
|
|
261
293
|
};
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8RV,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,
|
|
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
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
|
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"}
|