2023-07-27 16:14:01 +08: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_help.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true
|
|
|
|
|
|
|
|
|
|
=====================================Loon================================
|
|
|
|
|
[Script]
|
|
|
|
|
cron "40 4,17 * * *" script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_plantBean_help.js,tag=京东种豆得豆
|
|
|
|
|
|
|
|
|
|
======================================Surge==========================
|
|
|
|
|
京东种豆得豆 = type=cron,cronexp="40 4,17 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_plantBean_help.js
|
|
|
|
|
|
|
|
|
|
====================================小火箭=============================
|
|
|
|
|
京东种豆得豆 = type=cron,script-path=https://raw.githubusercontent.com/KingRan/JDJB/main/jd_plantBean_help.js, cronexpr="40 4,17 * * *", timeout=3600, enable=true
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
const $ = new Env('种豆得豆内部互助');
|
2023-08-26 10:33:19 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const llIiiI1=li1ll1Ii;function li1ll1Ii(_0x4b67ac,_0x1bf528){const _0x25171a=i1lIIIii();return li1ll1Ii=function(_0x2c98c8,_0x251a56){_0x2c98c8=_0x2c98c8-0x13f;let _0x11cf99=_0x25171a[_0x2c98c8];if(li1ll1Ii['kwdZns']===undefined){var _0x25205c=function(_0x62caa){const _0x648827='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3cb8a6='',_0x2a4897='';for(let _0x2f25c0=0x0,_0x57e9b1,_0xf9823f,_0x4776e8=0x0;_0xf9823f=_0x62caa['charAt'](_0x4776e8++);~_0xf9823f&&(_0x57e9b1=_0x2f25c0%0x4?_0x57e9b1*0x40+_0xf9823f:_0xf9823f,_0x2f25c0++%0x4)?_0x3cb8a6+=String['fromCharCode'](0xff&_0x57e9b1>>(-0x2*_0x2f25c0&0x6)):0x0){_0xf9823f=_0x648827['indexOf'](_0xf9823f);}for(let _0x4fdde8=0x0,_0x1ee535=_0x3cb8a6['length'];_0x4fdde8<_0x1ee535;_0x4fdde8++){_0x2a4897+='%'+('00'+_0x3cb8a6['charCodeAt'](_0x4fdde8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2a4897);};const _0x594aa8=function(_0x54ee5f,_0x21497f){let _0x15ba1e=[],_0x551514=0x0,_0x17a98d,_0x144553='';_0x54ee5f=_0x25205c(_0x54ee5f);let _0x54be8e;for(_0x54be8e=0x0;_0x54be8e<0x100;_0x54be8e++){_0x15ba1e[_0x54be8e]=_0x54be8e;}for(_0x54be8e=0x0;_0x54be8e<0x100;_0x54be8e++){_0x551514=(_0x551514+_0x15ba1e[_0x54be8e]+_0x21497f['charCodeAt'](_0x54be8e%_0x21497f['length']))%0x100,_0x17a98d=_0x15ba1e[_0x54be8e],_0x15ba1e[_0x54be8e]=_0x15ba1e[_0x551514],_0x15ba1e[_0x551514]=_0x17a98d;}_0x54be8e=0x0,_0x551514=0x0;for(let _0x18bec1=0x0;_0x18bec1<_0x54ee5f['length'];_0x18bec1++){_0x54be8e=(_0x54be8e+0x1)%0x100,_0x551514=(_0x551514+_0x15ba1e[_0x54be8e])%0x100,_0x17a98d=_0x15ba1e[_0x54be8e],_0x15ba1e[_0x54be8e]=_0x15ba1e[_0x551514],_0x15ba1e[_0x551514]=_0x17a98d,_0x144553+=String['fromCharCode'](_0x54ee5f['charCodeAt'](_0x18bec1)^_0x15ba1e[(_0x15ba1e[_0x54be8e]+_0x15ba1e[_0x551514])%0x100]);}return _0x144553;};li1ll1Ii['SYtsTa']=_0x594aa8,_0x4b67ac=arguments,li1ll1Ii['kwdZns']=!![];}const _0x859488=_0x25171a[0x0],_0x360758=_0x2c98c8+_0x859488,_0x5d3249=_0x4b67ac[_0x360758];return!_0x5d3249?(li1ll1Ii['dvhDrK']===undefined&&(li1ll1Ii['dvhDrK']=!![]),_0x11cf99=li1ll1Ii['SYtsTa'](_0x11cf99,_0x251a56),_0x4b67ac[_0x360758]=_0x11cf99):_0x11cf99=_0x5d3249,_0x11cf99;},li1ll1Ii(_0x4b67ac,_0x1bf528);}(function(IiIlI1il,ilillII,iIilIlIl,llIiiil,l1I11lIl,liillili,I1liIlll){return IiIlI1il=IiIlI1il>>0x2,liillili='hs',I1liIlll='hs',function(I1lliiI,II11lii,IIII1lI,lIi1lil1,l1liiiII){const ilili111=li1ll1Ii;lIi1lil1='tfi',liillili=lIi1lil1+liillili,l1liiiII='up',I1liIlll+=l1liiiII,liillili=IIII1lI(liillili),I1liIlll=IIII1lI(I1liIlll),IIII1lI=0x0;const ll1ili11=I1lliiI();while(!![]&&--llIiiil+II11lii){try{lIi1lil1=-parseInt(ilili111(0x18f,'!mtq'))/0x1+parseInt(ilili111(0x36c,'SUb8'))/0x2+-parseInt(ilili111(0x33d,'Qild'))/0x3+parseInt(ilili111(0x2a4,'^G^p'))/0x4+parseInt(ilili111(0x2d4,'0VZj'))/0x5*(-parseInt(ilili111(0x38e,'yvKo'))/0x6)+parseInt(ilili111(0x33f,'KYLF'))/0x7*(parseInt(ilili111(0x1c7,'!u$z'))/0x8)+parseInt(ilili111(0x168,'KYLF'))/0x9;}catch(lil1Ii1l){lIi1lil1=IIII1lI;}finally{l1liiiII=ll1ili11[liillili]();if(IiIlI1il<=llIiiil)IIII1lI?l1I11lIl?lIi1lil1=l1liiiII:l1I11lIl=l1liiiII:IIII1lI=l1liiiII;else{if(IIII1lI==l1I11lIl['replace'](/[pCLydeWHBrUuqhNJ=]/g,'')){if(lIi1lil1===II11lii){ll1ili11['un'+liillili](l1liiiII);break;}ll1ili11[I1liIlll](l1liiiII);}}}}}(iIilIlIl,ilillII,function(iiI1iI1,II1IllI,liIIl11l,ii1l11I,II1lIl1,IllllIlI,liilI1Ii){return II1IllI='\x73\x70\x6c\x69\x74',iiI1iI1=arguments[0x0],iiI1iI1=iiI1iI1[II1IllI](''),liIIl11l=`\x72\x65\x76\x65\x72\x73\x65`,iiI1iI1=iiI1iI1[liIIl11l]('\x76'),ii1l11I=`\x6a\x6f\x69\x6e`,(0x13b2e2,iiI1iI1[ii1l11I](''));});}(0x31c,0xaf235,i1lIIIii,0xc9),i1lIIIii)&&(version_=i1lIIIii);let ii1ill1I=!![],liIIll1I=[],ll1IIliI='',ilII11II=[],lI11illl=![],iiliI1lI,l1ilIiI,IIl1iIl,llI1IiI,li1IIIlI;const IiII1ill=require(llIiiI1(0x186,'0VZj')),l11IIi1l=require(llIiiI1(0x1af,'8N#0')),Ii1Ii1ll=llIiiI1(0x38b,'!u$z');let iIl1liii=[],iIiiI1i='',lIll1iI=null,ilil1Il=null,liIIIII=[],lliiilii='',liIIi1iI=$['isNode']()?0x14:0x5,iiIl1li;$['newShareCode']=[];let iIl1liIl=![],i111I1ii=0x0,i11liII=0x0;!(asyn
|
2023-07-27 16:14:01 +08:00
|
|
|
|
// 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
|