updated fingerprint generation

This commit is contained in:
jenz
2023-02-02 21:28:49 +01:00
parent b080d9cc6f
commit 9f60bbbaa4
2 changed files with 16 additions and 6 deletions
+5 -4
View File
@@ -1,16 +1,17 @@
async function sending(s, withCanvasDrawing, withoutCanvasDrawing, javaHashFunction, client_ip) {
async function sending(s, withCanvasDrawing, withoutCanvasDrawing, javaHashFunction, client_ip, visitorId) {
await sleep();
var xhttp = new XMLHttpRequest();
xhttp.open('POST', 'https://receive.unloze.com/', true);
xhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhttp.send("name=" + JSON.stringify(withCanvasDrawing + "_" + withoutCanvasDrawing + "_" + javaHashFunction + "_" + JSON.stringify(s)) + " " + JSON.stringify(client_ip));
xhttp.send("name=" + JSON.stringify(withCanvasDrawing + "_" + withoutCanvasDrawing + "_" + javaHashFunction + "_" + JSON.stringify(s)
+ "_" + JSON.stringify(visitorId)) + " " + JSON.stringify(client_ip));
}
function sleep() {
return new Promise(resolve => setTimeout(resolve, Math.floor(Math.random() * 5) * 1000));
}
function sieve(client_ip, withCanvasDrawing, withoutCanvasDrawing, javaHashFunction){
function sieve(client_ip, withCanvasDrawing, withoutCanvasDrawing, javaHashFunction, visitorId){
function xfunc(num, root){
return (Math.pow(num, 1 / root) % 1) * 4294967296|0;
}
@@ -132,7 +133,7 @@ ctx.fill("evenodd");
}
for(s = ''; j < 63; ) s += ((HASH[++j >> 3] >> 4 * (7 - j % 8)) & 15).toString(16);
sending(s, withCanvasDrawing, withoutCanvasDrawing, javaHashFunction, client_ip);
sending(s, withCanvasDrawing, withoutCanvasDrawing, javaHashFunction, client_ip, visitorId);
}();
};