jdpro/jd_opencard0826.js

7 lines
163 KiB
JavaScript
Raw Normal View History

2024-08-25 23:15:39 +00:00
/*
0 0 26 8 * jd_opencard0826.js
*/
const $ = new Env('8.26-9.2 活力开学季 惊喜添动力');
var _0xodI='jsjiami.com.v7';const _0x51ba61=_0x58e8;(function(_0x1d2102,_0x5ca6bc,_0x299e71,_0x151a01,_0xcfe58a,_0x1b1fab,_0x70dea8){return _0x1d2102=_0x1d2102>>0x9,_0x1b1fab='hs',_0x70dea8='hs',function(_0x272be3,_0x2209bf,_0x15fe31,_0x325d8d,_0x1f3592){const _0x35eb3d=_0x58e8;_0x325d8d='tfi',_0x1b1fab=_0x325d8d+_0x1b1fab,_0x1f3592='up',_0x70dea8+=_0x1f3592,_0x1b1fab=_0x15fe31(_0x1b1fab),_0x70dea8=_0x15fe31(_0x70dea8),_0x15fe31=0x0;const _0x18de0b=_0x272be3();while(!![]&&--_0x151a01+_0x2209bf){try{_0x325d8d=-parseInt(_0x35eb3d(0x8bb,'WatW'))/0x1+-parseInt(_0x35eb3d(0x229,'Deid'))/0x2*(-parseInt(_0x35eb3d(0x44b,'re*0'))/0x3)+parseInt(_0x35eb3d(0x19b,'*LNr'))/0x4*(parseInt(_0x35eb3d(0x3d6,'fVuz'))/0x5)+-parseInt(_0x35eb3d(0x307,'gdM*'))/0x6+-parseInt(_0x35eb3d(0x904,'[!!q'))/0x7+parseInt(_0x35eb3d(0x48b,'WatW'))/0x8*(parseInt(_0x35eb3d(0x503,'Usp%'))/0x9)+parseInt(_0x35eb3d(0x29d,'iPxk'))/0xa*(parseInt(_0x35eb3d(0x8d4,'$@LF'))/0xb);}catch(_0x48e020){_0x325d8d=_0x15fe31;}finally{_0x1f3592=_0x18de0b[_0x1b1fab]();if(_0x1d2102<=_0x151a01)_0x15fe31?_0xcfe58a?_0x325d8d=_0x1f3592:_0xcfe58a=_0x1f3592:_0x15fe31=_0x1f3592;else{if(_0x15fe31==_0xcfe58a['replace'](/[fhqAGVwXBKNRrYuEILbnC=]/g,'')){if(_0x325d8d===_0x2209bf){_0x18de0b['un'+_0x1b1fab](_0x1f3592);break;}_0x18de0b[_0x70dea8](_0x1f3592);}}}}}(_0x299e71,_0x5ca6bc,function(_0x24ad6d,_0x4f1c8c,_0x4d4c54,_0x13ed26,_0x38be69,_0x19ab01,_0x24de7d){return _0x4f1c8c='\x73\x70\x6c\x69\x74',_0x24ad6d=arguments[0x0],_0x24ad6d=_0x24ad6d[_0x4f1c8c](''),_0x4d4c54=`\x72\x65\x76\x65\x72\x73\x65`,_0x24ad6d=_0x24ad6d[_0x4d4c54]('\x76'),_0x13ed26=`\x6a\x6f\x69\x6e`,(0x17fb61,_0x24ad6d[_0x13ed26](''));});}(0x19800,0x6b49a,_0x1d9b,0xce),_0x1d9b)&&(_0xodI=0xce);const _0x1abff8=$[_0x51ba61(0x95f,'qMlG')]()?require(_0x51ba61(0x2fa,'ytvj')):'',_0x227327=$[_0x51ba61(0x433,'n&T@')]()?require(_0x51ba61(0x225,'Cr^@')):'',_0x1916cc=require(_0x51ba61(0x88f,'kWo%')),_0x4f892d=require(_0x51ba61(0x7f4,'YwH!')),_0x5cd864=require(_0x51ba61(0x6a2,'G8ov'));if(process[_0x51ba61(0x7c5,'Pv(i')][_0x51ba61(0x85d,'SK%s')])try{require(_0x51ba61(0x6c3,'kWo%')),ccc=require(_0x51ba61(0x91b,'ms$A')),$[_0x51ba61(0x6ba,'n&T@')]=ccc[_0x51ba61(0x8aa,'fVuz')]($[_0x51ba61(0x14b,'*LNr')][_0x51ba61(0x988,'yKyl')]($)),$[_0x51ba61(0x912,'fS1a')]=ccc[_0x51ba61(0x453,'N4sL')]($[_0x51ba61(0x5f7,'])Qu')][_0x51ba61(0x289,'*qeY')]($));}catch{$[_0x51ba61(0x712,'wEDc')](_0x51ba61(0x310,'[!!q')),$[_0x51ba61(0x286,'YB&2')]=$[_0x51ba61(0x698,'iPxk')],$[_0x51ba61(0x8dc,'wEDc')]=$[_0x51ba61(0x5da,'[!!q')];}else $[_0x51ba61(0x978,'aRlk')]=$[_0x51ba61(0x2b4,'ytvj')],$[_0x51ba61(0x1c0,'osz!')]=$[_0x51ba61(0x2f5,'8@l(')];let _0x43ae4b=[],_0x3b886d='',_0x3dd88f='',_0x2b96c5='',_0x35b27b={},_0x165b04=0x0,_0x5c9cfd=process[_0x51ba61(0x8b8,'ytvj')][_0x51ba61(0x3b5,'$@LF')]||'',_0x5e5260=process[_0x51ba61(0x359,'8@l(')][_0x51ba61(0x5ca,'ijFi')]||'',_0x4f8265=process[_0x51ba61(0x173,'&1oo')][_0x51ba61(0x565,'iPxk')+(__filename[_0x51ba61(0x825,'yKyl')](/(\d+\w?).js/)?__filename[_0x51ba61(0x552,'YB&2')](/(\d+\w?).js/)[0x1]:'')+_0x51ba61(0x63c,'Pv(i')]||'',_0x4742da=process[_0x51ba61(0x715,'qMlG')][_0x51ba61(0x242,'&1oo')]?process[_0x51ba61(0x2a1,'9El]')][_0x51ba61(0x438,'n&T@')]:'',_0x452407=process[_0x51ba61(0x6f3,'%KD@')][_0x51ba61(0x48e,'YB&2')]?process[_0x51ba61(0x58d,'$@LF')][_0x51ba61(0x7bf,'%KD@')]:'',_0x5e644b=_0x51ba61(0x5fc,'fVuz'),_0x3e78ee=0x64,_0x453984=_0x51ba61(0x268,'*qeY');$[_0x51ba61(0x85c,'uay6')]=_0x453984[_0x51ba61(0x66a,'a6XP')](/activityId=(.*)&?/)[0x1],$[_0x51ba61(0x4d3,'(UzF')]=_0x453984[_0x51ba61(0x72f,'SK%s')](_0x51ba61(0x5c1,'N[[e'))[0x1]?_0x453984[_0x51ba61(0x7f5,'gdM*')](_0x51ba61(0x653,'ytvj'))[0x1]:_0x51ba61(0x93f,'@3VT'),$[_0x51ba61(0x6f6,'$@LF')]=![],$[_0x51ba61(0x1ca,'Fq]z')]=![],$[_0x51ba61(0x7ff,'YwH!')]=![],$[_0x51ba61(0x5d1,'tBR8')]=0x0,$[_0x51ba61(0x6cc,'$@LF')]=0x0;if($[_0x51ba61(0x489,'9El]')]()){Object[_0x51ba61(0x267,'aRlk')](_0x1abff8)[_0x51ba61(0x5c6,'%KD@')](_0x2f0fbe=>{const _0x405623=_0x51ba61;_0x43ae4b[_0x405623(0x4e7,'])Qu')](_0x1abff8[_0x2f0fbe]);});if(process[_0x51ba61(0x5b0,'kWo%')][_0x51ba61(0x829,'wEDc
function Env(o,t){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((r,i)=>{s.call(this,t,(t,e,s)=>{t?i(t):r(e)})})}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.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))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(r=>{this.get({url:t},(t,e,s)=>r(s))})}runScript(a,o){return new Promise(r=>{let t=this.getdata("@chavy_boxjs_userCfgs.httpapi");t=t&&t.replace(/\n/g,"").trim();var e=(e=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"))?+e:20,[s,i]=(e=o&&o.timeout?o.timeout:e,t.split("@"));this.post({url:`http://${i}/v1/scripting/evaluate`,body:{script_text:a,mock_type:"cron",timeout:e},headers:{"X-Key":s,Accept:"*/*"},timeout:e},(t,e,s)=>r(s))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};this.fs=this.fs||require("fs"),this.path=this.path||require("path");var t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),r=!s&&this.fs.existsSync(e);if(!s&&!r)return{};r=s?t:e;try{return JSON.parse(this.fs.readFileSync(r))}catch(t){return{}}}writedata(){var t,e,s,r,i;this.isNode()&&(this.fs=this.fs||require("fs"),this.path=this.path||require("path"),t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),r=!(s=this.fs.existsSync(t))&&this.fs.existsSync(e),i=JSON.stringify(this.data),!s&&r?this.fs.writeFileSync(e,i):this.fs.writeFileSync(t,i))}lodash_get(t,e,s){let r=t;for(const t of e.replace(/\[(\d+)\]/g,".$1").split("."))if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,r,e){return Object(t)===t&&((r=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g)||[]).slice(0,-1).reduce((t,e,s)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(r[s+1])>>0==+r[s+1]?[]:{},t)[r[r.length-1]]=e),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){var[,s,r]=/^@(.*?)\.(.*?)$/.exec(t);if(s=s?this.getval(s):"")try{const t=JSON.parse(s);e=t?this.lodash_get(t,r,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){var[,r,i]=/^@(.*?)\.(.*?)$/.exec(e),a=this.getval(r),a=r?"null"===a?null:a||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,i,t),s=this.setval(JSON.stringify(e),r)}catch(e){this.lodash_set(a={},i,t),s=this.setval(JSON.stringify(a),r)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueF