KR/jd_lzkj_ttljd_exchange.js

28 lines
71 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/*
6.21-7.20 天天签到领京豆兑换
入口[ 6.21-7.20 天天签到领京豆兑换 ]
每天晚上 9 开始兑换 自行定时
请求太频繁会被黑ip
过10分钟再执行
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#6.21-7.20 天天签到领京豆兑换
1 1 1 1 * jd_lzkj_ttljd_exchange, tag=6.21-7.20 天天签到领京豆兑换, enabled=true
*/
const $ = new Env('6.21-7.20 天天签到领京豆兑换')
var version_='jsjiami.com.v7';const iI1lIiiI=i111liI1;(function(il111lIl,IlI1iIIi,liii1i1,II1IIllI,Il1ilI1i,lIliiliI,il1lIIII){return il111lIl=il111lIl>>0x7,lIliiliI='hs',il1lIIII='hs',function(l1l1illi,Iiiili1i,l1iIl11,III1lI,i11I1liI){const l1lIi11l=i111liI1;III1lI='tfi',lIliiliI=III1lI+lIliiliI,i11I1liI='up',il1lIIII+=i11I1liI,lIliiliI=l1iIl11(lIliiliI),il1lIIII=l1iIl11(il1lIIII),l1iIl11=0x0;const I11llIli=l1l1illi();while(!![]&&--II1IIllI+Iiiili1i){try{III1lI=-parseInt(l1lIi11l(0x272,'kZXs'))/0x1*(parseInt(l1lIi11l(0x285,'wj&w'))/0x2)+parseInt(l1lIi11l(0x2dd,'N1B['))/0x3+-parseInt(l1lIi11l(0x1fe,'c8cv'))/0x4*(parseInt(l1lIi11l(0x296,'arKt'))/0x5)+-parseInt(l1lIi11l(0x34b,'osUW'))/0x6*(parseInt(l1lIi11l(0x307,'iz%c'))/0x7)+parseInt(l1lIi11l(0x266,'osUW'))/0x8+-parseInt(l1lIi11l(0x246,'uQrZ'))/0x9*(-parseInt(l1lIi11l(0x299,'(Ho1'))/0xa)+-parseInt(l1lIi11l(0x2e1,')RPr'))/0xb*(-parseInt(l1lIi11l(0x28c,'F4*c'))/0xc);}catch(I1iIiili){III1lI=l1iIl11;}finally{i11I1liI=I11llIli[lIliiliI]();if(il111lIl<=II1IIllI)l1iIl11?Il1ilI1i?III1lI=i11I1liI:Il1ilI1i=i11I1liI:l1iIl11=i11I1liI;else{if(l1iIl11==Il1ilI1i['replace'](/[WOfQynVPJMTLqXhwpr=]/g,'')){if(III1lI===Iiiili1i){I11llIli['un'+lIliiliI](i11I1liI);break;}I11llIli[il1lIIII](i11I1liI);}}}}}(liii1i1,IlI1iIIi,function(I1liiI1i,li1iiliI,illl1II,Il1Il11I,IlIlllIl,i1lilil,I1iiiI){return li1iiliI='\x73\x70\x6c\x69\x74',I1liiI1i=arguments[0x0],I1liiI1i=I1liiI1i[li1iiliI](''),illl1II='\x72\x65\x76\x65\x72\x73\x65',I1liiI1i=I1liiI1i[illl1II]('\x76'),Il1Il11I='\x6a\x6f\x69\x6e',(0x131e55,I1liiI1i[Il1Il11I](''));});}(0x5e00,0xb6e86,IiIllIil,0xbe),IiIllIil)&&(version_=IiIllIil);const jdCookieNode=$[iI1lIiiI(0x229,')4At')]()?require(iI1lIiiI(0x127,'GT)B')):'',notify=$[iI1lIiiI(0x102,'wCIM')]()?require(iI1lIiiI(0x2ff,'(Ho1')):'',getToken=require('./function/krgetToken'),getH5st=require(iI1lIiiI(0x22d,'kZXs'));let domains=iI1lIiiI(0x1db,'Mz%h'),lz_cookie={},cookiesArr=[],cookie='';if($[iI1lIiiI(0x109,'N1B[')]()){Object[iI1lIiiI(0x1a3,'q&]T')](jdCookieNode)[iI1lIiiI(0x2f6,'pT#q')](ill1iIll=>{const iiiIII1=iI1lIiiI;cookiesArr[iiiIII1(0x1e5,'3z)M')](jdCookieNode[ill1iIll]);});if(process[iI1lIiiI(0x206,'osUW')][iI1lIiiI(0xfd,'arKt')]&&process[iI1lIiiI(0x2d4,'r50i')][iI1lIiiI(0xea,'Jeq$')]===iI1lIiiI(0x12f,'Jeq$'))console['log']=()=>{};}else cookiesArr=[$[iI1lIiiI(0x2d8,'O89&')](iI1lIiiI(0x15b,'GT)B')),$[iI1lIiiI(0x263,'c8cv')](iI1lIiiI(0x200,'kZXs')),...jsonParse($[iI1lIiiI(0x23e,'vG^t')](iI1lIiiI(0x301,'arKt'))||'[]')[iI1lIiiI(0x10a,'Jeq$')](iIlii1li=>iIlii1li['cookie'])][iI1lIiiI(0x140,'XzEl')](il1llll=>!!il1llll);allMessage='',message='',$['hotFlag']=![],$[iI1lIiiI(0x115,'vG^t')]=![],$['activityEnd']=![];let actorUuidArr=[],lz_jdpin_token_cookie='',activityCookie='',lzopen=process[iI1lIiiI(0x2d6,'tMpY')][iI1lIiiI(0x103,'3z)M')]?process[iI1lIiiI(0x2e2,'XzEl')]['JD_LZ_OPENCARD']:iI1lIiiI(0x1aa,'s#wq'),whitelist='',blacklist='';$[iI1lIiiI(0x1ca,'H*XM')]=process[iI1lIiiI(0x2bb,'yaod')][iI1lIiiI(0x1ac,'H*XM')]||whitelist,$[iI1lIiiI(0x8b,')RPr')]=process[iI1lIiiI(0xa1,'e49M')][iI1lIiiI(0x2c2,'BFiw')]||blacklist,getWhitelist(),getBlacklist(),$['errMsgPin']=[];let NowHour=new Date()[iI1lIiiI(0x244,'e49M')](),activityUrl='https://lzdz-isv.isvjcloud.com/m/688693/dzbddbeb43bfff40179190eb6a8e9b';!(async()=>{const lIiIIlI1=iI1lIiiI,IIiIIiIl={'dgsnE':lIiIIlI1(0x20b,'uYw['),'pADdf':'入口:\x0ahttps://lzdz-isv.isvjcloud.com/m/688693/dzbddbeb43bfff40179190eb6a8e9b','bzvyO':function(iIi11Iii,llIi1I1l){return iIi11Iii<llIi1I1l;},'feQfr':function(ilII1Il1,il1i1llI){return ilII1Il1===il1i1llI;},'zaies':lIiIIlI1(0xe4,'Mz%h'),'cVMcp':function(i11IIIi,l1I1ll1I){return i11IIIi+l1I1ll1I;},'PSPjs':lIiIIlI1(0x175,'(Ho1'),'fpjaq':'*********\x0a','kjyht':function(I1llilIi){return I1llilIi();},'hOuOE':function(i1lIIIli,Ill1iii1){return i1lIIIli!==Ill1iii1;},'FvGKT':lIiIIlI1(0x1dc,'(Ho1')};if(!cookiesArr[0x0]){$[lIiIIlI1(0x1ea,'Mz%h')]($['name'],IIiIIiIl[lIiIIlI1(0x25f,'XzEl')],lIiIIlI1(0x142,'h&j#'),{'open-url':lIiIIlI1(0x315,'pT#q')});return;}$[lIiIIlI1(0x148,'osUW')]='dzbddbeb43bfff40179190eb6a8e9b',$[lIiIIlI1(0xd4,'P@
// 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"])