KR/jd_opencardL340.js

28 lines
84 KiB
JavaScript
Raw Normal View History

2023-10-28 11:39:52 +08:00
/*
10.27-11.17 嗨购狂欢节 惊喜享不停
新增开卡脚本一次性脚本
第一个账号助力作者 其他依次助力CK1
第一个CK失效会退出脚本
入口[ 10.27-11.17 嗨购狂欢节 惊喜享不停]
请求太频繁会被黑ip
过10分钟再执行
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#10.27-11.17 嗨购狂欢节 惊喜享不停
1 1 1 1 * jd_opencardL340.js, tag=10.27-11.17 嗨购狂欢节 惊喜享不停, enabled=true
*/
const $ = new Env('10.27-11.17 嗨购狂欢节 惊喜享不停');
2023-10-28 13:01:26 +08:00
var version_='jsjiami.com.v7';function i1i1I1l1(_0x3689b7,_0x584ff2){const _0x4aca81=l1iI1lll();return i1i1I1l1=function(_0x14fca7,_0x432300){_0x14fca7=_0x14fca7-0xc2;let _0x3afecc=_0x4aca81[_0x14fca7];if(i1i1I1l1['VOwRxe']===undefined){var _0x29256b=function(_0x13cc5b){const _0x5678ad='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x19ad0c='',_0x2b232d='';for(let _0x4876c8=0x0,_0x1dd9de,_0x5e995,_0x3b1dcc=0x0;_0x5e995=_0x13cc5b['charAt'](_0x3b1dcc++);~_0x5e995&&(_0x1dd9de=_0x4876c8%0x4?_0x1dd9de*0x40+_0x5e995:_0x5e995,_0x4876c8++%0x4)?_0x19ad0c+=String['fromCharCode'](0xff&_0x1dd9de>>(-0x2*_0x4876c8&0x6)):0x0){_0x5e995=_0x5678ad['indexOf'](_0x5e995);}for(let _0x457c94=0x0,_0x573df2=_0x19ad0c['length'];_0x457c94<_0x573df2;_0x457c94++){_0x2b232d+='%'+('00'+_0x19ad0c['charCodeAt'](_0x457c94)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2b232d);};const _0x29fa15=function(_0x1f79af,_0x4089b9){let _0x2b79a2=[],_0x2f3a98=0x0,_0xfb838,_0xa91b68='';_0x1f79af=_0x29256b(_0x1f79af);let _0x1e85d9;for(_0x1e85d9=0x0;_0x1e85d9<0x100;_0x1e85d9++){_0x2b79a2[_0x1e85d9]=_0x1e85d9;}for(_0x1e85d9=0x0;_0x1e85d9<0x100;_0x1e85d9++){_0x2f3a98=(_0x2f3a98+_0x2b79a2[_0x1e85d9]+_0x4089b9['charCodeAt'](_0x1e85d9%_0x4089b9['length']))%0x100,_0xfb838=_0x2b79a2[_0x1e85d9],_0x2b79a2[_0x1e85d9]=_0x2b79a2[_0x2f3a98],_0x2b79a2[_0x2f3a98]=_0xfb838;}_0x1e85d9=0x0,_0x2f3a98=0x0;for(let _0x1086d7=0x0;_0x1086d7<_0x1f79af['length'];_0x1086d7++){_0x1e85d9=(_0x1e85d9+0x1)%0x100,_0x2f3a98=(_0x2f3a98+_0x2b79a2[_0x1e85d9])%0x100,_0xfb838=_0x2b79a2[_0x1e85d9],_0x2b79a2[_0x1e85d9]=_0x2b79a2[_0x2f3a98],_0x2b79a2[_0x2f3a98]=_0xfb838,_0xa91b68+=String['fromCharCode'](_0x1f79af['charCodeAt'](_0x1086d7)^_0x2b79a2[(_0x2b79a2[_0x1e85d9]+_0x2b79a2[_0x2f3a98])%0x100]);}return _0xa91b68;};i1i1I1l1['sKkUor']=_0x29fa15,_0x3689b7=arguments,i1i1I1l1['VOwRxe']=!![];}const _0x29fdb1=_0x4aca81[0x0],_0x1cae5b=_0x14fca7+_0x29fdb1,_0x4babf5=_0x3689b7[_0x1cae5b];return!_0x4babf5?(i1i1I1l1['SIbzwc']===undefined&&(i1i1I1l1['SIbzwc']=!![]),_0x3afecc=i1i1I1l1['sKkUor'](_0x3afecc,_0x432300),_0x3689b7[_0x1cae5b]=_0x3afecc):_0x3afecc=_0x4babf5,_0x3afecc;},i1i1I1l1(_0x3689b7,_0x584ff2);}const iIlli1Ii=i1i1I1l1;(function(IIiI1lii,ilIIli1I,Ii1iIIII,iI111i1I,ii1i1Ill,lIiliilI,Il111l){return IIiI1lii=IIiI1lii>>0x2,lIiliilI='hs',Il111l='hs',function(il1lllll,iI1lI1il,IiIIIiii,i11IlI1l,l1i1lli1){const llI1ll1i=i1i1I1l1;i11IlI1l='tfi',lIiliilI=i11IlI1l+lIiliilI,l1i1lli1='up',Il111l+=l1i1lli1,lIiliilI=IiIIIiii(lIiliilI),Il111l=IiIIIiii(Il111l),IiIIIiii=0x0;const iI1l11ii=il1lllll();while(!![]&&--iI111i1I+iI1lI1il){try{i11IlI1l=-parseInt(llI1ll1i(0x3de,'FS3N'))/0x1*(-parseInt(llI1ll1i(0x318,'FS3N'))/0x2)+parseInt(llI1ll1i(0x41b,'8$np'))/0x3+parseInt(llI1ll1i(0x2b6,'A$$X'))/0x4+parseInt(llI1ll1i(0x149,'H!Yx'))/0x5*(-parseInt(llI1ll1i(0x18a,'p]]1'))/0x6)+parseInt(llI1ll1i(0x3c6,'bkly'))/0x7+-parseInt(llI1ll1i(0x1d1,'drwC'))/0x8+parseInt(llI1ll1i(0xe1,'ZdQ7'))/0x9;}catch(iliiIII){i11IlI1l=IiIIIiii;}finally{l1i1lli1=iI1l11ii[lIiliilI]();if(IIiI1lii<=iI111i1I)IiIIIiii?ii1i1Ill?i11IlI1l=l1i1lli1:ii1i1Ill=l1i1lli1:IiIIIiii=l1i1lli1;else{if(IiIIIiii==ii1i1Ill['replace'](/[uVxXBAGgHyNhJefdwKp=]/g,'')){if(i11IlI1l===iI1lI1il){iI1l11ii['un'+lIiliilI](l1i1lli1);break;}iI1l11ii[Il111l](l1i1lli1);}}}}}(Ii1iIIII,ilIIli1I,function(IlillI1l,I1IiIIIi,li1IIlll,iil1lii,llli1i,iii1iIl1,iIIIlIl1){return I1IiIIIi='\x73\x70\x6c\x69\x74',IlillI1l=arguments[0x0],IlillI1l=IlillI1l[I1IiIIIi](''),li1IIlll=`\x72\x65\x76\x65\x72\x73\x65`,IlillI1l=IlillI1l[li1IIlll]('\x76'),iil1lii=`\x6a\x6f\x69\x6e`,(0x144cf6,IlillI1l[iil1lii](''));});}(0x308,0x9ba8a,l1iI1lll,0xc4),l1iI1lll)&&(version_=iIlli1Ii(0x105,'FZK8'));const ilI1i1I1=$[iIlli1Ii(0x2fb,'ek2l')]()?require(iIlli1Ii(0x289,'DJDs')):'',ll1li1l1=require('./function/krgetToken'),I1illll1=require(iIlli1Ii(0x23f,'bkly')),lI1iiiI1=require('./function/jdCommon'),li11il=require('./function/krwxSavePrize');let i1llilIl='https://lzdz-isv.isvjcloud.com',i1lllili={},lI1iIill=[],l1iI='';if($[iIlli1Ii(0x1ef,'eMoP')]()){Object['keys'](ilI1i1I1)[iIlli1Ii(0x
2023-10-28 11:39:52 +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"])