selenium-wire
selenium-wire copied to clipboard
Detected by cloudfare
Hi, When I use normal undetected chrome driver works ! but when I use with selenium wire, its detected. Thanks
Access denied Error code 1020
I have the same problem webdriver - 112 Chrome - 112 Selenium Wire - 5.1.0 undetected chromedriver - 3.4.6
The latest version of selenium-wire use the old version of undetected_chromedriver 3.1.0. The current version of undetected_chromedriver is 3.4.6 Can someone tell me how to adapt 3.4.6 to Selenium 5.1.0?
having the same issue chrome webdriver - 112 selenium wire - 5.1.0 selenium - 4.8.3 undetected_chromedriver - 3.4.6
- Keep hitting cloudflare turnstile.
- Getting certificate is not valid when using the undetected chromedriver via selenium-wire.
- When I use the undetected chrome driver itself the certificate issue is not present.
it can be fixed? or comment it?
-
selenium-wire
certificate is not valid - update
undetected_chromedriver
support to latest version
my env: selenium wire - 5.1.0 undetected_chromedriver - 3.4.6 chrome/chromedriver- 112
I'm running into the same problem, opened another issue here further explaining. Sorry if this was bad etiquette. https://github.com/wkeeling/selenium-wire/issues/669.
Seleniumwire does import the updated version of undetected chromedriver, see /seleniumwire/undetected_chromedriver/webdriver.py line 6. Add print(uc.__version__)
and you'll see it is in fact using the version in your venv. Also, the certificate being invalid isn't the problem, you can add a self signed cert to get rid of the insecure warning.
@strukiii The latest version of selenium wire only supports undetected_chromedriver version 3.1.0
@deniskzt I understand that's what the commit message says, I read that too, but I showed how you can verify the version yourself.
+1 on this issue. Can confirm issue is present in selenium-wire using undetected chromedriver 3.4.6 but not present when using selenium and undetected chromedriver 3.4.6 to do the same actions. Selenium-wire must be doing something which is making the driver more detectable.
I have the same problem
It seems the issue is not with selenium wire itself but with cloudflare detecting proxy/certificate, and selenium wire uses a self signed certificate for mitmproxy proxy. If we just launch a default chrome binary with a proxy flag, like:
chrome --proxy-server=127.0.0.1:8080
(local proxy with self signed certificate) then it triggers the cloudflare antibot protection.
I tried the same self signed certificate on firefox and it works like a charm but, unfortunately, there is no "undetected firefox" just yet
It seems the issue is not with selenium wire itself but with cloudflare detecting proxy/certificate
sounds like we need either/or
- a patched version of chromium
- a dynamic analysis tool like frida to insert hooks into the chromium binary
... to pipe all requests and responses through a local http proxy for passive tracing and active intercepting of https traffic
tracing https traffic with frida:
- https://gaiaslastlaugh.medium.com/frida-as-an-alternative-to-network-tracing-5173cfbd7a0b
- https://andydavies.me/blog/2019/12/12/capturing-and-decrypting-https-traffic-from-ios-apps/
- https://stackoverflow.com/questions/46711786/android-hooking-https-traffic-using-frida
- https://frida.re/docs/frida-trace/
or simpler: use a local socks5h proxy server to capture the encrypted https traffic and decrypt it with the TLS key (but this only allows passive tracing)
https://andydavies.me/blog/2019/12/12/capturing-and-decrypting-https-traffic-from-ios-apps/
To decrypt the packets we need the matching TLS keys, Chrome and Firefox will provide these when the SSLKEYLOGFILE environment variable is set
socks5h proxy server
- https://docs.mitmproxy.org/stable/concepts-modes/#socks-proxy
- https://github.com/Amaindex/asyncio-socks-server
- https://github.com/nneonneo/iOS-SOCKS-Server
- https://github.com/topics/socks5-server?l=python
- https://github.com/topics/proxy-server?l=python
see also
- https://github.com/wkeeling/selenium-wire/issues/67