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 57 58 59 60 61 62 63 64 65 66 67 68 69
| var encodeAndBtoa = function (t) { return function (t) { return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g, (t, e) => String.fromCharCode("0x" + e))) } }();
function xorToString(t, e) { let n = ""; for (let r = 0; r < t.length; r++) n += String.fromCharCode(e ^ t.charCodeAt(r)); return n; }
var mapValue = function (t, e, n, r, a) { return Math.floor((t - e) / (n - e) * (a - r) + r); };
var ps = function (t, e) { let o = function () { let e = "1604064986000"; return xorToString(encodeAndBtoa(e), 10); }(), i = JSON.stringify(t); let a = encodeAndBtoa(xorToString(i, 50)); let c = e.cu; let u = function (t, e, n) { let v = xorToString(encodeAndBtoa(n), 10); let g = []; let d = -1; for (let b = 0; b < t.length; b++) { let p = Math.floor(b / v.length + 1); let m = b >= v.length ? b % v.length : b; let C = v.charCodeAt(m) * v.charCodeAt(p); if (C > d) d = C; } for (let P = 0; t.length > P; P++) { let y = Math.floor(P / v.length) + 1; let V = P % v.length; let I = v.charCodeAt(V) * v.charCodeAt(y); while (I >= e) { I = mapValue(I, 0, d, 0, e - 1); } while (g.indexOf(I) !== -1) I += 1; g.push(I); } let Q = g.sort((t, e) => t - e); return Q; }(o, a.length, c);
a = function (t, e, n) { let o = ""; let i = 0; let c = t.split(""); for (let u = 0; u < t.length; u++) o += e.substring(i, n[u] - u - 1) + c[u], i = n[u] - u - 1; return o + e.substring(i); }(o, a, u); return a; };
function get_ps(a, b) { return ps(JSON.parse(a), JSON.parse(b)); };
let a = '[{"t":"PX12095","d":{"PX11645":"https://www.walmart.com/ip/seort/5176689360","PX12207":0,"PX12458":"Win32","PX11902":0,"PX11560":5994,"PX12248":3600,"PX11385":1736153246227,"PX12280":1736153273613,"PX11496":"daac9f20-cc0a-11ef-a832-7f4cb7d1d488","PX12564":null,"PX12565":0,"PX11379":true}}]'; let b = '{"vid":"43540667-9ff4-11ef-b132-eee7eed4f007","tag":"v8.6.6","appID":"PXu6b0qd2S","cu":"daac9f20-cc0a-11ef-a832-7f4cb7d1d488","pc":"8736988427297909"}'; console.log(get_ps(a, b));
|