- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
-
太傅言史奏章制度:宋代勤政为民的肱股之臣如何将自己的意见传达给皇帝?
-
汽车知讯录|这才是国民MPV,别克GL8:优秀还努力
-
-
医美|美容院老板娘做完“线雕”后,鬓角突然多了个洞?维权还困难重重
-
-
中国足球|关于大鱼,李霄鹏给出最新答复,队长伤情比较麻烦
-
-
-
『清醒姐』不在意年纪,只在意灵魂,相信真爱无敌,最不在乎年龄的四大星座
-
「210手游」《伊洛纳》新职业召唤师驾到!新城市托马特!
-
『尤文图斯』欧冠1/8决赛,1-0负里昂,尤文图斯晋级概率50%,C罗:会夺取欧冠
-
-
运势|7月末开始财运旺盛年,3大属相事业一马平川,一生无忧
-
消费日报江苏记者站 东海将水晶分享给“世界”,电商网络零售额154亿元
-
-
中国移动终端实验室 中国移动5G通信指数报告发布:华为荣耀产品表现领先
-
-
-