KR/jd_opencardL344.js

25 lines
124 KiB
JavaScript
Raw Normal View History

2023-10-31 01:29:16 +08:00
/*
10.30-11.7 大牌惠聚 豪礼多多
开卡脚本,一次性脚本
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
//export opencard_draw="3" //抽奖次数 3
入口[ 10.30-11.7 大牌惠聚 豪礼多多 ]
请求太频繁会被黑ip
请更换IP后再执行脚本
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#10.30-11.7 大牌惠聚 豪礼多多
11 11 11 11 * jd_opencardL344.js, tag=10.30-11.7 大牌惠聚 豪礼多多, enabled=true
*/
const $ = new Env('10.30-11.7 大牌惠聚 豪礼多多')
var version_='jsjiami.com.v7';const lii1i1=iii1II;(function(lI1iI,liIi11,Ili1i,ii1111,il1ilI,lII11I,ii111I){return lI1iI=lI1iI>>0x9,lII11I='hs',ii111I='hs',function(iilIi,ill1li,ililii,il1il1,iilIl){const lI1ii=iii1II;il1il1='tfi',lII11I=il1il1+lII11I,iilIl='up',ii111I+=iilIl,lII11I=ililii(lII11I),ii111I=ililii(ii111I),ililii=0x0;const lII111=iilIi();while(!![]&&--ii1111+ill1li){try{il1il1=-parseInt(lI1ii(0x59d,'OE7p'))/0x1*(-parseInt(lI1ii(0x641,'Sfjx'))/0x2)+parseInt(lI1ii(0x5d7,'Ma7F'))/0x3+parseInt(lI1ii(0x462,'x]Eo'))/0x4*(-parseInt(lI1ii(0xf6,'Ma7F'))/0x5)+parseInt(lI1ii(0x1b6,'^ZEZ'))/0x6*(-parseInt(lI1ii(0x310,'OE7p'))/0x7)+parseInt(lI1ii(0x56c,'ilxq'))/0x8*(-parseInt(lI1ii(0x5fe,'PG2!'))/0x9)+-parseInt(lI1ii(0x3e5,'LUPD'))/0xa+parseInt(lI1ii(0x380,'V1nQ'))/0xb;}catch(I1liI){il1il1=ililii;}finally{iilIl=lII111[lII11I]();if(lI1iI<=ii1111)ililii?il1ilI?il1il1=iilIl:il1ilI=iilIl:ililii=iilIl;else{if(ililii==il1ilI['replace'](/[FuYJlgGptAIxnVrwHhK=]/g,'')){if(il1il1===ill1li){lII111['un'+lII11I](iilIl);break;}lII111[ii111I](iilIl);}}}}}(Ili1i,liIi11,function(ill1ll,Il11iI,ililil,IlIIIl,lI1il,llilI1,IlIIIi){return Il11iI='\x73\x70\x6c\x69\x74',ill1ll=arguments[0x0],ill1ll=ill1ll[Il11iI](''),ililil=`\x72\x65\x76\x65\x72\x73\x65`,ill1ll=ill1ll[ililil]('\x76'),IlIIIl=`\x6a\x6f\x69\x6e`,(0x145261,ill1ll[IlIIIl](''));});}(0x17800,0x922cf,Iii11l,0xbe),Iii11l)&&(version_=lii1i1(0x567,'Qs%!'));const i1liIi=$[lii1i1(0x26d,'JgU9')]()?require(lii1i1(0x2b0,'x]Eo')):'',i1liIl=$[lii1i1(0x1ae,'Fuu1')]()?require(lii1i1(0x2db,'hh&Y')):'';let IiIill=$[lii1i1(0x17b,'j@]$')]()?process[lii1i1(0x3c0,'IyR%')]['opencard_draw']?process[lii1i1(0x349,'C1$y')][lii1i1(0x461,'jm9%')]:'0':$[lii1i1(0x1a6,'TOmS')](lii1i1(0xb1,'3&Dy'))?$['getdata'](lii1i1(0x18a,'8%h4')):'0',li1Iii=$['isNode']()?process[lii1i1(0x4d6,'ilxq')][lii1i1(0x61d,'Q(uV')]?process['env'][lii1i1(0x61d,'Q(uV')]:![]:$[lii1i1(0x1ea,'Ma7F')]('opencard_addCart')?$['getdata']('opencard_addCart'):![];const lIII1=require(lii1i1(0x605,'3&Dy')),llIi11=require(lii1i1(0x554,'XK&L')),IIi11I=require(lii1i1(0x643,'2AAu')),iiIIlI=require(lii1i1(0x2ab,'PG2!'));let IIl1II=lii1i1(0x288,'[T9S'),iill=[],iiIIl1='',llIi1I={};if($[lii1i1(0x238,'0qTZ')]()){Object[lii1i1(0x2f7,'&TxO')](i1liIi)[lii1i1(0x3d8,'8%h4')](li1IlI=>{const lIIIiI=lii1i1;iill[lIIIiI(0x324,'Wu!N')](i1liIi[li1IlI]);});if(process['env'][lii1i1(0x32d,'5wd[')]&&process[lii1i1(0x168,'jl0g')][lii1i1(0x279,'j3s)')]===lii1i1(0x319,']]Bq'))console['log']=()=>{};}else iill=[$[lii1i1(0x19f,'n3%O')](lii1i1(0x4ae,'JgU9')),$[lii1i1(0x3b1,'LDf*')]('CookieJD2'),...iiiiIl($[lii1i1(0x1c0,'5wd[')]('CookiesJD')||'[]')[lii1i1(0xea,'y)Cn')](iiI1i=>iiI1i[lii1i1(0x378,'KUYM')])]['filter'](iiI1l=>!!iiI1l);function Iii11l(){const I1IiIl=(function(){return[...[version_,'VnxjpsGjFiJwIaJmir.uYcom.rwlvG7HhKuAlgHt==','EmknwCkeW7S','fLWWcIW','WPFdNutdQmkp','WOuWWQ9lWRa','l0ejWRtdJq','WPBcUdddQCoLaL9nmmkgWPFdJSotteVdUmoc','WPFcR8o6qSoP','WPGyWRv3WQK','eszgWRRcR1KMkmoqW55vo8o7CYrHW4Prt8o6qSk2W7xdK0RcOCoBW4DSW5FcOtddK8oTwCoPjSkdW7SowSoHWPK/W5vVBSoBW47cNmkUW5ZdOw/dIwLOWR0EzMBcSg1tzSkvEh3cRJddNSklWQy+W43cN3uMhgC','WQZcGSkVymkw','5QY+772M5B+65yUb5P6a','frPvWQhcSW','WRxcMmkSsmkpWQuQ','W4/dHaFcLaa','Fc8zwdG','W4vtEmoarqTkDSkoaCog','gqRcPmo+nq','B8ocy8o4gq','5AEr5zkz5zoI56wW77+i','WP/dVcS','W5ldNWdcOaC','Bq/dNZyA','t8oAB8oHWQpdVbRcRddcGmkTW6S','DWikWOSnnCobeCoQk8oHW6zGWQG','i8osWQ/dOmkaW7RcRSkECSokW6/cLq','dWFcHs/dSCkmWQ4cW711oCk2dCoBWOBcNwpdKq','5RUU5OQD5PYN5l6v','wq7dHIKX','mH7cIJ3dShCW','pKGyWR0moCoEeCoGe8kVW6fNWQvJW5xcPq','BX/dMSoK','zc0DuI8','W5ZdVe5bW5vAWPe','BwFcPdZdUmklW7Ppv8opoSoDsG','W5f0WPBdRSkHW4e','WOT0EKVcQNm','nSojWRpdM8kDW5ZcRSkd','WQ3dS8oYkNq','W5FcMSkSW5yB','WRNdH8k8WPG1Fq','CW3dPru','DZGDttW','rWb+adbbWOlcT8oSW6GZiSkUALxdU1TKF1xdUCo0W4xcMCkYk1LAkvW3W4ZdMW','tmofBq','tsxdNCouW7G','WQxdGSk7WOucBN/dSCoGWOTVW6W','WPnOW5DSWQxdRa','ySolhSkEBa','WQ8enIqaWP5NWQddJ0TJW4jqAa','WPVcHsldVSoD','WPNdO8oBcfZcPSo1hmkhW4DzWPL8oW','WPpdU8k0WQC1','WO/cM8oOle9Chmk5','W5qYWOKQW5RcVmosW7ewWP4zWP0s','Ea/dNCoEW6ZdUuRcICkYWR8WW69GWRlcOmo3W4O','sCoQyCobdq','WOJdMaldLwy','5lUs5AAa
// 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"])