- 主页 > 生活百科 > >
通过浏览器打开页面时执行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岁被哈佛录取
-
-
HTTP长连接是啥?底层是如何工作的?Tomcat是如何实现长连接的?
-
-
甘拜下风|盘点金庸武侠最能作达人,第一名让鸠摩智甘拜下风!
-
晨财经:10家欧美银行被集体诉讼,或面临千亿罚款,致散户损失数十亿美元
-
村子|世界上最能睡觉的村庄:村民随时倒地就睡,一睡还睡好几天!
-
天津新增5例境外输入确诊和7例境外输入无症状感染者
-
-
-
-
-
口红|“50块”的口红和“500块”的口红,之间有什么差别?看完就懂了
-
海纳新闻|惊动两国情报机构,大批特工警察找上门,闹大了!印度学生恶作剧
-
王晓棠|王晓棠:原八一电影制片厂厂长,54岁授大校,59岁升少将,今88岁
-
?中新经纬|?*ST围海涉嫌挪用资金 实控人之一冯全宏被立案侦查
-
考古|宙斯神庙附近发现2500年前铜牛神像 网友:看起来很萌的说
-
-
高铁上厕所冲水按钮在哪里?现在的高铁在停站和进站的时候允许上厕所吗?
-
hdr400对游戏提升大吗 hdr400和hdr10哪个好