KR/jd_opencardL341.js

25 lines
126 KiB
JavaScript
Raw Normal View History

2023-10-30 00:31:55 +08:00
/*
10.30-11.6 品质生活 美力全开
开卡脚本,一次性脚本
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
//export opencard_draw="3" //抽奖次数 3
入口[ 10.30-11.6 品质生活 美力全开 ]
请求太频繁会被黑ip
请更换IP后再执行脚本
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#10.30-11.6 品质生活 美力全开
11 11 11 11 * jd_opencardL339.js, tag=10.30-11.6 品质生活 美力全开, enabled=true
*/
const $ = new Env('10.30-11.6 品质生活 美力全开')
var version_='jsjiami.com.v7';const l1lli1I1=l1Iillil;(function(l1IIliIi,Il1IIii1,iI11l1l1,ll1li1il,iIIll11,iIll1Ill,ilii11Il){return l1IIliIi=l1IIliIi>>0x7,iIll1Ill='hs',ilii11Il='hs',function(iIIiiIli,iIIlI1Ii,ll1l1I,l1iI11i,ililIiil){const liiIl1il=l1Iillil;l1iI11i='tfi',iIll1Ill=l1iI11i+iIll1Ill,ililIiil='up',ilii11Il+=ililIiil,iIll1Ill=ll1l1I(iIll1Ill),ilii11Il=ll1l1I(ilii11Il),ll1l1I=0x0;const Iiil11lI=iIIiiIli();while(!![]&&--ll1li1il+iIIlI1Ii){try{l1iI11i=parseInt(liiIl1il(0x1e3,'lCaC'))/0x1*(parseInt(liiIl1il(0x2e9,'N45Y'))/0x2)+parseInt(liiIl1il(0x225,'[%h!'))/0x3+-parseInt(liiIl1il(0x49f,'1QfU'))/0x4+-parseInt(liiIl1il(0x3d7,'D*B4'))/0x5*(parseInt(liiIl1il(0x289,'4&^3'))/0x6)+-parseInt(liiIl1il(0x567,'*0&o'))/0x7+-parseInt(liiIl1il(0x26e,'fVC9'))/0x8+-parseInt(liiIl1il(0xd1,'4&^3'))/0x9*(-parseInt(liiIl1il(0x4c1,'T611'))/0xa);}catch(ilI1IIi1){l1iI11i=ll1l1I;}finally{ililIiil=Iiil11lI[iIll1Ill]();if(l1IIliIi<=ll1li1il)ll1l1I?iIIll11?l1iI11i=ililIiil:iIIll11=ililIiil:ll1l1I=ililIiil;else{if(ll1l1I==iIIll11['replace'](/[WGYMTIqJSRQhpPBKEwFHlk=]/g,'')){if(l1iI11i===iIIlI1Ii){Iiil11lI['un'+iIll1Ill](ililIiil);break;}Iiil11lI[ilii11Il](ililIiil);}}}}}(iI11l1l1,Il1IIii1,function(IiIIIIii,IillIlli,Ii1lIi1l,lII1lili,lill1Il1,IIIii,iIl1llii){return IillIlli='\x73\x70\x6c\x69\x74',IiIIIIii=arguments[0x0],IiIIIIii=IiIIIIii[IillIlli](''),Ii1lIi1l=`\x72\x65\x76\x65\x72\x73\x65`,IiIIIIii=IiIIIIii[Ii1lIi1l]('\x76'),lII1lili=`\x6a\x6f\x69\x6e`,(0x145020,IiIIIIii[lII1lili](''));});}(0x6080,0xc1d81,li1l1lIi,0xc3),li1l1lIi)&&(version_=l1lli1I1(0x3d8,'lCaC'));const IlIllI1I=$[l1lli1I1(0x3a6,'[%h!')]()?require(l1lli1I1(0x19b,'*uRp')):'',iiilliII=$[l1lli1I1(0x120,'pD@n')]()?require(l1lli1I1(0x42e,'I1c[')):'';function l1Iillil(_0x2b78ee,_0x453589){const _0x280d4e=li1l1lIi();return l1Iillil=function(_0x273245,_0x466765){_0x273245=_0x273245-0x75;let _0x5c4ef3=_0x280d4e[_0x273245];if(l1Iillil['HugLEs']===undefined){var _0x4afcaf=function(_0x447095){const _0x9d234b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x43848d='',_0x1b21bc='';for(let _0x3ef93a=0x0,_0x4b5f6c,_0x31d30a,_0x12297c=0x0;_0x31d30a=_0x447095['charAt'](_0x12297c++);~_0x31d30a&&(_0x4b5f6c=_0x3ef93a%0x4?_0x4b5f6c*0x40+_0x31d30a:_0x31d30a,_0x3ef93a++%0x4)?_0x43848d+=String['fromCharCode'](0xff&_0x4b5f6c>>(-0x2*_0x3ef93a&0x6)):0x0){_0x31d30a=_0x9d234b['indexOf'](_0x31d30a);}for(let _0x5bf88d=0x0,_0x3468b6=_0x43848d['length'];_0x5bf88d<_0x3468b6;_0x5bf88d++){_0x1b21bc+='%'+('00'+_0x43848d['charCodeAt'](_0x5bf88d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1b21bc);};const _0x691054=function(_0x25ba34,_0x28e919){let _0x4a54bf=[],_0x3b8596=0x0,_0x3960a4,_0x4b349b='';_0x25ba34=_0x4afcaf(_0x25ba34);let _0x18aee7;for(_0x18aee7=0x0;_0x18aee7<0x100;_0x18aee7++){_0x4a54bf[_0x18aee7]=_0x18aee7;}for(_0x18aee7=0x0;_0x18aee7<0x100;_0x18aee7++){_0x3b8596=(_0x3b8596+_0x4a54bf[_0x18aee7]+_0x28e919['charCodeAt'](_0x18aee7%_0x28e919['length']))%0x100,_0x3960a4=_0x4a54bf[_0x18aee7],_0x4a54bf[_0x18aee7]=_0x4a54bf[_0x3b8596],_0x4a54bf[_0x3b8596]=_0x3960a4;}_0x18aee7=0x0,_0x3b8596=0x0;for(let _0x489542=0x0;_0x489542<_0x25ba34['length'];_0x489542++){_0x18aee7=(_0x18aee7+0x1)%0x100,_0x3b8596=(_0x3b8596+_0x4a54bf[_0x18aee7])%0x100,_0x3960a4=_0x4a54bf[_0x18aee7],_0x4a54bf[_0x18aee7]=_0x4a54bf[_0x3b8596],_0x4a54bf[_0x3b8596]=_0x3960a4,_0x4b349b+=String['fromCharCode'](_0x25ba34['charCodeAt'](_0x489542)^_0x4a54bf[(_0x4a54bf[_0x18aee7]+_0x4a54bf[_0x3b8596])%0x100]);}return _0x4b349b;};l1Iillil['JfIoOx']=_0x691054,_0x2b78ee=arguments,l1Iillil['HugLEs']=!![];}const _0x3f3427=_0x280d4e[0x0],_0x1b3c10=_0x273245+_0x3f3427,_0x383bed=_0x2b78ee[_0x1b3c10];return!_0x383bed?(l1Iillil['HFwkXi']===undefined&&(l1Iillil['HFwkXi']=!![]),_0x5c4ef3=l1Iillil['JfIoOx'](_0x5c4ef3,_0x466765),_0x2b78ee[_0x1b3c10]=_0x5c4ef3):_0x5c4ef3=_0x383bed,_0x5c4ef3;},l1Iillil(_0x2b78ee,_0x453589);}let IiliiI1I=$['isNode']()?process[l1lli1I1(0x412,'3*HC')][l1lli1I1(0x4ef,'CUWP')]?process[l1lli1I1(0x32c,'K21t')][l1lli1I1(0x2a4,'Azfw')]:'0':$['getdata'](l1lli1I1(0x4e9,'*uRp'))?$[l1lli1I1(0x15
// 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"])