当前位置:网站首页>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
边栏推荐
- 5. array
- [course assignment] floating point operation analysis and precision improvement
- Customize view to draw line chart (support zoom)
- Navigation bar switching, message board, text box losing focus
- Consultation: what kind of securities company is micro securities? Is it safe to open an account?
- Repair for a while, decisively reconstruct and take responsibility -- talk about CRM distributed cache optimization
- What is software testing?
- Highly available configuration of database (MySQL)
- Installation of MySQL 8.0.19 under alicloud lightweight application server linux-centos7
- Postman reports error write eproto 93988952error10000f7ssl routinesopenssl_ internalWRONG_ VERSION_ NUM
猜你喜欢

3D slicer import label and view label

Alibaba cloud log service is available in Net project

C language -- program compilation and linking

Open source FTP server FileZilla server

Babbitt yuancosmos daily must read: wechat may ban a official account for the first time on the grounds of "involving secondary transactions in digital collections", and the new regulations of the pla

Explanation of vim, makefile and GDB tools

Automation operation and maintenance 1 - installation and deployment of ansible

3D slicer saves segmentation results

Cvpr2022 | the action sequence verification task was first proposed by X xiaohongshu of Shanghai University of science and technology, which can be applied to multiple scenarios such as scoring of spo

【课程作业】浮点运算分析及精度改进
随机推荐
Heat mapping using Seaborn
[deeply understand tcapulusdb technology] tcapulusdb import data
2. data type
使用seaborn绘制热图
[in depth understanding of tcapulusdb technology] tcapulusdb construction data
Open source FTP server FileZilla server
Automatic operation and maintenance 3 - using playbook in ansible
Blazer page element authorization -- use of the authorizeview component
使用api制作我的足迹地图
6. functions
MySQL - table constraints
MySQL constraints (descriptions of various conditions when creating tables)
Talk about the delay of public network
Redis learning (1) -- overview and common commands
Kube-prometheus grafana安装插件和grafana-image-renderer
MySQL - view properties
JS 中的集合引用类型
3D slicer saves segmentation results
对app和微信小程序进行接口测试
Quelle plate - forme à terme est plus sûre. Je vous en prie.