Skip all fingerprint overrides on Google auth domains
Early return in inject.js bypasses all spoofing on accounts.google.com and accounts.youtube.com. Google does comprehensive browser verification beyond just UA — platform, languages, WebGL, screen all trigger rejection.
This commit is contained in:
43
inject.js
43
inject.js
@@ -8,6 +8,13 @@
|
||||
if (!CONFIG) return;
|
||||
delete window.__csConfig;
|
||||
|
||||
// Skip all overrides on auth domains — Google does deep browser verification
|
||||
// and rejects logins when any fingerprint inconsistency is detected
|
||||
const AUTH_BYPASS_DOMAINS = ["accounts.google.com", "accounts.youtube.com"];
|
||||
try {
|
||||
if (AUTH_BYPASS_DOMAINS.indexOf(window.location.hostname) !== -1) return;
|
||||
} catch(e) {}
|
||||
|
||||
const pageWindow = window.wrappedJSObject;
|
||||
|
||||
// --- Vector Toggle ---
|
||||
@@ -170,16 +177,6 @@
|
||||
// =========================================================================
|
||||
|
||||
if (vectorEnabled("navigator")) {
|
||||
// Auth domains where UA spoofing breaks login — return real values there
|
||||
const AUTH_BYPASS_DOMAINS = ["accounts.google.com", "accounts.youtube.com"];
|
||||
const UA_PROPS = new Set(["userAgent", "appVersion", "oscpu"]);
|
||||
|
||||
// Capture real values before any overrides
|
||||
const realNav = {};
|
||||
for (const p of UA_PROPS) {
|
||||
try { realNav[p] = window.navigator[p]; } catch(e) {}
|
||||
}
|
||||
|
||||
const navOverrides = {
|
||||
hardwareConcurrency: CONFIG.nav.hardwareConcurrency,
|
||||
platform: CONFIG.nav.platform,
|
||||
@@ -192,27 +189,11 @@
|
||||
|
||||
for (const [prop, value] of Object.entries(navOverrides)) {
|
||||
if (value !== undefined) {
|
||||
if (UA_PROPS.has(prop)) {
|
||||
// UA-related props: return real value on auth domains
|
||||
const realValue = realNav[prop];
|
||||
Object.defineProperty(pageWindow.Navigator.prototype, prop, {
|
||||
get: exportFunction(function() {
|
||||
try {
|
||||
const h = pageWindow.location.hostname;
|
||||
if (AUTH_BYPASS_DOMAINS.indexOf(h) !== -1) return realValue;
|
||||
} catch(e) {}
|
||||
return value;
|
||||
}, pageWindow),
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
});
|
||||
} else {
|
||||
Object.defineProperty(pageWindow.Navigator.prototype, prop, {
|
||||
get: exportFunction(function() { return value; }, pageWindow),
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
});
|
||||
}
|
||||
Object.defineProperty(pageWindow.Navigator.prototype, prop, {
|
||||
get: exportFunction(function() { return value; }, pageWindow),
|
||||
configurable: true,
|
||||
enumerable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user