2023-07-27 16:14:01 +08:00
|
|
|
|
/*
|
|
|
|
|
东东水果:脚本更新地址 jd_fruit_friend.js
|
|
|
|
|
更新时间:2021-5-18
|
|
|
|
|
活动入口:京东APP我的-更多工具-东东农场
|
|
|
|
|
==========================Quantumultx=========================
|
|
|
|
|
[task_local]
|
2023-08-25 03:59:57 +08:00
|
|
|
|
#东东农场好友删减奖励
|
2023-07-27 16:14:01 +08:00
|
|
|
|
10 2 * * * jd_fruit_friend.js, tag=东东农场好友删减奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png, enabled=true
|
|
|
|
|
=========================Loon=============================
|
|
|
|
|
[Script]
|
|
|
|
|
cron "10 2 * * *" script-path=jd_fruit_friend.js,tag=东东农场好友删减奖励
|
|
|
|
|
|
|
|
|
|
=========================Surge============================
|
|
|
|
|
东东农场好友删减奖励 = type=cron,cronexp="10 2 * * *",wake-system=1,timeout=3600,script-path=jd_fruit_friend.js
|
|
|
|
|
|
|
|
|
|
=========================小火箭===========================
|
|
|
|
|
东东农场好友删减奖励 = type=cron,script-path=jd_fruit_friend.js, cronexpr="10 2 * * *", timeout=3600, enable=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
const $ = new Env('东东农场好友删减奖励');
|
2023-08-26 15:18:52 +08:00
|
|
|
|
let cookiesArr = [],
|
|
|
|
|
cookie = '',
|
|
|
|
|
isBox = false,
|
|
|
|
|
notify,
|
|
|
|
|
allMessage = '';
|
|
|
|
|
let newShareCodes = [];
|
2023-08-29 15:38:30 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const l1li1IiI=liliiIli;(function(ii1li11l,III1liIi,lili1iI,iIIlII1i,IiIii1Il,Iillllli,iIi1iIiI){return ii1li11l=ii1li11l>>0x7,Iillllli='hs',iIi1iIiI='hs',function(liiIiiiI,IlIllIil,liil1l11,Ii1IIiiI,i1I1l1Il){const iliilI1=liliiIli;Ii1IIiiI='tfi',Iillllli=Ii1IIiiI+Iillllli,i1I1l1Il='up',iIi1iIiI+=i1I1l1Il,Iillllli=liil1l11(Iillllli),iIi1iIiI=liil1l11(iIi1iIiI),liil1l11=0x0;const lliil1II=liiIiiiI();while(!![]&&--iIIlII1i+IlIllIil){try{Ii1IIiiI=-parseInt(iliilI1(0x21a,'!EKo'))/0x1*(-parseInt(iliilI1(0x3dc,'%Lsq'))/0x2)+-parseInt(iliilI1(0x1fb,'dS88'))/0x3+parseInt(iliilI1(0x2d0,'sg7Z'))/0x4+-parseInt(iliilI1(0x331,'zh0Z'))/0x5+-parseInt(iliilI1(0x3f8,'dzrV'))/0x6+parseInt(iliilI1(0x1c0,'pNQJ'))/0x7+-parseInt(iliilI1(0x42f,'bS8F'))/0x8*(-parseInt(iliilI1(0x1bb,'%SpN'))/0x9);}catch(llIiIi1l){Ii1IIiiI=liil1l11;}finally{i1I1l1Il=lliil1II[Iillllli]();if(ii1li11l<=iIIlII1i)liil1l11?IiIii1Il?Ii1IIiiI=i1I1l1Il:IiIii1Il=i1I1l1Il:liil1l11=i1I1l1Il;else{if(liil1l11==IiIii1Il['replace'](/[prguWeMFtXhkVLdOJn=]/g,'')){if(Ii1IIiiI===IlIllIil){lliil1II['un'+Iillllli](i1I1l1Il);break;}lliil1II[iIi1iIiI](i1I1l1Il);}}}}}(lili1iI,III1liIi,function(l1iIi1il,Il1llii1,I1iiiii,iIiiilil,IIi1iiiI,iilIiIll,illIIIIi){return Il1llii1='\x73\x70\x6c\x69\x74',l1iIi1il=arguments[0x0],l1iIi1il=l1iIi1il[Il1llii1](''),I1iiiii=`\x72\x65\x76\x65\x72\x73\x65`,l1iIi1il=l1iIi1il[I1iiiii]('\x76'),iIiiilil=`\x6a\x6f\x69\x6e`,(0x13ba3d,l1iIi1il[iIiiilil](''));});}(0x5e00,0x5db9f,IIlI1I11,0xbe),IIlI1I11)&&(version_=IIlI1I11);let iii1il1i='',ilIi1I1l='',Ill1iIii={},IIIIili1=![];const iIIIIIi1=$[l1li1IiI(0x22f,'zh0Z')]()?process[l1li1IiI(0x419,'Kl9Y')][l1li1IiI(0x334,'9[ZJ')]?process[l1li1IiI(0x2a6,'EVmt')][l1li1IiI(0x1af,'973x')]:0x64:$['getdata'](l1li1IiI(0x274,'3tx0'))?$[l1li1IiI(0x199,'!H8O')](l1li1IiI(0x2a0,'5HGF')):0x64;let IIIl11li=!![],lIII11li=![];const llIIlIli=l1li1IiI(0x209,'bS8F'),Iii1I1il=l1li1IiI(0x2d3,'MLRg'),iI11l1ll=require(l1li1IiI(0x41c,'GZov')),i1iIIliI=require('./function/jdCommon'),IIi1l1i1=require('./function/h5st41.js');let IllIIiI1=IIii11ii(0x28),i1lilli1=IIii11ii(0xa,'123456789'),l1IlliIi=IIii11ii(0x20,'1234567890qwertyuiopasdfghjklzxcvbnm'),Il1Iiil=IIii11ii(0x2,l1li1IiI(0x29b,'tla5'))+'-'+IIii11ii(0x4,l1li1IiI(0x385,'kv]$'))+'-'+IIii11ii(0x4,l1li1IiI(0x19a,'Gk]E'))+'-'+IIii11ii(0x5,l1li1IiI(0x236,'Gmp]')),illlI1iI='106.475'+Math[l1li1IiI(0x34b,'skVo')](Math[l1li1IiI(0x3b2,'EVmt')]()*0x383+0x64),l11IIIIl=l1li1IiI(0x280,'Gmp]')+Math[l1li1IiI(0x1b9,'j*M8')](Math['random']()*0x383+0x64),iI1iIlii='',li1lIlli=new Date()[l1li1IiI(0x2ca,'sg7Z')](),I1Il1iI1=!![];const illi11l=require('fs');let IIiiii=![],Ii1llIi='./Fruit_ShareCache.json',i1ilIi1=illi11l[l1li1IiI(0x425,'aVx@')](Ii1llIi),lIi1II1l=[];i1ilIi1&&(console['log'](l1li1IiI(0x3fe,'N!CU')),lIi1II1l=illi11l['readFileSync'](Ii1llIi,l1li1IiI(0x2d4,'Kl9Y')),lIi1II1l&&(lIi1II1l=lIi1II1l[l1li1IiI(0x35b,'Kl9Y')](),lIi1II1l=JSON[l1li1IiI(0x299,'[]FO')](lIi1II1l)));let IiIIII1i=0x0,il1l1Il=![];!(async()=>{const IIIIIlll=l1li1IiI,ii1ili1I={'fxyYu':function(iilIi1i,lIli11lI){return iilIi1i==lIli11lI;},'pMYvL':IIIIIlll(0x3b1,'aVx@'),'BfOzn':'\x0a【缓存文件Fruit_ShareCache.json更新成功!】\x0a','yjJOi':function(II1iIll1,l1iIIiII){return II1iIll1||l1iIIiII;},'DBbWB':function(iiIiIIi,i11i1iI1){return iiIiIIi+i11i1iI1;},'vCTnI':function(Iil1i1ll,lIlIlill){return Iil1i1ll+lIlIlill;},'imWZy':function(IiI1IilI,i1ii1Ii1){return IiI1IilI+i1ii1Ii1;},'FBTLs':function(Ii11IIli,I1lII1II){return Ii11IIli>=I1lII1II;},'HDbUu':function(III1ili1,lI11li){return III1ili1+lI11li;},'hlQnB':function(lliiI1l,lIi1i1Ii){return lliiI1l+lIi1i1Ii;},'qQyiD':function(lIIIllI1,IIliili){return lIIIllI1>=IIliili;},'Fwiom':function(IlIllii){return IlIllii();},'yDZkf':IIIIIlll(0x1e2,'3D]l'),'UCZDb':IIIIIlll(0x232,'5HGF'),'kUVlN':IIIIIlll(0x1b6,'A0U]'),'gsVtt':function(liI11i1i,llIliili){return liI11i1i<llIliili;},'CgOAp':'NYhFI','omKUz':'gyIZw','UPPSl':function(l1lIliIi,Ilill1I){return l1lIliIi(Ilill1I);},'anlLG':function(iI111I,iiiIllII){return iI111I+iiiIllII;},'cOOhj':function(i1iI1I1){return i1iI
|
2023-07-27 16:14:01 +08:00
|
|
|
|
// prettier-ignore
|
2023-08-25 03:59:57 +08:00
|
|
|
|
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
|