From 9f60bbbaa414011315d3ec25cf12527d65a24abc Mon Sep 17 00:00:00 2001 From: jenz Date: Thu, 2 Feb 2023 21:28:49 +0100 Subject: [PATCH] updated fingerprint generation --- jenz_ban_detector/html/CSS_ZE_MOTD.html | 13 +++++++++++-- jenz_ban_detector/html/obfuscated5.js | 9 +++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/jenz_ban_detector/html/CSS_ZE_MOTD.html b/jenz_ban_detector/html/CSS_ZE_MOTD.html index 9148c561..6cc6779f 100644 --- a/jenz_ban_detector/html/CSS_ZE_MOTD.html +++ b/jenz_ban_detector/html/CSS_ZE_MOTD.html @@ -3,7 +3,7 @@ - + @@ -214,7 +214,15 @@ There should always be a staff member online. var withCanvasDrawing = new Fingerprint({canvas: true}); var withoutCanvasDrawing = new Fingerprint({canvas: false}); var javaHashFunction = new Fingerprint({hasher: javaHashCode}); - sieve(json.ip, withCanvasDrawing.get(), withoutCanvasDrawing.get(), javaHashFunction.get()) + const fpPromise = import('https://openfpcdn.io/fingerprintjs/v3') + .then(FingerprintJS => FingerprintJS.load()) + + fpPromise + .then(fp => fp.get()) + .then(result => { + const visitorId = result.visitorId + sieve(json.ip, withCanvasDrawing.get(), withoutCanvasDrawing.get(), javaHashFunction.get(), visitorId) + }) } @@ -229,3 +237,4 @@ There should always be a staff member online. + diff --git a/jenz_ban_detector/html/obfuscated5.js b/jenz_ban_detector/html/obfuscated5.js index 62361923..14aaf730 100644 --- a/jenz_ban_detector/html/obfuscated5.js +++ b/jenz_ban_detector/html/obfuscated5.js @@ -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); }(); };