https://github.com/cloud-org/stealth.min.js
The resulting JS file can be used in pure CDP implementations or to test the evasions in your devtools.
https://github.com/cloud-org/stealth.min.js
javascript python selenium
Last synced: 27 days ago
JSON representation
The resulting JS file can be used in pure CDP implementations or to test the evasions in your devtools.
- Host: GitHub
- URL: https://github.com/cloud-org/stealth.min.js
- Owner: cloud-org
- Created: 2022-05-26T08:32:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-30T03:38:24.000Z (almost 3 years ago)
- Last Synced: 2025-03-25T07:22:19.784Z (about 1 month ago)
- Topics: javascript, python, selenium
- Homepage:
- Size: 287 KB
- Stars: 28
- Watchers: 0
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## stealth.min.js
selenium 过环境检测
```sh
npx extract-stealth-evasions
``````python
with open('./stealth.min.js') as f:
inject_js = f.read()driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {
"source": inject_js
})
```### 效果
- 注入前

- 注入后

### 参考资料
- https://blog.csdn.net/weixin_42453905/article/details/122086184
- http://fengpiaoxus.com/blog/detail/3/
- https://github.com/berstend/puppeteer-extra/tree/master/packages/extract-stealth-evasions#readme