- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
-
浙江22-16领先6分,吴前7投1中,反过来一直以3分为骄傲的浙江
-
仰卧撑足球■法甲赛季结束让利物浦慌了!前主帅出面安慰:他们配得上英超冠军
-
「印度」印度获41国支持,上百艘军舰警告对手,美俄罕见“联合”支持!
-
-
-
-
-
序列|每经10点 |天津瞰海轩小区19号楼确诊病例,与本土第3例无症状感染者病毒序列一致;普陀山景区“天价便饭”事件反转
-
《七零年代白富美》她穿成懒肥馋的随军军嫂,首长老公将她宠成宝
-
胰腺癌|胰腺癌不是悄无声息,身体若出现这5个异常,建议尽早就医
-
车家号▲斯柯达的定位真的想明白了吗?,全系官降之后
-
迷人乐汽车非承载+3把锁,进藏入川“新硬汉”,长城又要火了!气势赶超路虎
-
『』最金贵的辣椒,一亩地只产7两,一斤价钱高达300元
-
-
运动|减肥要出汗才有效果吗?专家明说:达到这个标准才能燃烧脂肪
-
元杂剧四大悲剧和四大喜剧—古代中国元曲四大悲剧是那四大?
-
「周星驰」因不想出演,周星驰开天价婉拒,片方竟欣然答应,意外成就经典!
-
妙手小神医:教你简单一招,水里泡一泡立马变新鞋,旧拖鞋穿久了脏的洗不掉
-