faker2/jd_plantBean_help1.js

20 lines
122 KiB
JavaScript
Raw Normal View History

2024-06-28 07:27:40 +00:00
/*
种豆得豆 脚本更新地址jd_plantBean_help.js
更新时间2021-08-20
活动入口京东APP我的-更多工具-种豆得豆
已支持IOS京东多账号,云端多京东账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
会自动关注任务中的店铺跟商品介意者勿使用
互助码shareCode请先手动运行脚本查看打印可看到
每个京东账号每天只能帮助3个人多出的助力码将会助力失败
=====================================Quantumult X=================================
[task_local]
40 4,17 * * * https://raw.githubusercontent.com/KingRan/JDJB/main/jd_plantBean_help1.js
*/
const $ = new Env('种豆得豆助力池互助');
var _0xodJ='jsjiami.com.v7';const _0x52b490=_0x34d1;if(function(_0x4e8c12,_0x1eafec,_0x418c63,_0x182690,_0x514325,_0x1d9226,_0x3a03fc){return _0x4e8c12=_0x4e8c12>>0x9,_0x1d9226='hs',_0x3a03fc='hs',function(_0xc68d54,_0x8d8bc8,_0x260d6f,_0x4cfe24,_0x253918){const _0x402c37=_0x34d1;_0x4cfe24='tfi',_0x1d9226=_0x4cfe24+_0x1d9226,_0x253918='up',_0x3a03fc+=_0x253918,_0x1d9226=_0x260d6f(_0x1d9226),_0x3a03fc=_0x260d6f(_0x3a03fc),_0x260d6f=0x0;const _0x49c503=_0xc68d54();while(!![]&&--_0x182690+_0x8d8bc8){try{_0x4cfe24=parseInt(_0x402c37(0x362,'!sMO'))/0x1+-parseInt(_0x402c37(0x36f,'!RKg'))/0x2*(parseInt(_0x402c37(0x3f6,'(&kG'))/0x3)+-parseInt(_0x402c37(0x427,'fS3P'))/0x4+-parseInt(_0x402c37(0x251,'SBev'))/0x5+-parseInt(_0x402c37(0x1f0,'#t6L'))/0x6+-parseInt(_0x402c37(0x4ac,'bBlL'))/0x7+parseInt(_0x402c37(0x2a5,'P*Bt'))/0x8*(parseInt(_0x402c37(0x477,'!RKg'))/0x9);}catch(_0x3c1626){_0x4cfe24=_0x260d6f;}finally{_0x253918=_0x49c503[_0x1d9226]();if(_0x4e8c12<=_0x182690)_0x260d6f?_0x514325?_0x4cfe24=_0x253918:_0x514325=_0x253918:_0x260d6f=_0x253918;else{if(_0x260d6f==_0x514325['replace'](/[UXuqgkbJyGxQNWTpY=]/g,'')){if(_0x4cfe24===_0x8d8bc8){_0x49c503['un'+_0x1d9226](_0x253918);break;}_0x49c503[_0x3a03fc](_0x253918);}}}}}(_0x418c63,_0x1eafec,function(_0x1c7c33,_0x48b776,_0x48caa5,_0x1056d5,_0x66a1c1,_0x129df6,_0x4b482c){return _0x48b776='\x73\x70\x6c\x69\x74',_0x1c7c33=arguments[0x0],_0x1c7c33=_0x1c7c33[_0x48b776](''),_0x48caa5='\x72\x65\x76\x65\x72\x73\x65',_0x1c7c33=_0x1c7c33[_0x48caa5]('\x76'),_0x1056d5='\x6a\x6f\x69\x6e',(0x14ab9c,_0x1c7c33[_0x1056d5](''));});}(0x18400,0x59037,_0x52f8,0xc4),_0x52f8){}let jdNotify=!![],cookiesArr=[],cookie='',jdPlantBeanShareArr=[],isBox=![],notify,newShareCodes,option,message,subTitle;const common=require('./function/jdCommon'),H5ST=require(_0x52b490(0x209,'#t6L')),JD_API_HOST='https://api.m.jd.com/client.action';let codeType=0x1;const JD_ZLC_URL=process[_0x52b490(0x45f,'!sMO')][_0x52b490(0x302,'#t6L')]?process[_0x52b490(0x2c0,'[6C8')]['JD_ZLC_URL']:'https://zlc1.chaoyi996.com';let shareCodes=[],allMessage='',currentRoundId=null,lastRoundId=null,roundList=[],awardState='',randomCount=$[_0x52b490(0x536,'QntM')]()?0x14:0x5,num;$[_0x52b490(0x27e,'85]e')]=[];let llerror=![],lnrun=0x0,lnruns=0x0;!function(_0x44565d){'use strict';const _0x238caa=_0x52b490,_0x31db29={'nfTSU':function(_0x29457e,_0x5dc914){return _0x29457e(_0x5dc914);},'riLZS':function(_0x10e81b,_0x12b7f8){return _0x10e81b!==_0x12b7f8;},'EnUJA':_0x238caa(0x4bd,'^M8U'),'ciUgn':function(_0xdf9f1c,_0x2e60db){return _0xdf9f1c+_0x2e60db;},'BGDey':function(_0xfe7b7f,_0x14d9e6){return _0xfe7b7f&_0x14d9e6;},'GMfjs':function(_0x168249,_0x3579a5){return _0x168249|_0x3579a5;},'bxcCw':function(_0x47ff02,_0xae7ddf){return _0x47ff02<<_0xae7ddf;},'iualZ':function(_0x3974c3,_0x3c4a88){return _0x3974c3+_0x3c4a88;},'CoCly':function(_0x14f222,_0x126ca6){return _0x14f222>>_0x126ca6;},'OFCTy':function(_0x2d1c14,_0x54b007){return _0x2d1c14>>_0x54b007;},'jytqf':_0x238caa(0x22c,'S79%'),'GHmdv':'SWddL','NxjIg':function(_0x1cf565,_0x5bb3bb){return _0x1cf565-_0x5bb3bb;},'OBFRA':function(_0x3852b4,_0x5a7b1d){return _0x3852b4^_0x5a7b1d;},'qjkGl':function(_0x39b9d8,_0x1318aa){return _0x39b9d8===_0x1318aa;},'VEhhA':'yWBny','Lfdpt':function(_0x38289a,_0x905748,_0xd4fce7){return _0x38289a(_0x905748,_0xd4fce7);},'EveWo':function(_0x10fdeb,_0x5ea278,_0x2376fc){return _0x10fdeb(_0x5ea278,_0x2376fc);},'kAuEg':function(_0xa8c127,_0x4aac57,_0x1c3156,_0x15544e,_0x1d2fb2,_0x597f12,_0x369e49){return _0xa8c127(_0x4aac57,_0x1c3156,_0x15544e,_0x1d2fb2,_0x597f12,_0x369e49);},'NRgIh':function(_0x2ca7cb,_0x2f2bbb){return _0x2ca7cb&_0x2f2bbb;},'yHfNG':_0x238caa(0x4ee,')4UD'),'FRruG':_0x238caa(0x40d,'#t6L'),'htNkQ':function(_0x524875,_0x35f541){return _0x524875^_0x35f541;},'XdaiS':function(_0x27a8c2,_0x54d46d){return _0x27a8c2^_0x54d46d;},'oynQo':'otiok','PTFaD':function(_0xabf4de,_0x7ba7f7,_0xbe52e3,_0x688e1e,_0x3776fc,_0x240181,_0x4ad757){return _0xabf4de(_0x7ba7f7,_0xbe52e3,_0x688e1e,_0x3776fc,_0x240181,_0x4ad757);},'REuwH':function(_0x16c254,_0x475d65){return _0x16c254<<_0x475d65;},'
// prettier-ignore
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d