jdpro/jd_opencard1106.js

7 lines
157 KiB
JavaScript
Raw Normal View History

2024-11-05 23:12:55 +00:00
/*
0 0 6 11 * jd_opencard1106.js
*/
const $ = new Env('11.6-11.13 大牌有礼 狂欢来袭');
function QbH40Fi(){}var EdwvF5a=Object['defineProperty'],c5mckps,kgLqin,SNNPvz,OIII1pa,AQKGduC,munY8b,xY8fAkR,Cr8cdG,vRMvSNC,ooqDrIa,VlRZDKH,osh4tC9,B8fdkEC,laXw4XU,FY32P9,uVmdOg,valE2M,ueJGRc,yQZf0Q6,cAsKlly,lqnoaJ,bfigNqH,DCVJiT;function apg8Q7_(QbH40Fi){return c5mckps[QbH40Fi<0x126?QbH40Fi>0x126?QbH40Fi-0x22:QbH40Fi+0x5a:QbH40Fi-0x50]}c5mckps=soJ0oMA();function xsZ4iuO(QbH40Fi,EdwvF5a){kgLqin(QbH40Fi,'length',{value:EdwvF5a,configurable:apg8Q7_(0x50)});return QbH40Fi}QbH40Fi(kgLqin=Object.defineProperty,SNNPvz=xsZ4iuO(cPRCs27((...EdwvF5a)=>{var kgLqin=cPRCs27(EdwvF5a=>{return c5mckps[EdwvF5a<0x11f?EdwvF5a+0x61:EdwvF5a-0x63]},0x1);QbH40Fi(EdwvF5a[apg8Q7_(-0x27)]=kgLqin(-0x61),EdwvF5a.bzJrFD=EdwvF5a[0x0]);return EdwvF5a[0x1](EdwvF5a.bzJrFD())}),apg8Q7_(-0x5a))(b2XVERs,NOn2h9W));var DL8Kcd4=[],o_wzKw=[G5yIozP(0x0),G5yIozP(0x1),G5yIozP(apg8Q7_(-0x5a)),G5yIozP(apg8Q7_(-0x25)),G5yIozP(0x4),G5yIozP(apg8Q7_(-0x26)),G5yIozP(0x6),'|_4&&#O',G5yIozP(apg8Q7_(-0x1e)),G5yIozP(apg8Q7_(0x3)),G5yIozP(0x9),G5yIozP(apg8Q7_(-0x16)),'cWK|',G5yIozP(apg8Q7_(-0x12)),G5yIozP(0xc),'pR&G|vGHhiIQoF',',`8|',G5yIozP(0xd),G5yIozP(0xe),apg8Q7_(-0x59),G5yIozP(apg8Q7_(-0xc)),G5yIozP(0x10),G5yIozP(0x11),G5yIozP(apg8Q7_(-0x1d)),G5yIozP(apg8Q7_(0x8)),G5yIozP(0x14),G5yIozP(apg8Q7_(-0x58)),apg8Q7_(-0x2e),'|f19::O',apg8Q7_(-0x59),'|f19::O','A6+|u',G5yIozP(apg8Q7_(-0x58)),',`8|','?`+|u',G5yIozP(0x16),G5yIozP(apg8Q7_(0x33)),G5yIozP(0x18),G5yIozP(apg8Q7_(0x11)),G5yIozP(apg8Q7_(0x15)),G5yIozP(0x1b),G5yIozP(0x1c),G5yIozP(apg8Q7_(0x17)),G5yIozP(0x1e),G5yIozP(0x1f),G5yIozP(0x20),G5yIozP(0x21),'KY8|5:GV%ZnjN%r5z2TiG&5@hsztEN%abW8FUFt;E,*i)=BKQ1P&Q9]V!77wvN`)&Y2/`z5q&qotInlapY5mdR~kt,ulInF2~jZPAdVdd[6onrnszvxtQAC@}[ZhG+")?Y2y5ozB=|',G5yIozP(0x22),G5yIozP(apg8Q7_(-0x1)),G5yIozP(apg8Q7_(0x18)),G5yIozP(0x25),G5yIozP(apg8Q7_(0x39)),G5yIozP(0x27),G5yIozP(0x28),G5yIozP(0x29),G5yIozP(0x2a),G5yIozP(0x2b),G5yIozP(0x2c),G5yIozP(apg8Q7_(-0x15)),G5yIozP(0x2e),'1>+|%',G5yIozP(0x2f),G5yIozP(0x30),G5yIozP(apg8Q7_(-0x53)),',`8|cRnZB',G5yIozP(apg8Q7_(-0xa)),G5yIozP(apg8Q7_(0x1f)),G5yIozP(apg8Q7_(0x20)),G5yIozP(0x34),G5yIozP(0x35),G5yIozP(apg8Q7_(0x1)),G5yIozP(apg8Q7_(-0x4c)),G5yIozP(apg8Q7_(0x13)),G5yIozP(0x39),G5yIozP(apg8Q7_(-0x2f)),G5yIozP(0x3b),G5yIozP(0x3c),G5yIozP(apg8Q7_(-0x1b)),G5yIozP(apg8Q7_(0x21)),G5yIozP(apg8Q7_(0x22)),G5yIozP(apg8Q7_(-0x1f)),G5yIozP(0x40),G5yIozP(apg8Q7_(-0x57)),G5yIozP(apg8Q7_(-0x56)),'c$.Yn0}*{1;(Nn#:YwX*{="N29&!Y}..++;n<HwKdV+m_|kc%619SzblYV{HQ9@lZgIgXT6j}@.";TI:MS[.a?4(}y}7l7SEWkJ"E#Nr[',apg8Q7_(-0x55),G5yIozP(0x43),G5yIozP(0x14),G5yIozP(0x44),G5yIozP(0x45),G5yIozP(0x46),G5yIozP(0x47),G5yIozP(0x48),G5yIozP(0x49),G5yIozP(apg8Q7_(-0x3a)),G5yIozP(0x4b),G5yIozP(apg8Q7_(0x2f)),G5yIozP(apg8Q7_(-0x54)),G5yIozP(apg8Q7_(-0x57)),G5yIozP(apg8Q7_(-0x56)),G5yIozP(apg8Q7_(0x24)),apg8Q7_(-0x55),G5yIozP(0x4d),G5yIozP(0x4e),'i#|}YxO',G5yIozP(0x4f),G5yIozP(0x46),'I0|ASy!U,WCC_|Str:])n0vK#o}ie7o"rt~*;`y]|ZU7$$',G5yIozP(0x4f),G5yIozP(0x50),G5yIozP(apg8Q7_(-0x54)),G5yIozP(apg8Q7_(0x121)),G5yIozP(apg8Q7_(-0x3)),G5yIozP(apg8Q7_(-0x56)),G5yIozP(apg8Q7_(-0x57)),G5yIozP(apg8Q7_(-0x56)),G5yIozP(0x53),G5yIozP(0x54),G5yIozP(0x55),G5yIozP(apg8Q7_(0x3f)),G5yIozP(0x57),G5yIozP(apg8Q7_(-0x46)),G5yIozP(0x59),G5yIozP(0x5a),G5yIozP(apg8Q7_(-0x4b)),'KY8|5:GV%Z',G5yIozP(0x5c),G5yIozP(apg8Q7_(0x2e)),G5yIozP(0x5e),G5yIozP(apg8Q7_(-0x54)),G5yIozP(apg8Q7_(-0x52)),'Valpn0z2q7Y<|G3YakKpa',G5yIozP(0x60),G5yIozP(0x61),G5yIozP(apg8Q7_(-0x51)),G5yIozP(0x14),G5yIozP(apg8Q7_(0x29)),G5yIozP(apg8Q7_(0x41)),G5yIozP(apg8Q7_(-0x53)),apg8Q7_(-0x4d),G5yIozP(0x64),G5yIozP(0x65),G5yIozP(0x14),G5yIozP(0x66),G5yIozP(0x67),G5yIozP(0x68),',`L&|:6+NS=/:_',G5yIozP(apg8Q7_(-0x21)),G5yIozP(0x6a),G5yIozP(0x6b),G5yIozP(apg8Q7_(-0x53)),G5yIozP(apg8Q7_(0x45)),'K6c|',G5yIozP(apg8Q7_(-0x52)),G5yIozP(apg8Q7_(0xcb)),G5yIozP(apg8Q7_(-0x3d)),G5yIozP(0x5f),G5yIozP(0x6e),G5yIozP(0x6f),G5yIozP(0x70),G5yIozP(0x71),G5yIozP(0x72),'%6=|2',G5yIozP(apg8Q7_(-0x53)),G5yIozP(0x73),G5yIozP(0x74),G5yIozP(apg8Q7_(-0x51)),G5yIozP(apg8Q7_(-0x50)),G5yIozP(0x14),G5yIozP(0x76),G5yIozP(0x4f),G5yIozP(apg8Q7_(-0x4f)),G5yIozP(0x77),G5yIozP(0x5f),G5
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