- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
泪目!母亲驱车百余公里,给救援一线的消防员儿子送饭菜
-
「猎云网」“滴滴跑腿”上线成都、杭州,搅局“跑腿”还是疫情下无奈之举?
-
笑有真情来|能够长久的相爱都离不开两个字,男女之间
-
「上海市」夜景“最漂亮”的城市:前三名花落谁家,大家去过几个呢?
-
「半导体投资联盟」高德红外一季度净利润预增超19倍,红外热成像设备市场需求凸显
-
-
-
黄海峰的通信生活|华为如何助力运营商2B业务成功?,精品专线时代
-
薪酬待遇|2020年工科类专业薪资最新排名,计算机很吃香,工资水平最高
-
-
圆圆影音|还有人一直盲目吃,为了家人健康早点了解,豆腐的4个“仇家”
-
笔记本|倍思100W氮化镓充电器上手:笔记本原装快充头的完美替代品
-
普拉达女王|打扮要高级,真丝连衣裙就是很不错的选择篇,女人过了40岁
-
焦糖老干妈|铂爵旅拍婚纱照打光技巧曝光,打造新娘高光时刻
-
-
美团|美团取消支付宝接口?王兴一句话引争议,网友:已卸载
-
-
-
[郭京飞王珞丹坐雕塑踩石碑]郭京飞王珞丹坐雕塑踩石碑 网友吐槽“素质低”
-