- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
小妖说星座 从不在乎多少的三大星座,只要是为家人花钱
-
苹果手机可儿空气检测仪app怎么用 苹果手机检测软件沙漏
-
浪姐@除了“浪姐”们,我们发现了另外一批30+姐姐的共同特点……
-
甄嬛传|错过《甄嬛传》华妃,三次合作孙俪演都没红,如今给阚清子演配角
-
-
全球新冠死亡人数逼近100万 世卫:真实数字可能被低估!
-
-
「核糖核酸」中科院学者发明早期肿瘤标志物检测新方法,指示病变
-
小龙虾|吃小龙虾时 明明戴着手套为啥还是满手油?终于明白了
-
运势|领导准备把你提拔成心腹,不会直说,会给你安排这三类核心工作
-
-
-
凉茶|修正决明子枸杞菊花茶30袋9.9元到手:熬夜去火必备
-
苹果|iPad 10将缺席iPhone 14发布会:10月登场 苹果最后一款非全面屏平板!
-
国行|全面解析三星S20 FE国行版:4999元高端入门手机究竟值不值得买?
-
木桥娱乐|60岁毛舜筠罕晒母女合影,19岁女儿气质好,曾认张国荣当舅舅
-
曹操诗文的代表作有哪些-其风格特征是怎样的-,曹操诗歌风格以什么见称-
-
第一海外金融:ETF大旗不倒,近500亿美元强势流入!,4月美股强势反击
-
-