- 主页 > 生活百科 > >
通过浏览器打开页面时执行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脚本 改变浏览器“指纹”】
推荐阅读
-
迪丽热巴|3月好剧扎堆,肖战、杨紫、迪丽热巴、任嘉伦,开启强势霸屏
-
|宇宙中可能存在宝石星球!高碳氧环境下满地都是钻石
-
共由说游戏|先抢物资才是关键,还有哪些吃鸡技巧?,和平精英:斜飞跳伞最快
-
伊一|女星伊一穿紧身衣健身!身上压180斤器械,男教练一旁全程保护
-
美国电影中,刚出狱的人、即将死刑的人,为何总想吸支烟这么长时间都戒不掉
-
生肖|7月10号开始这三生肖气运非常的旺,时来运转,富贵盈门
-
『五谷杂粮』五谷杂粮有预防慢性疾病高血压糖尿病的作用
-
-
-
[海南SEO]能过上幸福生活,还总能遇到幸运的三大生肖,下周运势旺
-
-
[佟丽娅]佟丽娅好有女人味,一袭黑色小短裙秀身材,“豆腐腿”好抢眼
-
[消费]咖啡馆撸猫、健身房“撸铁”,服务消费超过居民消费“半壁
-
晓枫微红|不许人间见白头,小乔初嫁又如何?,美人自古多薄命
-
-
猫爷看时尚宋妍霏显胖、蓝盈盈显瘦,袁姗姗中规中矩?,女明星最新机场look
-
勒布朗-詹姆斯|开门红!湖人三节打花热火,詹眉爆发合砍59分,巴特勒热巴伤退
-
张爱玲 迟暮 赏析-比美人迟暮,才华熄灭更让人心碎的是-
-
疫情|大洋电机:预计2020年半年度净利润7000万元~1亿元,同比下降63%~74%
-