google-chrome-extension - 为什么 ym-faux-ad-iframe 被注入到我的 DOM 中?
问题描述
我有一个非常基本的骨架 React 项目设置。
使用 create-react-app 创建,使用 react-scripts-ts 支持打字稿。我已经添加了 redux 和 react-router。但是,我刚刚注意到有一个 iframe 在某个时候被注入到我的 DOM 中,我无法弄清楚它为什么或来自哪里。
它似乎是某种亚马逊广告 iframe。
这是浏览器发出的请求
curl 'https://s3.amazonaws.com/ym-hosting/faux-ad.htm?advertiserId=78946&brandName=faux' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'Referer: http://localhost:3000/' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9' --compressed
已安装的依赖项
"dependencies": {
"react": "^16.6.0",
"react-dom": "^16.6.0",
"react-redux": "^5.1.0",
"react-router-dom": "^4.3.1",
"react-scripts-ts": "3.1.0",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"@types/jest": "^23.3.9",
"@types/node": "^10.12.2",
"@types/react": "^16.4.18",
"@types/react-dom": "^16.0.9",
"@types/react-redux": "^6.0.9",
"@types/react-router-dom": "^4.3.1",
"@types/redux": "^3.6.0",
"@types/redux-devtools-extension": "^2.13.2",
"@types/redux-logger": "^3.0.6",
"@types/redux-thunk": "^2.1.0",
"redux-devtools-extension": "^2.13.5",
"typescript": "^3.1.6"
},
有没有其他人见过这样的事情?是不是某个模块悄悄地注入了它以从简单的广告浏览中获利?
截图:
编辑:原来这与 React 或 create-react-app 无关,而是与浏览器扩展“HoverZoom”有关。
解决方案
我不认为这是一个 React 问题,我认为它一定是注入 iframe 的浏览器扩展。我最近开始开发自己的 Web 应用程序(在 ASP.NET Core 上使用 F#),昨天在我的应用程序的 DOM 中看到了同样的东西;你的问题是我用谷歌搜索时唯一出现的问题,所以我想检查其他网站,我去的任何地方似乎都有。
iframe 乍一看并没有恶意(它是圣达菲度假的虚假广告),但谁知道另一端是否有跟踪代码跟踪我们的动作。现在开始禁用扩展,直到我找到罪魁祸首......
编辑:似乎是悬停缩放?不确定你是否使用那个,但禁用它为我删除了 iframe,所以现在它永远消失了。
推荐阅读
- python - 如何拦截从我的 Linux 设备发出的所有请求?
- .net-core - V4 管道在存档 (Zip) 文件阶段失败
- python - 使用请求python在亚马逊获取联系我们页面的问题
- calculated-columns - 从具有最高值的行返回地址并对所有值列求和
- python - 让 pandas 将 hive 的 collect_list 读取为 python 列表
- sql - SQL - 框内查找框
- python - 使用 Apache 部署 Django App 时出现禁止错误
- python - 使用python从网页中提取数据
- kubernetes - 如何在 Kubernetes 中配置 PrestoDB 内部通信
- python - 在 Python 中格式化字符串需要一些帮助