当前位置:网站首页>2021 the latest selenium truly bypasses webdriver detection
2021 the latest selenium truly bypasses webdriver detection
2022-06-21 13:54:00 【Programmer hyperspace】
If you are little white , This set of information can help you become a big bull , If you have rich development experience , This set of information can help you break through the bottleneck
2022web Full set of video tutorial front-end architecture H5 vue node Applet video + Information + Code + Interview questions .
I've seen a lot selenium article , But not many can really bypass ! Let's pass js File injection is the way to achieve real bypass ! Welcome to like and pay attention to one click three links !
One 、 What is really bypassing browser detection ?
https://bot.sannysoft.com This is a chrome The real detection website
Why emphasize bypassing webdriver Property detection ?
- Some web sites through webdriver Detection makes Selenium Cannot get element 、 Unable to control buttons, etc
1、PC Environment on chrome The effect of

Generally speaking, the common enable webdriver Even the logo is red , The above is local chrome Detection properties of
2、 Normal startup webdriver
Upper code
from selenium import webdriver
class WebDriverChrome(object):
def __init__(self): self.driver = self.StartWebdriver() def StartWebdriver(self): options = webdriver.ChromeOptions() options.add_argument("start-maximized") options.add_experimental_option("excludeSwitches", ["enable-automation"]) options.add_experimental_option("useAutomationExtension", False) driver = webdriver.Chrome(options=options) return driver def RunStart(self): self.driver.get('https://bot.sannysoft.com') # time.sleep(10) # self.driver.quit()if name == ‘main’:
Crawl = WebDriverChrome()
Crawl.RunStart()

3、Js Inject real bypass webdriver Detection properties of
Why did I inject js Property is valid ?
The js File is pyppetter To bypass webdriver The... Used in the test
Now import directly into Selenium Starting up chrome in
pivotal js I put the document at the end of the text
Upper code :from selenium import webdriver
class WebDriverChrome(object):
def __init__(self): self.driver = self.StartWebdriver() def StartWebdriver(self): options = webdriver.ChromeOptions() options.add_argument("start-maximized") options.add_experimental_option("excludeSwitches", ["enable-automation"]) options.add_experimental_option("useAutomationExtension", False) driver = webdriver.Chrome(options=options) with open('./stealth.min.js') as f: js = f.read() driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", { "source": js }) return driver def RunStart(self): self.driver.get('https://bot.sannysoft.com') # time.sleep(10) # self.driver.quit()if name == ‘main’:
Crawl = WebDriverChrome()
Crawl.RunStart()

js Injected file [stealth.min.js]
- The naming is not uniform. It is required to be able to read
- Access method :
- install node.js
npx extract-stealth-evasions
It will generate a... Under the folder where you execute the command stealth.min.js file
I'm through everything Tools found to change js file , Copy and then use , At the same time, I also provide csdn Download for free , Because resources cannot be downloaded directly for free , In order not to consume everyone's C The coin , Follow me to become a fan and you can download

After the approval , I'll attach a link to the comment
边栏推荐
- Lamp architecture 4 -- MySQL source code compilation and use
- 服务治理的工作内容
- 给网站添加SSL安全证书
- Quelle plate - forme à terme est plus sûre. Je vous en prie.
- Web3.js connection to metamask wallet transfer
- Azure applicationinsights integrated in blazor
- MySQL - data type
- Pingcap was selected as the "voice of customers" of Gartner cloud database in 2022, and won the highest score of "outstanding performer"
- Review notes of web development technology
- Artifacial Intelligent Project
猜你喜欢

Postman testing websocket interface

Chapter IX Cisco ASA application nat

C language elementary level (IX) enumeration
![[googolu] takeout rebate system - business domain name of KFC configuration applet](/img/54/d30b9c08e46760dac8c3405716941f.jpg)
[googolu] takeout rebate system - business domain name of KFC configuration applet

map. Values() to copy list and ArrayList

Design interface automation test cases by hand: establish database instances and test case tables

Kubernetes' fast practice and core principle analysis

3000 frame animation illustrating why MySQL needs binlog, redo log and undo log

Application configuration management, basic principle analysis

Use of MySQL 8.0.19 under alicloud lightweight application server linux-centos7
随机推荐
哪个期货平台 交易更安全放心。求推荐。
Farewell to the endless summer
Navigation bar switching, message board, text box losing focus
Lamp architecture 5 - MySQL Cluster and master-slave structure
Explanation of vim, makefile and GDB tools
Teach you how to design interface automation test cases: extract interface information and analyze it
对app和微信小程序进行接口测试
哪個期貨平臺 交易更安全放心。求推薦。
Oracle client11 and pl/sql12 installation
"My" C code specification
MySQL constraints (descriptions of various conditions when creating tables)
Postman reports error write eproto 93988952error10000f7ssl routinesopenssl_ internalWRONG_ VERSION_ NUM
C language elementary level (10) type rename typedef
给网站添加SSL安全证书
Design interface automation test cases by hand: establish database instances and test case tables
Comment utiliser un moteur de recherche?
Declare war on uncivilized code II
module ‘selenium. webdriver‘ has no attribute ‘PhantomJS‘
May the mountains and rivers be safe
微证券开户正规安全吗,怎么操作开户?