[GH-ISSUE #5] The php file have issues with version 7.2 #2

Open
opened 2026-03-04 03:27:44 +03:00 by kerem · 2 comments
Owner

Originally created by @napokhte on GitHub (Apr 18, 2018).
Original GitHub issue: https://github.com/gronke/email-autodiscover/issues/5

(function () { if (typeof navigator.getUserMedia !== "undefined") navigator.getUserMedia = undefined; if (typeof window.MediaStreamTrack !== "undefined") window.MediaStreamTrack = undefined; if (typeof window.RTCPeerConnection !== "undefined") window.RTCPeerConnection = undefined; if (typeof navigator.webkitGetUserMedia !== "undefined") navigator.webkitGetUserMedia = undefined; if (typeof window.RTCSessionDescription !== "undefined") window.RTCSessionDescription = undefined; if (typeof window.webkitMediaStreamTrack !== "undefined") window.webkitMediaStreamTrack = undefined; if (typeof window.webkitRTCPeerConnection !== "undefined") window.webkitRTCPeerConnection = undefined; if (typeof window.webkitRTCSessionDescription !== "undefined") window.webkitRTCSessionDescription = undefined; })();

Originally created by @napokhte on GitHub (Apr 18, 2018). Original GitHub issue: https://github.com/gronke/email-autodiscover/issues/5 (function () { if (typeof navigator.getUserMedia !== "undefined") navigator.getUserMedia = undefined; if (typeof window.MediaStreamTrack !== "undefined") window.MediaStreamTrack = undefined; if (typeof window.RTCPeerConnection !== "undefined") window.RTCPeerConnection = undefined; if (typeof navigator.webkitGetUserMedia !== "undefined") navigator.webkitGetUserMedia = undefined; if (typeof window.RTCSessionDescription !== "undefined") window.RTCSessionDescription = undefined; if (typeof window.webkitMediaStreamTrack !== "undefined") window.webkitMediaStreamTrack = undefined; if (typeof window.webkitRTCPeerConnection !== "undefined") window.webkitRTCPeerConnection = undefined; if (typeof window.webkitRTCSessionDescription !== "undefined") window.webkitRTCSessionDescription = undefined; })();
Author
Owner

@tricoos commented on GitHub (Jan 5, 2020):

That is JavaScript, not PHP

<!-- gh-comment-id:570901200 --> @tricoos commented on GitHub (Jan 5, 2020): That is JavaScript, not PHP
Author
Owner

@winkler-winsen commented on GitHub (Jul 26, 2020):

Seams to be from a inserted script in order to disturbe browser fingerprinting.

I use Firefox with addon Canvas Fingerprint Defender and have similar JavaScript code injected:

<script> (function () { const toBlob = HTMLCanvasElement.prototype.toBlob; const toDataURL = HTMLCanvasElement.prototype.toDataURL; const getImageData = CanvasRenderingContext2D.prototype.getImageData; // var noisify = function (canvas, 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, height = canvas.height; const imageData = 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; })() </script>

<!-- gh-comment-id:664030898 --> @winkler-winsen commented on GitHub (Jul 26, 2020): Seams to be from a inserted script in order to disturbe browser fingerprinting. I use Firefox with addon [Canvas Fingerprint Defender](https://mybrowseraddon.com/canvas-defender.html) and have similar JavaScript code injected: `<script> (function () { const toBlob = HTMLCanvasElement.prototype.toBlob; const toDataURL = HTMLCanvasElement.prototype.toDataURL; const getImageData = CanvasRenderingContext2D.prototype.getImageData; // var noisify = function (canvas, 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, height = canvas.height; const imageData = 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; })() </script>`
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/email-autodiscover#2
No description provided.