- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
胃肠息肉患者术后依旧腹泻、腹胀?这些症状不消除,息肉难以去根
-
#cnBeta#Editor上线:Word文档编辑的智能助手,[图]Microsoft
-
第一次泡茶包的水要倒掉吗?茶包要一直泡还是拿出来?
-
-
产业气象站■差别竟然这么大?掌握这些知识,轻松买对手机,网购与实体店购买手机
-
新神榜|《新神榜:杨戬》票房大卖,不是自身进步大,全靠同行衬托
-
-
『陈向东』跟谁学再遭香橼做空被指40%注册用户是虚构 陈向东:呵呵
-
互联网信号|144Hz竞速屏+44W超快闪充,iQOO Neo3性能强悍,带来极致体验
-
你的生活是绝对不可能,只剩下丧这个字,世界处处都充满希望
-
古天乐|人到中年跑去动脸,古天乐怪、牛莉认不出,丑还影响演技,何必呢
-
纤美生活|个性升级轻松演绎优雅气质,街拍:褶皱设计增加了V领上衣的华丽感
-
医学界风湿频道|等你“E”起参加!,风湿大咖MDT专场
-
董事长|成绩单!金陵饭店:2020年半年度净利润约31万元,同比下降99.13%
-
-
-
环球时报-环球网|印尼新冠肺炎新增确诊病例1821例,累计突破14万例
-
梁山|要是梁山好汉没被招安,而是选择起义,他们能打到宋朝东京吗?
-
-
音乐是自己|适合吃的食物,改善肠胃,消除皱纹,预防血管疾病,女性到40岁