Skip to content

Commit 8a22787

Browse files
authored
Update torupload.txt
1 parent 19cc03a commit 8a22787

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

torupload.txt

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,80 @@ author: BlazeFTL
7373
});
7474
window.addEventListener('load', () => { observer.disconnect(); Document.prototype.createElement = _origCreate; }, { once: true });
7575
})();
76+
77+
78+
/// blaze-set-useragent.js
79+
/// alias blaze-sua.js
80+
(function() {
81+
const UA_ANDROID = 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Mobile Safari/537.36';
82+
const UA_DESKTOP = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36';
83+
84+
const isMobile = /Android|iPhone|iPad|iPod|Mobile/i.test(navigator.userAgent);
85+
const spoofUA = isMobile ? UA_ANDROID : UA_DESKTOP;
86+
87+
try {
88+
Object.defineProperty(navigator, 'userAgent', {
89+
get: () => spoofUA,
90+
configurable: true,
91+
});
92+
} catch(e) {}
93+
94+
try {
95+
Object.defineProperty(navigator, 'appVersion', {
96+
get: () => spoofUA.replace('Mozilla/', ''),
97+
configurable: true,
98+
});
99+
} catch(e) {}
100+
101+
try {
102+
Object.defineProperty(navigator, 'platform', {
103+
get: () => isMobile ? 'Linux armv8l' : 'Win32',
104+
configurable: true,
105+
});
106+
} catch(e) {}
107+
108+
try {
109+
Object.defineProperty(navigator, 'vendor', {
110+
get: () => 'Google Inc.',
111+
configurable: true,
112+
});
113+
} catch(e) {}
114+
115+
// Spoof navigator.userAgentData (Chrome-only modern UA hints API)
116+
if (navigator.userAgentData !== undefined) {
117+
try {
118+
Object.defineProperty(navigator, 'userAgentData', {
119+
get: () => ({
120+
brands: [
121+
{ brand: 'Google Chrome', version: '137' },
122+
{ brand: 'Chromium', version: '137' },
123+
{ brand: 'Not/A)Brand', version: '24' },
124+
],
125+
mobile: isMobile,
126+
platform: isMobile ? 'Android' : 'Windows',
127+
getHighEntropyValues: (hints) => Promise.resolve({
128+
brands: [
129+
{ brand: 'Google Chrome', version: '137' },
130+
{ brand: 'Chromium', version: '137' },
131+
{ brand: 'Not/A)Brand', version: '24' },
132+
],
133+
mobile: isMobile,
134+
platform: isMobile ? 'Android' : 'Windows',
135+
platformVersion: isMobile ? '10.0.0' : '15.0.0',
136+
architecture: isMobile ? 'arm' : 'x86',
137+
bitness: '64',
138+
model: isMobile ? '' : '',
139+
uaFullVersion: '137.0.0.0',
140+
fullVersionList: [
141+
{ brand: 'Google Chrome', version: '137.0.0.0' },
142+
{ brand: 'Chromium', version: '137.0.0.0' },
143+
{ brand: 'Not/A)Brand', version: '24.0.0.0' },
144+
],
145+
}),
146+
toJSON: () => ({}),
147+
}),
148+
configurable: true,
149+
});
150+
} catch(e) {}
151+
}
152+
})();

0 commit comments

Comments
 (0)