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.71k stars 1.14k forks source link

This project cant bypass Imperva like openccc #393

Open henjicn opened 2 years ago

henjicn commented 2 years ago
import undetected_chromedriver.v2 as uc
options = uc.ChromeOptions()

# setting profile
options.user_data_dir = "c:\\temp\\profile"

# another way to set profile is the below (which takes precedence if both variants are used
options.add_argument('--user-data-dir=c:\\temp\\profile2')

# just some options passing in to skip annoying popups
options.add_argument('--no-first-run --no-service-autorun --password-store=basic')
driver = uc.Chrome(options=options, version_main=96)  # version_main allows to specify your chrome version instead of following chrome global version

driver.get('https://www.opencccapply.net/cccapply-welcome?cccMisCode=372')  # known url using cloudflare's "under attack mode"

Then it shows that,But I haven't used a vpn ———————————————————————————————————————————————————————————————————— ERROR A proxy connection has been detected. To connect to California Community Colleges you must disable anonymizing services. This may include: Tor web browser VPN connections Anonymizing browser plugins

Avnsx commented 2 years ago

This project cant bypass Imperva like openccc

Hey this is most likely caused, by the proxy you're using. You need to make sure your proxy connection does not forcefully send any of these headers

'VIA',
'X-FORWARDED-FOR',
'X-FORWARDED',
'FORWARDED-FOR',
'FORWARDED-FOR-IP',
'FORWARDED',
'CLIENT-IP',
'PROXY-CONNECTION'

in the request bodies.

If you can't find better proxies, I would recommend you to use https://github.com/wkeeling/selenium-wire#example-replace-an-existing-request-header and try to replace or remove the headers that cause you to get flagged. Also you don't need to define user profiles, if you use the same profile every time, that might cause you to get detected too.

I can confirm that the code snippet you sent, works well for me, no detections at all.

tadongguk commented 2 years ago

This project cant bypass Imperva like openccc

Hey this is most likely caused, by the proxy you're using. You need to make sure your proxy connection does not forcefully send any of these headers

'VIA',
'X-FORWARDED-FOR',
'X-FORWARDED',
'FORWARDED-FOR',
'FORWARDED-FOR-IP',
'FORWARDED',
'CLIENT-IP',
'PROXY-CONNECTION'

in the request bodies.

If you can't find better proxies, I would recommend you to use https://github.com/wkeeling/selenium-wire#example-replace-an-existing-request-header and try to replace or remove the headers that cause you to get flagged. Also you don't need to define user profiles, if you use the same profile every time, that might cause you to get detected too.

I can confirm that the code snippet you sent, works well for me, no detections at all.

Can you upload the example code here?

shopconan commented 2 years ago

work like charm thx