- 主页 > 生活百科 > >
通过浏览器打开页面时执行js脚本 改变浏览器“指纹”( 二 )
var noisify = function (canvas, context) { if (context) { const shift = { 'r': Math.floor(Math.random() * 10) - 5, 'g': Math.floor(Math.random() * 10) - 5, 'b': Math.floor(Math.random() * 10) - 5, 'a': Math.floor(Math.random() * 10) - 5 const width = canvas.width; const height = canvas.height; if (width && height) { const imageData = https://www.isolves.com/it/cxkf/yy/js/2022-09-21/getImageData.Apply(context, [0, 0, width, height]); for (let i = 0; i < height; i++) { for (let j = 0; j < width; j++) { const n = ((i * (width * 4)) + (j * 4)); imageData.data[n + 0] = imageData.data[n + 0] + shift.r; imageData.data[n + 1] = imageData.data[n + 1] + shift.g; imageData.data[n + 2] = imageData.data[n + 2] + shift.b; imageData.data[n + 3] = imageData.data[n + 3] + shift.a; window.top.postMessage("canvas-fingerprint-defender-alert", '*'); context.putImageData(imageData, 0, 0); Object.defineProperty(HTMLCanvasElement.prototype, "toBlob", { "value": function () { noisify(this, this.getContext("2d")); return toBlob.apply(this, arguments); Object.defineProperty(HTMLCanvasElement.prototype, "toDataURL", { "value": function () { noisify(this, this.getContext("2d")); return toDataURL.apply(this, arguments); Object.defineProperty(CanvasRenderingContext2D.prototype, "getImageData", { "value": function () { noisify(this.canvas, this); return getImageData.apply(this, arguments); document.documentElement.dataset.cbscriptallow = true; inject();【通过浏览器打开页面时执行js脚本 改变浏览器“指纹”】
推荐阅读
-
-
大妈聊事|出轨风波后首同框,李湘王岳伦携手上综艺,镜头前亲吻被指太假
-
中国电竞用户规模达4.84亿人|中国电竞用户规模达4.84亿人 许多人仍对电竞心存误解
-
|52岁陈松伶晒减肥成功照片,颜值身材重回巅峰,自曝半年减掉24斤
-
星座小艾米|喜鹊枝头叫,喜结良缘喜脱单的4大生肖,10月份
-
EMUI EMUI 10.1畅连大升级,让手机成为肢体与器官的无限延伸
-
业绩|宝丰能源持续进击:项目投产推升业绩 负债增长24%至百亿
-
-
-
浮生未央|赵露思新路透,圆脸瘦成瓜子脸?还嫌弃男粉“土味情话”
-
99版人民币|清乾隆 和田玉籽料 白玉 龙龟 水呈水注
-
冠通分销平台|eBay如何进行销量排名?eBay有哪些销量调查工具?
-
斜线|字体帮-第1639篇:让你最开心的三个字明日命题:?你最喜欢的美食或零食
-
怎样处理母亲对自己说很多抱怨的话(关于亲戚之间各种怨气)
-
-
-
福林妈咪|“过来人”分享顺产经历,一定避免4种错误用力方式,二胎均顺产
-
-
里尚七七儿子们忙着秀恩爱,妻女轮番救场!梅拉尼娅现身给老特打气被无视
-