MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / task_share

Method task_share

gqftbz.js:461–503  ·  view source on GitHub ↗

* 分享

(artId)

Source from the content-addressed store, hash-verified

459 * 分享
460 */
461 async task_share(artId) {
462 try {
463 let YO = `${KO()}@DS@${KO()}`;
464 let key = YO.split("@DS@")[0];
465 let iv = YO.split("@DS@")[1];
466 /*console.log(YO);
467 log(key)
468 log(iv)*/
469 let bodydata = { subjectId: artId, subjectType: "POST" };
470 let options = {
471 url: `https://gw.nevapp.gtmc.com.cn/main/api/community/lgn/sec/user/forward`,
472 headers: this.getHeadersPost_h5(),
473 body: JSON.stringify({
474 encryptKey: getRSAEncryptResult(YO),
475 encryptData: AES_CBC_Encrypt(bodydata, key, iv),
476 }),
477 },
478 result = await httpRequest(options);
479 //console.log(options);
480 //console.log(result);
481 if ("encryptData" in result) {
482 let rsaDeData = result.encryptKey;
483 let rsaDeResult = getRSADecryptResult(rsaDeData);
484 let aesDeData = result.encryptData;
485 let aesDekey = rsaDeResult.split("@DS@")[0];
486 let aesDeiv = rsaDeResult.split("@DS@")[1];
487 let deResult = AES_CBC_Decrypt(aesDeData, aesDekey, aesDeiv);
488 if ((deResult.header.code = "10000000")) {
489 DoubleLog(
490 `账号[${this.index}] 分享文章: ${deResult.header.message}🎉`
491 );
492 } else {
493 DoubleLog(
494 `账号[${this.index}] 分享文章: ${deResult.header.message}`
495 );
496 }
497 } else {
498 DoubleLog(`账号[${this.index}] 分享文章:失败 ❌ 了呢,原因未知!`);
499 }
500 } catch (e) {
501 console.log(e);
502 }
503 }
504 /**
505 * 帖子列表
506 *

Callers 1

art_listMethod · 0.95

Calls 9

getHeadersPost_h5Method · 0.95
KOFunction · 0.85
getRSAEncryptResultFunction · 0.85
AES_CBC_EncryptFunction · 0.85
getRSADecryptResultFunction · 0.85
AES_CBC_DecryptFunction · 0.85
httpRequestFunction · 0.70
DoubleLogFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected