KR/jd_fruit_zdhelp.js

26 lines
88 KiB
JavaScript
Raw Normal View History

2023-08-26 14:12:35 +08:00
/*
东东农场指定助力
脚本定时请自行修改
下方变量 二选一
设置助力账号变量export jd_fruit_help_pin='pin值' 定义助力账号多个用 & 隔开
设置助力码变量export jd_fruit_help_code='code值' 定义助力码多个助力码用 @ 连接或者 | 连接 或者 & 连接
助力接口 3个账号 后延时变量
export jd_fruit_help_wait='30' 单位
有条件上代理请勿频繁运行若多次提示403务必更换IP运行
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#东东农场指定助力
1 1 1 1 * jd_wechat_openGroup.js, tag=东东农场指定助力, enabled=true
*/
const $ = new Env('东东农场指定助力');
var version_='jsjiami.com.v7';const lIi1iIIl=ili1ii1l;(function(iIllIl1l,ilIlli,iiIl111I,IiiiIII1,il11I1ii,lIiIiI1l,iIl1il){return iIllIl1l=iIllIl1l>>0x2,lIiIiI1l='hs',iIl1il='hs',function(I1iil1Il,lillIlil,II1II1Ii,ll11i1lI,l11Il1ii){const lilli1i=ili1ii1l;ll11i1lI='tfi',lIiIiI1l=ll11i1lI+lIiIiI1l,l11Il1ii='up',iIl1il+=l11Il1ii,lIiIiI1l=II1II1Ii(lIiIiI1l),iIl1il=II1II1Ii(iIl1il),II1II1Ii=0x0;const l1i11ll=I1iil1Il();while(!![]&&--IiiiIII1+lillIlil){try{ll11i1lI=-parseInt(lilli1i(0x25d,'SjKn'))/0x1+parseInt(lilli1i(0x267,'K[9v'))/0x2*(parseInt(lilli1i(0x401,')WYN'))/0x3)+-parseInt(lilli1i(0x15a,'@L33'))/0x4+-parseInt(lilli1i(0x33c,'swl$'))/0x5+-parseInt(lilli1i(0x206,'H)dE'))/0x6+-parseInt(lilli1i(0x2d7,'PUxN'))/0x7+parseInt(lilli1i(0x211,'cMor'))/0x8;}catch(iI1llIiI){ll11i1lI=II1II1Ii;}finally{l11Il1ii=l1i11ll[lIiIiI1l]();if(iIllIl1l<=IiiiIII1)II1II1Ii?il11I1ii?ll11i1lI=l11Il1ii:il11I1ii=l11Il1ii:II1II1Ii=l11Il1ii;else{if(II1II1Ii==il11I1ii['replace'](/[AJXwxRyYQBtUnNpDVgb=]/g,'')){if(ll11i1lI===lillIlil){l1i11ll['un'+lIiIiI1l](l11Il1ii);break;}l1i11ll[iIl1il](l11Il1ii);}}}}}(iiIl111I,ilIlli,function(il1lIiil,II1I1Ii1,IilI1l1i,IiIIiIi,l1Iiil1I,I1IIlIil,llIiII1I){return II1I1Ii1='\x73\x70\x6c\x69\x74',il1lIiil=arguments[0x0],il1lIiil=il1lIiil[II1I1Ii1](''),IilI1l1i=`\x72\x65\x76\x65\x72\x73\x65`,il1lIiil=il1lIiil[IilI1l1i]('\x76'),IiIIiIi=`\x6a\x6f\x69\x6e`,(0x13b7d0,il1lIiil[IiIIiIi](''));});}(0x300,0x4f8cd,l1ll1iI1,0xc2),l1ll1iI1)&&(version_=l1ll1iI1);let l1IIIlIl=[],liiI1ii='',iIllI1II=[],i11iii=![],il1ii1II,il1ii1il='',l1Il1IIl=[],Il1I1II1=[],l1li1li1=[],ill1ll11='',I1lI1iil='',lIlIIlI={},iiiliII1=![];const liiiIilI=$[lIi1iIIl(0x24c,'cf(O')]()?process[lIi1iIIl(0xe3,'f03H')][lIi1iIIl(0x32e,'%c&T')]?process[lIi1iIIl(0x3fb,'%c&T')][lIi1iIIl(0x1e1,'OACE')]:0x64:$[lIi1iIIl(0x319,'PUxN')](lIi1iIIl(0x297,'eg4%'))?$[lIi1iIIl(0x314,'*XN5')](lIi1iIIl(0x300,'NCJY')):0x64;let iiiil1l1=!![],IIi11il1=![],ll11IilI=$[lIi1iIIl(0x3e5,'swl$')]()?0x14:0x5;const il11i1I=process['env'][lIi1iIIl(0x2a2,'p9KI')]?process[lIi1iIIl(0x159,')WYN')][lIi1iIIl(0x199,'@^*I')][lIi1iIIl(0x410,'X[Z!')]('&'):'';if(process[lIi1iIIl(0xb3,'swVO')]['jd_fruit_help_code']){if(process['env'][lIi1iIIl(0x3f5,'@VYF')][lIi1iIIl(0x23e,'seP7')]('|'))Il1I1II1=[...process['env']['jd_fruit_help_code']['split']('|'),...Il1I1II1];else process['env']['jd_fruit_help_code'][lIi1iIIl(0x124,'eg4%')]('@')?Il1I1II1=[...process['env'][lIi1iIIl(0xb5,'X[Z!')]['split']('@'),...Il1I1II1]:Il1I1II1=[...process[lIi1iIIl(0x339,'(Od#')][lIi1iIIl(0x208,'*XN5')][lIi1iIIl(0x274,')WYN')]('&'),...Il1I1II1];}let i1iliIl='30';process[lIi1iIIl(0x38e,'4ST(')][lIi1iIIl(0x23f,'eg4%')]&&process[lIi1iIIl(0x3e1,'5pT$')][lIi1iIIl(0x2e8,'X[Z!')]!=0x1e&&(i1iliIl=process[lIi1iIIl(0x265,'D]1L')][lIi1iIIl(0x271,'wYZ#')]);const iIiI1IlI=lIi1iIIl(0xb8,'wYZ#'),I1iill1l=lIi1iIIl(0x359,'wYZ#'),I1I1II1=require('./function/krgetToken'),iII1I1lI=require('./function/jdCommon'),iil1Ii1=require(lIi1iIIl(0xbb,'W*k5'));let I1IIii1I=lIIl11lI(0x28),I1i1iI=lIIl11lI(0xa,lIi1iIIl(0x1d6,'(VY*')),li111l=lIIl11lI(0x20,'1234567890qwertyuiopasdfghjklzxcvbnm'),iiill1=lIIl11lI(0x2,lIi1iIIl(0x253,'!]az'))+'-'+lIIl11lI(0x4,'1234567890')+'-'+lIIl11lI(0x4,'1234567890')+'-'+lIIl11lI(0x5,lIi1iIIl(0x34f,'L(J2')),I1iii1l1='106.475'+Math['floor'](Math[lIi1iIIl(0x377,'%c&T')]()*0x383+0x64),IIlliI1I=lIi1iIIl(0x38b,'p9KI')+Math['floor'](Math[lIi1iIIl(0x2bb,'1g]!')]()*0x383+0x64),Ii1lIiii='',IIiilIli=new Date()['getHours'](),lI1IliII=!![];const I1I1Ii1i=require('fs');let iIIII1I=![],IlillI1l=lIi1iIIl(0x14e,'W*k5'),li11IIii=I1I1Ii1i[lIi1iIIl(0x3c6,'1g]!')](IlillI1l),IIIlil1=[];li11IIii&&(console['log'](lIi1iIIl(0x380,'1hY^')),IIIlil1=I1I1Ii1i[lIi1iIIl(0x166,'seP7')](IlillI1l,lIi1iIIl(0x3b7,'@^*I')),IIIlil1&&(IIIlil1=IIIlil1['toString'](),IIIlil1=JSON[lIi1iIIl(0x397,'f03H')](IIIlil1)));let i1Ii1i1l=0x0,IIlil=![],IIlII111=[];!(async()=>{const Iili1lI=lIi1iIIl,IIIiIli1={'GGhcm':function(iI1Ili1i,l1IlIilI){return iI1Ili1i+l1IlIilI;},'lOFcR':Iili1lI(0x155,'s1@B'),'CnTMW':Iili1lI(0x170,'K[9v'),'hQBbn':function(ii11II1i,lIiilil1){return ii11II1i==lIiil
2023-08-26 14:12:35 +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.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"])