- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
3C毒物:华为P40Pro和iPhone11ProMax性能对比
-
-
苏州▲苏州正在消逝的百年老街,没有商业一片原始,许多房屋已破旧不堪
-
环球网|逾170万人参加香港新冠病毒普及社区检测计划,聂德权呼吁市民把握最后机会
-
-
【新春走基层·算算脱贫致富账】“路子找到了,日子有奔头”
-
「购房置业」手里有100万存款,“买房”还是“存银行”?马云王思聪给出答案
-
-
-
网络|电魂网络:股东郑锦栩、吴文仲共减持约287万股,减持计划时间已过半
-
豪宅|原创苗圃街边吃面条很朴素,嫁大21岁老公住宽敞豪宅,生活却接地气
-
万科@继举报信后,又有多名万科老员工致信清华,要求退还2亿万科股票
-
最佳健康|女神每天都在办公室偷偷做这个动作,没想到一个月后…..
-
「直播吧」小威直言被吓到,温网取消后众星发声:费德勒震惊
-
-
『保障』武汉天河机场复航5天保障商业客运航班637班
-
『IntelliJ IDEA』IntelliJ IDEA 常用插件一览,让效率成为习惯
-
孔孔谈八卦|如今涂磊咋样了?,因妻子一句话退出主持10多年的《爱情保卫战》
-
-
小爱说游戏|终于等到你!《底特律:变人》、《超凡双生》上架Steam