jumpy-lion 0.0.32 → 0.0.34
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 +2 -2
- package/dist/browser-controller.d.ts.map +1 -1
- package/dist/browser-controller.js +59 -21
- package/dist/browser-controller.js.map +1 -1
- package/dist/browser-plugin.d.ts +22 -0
- package/dist/browser-plugin.d.ts.map +1 -1
- package/dist/browser-plugin.js +118 -27
- package/dist/browser-plugin.js.map +1 -1
- package/dist/browser-process/browser.d.ts +15 -0
- package/dist/browser-process/browser.d.ts.map +1 -1
- package/dist/browser-process/browser.js +38 -3
- 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 +99 -5
- package/dist/browser-process/process.js.map +1 -1
- package/dist/crawler.d.ts +18 -2
- package/dist/crawler.d.ts.map +1 -1
- package/dist/crawler.js +4 -5
- package/dist/crawler.js.map +1 -1
- 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 +6 -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 +179 -0
- package/dist/fingerprinting/anti-webgpu/data/content_script/page_context/inject.js.map +1 -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.js +95 -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 +255 -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 +87 -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 +13 -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 +109 -0
- package/dist/fingerprinting/anti-webgpu/lib/runtime.js.map +1 -0
- package/dist/fingerprinting/fingerprint-injector.d.ts +85 -1
- package/dist/fingerprinting/fingerprint-injector.d.ts.map +1 -1
- package/dist/fingerprinting/fingerprint-injector.js +188 -90
- package/dist/fingerprinting/fingerprint-injector.js.map +1 -1
- 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 +87 -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 +95 -0
- package/dist/fingerprinting/fingerprint-overrides/canvas-protection.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 +96 -0
- package/dist/fingerprinting/fingerprint-overrides/client-rect-spoofing.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 +219 -0
- package/dist/fingerprinting/fingerprint-overrides/font-spoofing.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/index.d.ts +19 -0
- package/dist/fingerprinting/fingerprint-overrides/index.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/index.js +19 -0
- package/dist/fingerprinting/fingerprint-overrides/index.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 +262 -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 +103 -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 +228 -0
- package/dist/fingerprinting/fingerprint-overrides/performance-spoofing.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts +20 -0
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js +227 -0
- package/dist/fingerprinting/fingerprint-overrides/platform-consistency.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.d.ts +6 -0
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.js +84 -0
- package/dist/fingerprinting/fingerprint-overrides/runtime-enable-bypass.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts +6 -0
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.js +440 -0
- package/dist/fingerprinting/fingerprint-overrides/stealth-script.js.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/ua-ch.d.ts +6 -0
- package/dist/fingerprinting/fingerprint-overrides/ua-ch.d.ts.map +1 -0
- package/dist/fingerprinting/fingerprint-overrides/ua-ch.js +95 -0
- package/dist/fingerprinting/fingerprint-overrides/ua-ch.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 +167 -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 +205 -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 +96 -0
- package/dist/fingerprinting/fingerprint-overrides/webrtc-spoofing.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/page.d.ts +1 -0
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +42 -1
- package/dist/page.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -3
|
@@ -0,0 +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,MA0FjD,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client Rect Spoofing
|
|
3
|
+
* Adds small variations to DOM measurements to prevent fingerprinting
|
|
4
|
+
*/
|
|
5
|
+
export const createClientRectSpoofingScript = () => {
|
|
6
|
+
return `
|
|
7
|
+
(() => {
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
// Client Rect Spoofing for 2025
|
|
11
|
+
const spoofClientRects = () => {
|
|
12
|
+
// Add small random variations to rect values
|
|
13
|
+
const addVariation = (value) => {
|
|
14
|
+
return value + (Math.random() - 0.5) * 0.1;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// Override getBoundingClientRect
|
|
18
|
+
const originalGetBoundingClientRect = Element.prototype.getBoundingClientRect;
|
|
19
|
+
Element.prototype.getBoundingClientRect = function() {
|
|
20
|
+
const rect = originalGetBoundingClientRect.apply(this, arguments);
|
|
21
|
+
|
|
22
|
+
// Create a new DOMRect with slight variations
|
|
23
|
+
const newRect = {
|
|
24
|
+
x: addVariation(rect.x),
|
|
25
|
+
y: addVariation(rect.y),
|
|
26
|
+
width: addVariation(rect.width),
|
|
27
|
+
height: addVariation(rect.height),
|
|
28
|
+
top: addVariation(rect.top),
|
|
29
|
+
right: addVariation(rect.right),
|
|
30
|
+
bottom: addVariation(rect.bottom),
|
|
31
|
+
left: addVariation(rect.left),
|
|
32
|
+
toJSON: rect.toJSON
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// Make it look like a real DOMRect
|
|
36
|
+
Object.setPrototypeOf(newRect, DOMRect.prototype);
|
|
37
|
+
|
|
38
|
+
return newRect;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Override getClientRects
|
|
42
|
+
const originalGetClientRects = Element.prototype.getClientRects;
|
|
43
|
+
Element.prototype.getClientRects = function() {
|
|
44
|
+
const rects = originalGetClientRects.apply(this, arguments);
|
|
45
|
+
const newRects = [];
|
|
46
|
+
|
|
47
|
+
for (let i = 0; i < rects.length; i++) {
|
|
48
|
+
const rect = rects[i];
|
|
49
|
+
const newRect = {
|
|
50
|
+
x: addVariation(rect.x),
|
|
51
|
+
y: addVariation(rect.y),
|
|
52
|
+
width: addVariation(rect.width),
|
|
53
|
+
height: addVariation(rect.height),
|
|
54
|
+
top: addVariation(rect.top),
|
|
55
|
+
right: addVariation(rect.right),
|
|
56
|
+
bottom: addVariation(rect.bottom),
|
|
57
|
+
left: addVariation(rect.left)
|
|
58
|
+
};
|
|
59
|
+
Object.setPrototypeOf(newRect, DOMRect.prototype);
|
|
60
|
+
newRects.push(newRect);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Create a DOMRectList-like object
|
|
64
|
+
const rectList = {
|
|
65
|
+
length: newRects.length,
|
|
66
|
+
item: (index) => newRects[index] || null,
|
|
67
|
+
[Symbol.iterator]: function*() {
|
|
68
|
+
for (let i = 0; i < this.length; i++) {
|
|
69
|
+
yield this.item(i);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// Add indexed properties
|
|
75
|
+
for (let i = 0; i < newRects.length; i++) {
|
|
76
|
+
rectList[i] = newRects[i];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
Object.setPrototypeOf(rectList, DOMRectList.prototype);
|
|
80
|
+
return rectList;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Override Range methods
|
|
84
|
+
if (typeof Range !== 'undefined') {
|
|
85
|
+
const originalGetBoundingClientRectRange = Range.prototype.getBoundingClientRect;
|
|
86
|
+
Range.prototype.getBoundingClientRect = Element.prototype.getBoundingClientRect;
|
|
87
|
+
|
|
88
|
+
const originalGetClientRectsRange = Range.prototype.getClientRects;
|
|
89
|
+
Range.prototype.getClientRects = Element.prototype.getClientRects;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
spoofClientRects();
|
|
94
|
+
})();`;
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=client-rect-spoofing.js.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwFL,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Font Spoofing
|
|
3
|
+
* Hides Linux-specific fonts and reports Windows/Mac fonts as available
|
|
4
|
+
* Now includes randomization to prevent cross-session correlation
|
|
5
|
+
*/
|
|
6
|
+
export declare const createFontSpoofingScript: () => string;
|
|
7
|
+
//# sourceMappingURL=font-spoofing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-spoofing.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/font-spoofing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,wBAAwB,QAAO,MAoN3C,CAAC"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Font Spoofing
|
|
3
|
+
* Hides Linux-specific fonts and reports Windows/Mac fonts as available
|
|
4
|
+
* Now includes randomization to prevent cross-session correlation
|
|
5
|
+
*/
|
|
6
|
+
export const createFontSpoofingScript = () => {
|
|
7
|
+
return `
|
|
8
|
+
(() => {
|
|
9
|
+
'use strict';
|
|
10
|
+
|
|
11
|
+
// Font Spoofing for 2025 - Platform-aware font availability with randomization
|
|
12
|
+
const spoofFonts = () => {
|
|
13
|
+
// Generate a session-stable seed from current time and user agent
|
|
14
|
+
const generateSeed = () => {
|
|
15
|
+
const ua = navigator.userAgent || '';
|
|
16
|
+
const timeStamp = Math.floor(Date.now() / (1000 * 60 * 60 * 24)); // Changes daily
|
|
17
|
+
return ua.split('').reduce((a, b) => a + b.charCodeAt(0), 0) + timeStamp;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Simple seeded random function
|
|
21
|
+
const seededRandom = (seed) => {
|
|
22
|
+
const x = Math.sin(seed) * 10000;
|
|
23
|
+
return x - Math.floor(x);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const sessionSeed = generateSeed();
|
|
27
|
+
|
|
28
|
+
// Platform-specific font lists
|
|
29
|
+
const basePlatformFonts = {
|
|
30
|
+
'Win32': [
|
|
31
|
+
'Arial', 'Times New Roman', 'Calibri', 'Segoe UI', 'Georgia', 'Verdana',
|
|
32
|
+
'Trebuchet MS', 'Impact', 'Comic Sans MS', 'Courier New', 'Palatino Linotype',
|
|
33
|
+
'Book Antiqua', 'Lucida Console', 'Lucida Sans Unicode', 'MS Sans Serif',
|
|
34
|
+
'MS Serif', 'Tahoma', 'Century Gothic', 'Franklin Gothic Medium',
|
|
35
|
+
'Arial Black', 'Garamond', 'Bookman Old Style', 'Copperplate Gothic Bold',
|
|
36
|
+
'Copperplate Gothic Light', 'Century Schoolbook', 'Monotype Corsiva',
|
|
37
|
+
'Bradley Hand ITC', 'Brush Script MT', 'Chiller', 'Harrington',
|
|
38
|
+
'Jokerman', 'Old English Text MT', 'Papyrus', 'Stencil', 'Vivaldi',
|
|
39
|
+
'Wingdings', 'Wingdings 2', 'Wingdings 3', 'Webdings', 'Symbol'
|
|
40
|
+
],
|
|
41
|
+
'MacIntel': [
|
|
42
|
+
'Helvetica', 'Times', 'Courier', 'Monaco', 'Geneva', 'Chicago',
|
|
43
|
+
'New York', 'Palatino', 'Charcoal', 'Sand', 'Techno', 'Textile',
|
|
44
|
+
'American Typewriter', 'Andale Mono', 'Apple Chancery', 'Apple Color Emoji',
|
|
45
|
+
'Apple SD Gothic Neo', 'Apple Symbols', 'AppleGothic', 'Arial',
|
|
46
|
+
'Arial Black', 'Arial Narrow', 'Arial Rounded MT Bold', 'Arial Unicode MS',
|
|
47
|
+
'Avenir', 'Avenir Next', 'Avenir Next Condensed', 'Baskerville',
|
|
48
|
+
'Big Caslon', 'Bodoni 72', 'Bodoni 72 Oldstyle', 'Bodoni 72 Smallcaps',
|
|
49
|
+
'Bradley Hand', 'Brush Script MT', 'Chalkboard', 'Chalkboard SE',
|
|
50
|
+
'Chalkduster', 'Charter', 'Cochin', 'Comic Sans MS', 'Copperplate',
|
|
51
|
+
'Courier New', 'Didot', 'Futura', 'Georgia', 'Gill Sans', 'Helvetica Neue',
|
|
52
|
+
'Hoefler Text', 'Impact', 'Lucida Grande', 'Marker Felt', 'Menlo',
|
|
53
|
+
'Optima', 'Papyrus', 'Phosphate', 'Rockwell', 'Savoye LET', 'SignPainter',
|
|
54
|
+
'Skia', 'Snell Roundhand', 'Tahoma', 'Times New Roman', 'Trattatello',
|
|
55
|
+
'Trebuchet MS', 'Verdana', 'Zapfino'
|
|
56
|
+
],
|
|
57
|
+
'Linux x86_64': [
|
|
58
|
+
// Limited font set typical for Linux systems
|
|
59
|
+
'Arial', 'Times New Roman', 'Courier New', 'Georgia', 'Verdana',
|
|
60
|
+
'Tahoma', 'Trebuchet MS', 'Impact', 'Comic Sans MS', 'Palatino Linotype',
|
|
61
|
+
'Lucida Console', 'Lucida Sans Unicode', 'DejaVu Sans', 'DejaVu Serif',
|
|
62
|
+
'DejaVu Sans Mono', 'Liberation Sans', 'Liberation Serif', 'Liberation Mono',
|
|
63
|
+
'Ubuntu', 'Ubuntu Mono', 'Droid Sans', 'Droid Serif', 'Droid Sans Mono'
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// Get platform from navigator (this should be spoofed by platform consistency)
|
|
68
|
+
const platform = navigator.platform || 'Win32';
|
|
69
|
+
const baseFonts = basePlatformFonts[platform] || basePlatformFonts['Win32'];
|
|
70
|
+
|
|
71
|
+
// Randomize font availability (remove 2-5 fonts randomly but consistently per session)
|
|
72
|
+
const fontsToRemove = Math.floor(seededRandom(sessionSeed) * 4) + 2; // 2-5 fonts
|
|
73
|
+
const shuffledFonts = [...baseFonts];
|
|
74
|
+
|
|
75
|
+
// Remove some fonts based on session seed to create variance
|
|
76
|
+
for (let i = 0; i < fontsToRemove; i++) {
|
|
77
|
+
const indexToRemove = Math.floor(seededRandom(sessionSeed + i + 100) * shuffledFonts.length);
|
|
78
|
+
// Don't remove core fonts
|
|
79
|
+
const coreFonts = ['Arial', 'Times New Roman', 'Courier New', 'Georgia', 'Verdana'];
|
|
80
|
+
if (!coreFonts.includes(shuffledFonts[indexToRemove])) {
|
|
81
|
+
shuffledFonts.splice(indexToRemove, 1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const availableFonts = shuffledFonts;
|
|
86
|
+
|
|
87
|
+
// Store the font list in session to ensure consistency
|
|
88
|
+
if (!sessionStorage.getItem('cdp_font_list')) {
|
|
89
|
+
sessionStorage.setItem('cdp_font_list', JSON.stringify(availableFonts));
|
|
90
|
+
} else {
|
|
91
|
+
// Use stored list for consistency within session
|
|
92
|
+
try {
|
|
93
|
+
const stored = JSON.parse(sessionStorage.getItem('cdp_font_list'));
|
|
94
|
+
if (Array.isArray(stored) && stored.length > 0) {
|
|
95
|
+
availableFonts.splice(0, availableFonts.length, ...stored);
|
|
96
|
+
}
|
|
97
|
+
} catch (e) {
|
|
98
|
+
// Fallback to generated list
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Override document.fonts.check if available
|
|
103
|
+
if (document.fonts && document.fonts.check) {
|
|
104
|
+
const originalCheck = document.fonts.check;
|
|
105
|
+
document.fonts.check = function(font, text) {
|
|
106
|
+
// Extract font family from font descriptor
|
|
107
|
+
const fontFamily = font.match(/(?:^|\\s)(['"]?)([^'"\\s,]+)\\1(?=\\s|,|$)/)?.[2];
|
|
108
|
+
|
|
109
|
+
if (fontFamily && availableFonts.includes(fontFamily)) {
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// For fonts not in our list, return false to hide Linux-specific fonts
|
|
114
|
+
if (fontFamily) {
|
|
115
|
+
const linuxSpecificFonts = [
|
|
116
|
+
'Ubuntu', 'Liberation Sans', 'DejaVu Sans', 'Noto Sans', 'Cantarell',
|
|
117
|
+
'Source Sans Pro', 'Droid Sans', 'Roboto', 'Open Sans'
|
|
118
|
+
];
|
|
119
|
+
if (linuxSpecificFonts.includes(fontFamily)) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Fall back to original check for other cases
|
|
125
|
+
try {
|
|
126
|
+
return originalCheck.call(this, font, text);
|
|
127
|
+
} catch (e) {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Override FontFace constructor to control font loading
|
|
134
|
+
if (typeof FontFace !== 'undefined') {
|
|
135
|
+
const OriginalFontFace = FontFace;
|
|
136
|
+
window.FontFace = new Proxy(OriginalFontFace, {
|
|
137
|
+
construct(target, args) {
|
|
138
|
+
const [family, source, descriptors] = args;
|
|
139
|
+
|
|
140
|
+
// Check if this font should be available on our target platform
|
|
141
|
+
if (availableFonts.includes(family)) {
|
|
142
|
+
return Reflect.construct(target, args);
|
|
143
|
+
} else {
|
|
144
|
+
// Create a font face that will fail to load for unavailable fonts
|
|
145
|
+
const fontFace = Reflect.construct(target, [family, 'url(data:,)', descriptors]);
|
|
146
|
+
// Override the load method to always reject
|
|
147
|
+
fontFace.load = function() {
|
|
148
|
+
return Promise.reject(new DOMException('Font load failed', 'NetworkError'));
|
|
149
|
+
};
|
|
150
|
+
return fontFace;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Spoof canvas font measurement for consistent results
|
|
157
|
+
const originalMeasureText = CanvasRenderingContext2D.prototype.measureText;
|
|
158
|
+
CanvasRenderingContext2D.prototype.measureText = function(text) {
|
|
159
|
+
const metrics = originalMeasureText.apply(this, arguments);
|
|
160
|
+
|
|
161
|
+
// Get current font family from context
|
|
162
|
+
const font = this.font || '10px sans-serif';
|
|
163
|
+
const fontFamily = font.match(/(?:^|\\s)(['"]?)([^'"\\s,]+)\\1(?=\\s|,|$)/)?.[2] || 'Arial';
|
|
164
|
+
|
|
165
|
+
// Apply platform-specific text measurement adjustments
|
|
166
|
+
let osMultiplier = 1.0;
|
|
167
|
+
if (platform === 'Win32') {
|
|
168
|
+
osMultiplier = 1.02 + seededRandom(sessionSeed + 1000) * 0.01; // 1.02-1.03
|
|
169
|
+
} else if (platform === 'MacIntel') {
|
|
170
|
+
osMultiplier = 0.97 + seededRandom(sessionSeed + 1001) * 0.02; // 0.97-0.99
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Apply font-specific adjustments with session variance
|
|
174
|
+
const fontAdjustments = {
|
|
175
|
+
'Arial': 1.0 + seededRandom(sessionSeed + 2000) * 0.005,
|
|
176
|
+
'Times New Roman': 1.05 + seededRandom(sessionSeed + 2001) * 0.01,
|
|
177
|
+
'Courier New': 0.95 + seededRandom(sessionSeed + 2002) * 0.005,
|
|
178
|
+
'Helvetica': 0.98 + seededRandom(sessionSeed + 2003) * 0.005,
|
|
179
|
+
'Georgia': 1.03 + seededRandom(sessionSeed + 2004) * 0.01
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
const fontMultiplier = fontAdjustments[fontFamily] || (1.0 + seededRandom(sessionSeed + fontFamily.charCodeAt(0)) * 0.005);
|
|
183
|
+
const finalMultiplier = osMultiplier * fontMultiplier;
|
|
184
|
+
|
|
185
|
+
return new Proxy(metrics, {
|
|
186
|
+
get(target, prop) {
|
|
187
|
+
if (typeof target[prop] === 'number' && prop.includes('width')) {
|
|
188
|
+
return target[prop] * finalMultiplier;
|
|
189
|
+
}
|
|
190
|
+
return target[prop];
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
// Override getComputedStyle to return consistent font information
|
|
196
|
+
const originalGetComputedStyle = window.getComputedStyle;
|
|
197
|
+
window.getComputedStyle = function(element, pseudoElement) {
|
|
198
|
+
const styles = originalGetComputedStyle.call(this, element, pseudoElement);
|
|
199
|
+
|
|
200
|
+
return new Proxy(styles, {
|
|
201
|
+
get(target, prop) {
|
|
202
|
+
if (prop === 'fontFamily') {
|
|
203
|
+
const fontFamily = target.fontFamily;
|
|
204
|
+
// Ensure reported font families are from our available list
|
|
205
|
+
const families = fontFamily.split(',').map(f => f.trim().replace(/['"]/g, ''));
|
|
206
|
+
const availableFamily = families.find(f => availableFonts.includes(f));
|
|
207
|
+
return availableFamily ? \`"\${availableFamily}"\` : '"Arial"';
|
|
208
|
+
}
|
|
209
|
+
return target[prop];
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
spoofFonts();
|
|
216
|
+
})();
|
|
217
|
+
`;
|
|
218
|
+
};
|
|
219
|
+
//# sourceMappingURL=font-spoofing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-spoofing.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/font-spoofing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAW,EAAE;IACjD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkNV,CAAC;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fingerprint Overrides Index
|
|
3
|
+
* Exports all individual fingerprint override modules
|
|
4
|
+
*/
|
|
5
|
+
export { createStealthScript } from './stealth-script.js';
|
|
6
|
+
export { createWebGLSpoofingScript, type WebGLConfig } from './webgl-spoofing.js';
|
|
7
|
+
export { createAudioFingerprintSpoofingScript } from './audio-spoofing.js';
|
|
8
|
+
export { createAdvancedCanvasProtectionScript } from './canvas-protection.js';
|
|
9
|
+
export { createClientRectSpoofingScript } from './client-rect-spoofing.js';
|
|
10
|
+
export { createWebRTCSpoofingScript } from './webrtc-spoofing.js';
|
|
11
|
+
export { createWebGPUSpoofingScript } from './webgpu-spoofing.js';
|
|
12
|
+
export { createPlatformConsistencyScript, type PlatformConfig } from './platform-consistency.js';
|
|
13
|
+
export { setupMouseMovementHumanization } from './mouse-humanization.js';
|
|
14
|
+
export { setupRuntimeEnableBypass } from './runtime-enable-bypass.js';
|
|
15
|
+
export { createFontSpoofingScript } from './font-spoofing.js';
|
|
16
|
+
export { createPerformanceSpoofingScript } from './performance-spoofing.js';
|
|
17
|
+
export { createLocaleSpoofingScript } from './locale-spoofing.js';
|
|
18
|
+
export { createUAClientHintsSpoofingScript } from './ua-ch.js';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,oCAAoC,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,oCAAoC,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fingerprint Overrides Index
|
|
3
|
+
* Exports all individual fingerprint override modules
|
|
4
|
+
*/
|
|
5
|
+
export { createStealthScript } from './stealth-script.js';
|
|
6
|
+
export { createWebGLSpoofingScript } from './webgl-spoofing.js';
|
|
7
|
+
export { createAudioFingerprintSpoofingScript } from './audio-spoofing.js';
|
|
8
|
+
export { createAdvancedCanvasProtectionScript } from './canvas-protection.js';
|
|
9
|
+
export { createClientRectSpoofingScript } from './client-rect-spoofing.js';
|
|
10
|
+
export { createWebRTCSpoofingScript } from './webrtc-spoofing.js';
|
|
11
|
+
export { createWebGPUSpoofingScript } from './webgpu-spoofing.js';
|
|
12
|
+
export { createPlatformConsistencyScript } from './platform-consistency.js';
|
|
13
|
+
export { setupMouseMovementHumanization } from './mouse-humanization.js';
|
|
14
|
+
export { setupRuntimeEnableBypass } from './runtime-enable-bypass.js';
|
|
15
|
+
export { createFontSpoofingScript } from './font-spoofing.js';
|
|
16
|
+
export { createPerformanceSpoofingScript } from './performance-spoofing.js';
|
|
17
|
+
export { createLocaleSpoofingScript } from './locale-spoofing.js';
|
|
18
|
+
export { createUAClientHintsSpoofingScript } from './ua-ch.js';
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fingerprinting/fingerprint-overrides/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAoB,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,oCAAoC,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,oCAAoC,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,2BAA2B,CAAC;AACjG,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +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,MAgQ7C,CAAC"}
|