mirror of https://github.com/6dylan6/jdpro.git
7 lines
148 KiB
JavaScript
7 lines
148 KiB
JavaScript
|
/*
|
||
|
0 0 31 10 * jd_opencard1031.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('10.31-11.8 大牌钜惠 好物联盟');
|
||
|
function qHimhsS(){}var FxWGy1=Object['defineProperty'],ZXBkE6h,FDsEznx,dtGufs,x8dUnYn,HrQoUd,OJlTLSv,yvN6A_,vEByu4,AdsZ6Jw,VCwdgZf,x38nvtQ,wxCVTaI,I42qrY,GPjtev_,g0SEty,WisPdv,nwVHEsb,NP6Rua,C1DhEd,Py48xIz;function Da_BZd(qHimhsS){return ZXBkE6h[qHimhsS>0x1d3?qHimhsS-0x4e:qHimhsS-0x56]}ZXBkE6h=MPIubM();function PImwzx(qHimhsS,FxWGy1){var dtGufs=UvZXQA(qHimhsS=>{return ZXBkE6h[qHimhsS>-0x14?qHimhsS>-0x14?qHimhsS<-0x14?qHimhsS+0x2b:qHimhsS<0x16a?qHimhsS+0x13:qHimhsS-0x60:qHimhsS-0x49:qHimhsS+0x24]},0x1);return FDsEznx(qHimhsS,dtGufs(0x19),{value:FxWGy1,configurable:dtGufs(0x7d)})}qHimhsS(FDsEznx=Object.defineProperty,dtGufs=UvZXQA((qHimhsS,FxWGy1)=>{return FxWGy1(qHimhsS())},0x2)(nBSEVu,hLxYtm));var R7feDtZ=[],wqfKe1=[LmUP27(Da_BZd(0x88)),LmUP27(Da_BZd(0x8b)),LmUP27(0x2),LmUP27(0x3),LmUP27(0x4),LmUP27(Da_BZd(0x8e)),LmUP27(Da_BZd(0x93)),LmUP27(0x7),LmUP27(Da_BZd(0x9b)),LmUP27(Da_BZd(0xad)),LmUP27(Da_BZd(0xa7)),LmUP27(0xb),LmUP27(0xc),LmUP27(0xd),LmUP27(0xe),'sgIvU(R:=YnP9`[D8v},t.%zAz#jN+Klkd.FOvoXaC],5|6gc5V]2C,sLZ>hXKd`@b',LmUP27(Da_BZd(0x56)),LmUP27(Da_BZd(0x81)),LmUP27(Da_BZd(0x60)),LmUP27(0x11),LmUP27(0xc),LmUP27(0x11),LmUP27(Da_BZd(0x56)),LmUP27(0x10),LmUP27(Da_BZd(0x96)),LmUP27(0x13),LmUP27(Da_BZd(0x198)),LmUP27(Da_BZd(0x100)),LmUP27(0x16),LmUP27(Da_BZd(0x9c)),'fShzh0#F5$w:|yVDfb',LmUP27(Da_BZd(0x97)),LmUP27(Da_BZd(0xb2)),LmUP27(0x1a),'v{fx&g5KGiVkOGW&3%?j5(&a=]3[:OG2^lf8X8[":_4jty|v7<s(7e}K>oomPOBt({%,B3&z(z0[CVL2T{&.#1$![_ZLCV8%$k<wOCK&o6Y~rTya3P$[kCba8$m;>r:ty6R)s+<p~6',LmUP27(0x1b),LmUP27(Da_BZd(0x9a)),LmUP27(0x1d),LmUP27(0x1e),'`IfcgC$||jb)A','w@>jF8u2|','sJ>jF8u2|',LmUP27(Da_BZd(0x92)),LmUP27(Da_BZd(0x17a)),LmUP27(0x21),LmUP27(0x22),'Z@q(v1&u|',LmUP27(0x23),'|/tiQ:zZ[/',LmUP27(0x24),LmUP27(Da_BZd(0x58)),'_BfxI1Vi|',LmUP27(0x25),LmUP27(Da_BZd(0xa8)),LmUP27(Da_BZd(0x98)),'WZA|',LmUP27(0x28),LmUP27(0x29),LmUP27(0x2a),LmUP27(Da_BZd(0x9d)),LmUP27(0x2c),LmUP27(Da_BZd(0x77)),LmUP27(Da_BZd(0x78)),LmUP27(Da_BZd(0xb9)),LmUP27(Da_BZd(0x8f)),'fShzdw=F|a',LmUP27(0xe),LmUP27(Da_BZd(0x12a)),'|)`E4;qWWu',LmUP27(0x32),LmUP27(0x33),LmUP27(0x34),LmUP27(Da_BZd(0xba)),'r^I3o`n|s','|)`E4;zf',LmUP27(0x36),LmUP27(0x2e),LmUP27(0x37),LmUP27(0x30),LmUP27(0x38),LmUP27(Da_BZd(0xbc)),LmUP27(0x3a),LmUP27(0x3b),LmUP27(0x39),'|co6w.Wr','6DUWy}T^Tw6[)_9,7Bc{q.J+gKZ.nNmu`IF],c#V|Y0":$DuD_L},Y|+;lsvFj*J',LmUP27(0x2d),LmUP27(Da_BZd(0x57)),LmUP27(0x2d),LmUP27(Da_BZd(0x57)),LmUP27(Da_BZd(0xbf)),LmUP27(Da_BZd(0xc0)),LmUP27(0x3f),LmUP27(0x40),LmUP27(0x41),'Il=iM3:p|',LmUP27(Da_BZd(0xbe)),LmUP27(Da_BZd(0x64)),LmUP27(0x44),LmUP27(0xe),LmUP27(Da_BZd(0xc3)),LmUP27(0x46),LmUP27(Da_BZd(0xc8)),LmUP27(Da_BZd(0x58)),LmUP27(Da_BZd(0xc5)),LmUP27(0x49),'r%ptsFLw@%=E&$|g_fX4;ib',LmUP27(Da_BZd(0xc6)),LmUP27(0x4b),LmUP27(Da_BZd(0x58)),LmUP27(0x4c),LmUP27(Da_BZd(0x63)),LmUP27(Da_BZd(0x5c)),LmUP27(Da_BZd(0xc9)),LmUP27(Da_BZd(0x5b)),LmUP27(0x51),LmUP27(0x52),LmUP27(Da_BZd(0x72)),LmUP27(Da_BZd(0x5e)),LmUP27(Da_BZd(0x58)),LmUP27(0x55),LmUP27(Da_BZd(0x74)),LmUP27(Da_BZd(0x58)),LmUP27(Da_BZd(0xd1)),'mKkn|5g',LmUP27(0xe),Da_BZd(0x68),LmUP27(Da_BZd(0xcd)),LmUP27(0x59),LmUP27(Da_BZd(0xd7)),LmUP27(Da_BZd(0xb0)),LmUP27(Da_BZd(0x58)),LmUP27(0x5c),LmUP27(0x5d),Da_BZd(0x59),LmUP27(0xe),'"a"|jpcj[cCD8WG/CwVa',LmUP27(Da_BZd(0xd8)),Da_BZd(0x59),LmUP27(Da_BZd(0xda)),LmUP27(Da_BZd(0xa4)),LmUP27(Da_BZd(0x70)),LmUP27(Da_BZd(0xdb)),'fShzu1g0|',LmUP27(0x62),LmUP27(0x63),LmUP27(0x64),LmUP27(0x65),LmUP27(Da_BZd(0xdc)),LmUP27(Da_BZd(0x79)),'mKkn|5!>x',LmUP27(0x46),'|co6w.Wr',LmUP27(Da_BZd(0xe2)),'[lpw5hI#|',LmUP27(0x69),'=OJl4vonI)VeAFRqg|(',LmUP27(0x6a),LmUP27(0x5d),Da_BZd(0x59),LmUP27(Da_BZd(0x5d)),LmUP27(0x6c),LmUP27(0x6d),LmUP27(Da_BZd(0x69)),LmUP27(0x6f),LmUP27(Da_BZd(0x1ba)),LmUP27(Da_BZd(0xe4)),LmUP27(0x72),LmUP27(Da_BZd(0x5a)),LmUP27(0x73),'"a"|jpcj[cCD#8bDh]9_',LmUP27(0x5d),LmUP27(0x73),LmUP27(0x74),LmUP27(0x75),LmUP27(0x76),LmUP27(0x3a),LmUP27(0x77),LmUP27(0x78),LmUP27(Da_BZd(0x61)),LmUP27(0x7a),LmUP27(Da_BZd(0x62)),LmUP27(Da_BZd(0x71)),Da_BZd(0x5f),LmUP27(Da_BZd(0x5a)),'"a"|TB>sqE_i#88@%D<"',LmUP27(Da_BZd(0x5a)),LmUP27(Da_BZd(0xe5)),LmUP27(0x7c),'j#`8_q^*P?|rb(',LmUP27(0x7d),LmUP
|
||
|
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
|