fysh711426 / UndetectedChromeDriver

GNU General Public License v3.0
166 stars 60 forks source link

Google login detection - headless browser #44

Open luanmacek opened 1 year ago

luanmacek commented 1 year ago

Hello till 16.2.2023 library was undetectable by google through headless browser, now its detected. Does anyone have solution for this?

Radu-D commented 1 year ago

Edit: Doesn't solve this issue

I've had this issue and the options below (and nothing more or less) solved it for me. Also, try not setting the headless parameter to true when creating the UndetectedChromeDriver. Not sure exactly what makes it bypass Cloudflare.

chromeOptions.AddArguments(
        "--disable-gpu",
        "--remote-debugging-port=9222",
        "--autoplay-policy=user-gesture-required",
        "--disable-background-networking",
        "--disable-background-timer-throttling",
        "--disable-backgrounding-occluded-windows",
        "--disable-breakpad",
        "--disable-client-side-phishing-detection",
        "--disable-component-update",
        "--disable-dev-shm-usage",
        "--disable-domain-reliability",
        "--disable-extensions",
        "--disable-features=AudioServiceOutOfProcess",
        "--disable-hang-monitor",
        "--disable-ipc-flooding-protection",
        "--disable-notifications",
        "--disable-offer-store-unmasked-wallet-cards",
        "--disable-popup-blocking",
        "--disable-print-preview",
        "--disable-prompt-on-repost",
        "--disable-renderer-backgrounding",
        "--disable-setuid-sandbox",
        "--disable-speech-api",
        "--disk-cache-size=33554432",
        "--hide-scrollbars",
        "--ignore-gpu-blacklist",
        "--ignore-certificate-errors",
        "--metrics-recording-only",
        "--mute-audio",
        "--no-default-browser-check",
        "--no-first-run",
        "--no-pings",
        "--no-sandbox",
        "--no-zygote",
        "--password-store=basic",
        "--use-gl=swiftshader",
        "--use-mock-keychain",
        "--single-process",
        "--headless=new");
luanmacek commented 1 year ago

I've had this issue and the options below (and nothing more or less) solved it for me. Also, try not setting the headless parameter to true when creating the UndetectedChromeDriver. Not sure exactly what makes it bypass Cloudflare.

chromeOptions.AddArguments(
        "--disable-gpu",
        "--remote-debugging-port=9222",
        "--autoplay-policy=user-gesture-required",
        "--disable-background-networking",
        "--disable-background-timer-throttling",
        "--disable-backgrounding-occluded-windows",
        "--disable-breakpad",
        "--disable-client-side-phishing-detection",
        "--disable-component-update",
        "--disable-dev-shm-usage",
        "--disable-domain-reliability",
        "--disable-extensions",
        "--disable-features=AudioServiceOutOfProcess",
        "--disable-hang-monitor",
        "--disable-ipc-flooding-protection",
        "--disable-notifications",
        "--disable-offer-store-unmasked-wallet-cards",
        "--disable-popup-blocking",
        "--disable-print-preview",
        "--disable-prompt-on-repost",
        "--disable-renderer-backgrounding",
        "--disable-setuid-sandbox",
        "--disable-speech-api",
        "--disk-cache-size=33554432",
        "--hide-scrollbars",
        "--ignore-gpu-blacklist",
        "--ignore-certificate-errors",
        "--metrics-recording-only",
        "--mute-audio",
        "--no-default-browser-check",
        "--no-first-run",
        "--no-pings",
        "--no-sandbox",
        "--no-zygote",
        "--password-store=basic",
        "--use-gl=swiftshader",
        "--use-mock-keychain",
        "--single-process",
        "--headless=new");

Sir, what chrome version and chromedriver do you use? I have tried many various from v84 to 111 but unsuccessful

Radu-D commented 1 year ago

@luanmacek I just checked and you're right. As soon as you submit the form, the message "This browser or app may not be secure." appears. I thought that the check would be done before loading the page. My mistake! I have no solution for this, yet.

Chrome: 111.0.5563.64, Driver: 111.0.5563