-
Notifications
You must be signed in to change notification settings - Fork 19
/
fpalgo.js
56 lines (41 loc) · 1.78 KB
/
fpalgo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
app.use(bodyParser.json());
function processFingerprint(_0x36bb43) {
var _0x216bb6;
var _0xc9fde2 = unescape(encodeURIComponent(JSON.stringify(_0x36bb43)));
var _0x1d5e1e = [];
var _0x3dc4c6 = 0;
var _0x194769 = '';
for (var _0x3e2978 = 0; _0x3e2978 < 256; _0x3e2978++) {
_0x1d5e1e[_0x3e2978] = _0x3e2978;
}
for (var _0x3326d3 = 0; _0x3326d3 < 256; _0x3326d3++) {
_0x3dc4c6 = (_0x3dc4c6 + _0x1d5e1e[_0x3326d3] + "FZMÛSê/·V«xÞhí¢³4<`ô2ª,µ¦Yû".charCodeAt(_0x3326d3 % "FZMÛSê/·V«xÞhí¢³4<`ô2ª,µ¦Yû".length)) % 256;
_0x216bb6 = _0x1d5e1e[_0x3326d3];
_0x1d5e1e[_0x3326d3] = _0x1d5e1e[_0x3dc4c6];
_0x1d5e1e[_0x3dc4c6] = _0x216bb6;
}
var _0x3837e7 = 0;
_0x3dc4c6 = 0;
for (var _0x56c78d = 0; _0x56c78d < _0xc9fde2.length; _0x56c78d++) {
_0x3dc4c6 = (_0x3dc4c6 + _0x1d5e1e[_0x3837e7 = (_0x3837e7 + 1) % 256]) % 256;
_0x216bb6 = _0x1d5e1e[_0x3837e7];
_0x1d5e1e[_0x3837e7] = _0x1d5e1e[_0x3dc4c6];
_0x1d5e1e[_0x3dc4c6] = _0x216bb6;
_0x194769 += String.fromCharCode(_0xc9fde2.charCodeAt(_0x56c78d) ^ _0x1d5e1e[(_0x1d5e1e[_0x3837e7] + _0x1d5e1e[_0x3dc4c6]) % 256]);
}
return btoa(_0x194769);
}
app.post('/process_fingerprint', (req, res) => {
const data = req.body;
const result = processFingerprint(data);
// console log part of the result like 100 chars
console.log("fingerprint result: ", result.substring(0, 100));
res.json({ result });
});
const port = 3000;
app.listen(port, () => {
console.log(`Server running on port ${port}`);
});