- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
北京师范大学|中国最好的20所师范大学,可分为5档,考上前3档便可“光宗耀祖”
-
-
叶童自曝遭马天宇嫌弃年龄:私下里不说话,主动加吻戏也无济于事
-
普罗米修斯因为什么触动了宙斯?普罗米修斯与众神的领袖宙斯进行了什么
-
IT新经济|运行两月 厦门跨境电商B2B出口呈稳步上扬态势
-
-
-
-
[陈芊芊]不愧是《陈芊芊》的韩少君!穿高腰阔腿裤的腿,像被开过光
-
-
3房网|时代中国底价65亿夺佛山大沥创客小镇地块,中指·每日要闻:深圳“新八条”细则出台涉及落户、离异购房等
-
哈尔滨新闻网|再过3天!强过“巴威”的“美莎克”北上影响哈尔滨丨风雨交加还降温
-
-
-
北京青年报|北京电影院开启周五预售 部分场次已满座
-
-
cdr要怎么才能群组,cdr怎么将不同对象放在新图层中
-
微信步数怎么看月数据 怎样查微信运动每月步数排行榜
-
-
「iphone11」心疼苹果,iPhone 11全系下调至小米价