seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
4.95k stars 938 forks source link

SeleniumBase Detected On Discord #1700

Closed mrafieefard closed 1 year ago

mrafieefard commented 1 year ago

This module is great but it can't bypass number verification on unclaimed account I tried many possible way to bypass it can someone help me ?

mdmintz commented 1 year ago

Are you using SeleniumBase in undetected mode? If not, you need to set --uc as a command-line option, or from within the test when launching a new driver. Eg:

from seleniumbase import BaseCase

if __name__ == "__main__":
    from pytest import main
    main([__file__, "--uc", "--incognito", "-s"])

class UndetectedTest(BaseCase):
    def test_browser_is_undetected(self):
        if not self.undetectable or not self.incognito:
            self.get_new_driver(undetectable=True, incognito=True)
        self.open("https://nowsecure.nl/#relax")
        try:
            self.assert_text("OH YEAH, you passed!", "h1", timeout=7.75)
            self.post_message("Selenium wasn't detected!", duration=2.8)
            self._print("\n Success! Website did not detect Selenium! ")
            self.save_screenshot_to_logs()
        except Exception:
            self.fail('Selenium was detected! Try using: "pytest --uc"')
mrafieefard commented 1 year ago

Yes i tried that I used undetected selenium before and past nowsecure but discord ask me for phone number even i tried pixelscan and everything is green but still discord detect uc

mdmintz commented 1 year ago

If your clicks are being detected, then you'll have to combine SeleniumBase page loads in UC Mode with https://github.com/asweigart/pyautogui so that your clicks are no longer detected. (That's what the experts are using.)

mrafieefard commented 1 year ago

I even tried that with my click like I clicked the mouse keyboard and everything connected by me but it still detected I think it detects selenium even I open regular chrome and selenium chrome and try to register I can register in regular chrome and I don't have any problem but I changed my IP and register by my self but It asks me again for the number I recognize its for the driver. get it because I open a new tab in opened selenium chrome and tried to register and it's successful but when I use the driver. get when the driver controls the tab it detects me

mrafieefard commented 1 year ago

If you can't answer me please open issue

mdmintz commented 1 year ago

The new https://github.com/seleniumbase/SeleniumBase/releases/tag/v4.12.2 release from yesterday had several updates to UC Mode. Hopefully that resolves your issue. If that still doesn't resolve it, than you'll probably need to either use https://github.com/asweigart/pyautogui for more of your script, or open an issue with https://github.com/ultrafunkamsterdam/undetected-chromedriver, where much of the SeleniumBase UC Mode code comes from.

SeleniumBase UC Mode does make some improvements to undetected-chromedriver on its own, such as:

I'm actively following a thread on undetected-chromedriver's Pull Request page: https://github.com/ultrafunkamsterdam/undetected-chromedriver/pull/993#issuecomment-1403508965, which may have updates soon with improvements that will help. I've already implemented the current updates, which helped, but it looks like they will have more updates soon, so I'll be waiting on more info from that.

mrafieefard commented 1 year ago

No it did't work