diprajpatra / selenium-stealth

Trying to make python selenium more stealthy.
MIT License
607 stars 88 forks source link

godaddy login page detects selenium even with `stealth` #32

Open dpopes opened 2 years ago

dpopes commented 2 years ago

I have not been able to figure out how they're doing it, but using a selenium chromedriver with sealth, I still see:

image

        options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36')
        options.add_argument('--disable-blink-features=AutomationControlled')
        options.add_argument('--disable-extensions')
        options.add_argument('--profile-directory=Default')
        options.add_argument("--incognito")
        options.add_argument("--disable-plugins-discovery");
        options.add_argument("--start-maximized")
        options.add_experimental_option("excludeSwitches", ["enable-automation"])
        options.add_experimental_option('useAutomationExtension', False)
        self.driver = webdriver.Chrome(options=options)

        stealth(self.driver,
            user_agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36')
            languages=["en-US", "en"],
            vendor="Google Inc.",
            platform="Win32",
            webgl_vendor="Intel Inc.",
            renderer="Intel Iris OpenGL Engine",
            fix_hairline=True,
        )

        self.driver.get(self.login_url)

This is running from my laptop on a residential IP address. Even if I just launch chromedriver and then manually interact with the login form and log in, I still get the "unusual browser" modal dialog.

Any thoughts on what might be going on here?

dpopes commented 2 years ago

I found some slightly obfuscated/minified javascript (https://d3op16id4dloxg.cloudfront.net/RelevantID4.js) that's being served on their site (pretty formatting => https://pastebin.com/GgXUMCKu) that may yield some clues

praveencqr commented 1 year ago

You are using windows platform name (Win32) for a Mac useragent. You should use the parameters carefully no matter how powerful the tool is in bypassing detection.

kaliiiiiiiiii commented 1 year ago

You could try https://github.com/kaliiiiiiiiii/Selenium-Profiles or undetected-chromedriver