当前位置: 首页 > news >正文

php如何给网站做支付接口2022年关键词排名

php如何给网站做支付接口,2022年关键词排名,国内大型餐饮网站建设,制作网页的网站的软件是背景 最近在使用selenium自动播放学习课程,相信大家也有一些类似的使用场景。 能自动化的事情,绝不自己干。 为防止被检测是机器人做题,刷视频,需要做一些小调整。 先来看作为服务方维护者,是如何检测是Selenium打…

背景

最近在使用selenium自动播放学习课程,相信大家也有一些类似的使用场景。

能自动化的事情,绝不自己干。

为防止被检测是机器人做题,刷视频,需要做一些小调整。

先来看作为服务方维护者,是如何检测是Selenium打开的浏览器,而非一般的活跃用户打开的浏览器。

测试环境

本文的测试环境如下:

Google Chrome 浏览器版本:版本 125.0.6422.77(正式版本) (64 位)

ChromeDriver版本:Chrome for Testing availability

如何检测是否是Selenium打开的浏览器页面

window.navigator.webdriver

直接的方式就是检测navigator的值。如果是selenium打开的web浏览器,则此值为true,或者为false,捉着undefined

 Selenium Page缓存

selenium自身再页面上的缓存有如下特征。

 可以用如下代码检测

function getPageCache(opt_doc) {var doc = opt_doc || document;var key = '$cdc_asdjflasutopfhvcZLmcfl_';
//  var key = 'doggie_';if (!(key in doc))doc[key] = new Cache();return doc[key];
}

如下是一些自动化测试常有的特征检测

runBotDetection = function () {var documentDetectionKeys = ["__webdriver_evaluate","__selenium_evaluate","__webdriver_script_function","__webdriver_script_func","__webdriver_script_fn","__fxdriver_evaluate","__driver_unwrapped","__webdriver_unwrapped","__driver_evaluate","__selenium_unwrapped","__fxdriver_unwrapped",];var windowDetectionKeys = ["_phantom","__nightmare","_selenium","callPhantom","callSelenium","_Selenium_IDE_Recorder",];for (const windowDetectionKey in windowDetectionKeys) {const windowDetectionKeyValue = windowDetectionKeys[windowDetectionKey];if (window[windowDetectionKeyValue]) {return true;}};for (const documentDetectionKey in documentDetectionKeys) {const documentDetectionKeyValue = documentDetectionKeys[documentDetectionKey];if (window['document'][documentDetectionKeyValue]) {return true;}};for (const documentKey in window['document']) {if (documentKey.match(/\$[a-z]dc_/) && window['document'][documentKey]['cache_']) {return true;}}if (window['external'] && window['external'].toString() && (window['external'].toString()['indexOf']('Sequentum') != -1)) return true;if (window['document']['documentElement']['getAttribute']('selenium')) return true;if (window['document']['documentElement']['getAttribute']('webdriver')) return true;if (window['document']['documentElement']['getAttribute']('driver')) return true;return false;
};

去除Selenium特征

去除window.navigator.webdriver

ChromeOptions options = new ChromeOptions();
options.addArguments("--remote-allow-origins=*");
// 移除chrome selenium 特征,window.navigator.webdriver
// chrome 125
options.addArguments("--disable-blink-features=AutomationControlled");
// 关闭界面上的---Chrome正在受到自动软件的控制
options.addArguments("disable-infobars");
WebDriver driver = new ChromeDriver(options);
// 再去打开页面
// driver.get("https://xxxxx.xx.xx.xx")

修改ChromeDriver特征

修改ChromeDriver特征,要么修改源码,再重新编译,要么直接修改二进制代码。本文选择直接修改二进制代码的方式,比较简单。

下载VIM

download : vim online

修改ChromeDriver可执行文件内容,修改之前记得备份下chromedriver.exe

vim.exe chromedriver.exe

将cdc_开头的都替换成你想要的,比如这边我是替换成了doggie 

替换完成保存

%s/cdc_/doggie_/g

当然还有一些伪装自己是活人的办法:

不再深入,后续有机会再玩。

参考文档

https://www.zenrows.com/blog/selenium-avoid-bot-detection#remove-javascript-signiture

https://datadome.co/threat-research/detecting-selenium-chrome/

http://www.ds6.com.cn/news/35065.html

相关文章:

  • 做网站都需要什么人团杭州seo排名公司
  • 网站空间怎么回事同城广告发布平台
  • 网站没权重十大洗脑广告
  • wordpress页面自由布局网络推广seo是什么
  • 人流什么时间做 新闻源网站2022年新闻摘抄简短
  • 淘宝客如何建立自己的网站企业网站设计论文
  • 微信开放平台登录自己搜20条优化措施
  • 网站图片设计兼职百度怎么发布短视频
  • 哈尔滨住房建设发展集团网站微信小程序开发
  • 网站数字化建设方案广州seo招聘网
  • 404网站页面进入搜索引擎优化名词解释
  • 国外做任务赚钱的网站惠州seo全网营销
  • 网站建设属于固定资产吗域名信息查询网站
  • wdcp 网站打不开全网引流推广
  • 免费域名网站申请百度推广助手下载
  • 建设网站实训报告书b站推广网站入口2023的推广形式
  • 网站定制公司蒙特最常用的几个关键词
  • 如何做产品众筹网站班级优化大师免费下载app
  • 政府门户网站app建设方案网站关键词排名快速提升
  • 在谷歌上做外贸网站有用吗搜索引擎营销的内容有哪些
  • 专业做财务公司网站网站免费高清素材软件
  • 毕节市交通建设集团网站百度大数据查询
  • wordpress db collate优化排名 生客seo
  • 做网站最基本南京seo优化公司
  • 网站构建器seo包年服务
  • 网站cms下载百度门店推广
  • 高端网站建设的方案社群营销的方法和技巧
  • 个人网站用react做全国人大常委会委员长
  • 一个服务器放多少网站重庆seo薪酬水平
  • 郑州做网站报价互联网媒体推广