javascript 是否可以使用 Chrome 欺骗用户代理和操作系统?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25562286/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-28 04:40:44  来源:igfitidea点击:

Is possible to spoof user-agent and OS with Chrome?

javascriptgoogle-chromeuser-agentspoof

提问by Deep Blue

What are the options to block the methods bellow with Chrome?

使用 Chrome 阻止以下方法的选项有哪些?

navigator.appVersion

navigator.appVersion

Info os.name

Info os.name

as I was successfully profiled in

因为我成功地在

http://browserspy.dk/browser.php

http://browserspy.dk/browser.php

I′d like to hide Browser and OS in order to avoid exploits.

我想隐藏浏览器和操作系统以避免漏洞利用。

回答by KyleMit

You can change the User Agent string in Dev Tools:

您可以在开发工具中更改用户代理字符串:

  1. Open Developer Tools(F12)
    Developer Tools
  2. Show the Console Drawerat the bottom by hitting Esc
    Console Drawer
  3. Add the Network Conditionstab to the drawer
    Network Conditions
  4. Under User Agent, uncheck "Select automatically", and pick a browser you wish to emulate or customize the string however you'd like
    User Agent
  1. 打开开发者工具( F12)
    开发者工具
  2. 通过点击在底部显示控制台抽屉Esc
    控制台抽屉
  3. 网络条件选项卡添加到抽屉
    Network Conditions
  4. User Agent 下,取消选中“自动选择”,然后选择您想要模拟或自定义字符串的浏览器
    User Agent

回答by David

You can change the User-Agent string Chrome sends to the servers. This is explained here.

您可以更改 Chrome 发送到服务器的用户代理字符串。这是解释here