Can a website detect when you are using selenium with chromedriver?

后端 未结 19 2715
情歌与酒
情歌与酒 2020-11-21 05:41

I\'ve been testing out Selenium with Chromedriver and I noticed that some pages can detect that you\'re using Selenium even though there\'s no automation at all. Even when I

19条回答
  •  醉酒成梦
    2020-11-21 06:05

    Some sites are detecting this:

    function d() {
    try {
        if (window.document.$cdc_asdjflasutopfhvcZLmcfl_.cache_)
            return !0
    } catch (e) {}
    
    try {
        //if (window.document.documentElement.getAttribute(decodeURIComponent("%77%65%62%64%72%69%76%65%72")))
        if (window.document.documentElement.getAttribute("webdriver"))
            return !0
    } catch (e) {}
    
    try {
        //if (decodeURIComponent("%5F%53%65%6C%65%6E%69%75%6D%5F%49%44%45%5F%52%65%63%6F%72%64%65%72") in window)
        if ("_Selenium_IDE_Recorder" in window)
            return !0
    } catch (e) {}
    
    try {
        //if (decodeURIComponent("%5F%5F%77%65%62%64%72%69%76%65%72%5F%73%63%72%69%70%74%5F%66%6E") in document)
        if ("__webdriver_script_fn" in document)
            return !0
    } catch (e) {}
    

提交回复
热议问题