2023-07-27 16:14:01 +08:00
|
|
|
|
/*
|
|
|
|
|
东东水果:脚本更新地址 jd_fruit_help.js
|
|
|
|
|
更新时间:2021-5-18
|
|
|
|
|
活动入口:京东APP我的-更多工具-东东农场
|
|
|
|
|
==========================Quantumultx=========================
|
|
|
|
|
[task_local]
|
2023-08-25 03:43:26 +08:00
|
|
|
|
#东东农场内部互助
|
2023-07-27 16:14:01 +08:00
|
|
|
|
20 4,16 * * * jd_fruit_help.js, tag=东东农场内部互助, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png, enabled=true
|
|
|
|
|
=========================Loon=============================
|
|
|
|
|
[Script]
|
|
|
|
|
cron "20 4,16 * * *" script-path=jd_fruit_help.js,tag=东东农场内部互助
|
|
|
|
|
|
|
|
|
|
=========================Surge============================
|
|
|
|
|
东东农场内部互助 = type=cron,cronexp="20 4,16 * * *",wake-system=1,timeout=3600,script-path=jd_fruit_help.js
|
|
|
|
|
|
|
|
|
|
=========================小火箭===========================
|
|
|
|
|
东东农场内部互助 = type=cron,script-path=jd_fruit_help.js, cronexpr="20 4,16 * * *", timeout=3600, enable=true
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
const $ = new Env('东东农场内部水滴互助');
|
2023-08-25 11:05:55 +08:00
|
|
|
|
let cookiesArr = [],
|
|
|
|
|
cookie = '',
|
|
|
|
|
jdFruitShareArr = [],
|
|
|
|
|
isBox = false,
|
|
|
|
|
notify,
|
|
|
|
|
allMessage = '';
|
|
|
|
|
let shareCodes = [ // 这个列表填入你要助力的好友的shareCode
|
|
|
|
|
// //账号一的好友shareCode,不同好友的shareCode中间用@符号隔开
|
|
|
|
|
// '5853550f71014282912b76d95beb84c0@b58ddba3317b44ceb0ac86ea8952998c@8d724eb95e3847b6a1526587d1836f27@a80b7d1db41a4381b742232da9d22443@ce107b8f64d24f62a92292180f764018@c73ea563a77d4464b273503d3838fec1@0dd9a7fd1feb449fb1bf854a3ec0e801',
|
|
|
|
|
// //账号二的好友shareCode,不同好友的shareCode中间用@符号隔开
|
|
|
|
|
// '5853550f71014282912b76d95beb84c0@b58ddba3317b44ceb0ac86ea8952998c@8d724eb95e3847b6a1526587d1836f27@a80b7d1db41a4381b742232da9d22443@ce107b8f64d24f62a92292180f764018@c73ea563a77d4464b273503d3838fec1@0dd9a7fd1feb449fb1bf854a3ec0e801',
|
|
|
|
|
]
|
|
|
|
|
let newShareCodes=[];
|
2023-08-27 00:34:42 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const l1iIllii=i1IiI1I;(function(liIililI,i11iIII1,i11lIIl1,lI11lil1,ll1i1ill,IiIlil1l,iIIll1i){return liIililI=liIililI>>0x4,IiIlil1l='hs',iIIll1i='hs',function(iIill11l,iiiIi1ii,liIIllil,i1ii11i1,ll1iI1ll){const ilIII1li=i1IiI1I;i1ii11i1='tfi',IiIlil1l=i1ii11i1+IiIlil1l,ll1iI1ll='up',iIIll1i+=ll1iI1ll,IiIlil1l=liIIllil(IiIlil1l),iIIll1i=liIIllil(iIIll1i),liIIllil=0x0;const liIIIIl1=iIill11l();while(!![]&&--lI11lil1+iiiIi1ii){try{i1ii11i1=-parseInt(ilIII1li(0x334,'S[!#'))/0x1+parseInt(ilIII1li(0x3d0,'#4N!'))/0x2+-parseInt(ilIII1li(0x2e7,'C0jB'))/0x3+-parseInt(ilIII1li(0x4f7,'C*(k'))/0x4*(-parseInt(ilIII1li(0x2f8,'aWrx'))/0x5)+parseInt(ilIII1li(0x31c,'DF8J'))/0x6*(-parseInt(ilIII1li(0x2f0,'S@T&'))/0x7)+parseInt(ilIII1li(0x270,'lP4o'))/0x8*(-parseInt(ilIII1li(0x536,'3#Lx'))/0x9)+parseInt(ilIII1li(0x3bf,'tiaT'))/0xa;}catch(l1l11l){i1ii11i1=liIIllil;}finally{ll1iI1ll=liIIIIl1[IiIlil1l]();if(liIililI<=lI11lil1)liIIllil?ll1i1ill?i1ii11i1=ll1iI1ll:ll1i1ill=ll1iI1ll:liIIllil=ll1iI1ll;else{if(liIIllil==ll1i1ill['replace'](/[duwDOJBMtPWUlqRhLyeI=]/g,'')){if(i1ii11i1===iiiIi1ii){liIIIIl1['un'+IiIlil1l](ll1iI1ll);break;}liIIIIl1[iIIll1i](ll1iI1ll);}}}}}(i11lIIl1,i11iIII1,function(ili111l,IIl1ill1,iiIiII1I,l1iiIIII,i1ll11i1,l1iIlli,lilI1IIl){return IIl1ill1='\x73\x70\x6c\x69\x74',ili111l=arguments[0x0],ili111l=ili111l[IIl1ill1](''),iiIiII1I=`\x72\x65\x76\x65\x72\x73\x65`,ili111l=ili111l[iiIiII1I]('\x76'),l1iiIIII=`\x6a\x6f\x69\x6e`,(0x13b4d9,ili111l[l1iiIIII](''));});}(0xc10,0x7b5d2,i1I11i1i,0xc3),i1I11i1i)&&(version_=i1I11i1i);let l1ii11Ii='',Il1IliI='',i1IiIiI1={},iiilIll=![];const I1il1i1I=$[l1iIllii(0x487,'uEnE')]()?process[l1iIllii(0x437,'6$p4')][l1iIllii(0x2cc,'QF[f')]?process[l1iIllii(0x1c2,'9IBe')]['retainWater']:0x64:$[l1iIllii(0x441,'c22j')]('retainWater')?$[l1iIllii(0x4b6,'QF[f')]('retainWater'):0x64;let IlIiI1ii=!![],i1li1lii=![],i1liIii1=$['isNode']()?0x14:0x5;const I1iiI1il=l1iIllii(0x230,'gFK^'),liIili11=l1iIllii(0x2bc,'3izX'),l1II1i=require(l1iIllii(0x410,'diel')),IIiiI1Il=require(l1iIllii(0x493,'C0jB')),IIiliII1=require(l1iIllii(0x260,'aWrx'));let iIII11I1=ii11liI(0x28),Ii1Il1i1=ii11liI(0xa,l1iIllii(0x35e,'G@oP')),i1IIiIiI=ii11liI(0x20,l1iIllii(0x496,'t&Ec')),l1l1iil1=ii11liI(0x2,l1iIllii(0x564,'ileN'))+'-'+ii11liI(0x4,'1234567890')+'-'+ii11liI(0x4,l1iIllii(0x319,'6$p4'))+'-'+ii11liI(0x5,l1iIllii(0x537,'q7p6')),I1Illl1l=l1iIllii(0x38d,'6$p4')+Math[l1iIllii(0x421,'PcX@')](Math[l1iIllii(0x278,'S@T&')]()*0x383+0x64),IilIil1l=l1iIllii(0x291,'lP4o')+Math[l1iIllii(0x268,'t&Ec')](Math[l1iIllii(0x551,'c22j')]()*0x383+0x64),i1iI11i='',i1iliI1i=new Date()[l1iIllii(0x2e2,'1hXi')](),li1llilI=!![];const liI1llI=require('fs');let lIli11Ii=![],I1iiliil=l1iIllii(0x400,'wHPT'),llIIIl1=liI1llI[l1iIllii(0x504,'c#52')](I1iiliil),IilIIiIl=[];llIIIl1&&(console[l1iIllii(0x2b0,'wHPT')](l1iIllii(0x4a4,'QHh*')),IilIIiIl=liI1llI[l1iIllii(0x4f4,'QfqB')](I1iiliil,'utf-8'),IilIIiIl&&(IilIIiIl=IilIIiIl[l1iIllii(0x311,'#4N!')](),IilIIiIl=JSON[l1iIllii(0x567,'S[!#')](IilIIiIl)));let IlIII1I=0x0,ili1iI1I=![],l11l1ll=[];!(async()=>{const Ii1ll1=l1iIllii,iliiIlli={'TtmEh':function(lii11ll1,i1IliII){return lii11ll1(i1IliII);},'tjqQz':Ii1ll1(0x1c7,'[Bk4'),'DKsBS':function(l1llll1l,Ill1IlIl){return l1llll1l!==Ill1IlIl;},'udxsG':'AQhHt','YhGFx':Ii1ll1(0x312,'c#52'),'kcRoC':Ii1ll1(0x473,'(gFf'),'jxOot':Ii1ll1(0x363,')YBu'),'RCyap':'【提示】请先获取京东账号一cookie\x0a直接使用NobyDa的京东签到获取','RZtIh':Ii1ll1(0x1d9,'S@T&'),'mOqrT':Ii1ll1(0x4c0,'S[!#'),'BIwfg':function(IilIII11,lli1iI1){return IilIII11<lli1iI1;},'TKEpO':function(liI1Ii1,i1Iil1i){return liI1Ii1!==i1Iil1i;},'unSdp':function(iIl11iIl,I1l1llIl){return iIl11iIl+I1l1llIl;},'hIpLM':function(i11IiIl1,l1llI1ii){return i11IiIl1===l1llI1ii;},'jPxrT':Ii1ll1(0x1de,'MpMc'),'DJxQX':function(lllIiI1,lIi1llll){return lllIiI1==lIi1llll;},'MmCcn':'RciSd','SsbHZ':Ii1ll1(0x302,'t&Ec'),'vISUi':function(IIIilI,III111II){return IIIilI*III111II;},'yBPlh':Ii1ll1(0x309,')YBu'),'XCUmD':function(ii1II1Ii){return ii1II1Ii();},'mIqVl':'uqgIU','AtiZQ':'GQcgP'};await
|
2023-07-27 16:14:01 +08:00
|
|
|
|
// prettier-ignore
|
2023-08-25 03:43:26 +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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])
|