MCPcopy Create free account
hub / github.com/Semporia/Scripts / decrypt

Function decrypt

jd_jxmc.js:410–433  ·  view source on GitHub ↗
(time, stk, type, url)

Source from the content-addressed store, hash-verified

408}
409
410function decrypt(time, stk, type, url) {
411 stk = stk || (url ? getUrlData(url, '_stk') : '')
412 if (stk) {
413 const timestamp = new Date(time).Format("yyyyMMddhhmmssSSS");
414 let hash1 = '';
415 if ($.fingerprint && $.token && $.enCryptMethodJD) {
416 hash1 = $.enCryptMethodJD($.token, $.fingerprint.toString(), timestamp.toString(), $.appId.toString(), $.CryptoJS).toString($.CryptoJS.enc.Hex);
417 } else {
418 const random = '5gkjB6SpmC9s';
419 $.token = `tk01wcdf61cb3a8nYUtHcmhSUFFCfddDPRvKvYaMjHkxo6Aj7dhzO+GXGFa9nPXfcgT+mULoF1b1YIS1ghvSlbwhE0Xc`;
420 $.fingerprint = 5287160221454703;
421 const str = `${$.token}${$.fingerprint}${timestamp}${$.appId}${random}`;
422 hash1 = $.CryptoJS.SHA512(str, $.token).toString($.CryptoJS.enc.Hex);
423 }
424 let st = '';
425 stk.split(',').map((item, index) => {
426 st += `${item}:${getUrlData(url, item)}${index === stk.split(',').length - 1 ? '' : '&'}`;
427 })
428 const hash2 = $.CryptoJS.HmacSHA256(st, hash1.toString()).toString($.CryptoJS.enc.Hex);
429 return encodeURIComponent(["".concat(timestamp.toString()), "".concat($.fingerprint.toString()), "".concat($.appId.toString()), "".concat($.token), "".concat(hash2)].join(";"))
430 } else {
431 return '20210318144213808;8277529360925161;10001;tk01w952a1b73a8nU0luMGtBanZTHCgj0KFVwDa4n5pJ95T/5bxO/m54p4MtgVEwKNev1u/BUjrpWAUMZPW0Kz2RWP8v;86054c036fe3bf0991bd9a9da1a8d44dd130c6508602215e50bb1e385326779d'
432 }
433}
434
435async function requestAlgo() {
436 $.fingerprint = await generateFp();

Callers 1

takeGetRequestFunction · 0.70

Calls 1

getUrlDataFunction · 0.70

Tested by

no test coverage detected