ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
9.57k stars 1.14k forks source link

The driver is detected #98

Closed migue1986 closed 3 years ago

migue1986 commented 3 years ago

Since yesterday it not working in bet365.es . The solution indicated in the following post #60 worked until yesterday. Has anyone been able to fix it? Thank you so much for everything

nesttle commented 3 years ago

Did you found a workaround for this? Having similar issue in an online store since yesterday

HMaker commented 3 years ago

Are you sure your IP is not blocked? Use the same IP and try to access bet365 in browser

ultrafunkamsterdam commented 3 years ago

That is not an entirely fair test. As another browser is ... well another browser. In general, i see just too many "bet365" "issues", but all not using official URL for it... smells a bit fishy. Any of these calls will not be supported anymore as 9/10 times the URL either does not even work, and smells too fishy.  Rather spend valuable time researching New detection methods.On Jan 30, 2021 21:15, Heraldo Lucena notifications@github.com wrote: Are you sure your IP is not blocked? Use the same IP and try to access bet365 in browser

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.

HMaker commented 3 years ago

When the IP is blocked bet365 will redirect requests to the session endpoint, /default/sports-configuration, to localhost. That's why I asked them to make sure the IP was not blocked.

boganfoo commented 3 years ago

Hello, I can confirm this issue occurs when not blocked by IP. Multiple IPs that previously worked are no longer working I am accessing using bet365.com.au (official site) headless mode on/off doesn't work Is there any way we can gather data to help with the research on this?

migue1986 commented 3 years ago

Hello ! The browser goes blank. stays charging indefinitely. I have tried with the normal Chrome and if it loads the data, so it is not IP problem.

boganfoo commented 3 years ago

Fixed it. Temporarily probably. Nice try bet365 :) Hats off to them. I added this before driver.get

driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", { "source": """ Object.defineProperty(navigator, 'maxTouchPoints', { get: () => 1 }) """ })

migue1986 commented 3 years ago

Wow !!!! Incredible !!!I have applied that code and it works correctly. Thank you very much :)

liqing1990 commented 3 years ago

w

Fixed it. Temporarily probably. Nice try bet365 :) Hats off to them. I added this before driver.get

driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", { "source": """ Object.defineProperty(navigator, 'maxTouchPoints', { get: () => 1 }) """ })

You are so amazing, thank you very much for your answer!!!!!!!!

karim090 commented 3 years ago

adding in _get_wrapped definition: if instance.execute_script("return navigator.maxTouchPoints") is 0: instance.execute_cdp_cmd( "Page.addScriptToEvaluateOnNewDocument", { "source": """ Object.defineProperty(navigator, 'maxTouchPoints', { get: () => 1 }) """ } )

will modify the property

@ultrafunkamsterdam let me contriubute

ultrafunkamsterdam commented 3 years ago

adding in _get_wrapped definition: if instance.execute_script("return navigator.maxTouchPoints") is 0: instance.execute_cdp_cmd( "Page.addScriptToEvaluateOnNewDocument", { "source": """ Object.defineProperty(navigator, 'maxTouchPoints', { get: () => 1 }) """ } )

will modify the property

@ultrafunkamsterdam let me contriubute

@karim090 , does this also work on cloudflare perhaps?

HMaker commented 3 years ago

@ultrafunkamsterdam this is specific to https://www.bet365.com/ it's a big bookmaker which is scraped by many bots, they have their own automated environment detection algorithm. I saw they look for navigator.maxTouchPoints var, value 1 means the browser supports touch, it somehow breaks their algorithm, probably they don't want to have false positives for mobile users.

ultrafunkamsterdam commented 3 years ago

I know bet365. Touchpoints check is quite common so i wonder why bet365 is the only one using it successfully

ultrafunkamsterdam commented 3 years ago

adding in _get_wrapped definition: if instance.execute_script("return navigator.maxTouchPoints") is 0: instance.execute_cdp_cmd( "Page.addScriptToEvaluateOnNewDocument", { "source": """ Object.defineProperty(navigator, 'maxTouchPoints', { get: () => 1 }) """ } ) will modify the property @ultrafunkamsterdam let me contriubute

@karim090 , does this also work on cloudflare perhaps?

I will implement it, but as an option , using a constructor param since it seems bound to 1 specific page, and might break other use cases.

ultrafunkamsterdam commented 3 years ago

When the IP is blocked bet365 will redirect requests to the session endpoint, /default/sports-configuration, to localhost. That's why I asked them to make sure the IP was not blocked.

That's frustrating to test. In the Netherlands bet365 is not allowed by geo restriction, and using VPN also seems blocked as it's trying to get something of localhost..

@boganfoo 's excellent find however is implemented in a patch (branch: update-patch), together with some other minor changes. However i cannot test it... so i'll wait for confirmation from any of you guys.

Avnsx commented 3 years ago

@ultrafunkamsterdam if we keep going like this, you can soon re-name it to undetected-bet365driver 🤪

ultrafunkamsterdam commented 3 years ago

@ultrafunkamsterdam if we keep going like this, you can soon re-name it to undetected-bet365driver 🤪

I agree. but there were too many issues, and even though the use case is very arguable, it detected the package... which does not represent "undetectable"

unknownsoldierorsimilar commented 2 years ago

We have just created a Discord group for discussing bet365 detection methods "under the hood" because these threads are constantly being monitored by bet365 staff thus making them harder to sustain. Please join the group through https://discord.gg/MjFr2HvUtK

Of course, there is still a possibility for them to join the group as well, but hopefully we could make our lives a little longer and easier. Thank you!