jdpro/jd_opencard0724.js

7 lines
110 KiB
JavaScript
Raw Normal View History

2024-07-24 03:55:19 +00:00
/*
0 0 24 7 * jd_opencard0724.js
*/
const $ = new Env('7.24-7.31 为热爱助威 赢惊喜好礼');
var _0xodW='jsjiami.com.v7';const _0x1f1830=_0x1741;(function(_0x322ef8,_0x51086b,_0x163c22,_0xc5888b,_0x582a20,_0x55f6c5,_0x5707b7){return _0x322ef8=_0x322ef8>>0x2,_0x55f6c5='hs',_0x5707b7='hs',function(_0x4eb532,_0x5bc2f6,_0x382205,_0x4fd931,_0x55069b){const _0x366f10=_0x1741;_0x4fd931='tfi',_0x55f6c5=_0x4fd931+_0x55f6c5,_0x55069b='up',_0x5707b7+=_0x55069b,_0x55f6c5=_0x382205(_0x55f6c5),_0x5707b7=_0x382205(_0x5707b7),_0x382205=0x0;const _0x184127=_0x4eb532();while(!![]&&--_0xc5888b+_0x5bc2f6){try{_0x4fd931=-parseInt(_0x366f10(0x684,'7ugy'))/0x1*(parseInt(_0x366f10(0x6f7,'EOJd'))/0x2)+parseInt(_0x366f10(0x380,'SvEI'))/0x3+parseInt(_0x366f10(0x572,'G^95'))/0x4+-parseInt(_0x366f10(0x410,'D$Cq'))/0x5+parseInt(_0x366f10(0x4b6,'P4v7'))/0x6+-parseInt(_0x366f10(0x554,'^*&Y'))/0x7+parseInt(_0x366f10(0x5a3,'sjuo'))/0x8*(parseInt(_0x366f10(0x5b1,'aGkP'))/0x9);}catch(_0x4ad4fd){_0x4fd931=_0x382205;}finally{_0x55069b=_0x184127[_0x55f6c5]();if(_0x322ef8<=_0xc5888b)_0x382205?_0x582a20?_0x4fd931=_0x55069b:_0x582a20=_0x55069b:_0x382205=_0x55069b;else{if(_0x382205==_0x582a20['replace'](/[KuyUWgHNnQMRXGpVCLA=]/g,'')){if(_0x4fd931===_0x5bc2f6){_0x184127['un'+_0x55f6c5](_0x55069b);break;}_0x184127[_0x5707b7](_0x55069b);}}}}}(_0x163c22,_0x51086b,function(_0xcb468e,_0x445228,_0x5f0e28,_0x506c41,_0x3105a5,_0x31776c,_0x35735f){return _0x445228='\x73\x70\x6c\x69\x74',_0xcb468e=arguments[0x0],_0xcb468e=_0xcb468e[_0x445228](''),_0x5f0e28=`\x72\x65\x76\x65\x72\x73\x65`,_0xcb468e=_0xcb468e[_0x5f0e28]('\x76'),_0x506c41=`\x6a\x6f\x69\x6e`,(0x17a790,_0xcb468e[_0x506c41](''));});}(0x2fc,0x25083,_0x7117,0xc1),_0x7117)&&(_0xodW=0x1418);const _0x488db0=(function(){const _0x4f0162=_0x1741,_0x2fcfd3={'SqutK':function(_0x171189,_0xd36597){return _0x171189!==_0xd36597;},'swblr':_0x4f0162(0x4d1,'n$wo'),'wzHqc':_0x4f0162(0x557,'CvIM')};let _0x17a025=!![];return function(_0xd6173f,_0x15bdf7){const _0x1f87a2=_0x17a025?function(){const _0x1df20b=_0x1741;if(_0x2fcfd3[_0x1df20b(0x6ba,'bzab')](_0x2fcfd3[_0x1df20b(0x3f5,'0(d9')],_0x2fcfd3[_0x1df20b(0x209,'vpgm')])){if(_0x15bdf7){const _0x59fa65=_0x15bdf7[_0x1df20b(0x658,'7ugy')](_0xd6173f,arguments);return _0x15bdf7=null,_0x59fa65;}}else return;}:function(){};return _0x17a025=![],_0x1f87a2;};}()),_0x291e7c=_0x488db0(this,function(){const _0x3295dd=_0x1741,_0xe55632={'QtpiO':_0x3295dd(0x4fa,'R5cW')};return _0x291e7c[_0x3295dd(0x507,'wRNa')]()[_0x3295dd(0x69c,'B$A0')](_0xe55632[_0x3295dd(0x202,'bzab')])[_0x3295dd(0x67e,'hSN$')]()[_0x3295dd(0x45a,'3%Su')](_0x291e7c)[_0x3295dd(0x4ba,'CvIM')](_0xe55632[_0x3295dd(0x531,'QtVW')]);});_0x291e7c();const _0x47f5c1=$[_0x1f1830(0x521,'ux2$')]()?require(_0x1f1830(0x3b5,'X5lo')):'',_0x4f6a3b=$[_0x1f1830(0x6b4,'^t#N')]()?require(_0x1f1830(0x579,'3%Su')):'',_0x5c9a65=require(_0x1f1830(0x3dc,'wRNa')),_0x45de2a=require(_0x1f1830(0x368,'7WuC')),_0x5cad91=process[_0x1f1830(0x516,'bZ)y')][_0x1f1830(0x69a,'MEAw')]||0x5;if(process[_0x1f1830(0x23a,'SJ9J')][_0x1f1830(0x703,'#hrR')])try{require(_0x1f1830(0x62c,'^t#N')),ccc=require(_0x1f1830(0x471,'ux2$')),$[_0x1f1830(0x5d7,'UPg]')]=ccc[_0x1f1830(0x281,'B$A0')]($[_0x1f1830(0x1b8,'vpgm')][_0x1f1830(0x5e1,'#hrR')]($)),$[_0x1f1830(0x321,'BZ$O')]=ccc[_0x1f1830(0x335,'aGkP')]($[_0x1f1830(0x622,'eUg)')][_0x1f1830(0x5ce,'0(d9')]($));}catch{$[_0x1f1830(0x6a3,'7ugy')](_0x1f1830(0x64c,'Up$x')),$[_0x1f1830(0x4c5,'P4v7')]=$[_0x1f1830(0x1fe,'CvIM')],$[_0x1f1830(0x6e2,'EOJd')]=$[_0x1f1830(0x6fb,'MEAw')];}else $[_0x1f1830(0x5e4,'sjuo')]=$[_0x1f1830(0x34b,'kHaM')],$[_0x1f1830(0x224,'5AkJ')]=$[_0x1f1830(0x229,'bZ)y')];let _0x29b174=[],_0x34a500='',_0x21d3b1=0x0;if($[_0x1f1830(0x3c1,'EOJd')]()){Object[_0x1f1830(0x362,'hSN$')](_0x47f5c1)[_0x1f1830(0x525,'cXjk')](_0x40d47b=>{const _0x13ee8b=_0x1f1830;_0x29b174[_0x13ee8b(0x2ef,'*&8u')](_0x47f5c1[_0x40d47b]);});if(process[_0x1f1830(0x2a1,'aGkP')][_0x1f1830(0x428,'sjuo')]&&process[_0x1f1830(0x31e,'(Oso')][_0x1f1830(0x422,'aGkP')]===_0x1f1830(0x1df,'bzab'))console[_0x1f1830(0x216,'R4RT')]=()=>{};}else _0x29b174=[$[_0x1f1830(0x522,'UPg]')](_0x1f1830(0x661,'%9^x')),$[_0x1f1830(0x6e1,'C7j%')](_0x1f1830(0x4cd,'hSN$')),...
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