网站可以知道我是否正在运行用户脚本吗? [英] Can a website know if I am running a userscript?

查看:53
本文介绍了网站可以知道我是否正在运行用户脚本吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,Facebook.com 能否在我的浏览器上运行一个版本控制脚本,并找出我是否正在使用脚本运行更改过的 HTML 代码?

Can, for example, Facebook.com run a version control script on my browser and find out if I am running altered HTML code with the use of a script?

是否可以使用一个脚本来完成,该脚本可以读取缓存中的 HTML 代码并生成某种散列标签,然后将其发送回服务器并与发送到客户端的代码进行比较?

Could that be done with a script that can read the HTML code in the cache and produce some kind of hash tag that is sent back to the server and compared with the code that was sent to the client?

推荐答案

是的,理论上,一个站点可以在各种情况下推断出脚本的存在.

Yes, in theory, a site can deduce the presence of scripts in various situations.

这不是万无一失的,通常对于网站的微不足道的威胁"来说太麻烦了.(话又说回来,有些网站管理员可能对此类事情过于偏执.;))

This is not foolproof and usually is way too much trouble for the negligible "threat" to the site. (Then again, some webmasters can be obsessive-paranoids about such things. ;) )

某些方法,取决于脚本的作用(无特定顺序):

Some methods, depending on what the script does (in no particular order):

  1. 游戏或拍卖网站可以监控出价"点击的时间(速度和规律).

  1. Gaming or auction sites can monitor the timing (speed and regularity) of "bid" clicks.

一个站点可以 AJAX 支持

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆