2023-10-27 12:53:06 +08:00
|
|
|
|
/*
|
|
|
|
|
#京东版-邀好友得红包助力
|
|
|
|
|
|
|
|
|
|
入口:京东APP 签到领豆-每日红包
|
|
|
|
|
|
|
|
|
|
变量:
|
2023-10-27 12:54:50 +08:00
|
|
|
|
kryhycode //指定助力码
|
2023-10-27 12:53:06 +08:00
|
|
|
|
JD_PROXY_OPEN // 代理启用变量,默认不开启(true/false)
|
|
|
|
|
JD_PROXY_TUNNRL // 代理池代理地址变量,默认不开启,仅支持代理池模式(auto-proxy-pool),格式为:http://ip:port
|
|
|
|
|
JD_PROXY_URL // API代理地址变量,默认不开启,仅支持 数据格式:txt;提取数量:每次一个,格式为:http://api.xxx.xxx
|
|
|
|
|
JD_NO_PROXY // 禁止走代理,默认 127.0.0.1,*.baidu.com 需要自行修改
|
|
|
|
|
|
|
|
|
|
[task_local]
|
|
|
|
|
#京东版-邀好友得红包助力
|
|
|
|
|
1 1 1 1 * jd_yhydhb_help.js, tag=京东版-邀好友得红包助力, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('京东版-邀好友得红包助力');
|
2023-10-27 12:54:50 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const iIll1I1=lIlili11;(function(li1li1i1,lIilIl1I,i1l1llII,iilIIIIi,I1iI1ll1,IilIilII,i1i1Iiii){return li1li1i1=li1li1i1>>0x7,IilIilII='hs',i1i1Iiii='hs',function(iIlii1l,IiiIliIi,Iiili1Il,llliil11,l1ll1i1){const Ili1Ii=lIlili11;llliil11='tfi',IilIilII=llliil11+IilIilII,l1ll1i1='up',i1i1Iiii+=l1ll1i1,IilIilII=Iiili1Il(IilIilII),i1i1Iiii=Iiili1Il(i1i1Iiii),Iiili1Il=0x0;const i1IlIIiI=iIlii1l();while(!![]&&--iilIIIIi+IiiIliIi){try{llliil11=parseInt(Ili1Ii(0x200,'eQQD'))/0x1*(parseInt(Ili1Ii(0x242,'rRT!'))/0x2)+parseInt(Ili1Ii(0x409,'A4UK'))/0x3+-parseInt(Ili1Ii(0x3aa,'BsPN'))/0x4*(parseInt(Ili1Ii(0x44e,'oBxx'))/0x5)+-parseInt(Ili1Ii(0x44a,'@#LN'))/0x6+-parseInt(Ili1Ii(0x396,'rRT!'))/0x7+-parseInt(Ili1Ii(0x399,'heK2'))/0x8+parseInt(Ili1Ii(0x361,'K$6E'))/0x9;}catch(i1l1IIiI){llliil11=Iiili1Il;}finally{l1ll1i1=i1IlIIiI[IilIilII]();if(li1li1i1<=iilIIIIi)Iiili1Il?I1iI1ll1?llliil11=l1ll1i1:I1iI1ll1=l1ll1i1:Iiili1Il=l1ll1i1;else{if(Iiili1Il==I1iI1ll1['replace'](/[IrEkBnJlTOfLCPqWQeHtp=]/g,'')){if(llliil11===IiiIliIi){i1IlIIiI['un'+IilIilII](l1ll1i1);break;}i1IlIIiI[i1i1Iiii](l1ll1i1);}}}}}(i1l1llII,lIilIl1I,function(iii1IIII,III1i1II,Illlilii,i1II1lIl,iIlIIii,iili11ll,iIIIIIll){return III1i1II='\x73\x70\x6c\x69\x74',iii1IIII=arguments[0x0],iii1IIII=iii1IIII[III1i1II](''),Illlilii=`\x72\x65\x76\x65\x72\x73\x65`,iii1IIII=iii1IIII[Illlilii]('\x76'),i1II1lIl=`\x6a\x6f\x69\x6e`,(0x144a89,iii1IIII[i1II1lIl](''));});}(0x6200,0x72c54,i1i1lIIi,0xc6),i1i1lIIi)&&(version_=iIll1I1(0x2bd,'n^(P'));function lIlili11(_0x91543c,_0x464dc2){const _0x5b4547=i1i1lIIi();return lIlili11=function(_0xf475ef,_0x58ba68){_0xf475ef=_0xf475ef-0x1d4;let _0x146591=_0x5b4547[_0xf475ef];if(lIlili11['BLySVb']===undefined){var _0x1ab82b=function(_0x24d8ba){const _0x1de72a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x462f35='',_0x19e4e8='';for(let _0x4e773a=0x0,_0x1c38a0,_0x54cbe7,_0x5b19e4=0x0;_0x54cbe7=_0x24d8ba['charAt'](_0x5b19e4++);~_0x54cbe7&&(_0x1c38a0=_0x4e773a%0x4?_0x1c38a0*0x40+_0x54cbe7:_0x54cbe7,_0x4e773a++%0x4)?_0x462f35+=String['fromCharCode'](0xff&_0x1c38a0>>(-0x2*_0x4e773a&0x6)):0x0){_0x54cbe7=_0x1de72a['indexOf'](_0x54cbe7);}for(let _0x3b6870=0x0,_0x5602ae=_0x462f35['length'];_0x3b6870<_0x5602ae;_0x3b6870++){_0x19e4e8+='%'+('00'+_0x462f35['charCodeAt'](_0x3b6870)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x19e4e8);};const _0x2c2a6f=function(_0x557018,_0x2e8822){let _0x512272=[],_0x5ad0e7=0x0,_0x4d685a,_0x2b131a='';_0x557018=_0x1ab82b(_0x557018);let _0x475c85;for(_0x475c85=0x0;_0x475c85<0x100;_0x475c85++){_0x512272[_0x475c85]=_0x475c85;}for(_0x475c85=0x0;_0x475c85<0x100;_0x475c85++){_0x5ad0e7=(_0x5ad0e7+_0x512272[_0x475c85]+_0x2e8822['charCodeAt'](_0x475c85%_0x2e8822['length']))%0x100,_0x4d685a=_0x512272[_0x475c85],_0x512272[_0x475c85]=_0x512272[_0x5ad0e7],_0x512272[_0x5ad0e7]=_0x4d685a;}_0x475c85=0x0,_0x5ad0e7=0x0;for(let _0x1eba6a=0x0;_0x1eba6a<_0x557018['length'];_0x1eba6a++){_0x475c85=(_0x475c85+0x1)%0x100,_0x5ad0e7=(_0x5ad0e7+_0x512272[_0x475c85])%0x100,_0x4d685a=_0x512272[_0x475c85],_0x512272[_0x475c85]=_0x512272[_0x5ad0e7],_0x512272[_0x5ad0e7]=_0x4d685a,_0x2b131a+=String['fromCharCode'](_0x557018['charCodeAt'](_0x1eba6a)^_0x512272[(_0x512272[_0x475c85]+_0x512272[_0x5ad0e7])%0x100]);}return _0x2b131a;};lIlili11['IVJHpB']=_0x2c2a6f,_0x91543c=arguments,lIlili11['BLySVb']=!![];}const _0x2314c8=_0x5b4547[0x0],_0x4c8b9c=_0xf475ef+_0x2314c8,_0x1a171f=_0x91543c[_0x4c8b9c];return!_0x1a171f?(lIlili11['IZldRA']===undefined&&(lIlili11['IZldRA']=!![]),_0x146591=lIlili11['IVJHpB'](_0x146591,_0x58ba68),_0x91543c[_0x4c8b9c]=_0x146591):_0x146591=_0x1a171f,_0x146591;},lIlili11(_0x91543c,_0x464dc2);}const lIliIil1=$[iIll1I1(0x233,'9XRU')]()?require('./sendNotify'):'',ll1i1I11=$[iIll1I1(0x1f1,'aD!*')]()?require(iIll1I1(0x3f3,'GVvk')):'',I1I1II1I=require(iIll1I1(0x41c,'a6Hr')),lIIIl1l1=require(iIll1I1(0x23c,'OivD'));let iIilI=[],lI1IlI1='',I11Ill1l,iiI1iili=![],ll1i11II=[],l1l1l1Ii=[],IiiIi1II,Ill1Illi={};$['krtyhot']=![];let iIIll1ll='EcuVpjGGfccY3Ic_1ni83w';const II1iiI=process[iIl
|
2023-10-27 12:53:06 +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"])
|