KR/jd_zzhbhelp.js

21 lines
70 KiB
JavaScript
Raw Normal View History

2023-09-19 21:22:48 +08:00
/*
#京东版-转赚红包助力
入口京东APP 搜索 玩一玩 转赚红包
变量
krzzhbcode //指定助力码
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_tj_cxjhelp.js, tag=京东版-转赚红包助力, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true*/
const $ = new Env('京东版-转赚红包助力');
2023-10-26 22:52:41 +08:00
var version_='jsjiami.com.v7';const IlilIIi=l11iIiil;(function(lliIiI1l,IIiIIiIl,IliilII1,i111Ii1,Ilil1I1i,I11I1llI,i1lil1lI){return lliIiI1l=lliIiI1l>>0x8,I11I1llI='hs',i1lil1lI='hs',function(iIl1l111,IIlI1lI1,iil1lIiI,ill1iII1,iI1IIlI){const IIili1lI=l11iIiil;ill1iII1='tfi',I11I1llI=ill1iII1+I11I1llI,iI1IIlI='up',i1lil1lI+=iI1IIlI,I11I1llI=iil1lIiI(I11I1llI),i1lil1lI=iil1lIiI(i1lil1lI),iil1lIiI=0x0;const Iii1i1ll=iIl1l111();while(!![]&&--i111Ii1+IIlI1lI1){try{ill1iII1=parseInt(IIili1lI(0x2e4,'IP@k'))/0x1+-parseInt(IIili1lI(0x182,'rLob'))/0x2+-parseInt(IIili1lI(0x317,'*M7M'))/0x3*(-parseInt(IIili1lI(0x278,'9En]'))/0x4)+parseInt(IIili1lI(0x1ba,'*M7M'))/0x5+-parseInt(IIili1lI(0x164,'IuQ6'))/0x6*(parseInt(IIili1lI(0x31d,'9En]'))/0x7)+-parseInt(IIili1lI(0x2f3,'9En]'))/0x8*(parseInt(IIili1lI(0x20c,'yz^5'))/0x9)+parseInt(IIili1lI(0x212,'RfT['))/0xa*(parseInt(IIili1lI(0x198,'dk*C'))/0xb);}catch(llIIii1I){ill1iII1=iil1lIiI;}finally{iI1IIlI=Iii1i1ll[I11I1llI]();if(lliIiI1l<=i111Ii1)iil1lIiI?Ilil1I1i?ill1iII1=iI1IIlI:Ilil1I1i=iI1IIlI:iil1lIiI=iI1IIlI;else{if(iil1lIiI==Ilil1I1i['replace'](/[dKufgCJtGhYkNrqIwnXOWR=]/g,'')){if(ill1iII1===IIlI1lI1){Iii1i1ll['un'+I11I1llI](iI1IIlI);break;}Iii1i1ll[i1lil1lI](iI1IIlI);}}}}}(IliilII1,IIiIIiIl,function(ilII11il,IiI111,I1IlIl1i,iIli1I,I11I1il,I1iI1Ii1,lilI1lli){return IiI111='\x73\x70\x6c\x69\x74',ilII11il=arguments[0x0],ilII11il=ilII11il[IiI111](''),I1IlIl1i=`\x72\x65\x76\x65\x72\x73\x65`,ilII11il=ilII11il[I1IlIl1i]('\x76'),iIli1I=`\x6a\x6f\x69\x6e`,(0x14497a,ilII11il[iIli1I](''));});}(0xc000,0xc6dfb,iIlIi111,0xc2),iIlIi111)&&(version_=IlilIIi(0x2b7,'IM9c'));const lIIIIi1l=$['isNode']()?require('./sendNotify'):'',I11i11ii=$[IlilIIi(0xf3,'))V)')]()?require(IlilIIi(0x1de,'D8r@')):'',lii1iiI=require(IlilIIi(0x2fc,'Q)Gw')),iiilIiI1=require('./function/jdCommon');let i1ilil11=[],lI1iIlI='',ll1ilill,i1iI11ii=![],lliiliI=[],l1i1Ilii=[],I1iIlili,il11lI={};$[IlilIIi(0x289,'79LX')]=![];let Il11IlIi='3orGfh1YkwNLksxOcN8zWQ';const iiiIi1I1=process[IlilIIi(0x1b4,'igZs')]['JD_PROXY_OPEN']==='true',ll1IilI=process['env']['JD_PROXY_TUNNRL'],Iii11I1=process[IlilIIi(0x2fa,'IP@k')][IlilIIi(0x327,'[3^a')],il1i1i1l=process['env']['JD_NO_PROXY']||'127.0.0.1,*.baidu.com',Ill1llI='2';let IIl1llll=parseInt(Ill1llI)*0x3e8;ll1IilI&&(IIl1llll=0x64);let Iillil1i='',liI1111I=0x0,il11III1=![];if(iiiIi1I1){il11III1=!![],require(IlilIIi(0x143,'@PTE'));if(Iii11I1){console[IlilIIi(0x248,'b4oc')]('☑️\x20API地址代理已开启'),console[IlilIIi(0x2b5,'IM9c')](IlilIIi(0x1ef,'cE]0')+Iii11I1+'\x0a');let lliiiiil=/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/g;global[IlilIIi(0x1d3,'B(w[')][IlilIIi(0x1bd,'Xu]K')]=lliiiiil[IlilIIi(0x2ca,'m#Z9')](Iii11I1)[0x0]+','+il1i1i1l;}else{if(ll1IilI)global[IlilIIi(0x245,'X*Oo')][IlilIIi(0x199,'DwZ^')]=ll1IilI,global[IlilIIi(0x2a2,'IM9c')][IlilIIi(0x1e5,'B(w[')]=''+il1i1i1l,console['log']('☑️\x20代理池代理已开启'),console['log'](IlilIIi(0x18a,'f]7z')+global[IlilIIi(0x359,'L1CY')][IlilIIi(0xe9,'sM45')]+'\x0a');else{const Ii11iIil=IlilIIi(0x313,'qm]E')['split']('|');let iI11I1l1=0x0;while(!![]){switch(Ii11iIil[iI11I1l1++]){case'0':console['log']('⚠\x20API地址变量export\x20JD_PROXY_URL=\x27http://api.xxx.xxx\x27\x0a');continue;case'1':console[IlilIIi(0x13c,'sZDD')](IlilIIi(0x34a,'AtgR'));continue;case'2':return;case'3':console[IlilIIi(0x250,'J!ND')]('⚠\x20请知晓代理地址仅支持代理池模式(auto-proxy-pool)\x0a');continue;case'4':console['log'](IlilIIi(0x2bb,'IM9c'));continue;}break;}}}}else console[IlilIIi(0x220,'L1CY')](IlilIIi(0x1c5,'IM9c')),console[IlilIIi(0x249,'o@Og')]('⚠\x20开启代理变量export\x20JD_PROXY_OPEN=\x27true\x27\x20\x0a');if($[IlilIIi(0x165,'cE]0')]()){Object[IlilIIi(0x2a6,'qm]E')](I11i11ii)['forEach'](ii1liI1i=>{const li1ili1I=IlilIIi;i1ilil11[li1ili1I(0x151,'6v@@')](I11i11ii[ii1liI1i]);});if(process['env'][IlilIIi(0x1ce,'6v@@')]&&process[IlilIIi(0x142,'Y[Z*')][IlilIIi(0x203,'ZVs!')]===IlilIIi(0xe6,'9En]'))console[IlilIIi(0x30f,'Y[Z*')]=()=>{};}else i1ilil11=[$[IlilIIi(0x266,'f]7z')](IlilIIi(0x2c3,'S
2023-09-19 21:22:48 +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"])