Compare commits
No commits in common. "d776ad589d5982572ad01462a831c6a1ad7302cb" and "c2bb276c3de9401b78530d50d17ecdb5460e4ad8" have entirely different histories.
d776ad589d
...
c2bb276c3d
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "real-debrid-downloader",
|
"name": "real-debrid-downloader",
|
||||||
"version": "1.6.78",
|
"version": "1.6.77",
|
||||||
"description": "Desktop downloader",
|
"description": "Desktop downloader",
|
||||||
"main": "build/main/main/main.js",
|
"main": "build/main/main/main.js",
|
||||||
"author": "Sucukdeluxe",
|
"author": "Sucukdeluxe",
|
||||||
|
|||||||
@ -193,13 +193,10 @@ export class BestDebridWebFallback {
|
|||||||
window.webContents.setUserAgent(BESTDEBRID_USER_AGENT);
|
window.webContents.setUserAgent(BESTDEBRID_USER_AGENT);
|
||||||
window.setMenuBarVisibility(false);
|
window.setMenuBarVisibility(false);
|
||||||
|
|
||||||
// Inject anti-fingerprint patches via CDP before any page JS runs.
|
// Inject anti-fingerprint patches via CDP before any page JS runs
|
||||||
// The debugger must stay attached until after page load so the
|
// This hides Electron-specific properties that Cloudflare Turnstile detects
|
||||||
// registered scripts actually execute on every new document.
|
|
||||||
let debuggerAttached = false;
|
|
||||||
try {
|
try {
|
||||||
window.webContents.debugger.attach("1.3");
|
window.webContents.debugger.attach("1.3");
|
||||||
debuggerAttached = true;
|
|
||||||
await window.webContents.debugger.sendCommand("Page.addScriptToEvaluateOnNewDocument", {
|
await window.webContents.debugger.sendCommand("Page.addScriptToEvaluateOnNewDocument", {
|
||||||
source: [
|
source: [
|
||||||
"Object.defineProperty(navigator, 'webdriver', { get: () => false });",
|
"Object.defineProperty(navigator, 'webdriver', { get: () => false });",
|
||||||
@ -208,14 +205,12 @@ export class BestDebridWebFallback {
|
|||||||
"window.chrome = { runtime: {}, loadTimes: function() {}, csi: function() {} };"
|
"window.chrome = { runtime: {}, loadTimes: function() {}, csi: function() {} };"
|
||||||
].join("\n")
|
].join("\n")
|
||||||
});
|
});
|
||||||
|
window.webContents.debugger.detach();
|
||||||
} catch {
|
} catch {
|
||||||
// CDP not available — continue without patches
|
// CDP not available — continue without patches
|
||||||
}
|
}
|
||||||
|
|
||||||
window.on("closed", () => {
|
window.on("closed", () => {
|
||||||
if (debuggerAttached) {
|
|
||||||
try { window.webContents.debugger.detach(); } catch { /* already detached */ }
|
|
||||||
}
|
|
||||||
if (this.loginWindow === window) {
|
if (this.loginWindow === window) {
|
||||||
this.loginWindow = null;
|
this.loginWindow = null;
|
||||||
this.loginWindowPartition = "";
|
this.loginWindowPartition = "";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user