javascript - Check if selenium webdriver is being detected? - Stack Overflow

is there any way to check when runninng selenium webdriver from python or puppeteer from javascript if

is there any way to check when runninng selenium webdriver from python or puppeteer from javascript if the website that i'm visiting is detecting that i'm running a bot? are there any websites that tell you if you would fail a bot test? (ex.: cloudflare or captcha)

thanks

is there any way to check when runninng selenium webdriver from python or puppeteer from javascript if the website that i'm visiting is detecting that i'm running a bot? are there any websites that tell you if you would fail a bot test? (ex.: cloudflare or captcha)

thanks

Share Improve this question asked Sep 9, 2022 at 13:10 electricnapkinelectricnapkin 1754 silver badges12 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

thank you for the answer. i managed to find a couple more resources. here is a list of everything i found:

https://nowsecure.nl/ (thanks to user Michael Mintz)
https://bot.sannysoft.
https://browserleaks./
https://bot.incolumitas./
https://fingerprintjs.github.io/fingerprintjs/
https://antoinevastel./bots/
https://www.google./recaptcha/api2/demo
https://recaptcha-demo.appspot./

out of all the websites i found browserleaks and incolumnitas to be the most prehensive. i'll leave the question open, feel free anyone to add some more if you know.

Here's the bot test for Cloudflare: https://nowsecure.nl (If Selenium/automation is detected, it will keep loading the page forever. If you bypassed detection, you'll see blinking lights that you passed.)

There's a Python library that lets you get past that bot blocker: undetected-chromedriver

That tool has been integrated into SeleniumBase so that you can bypass bot detection as a pytest mand-line option (--uc) for your Selenium Python tests: pytest --uc.

I'm one of the authors mentioned in the responses above. Bot detection evolves frequently so I wrote an updated article to explain how (headless) Chrome (even when modified) instrumented with Selenium can be detected as of June 2024. I also created a test page so that you can verify if your bot is detected.

Testing the presence of the HeadlessChrome substring in the user agent and verifying the value of navigator.webdriver is still helpful against bots that don't modify too much their fingerprint.

Otherwise, there is a new detection techniques that aims to detect CDP automation (Chrome devtool protocol) used by instrumentation frameworks like Selenium.

The new test looks as follows:

var cdpDetected = false;
var e = new Error();
Object.defineProperty(e, 'stack', {
   get() {
    cdpDetected = true;
   }
});

// This is part of the detection, the console.log shouldn't be removed!
console.log(e);

if (cdpDetected) {
    isBot = true;
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742341523a4425720.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信