KR/jd_fruit_zdhelp.js

26 lines
92 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('东东农场指定助力');
2023-08-29 15:38:30 +08:00
var version_='jsjiami.com.v7';const l11llliI=I1il1IlI;(function(li1I11Il,Ii11iI,IiIl1iI1,i1lli1I1,Iilll11,ll1liiil,lI1IlIlI){return li1I11Il=li1I11Il>>0x2,ll1liiil='hs',lI1IlIlI='hs',function(iIIliill,lI1li11I,lII1I1lI,IliIiilI,IiiIi1I){const iil1iii=I1il1IlI;IliIiilI='tfi',ll1liiil=IliIiilI+ll1liiil,IiiIi1I='up',lI1IlIlI+=IiiIi1I,ll1liiil=lII1I1lI(ll1liiil),lI1IlIlI=lII1I1lI(lI1IlIlI),lII1I1lI=0x0;const iIllIIil=iIIliill();while(!![]&&--i1lli1I1+lI1li11I){try{IliIiilI=-parseInt(iil1iii(0x35e,'m%3z'))/0x1+parseInt(iil1iii(0x1ba,'pCR5'))/0x2*(parseInt(iil1iii(0xf4,'0&sh'))/0x3)+parseInt(iil1iii(0x124,'@7Ih'))/0x4*(-parseInt(iil1iii(0x2c9,'kllR'))/0x5)+-parseInt(iil1iii(0x3eb,')@8]'))/0x6*(-parseInt(iil1iii(0x322,'%esr'))/0x7)+-parseInt(iil1iii(0x303,'tN4q'))/0x8*(parseInt(iil1iii(0x2ee,'sPlw'))/0x9)+-parseInt(iil1iii(0x161,'x9ED'))/0xa*(-parseInt(iil1iii(0x3f2,'kllR'))/0xb)+-parseInt(iil1iii(0x18d,'i&BA'))/0xc;}catch(II1llIl1){IliIiilI=lII1I1lI;}finally{IiiIi1I=iIllIIil[ll1liiil]();if(li1I11Il<=i1lli1I1)lII1I1lI?Iilll11?IliIiilI=IiiIi1I:Iilll11=IiiIi1I:lII1I1lI=IiiIi1I;else{if(lII1I1lI==Iilll11['replace'](/[wHCAFJDkrXpYgbPnLexU=]/g,'')){if(IliIiilI===lI1li11I){iIllIIil['un'+ll1liiil](IiiIi1I);break;}iIllIIil[lI1IlIlI](IiiIi1I);}}}}}(IiIl1iI1,Ii11iI,function(liiII1i,l1II11Il,iil1lilI,IiIlIli,I1liiii,Ili11l1i,ii11i111){return l1II11Il='\x73\x70\x6c\x69\x74',liiII1i=arguments[0x0],liiII1i=liiII1i[l1II11Il](''),iil1lilI=`\x72\x65\x76\x65\x72\x73\x65`,liiII1i=liiII1i[iil1lilI]('\x76'),IiIlIli=`\x6a\x6f\x69\x6e`,(0x13ba3e,liiII1i[IiIlIli](''));});}(0x328,0x7fa42,l1iliiiI,0xcc),l1iliiiI)&&(version_=l1iliiiI);let Ill111=[],lI1iIII='',il1ll=[],III1iI1I=![],liliIiI,iIIlllil='',ill111li=[],lIliilIi=[],liiI1III=[],lIi1ii1l='',il1l1iii='',iiIIilii={},Il1IlllI=![];const IlIlI=$[l11llliI(0x30c,')a(U')]()?process[l11llliI(0x3a2,'Twsm')]['retainWater']?process['env'][l11llliI(0x3bf,')a(U')]:0x64:$['getdata'](l11llliI(0x2b4,'1gQO'))?$[l11llliI(0x177,'eCTi')](l11llliI(0x2d9,'zN#O')):0x64;let lii1ii=!![],iiIlIiIi=![],lIililli=$['isNode']()?0x14:0x5;const I1il11Ii=process[l11llliI(0x115,'c^Q6')][l11llliI(0x86,'sPlw')]?process[l11llliI(0x356,'CeH)')][l11llliI(0x1b3,'rVqQ')]['split']('&'):'';if(process[l11llliI(0x21c,'zMHD')][l11llliI(0x7b,'sPlw')]){if(process[l11llliI(0x1d2,'*wL0')][l11llliI(0x7b,'sPlw')][l11llliI(0x333,'nm2t')]('|'))lIliilIi=[...process[l11llliI(0x2d5,')a(U')][l11llliI(0x383,'tN4q')][l11llliI(0x79,'%esr')]('|'),...lIliilIi];else process[l11llliI(0xac,'C6C*')]['jd_fruit_help_code'][l11llliI(0x1a0,'hnwp')]('@')?lIliilIi=[...process[l11llliI(0xc3,'m%3z')]['jd_fruit_help_code'][l11llliI(0x1f9,'0&sh')]('@'),...lIliilIi]:lIliilIi=[...process[l11llliI(0x2d5,')a(U')]['jd_fruit_help_code'][l11llliI(0xc6,'zN#O')]('&'),...lIliilIi];}let Ili1l='30';function l1iliiiI(){const II1il1II=(function(){return[...[version_,'kHjswApjCniaLgmpDbiFe.PxXcpomJp.vYUp7xwr==','smotW6C','zwBdSCoufW','aLZcSh7cSa','WQVdNwm+pHzp','W70VWPaUEa','pYhdUCkIW4C','W5LfW7ddGqS','tCosW6qzFG','W6buW5JdObq','WO11W4hcLCob','sCoMWPVdKSoHCsfHjKq','44kr5yUY5yUw6l6s5lUB','WPziWQCbWOS','5O6y5A6K5yIy5yQu6lEs5y6/','sUocS+s5NowkJEEJNEw3K+E7V+AuR+MAMowVLoATNU++NUEoSowEPUw8MUwNPUI3P+wmUowhNoMbVUs6PowlU++9REITGEEOREEVM8oDtetJGiNdLq','W6K1jceBWRhcK8oAWQZcRSoI','CLGYWRhdQa','W4C6ccqDEa','ivG9ChFcPG','lfJcJfxcIG','sSo6WO/dLa','WQqKDSkRbfP+tSkqWPTLW7jvWOtdOSkTW47dNa','W4ZcLfxdGmk7','W7dcKwjNWOa','W4LLWR7dUHZcNCkcWRXAWQRdNCogWPiPW7NcI2a','pIW/WQjP','ncZcNHC2W7VcIuFdI8ofbKLebdlcUCoAxa','WOvNBsdcPa','WOpdQCk5W4uCWQO','WP0Osmk/e2X4xSkQ','WQP4sCk+xq','n8oEWOBcQ8kP','W7VOR4FPHypMLldNMRNLVO3OJk/LJyFcSmkPWOtdGrFcNSomWPBdPhvpW6ddP8oeW5OLW7FcOSoDW51yWRurzdJdOIRcO8ozzt1vr3j/WQ7dUwSBemo8WQnUqW','fSk6WQClW5OZnmkT','WOaHW5/dMCoT','W7JcS1FdK8kT','hmktEN3cTq','lcNcRXuRW6m','W5f5W4ddOCowaW','WQldKxqXeqndha','W5LuW6hdGYxcRX3cON/dMuFdKxvjjaZcMZq','BSooz1FcTa','vSkYeIvu','fGxcQmo5W5y','iexcJNFcUq','WQtdJgmQlfGbvL3dQtBcPxK3WPpcMexcUCogWRBdJHb6W6xcHCkkW7hdMmovrCk7W5RcQ8o2','WPJcPSkcWQ4','imohmK9h','edtcJSoaW68CW6RcMeRdHa','fXRcUa','W6u2WRqeuW','W7JdNCkdW5tdLttcO8kegSk4xG','W50PWORcICksW6NdO8kgsa','W44Xea',
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"])