mirror of https://github.com/6dylan6/jdpro.git
7 lines
191 KiB
JavaScript
7 lines
191 KiB
JavaScript
|
/*
|
||
|
0 0 17 10 * jd_opencard1017_1.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('10.17-10.25 大牌相惠 好礼抢先go');
|
||
|
function f6doLf(){}var uZKu8SV=Object['defineProperty'],BNXMie0,cZ_qqU,SIwRCgv,e23ALpx,L9GIDwK,yWtchQ,lLrTIQ,zryK6ie,bogkjp,zFIpKeg,TtQHcFN,FNC8n4,nopsKa,ctey3Th,rwmVzL,xEZ7Vv,FUD2J1,TQJPrh,E6LXXb,Y21gm5;function XhkegF(f6doLf){return BNXMie0[f6doLf>0x44?f6doLf>0x266?f6doLf-0x57:f6doLf<0x44?f6doLf+0x28:f6doLf-0x45:f6doLf-0x4]}BNXMie0=k6stkFY();function DMy01x(f6doLf,uZKu8SV){cZ_qqU(f6doLf,'length',{value:uZKu8SV,configurable:XhkegF(0x104)});return f6doLf}f6doLf(cZ_qqU=Object.defineProperty,SIwRCgv=DMy01x(nFo95f((...uZKu8SV)=>{var cZ_qqU=nFo95f(uZKu8SV=>{return BNXMie0[uZKu8SV<-0x5?uZKu8SV-0x4b:uZKu8SV<-0x5?uZKu8SV+0x44:uZKu8SV+0x4]},0x1);f6doLf(uZKu8SV[cZ_qqU(0x36)]=0x2,uZKu8SV[0x48]=-0x7e);return uZKu8SV[0x48]>-cZ_qqU(-0x3)?uZKu8SV[XhkegF(0x4c)]:uZKu8SV[uZKu8SV[0x48]+0x7f](uZKu8SV[uZKu8SV[0x48]+0x7e]())}),XhkegF(0x76))(Wds4yTN,hCbmAZ));var mBNehGt=[],QFLsRTe=[r3KDTs(XhkegF(0x7d)),r3KDTs(0x1),r3KDTs(0x2),r3KDTs(XhkegF(0x74)),r3KDTs(XhkegF(0x77)),r3KDTs(XhkegF(0x71)),r3KDTs(0x6),r3KDTs(0x7),r3KDTs(0x8),r3KDTs(XhkegF(0x62)),'X"Cs|?gS',r3KDTs(XhkegF(0x122)),r3KDTs(0xb),'d{?|x',r3KDTs(XhkegF(0x45)),r3KDTs(XhkegF(0x91)),r3KDTs(0xe),r3KDTs(0xf),r3KDTs(0x10),r3KDTs(0x11),r3KDTs(XhkegF(0x85)),r3KDTs(0x13),r3KDTs(XhkegF(0xb6)),r3KDTs(0xb),r3KDTs(0x15),r3KDTs(0x16),r3KDTs(XhkegF(0x45)),r3KDTs(0x16),r3KDTs(0x9),r3KDTs(XhkegF(0x73)),r3KDTs(XhkegF(0xb5)),r3KDTs(0x18),r3KDTs(0x19),r3KDTs(0x1a),r3KDTs(0x1b),r3KDTs(XhkegF(0xbd)),r3KDTs(XhkegF(0x1a9)),r3KDTs(0x1e),r3KDTs(0x1f),r3KDTs(0x20),r3KDTs(0x21),r3KDTs(XhkegF(0xcf)),r3KDTs(XhkegF(0x8d)),r3KDTs(0x24),r3KDTs(XhkegF(0x1e5)),'KHqb]]j9"pM_*~W>pI2O,#m<|pJX|7K*dll',r3KDTs(0x26),r3KDTs(0x27),r3KDTs(XhkegF(0xee)),r3KDTs(XhkegF(0x72)),r3KDTs(XhkegF(0x80)),r3KDTs(XhkegF(0x136)),r3KDTs(0x2c),r3KDTs(0x2d),r3KDTs(XhkegF(0xa0)),r3KDTs(XhkegF(0xa1)),r3KDTs(XhkegF(0xc1)),r3KDTs(0x31),r3KDTs(XhkegF(0xc3)),r3KDTs(XhkegF(0x8f)),r3KDTs(XhkegF(0x7c)),r3KDTs(XhkegF(0xb2)),r3KDTs(0x36),r3KDTs(XhkegF(0xa6)),r3KDTs(XhkegF(0xd9)),r3KDTs(XhkegF(0x47)),r3KDTs(XhkegF(0x8a)),r3KDTs(XhkegF(0x46)),r3KDTs(XhkegF(0xc8)),r3KDTs(XhkegF(0xc9)),r3KDTs(XhkegF(0xa4)),r3KDTs(XhkegF(0x84)),r3KDTs(XhkegF(0x5c)),r3KDTs(0x41),r3KDTs(0x42),r3KDTs(0x43),r3KDTs(XhkegF(0x48)),r3KDTs(XhkegF(0x49)),r3KDTs(0x46),r3KDTs(0x47),r3KDTs(0x48),r3KDTs(XhkegF(0x93)),r3KDTs(0x4a),r3KDTs(XhkegF(0x96)),r3KDTs(0x4c),'W"^WR)|x"Z&mjS',r3KDTs(0x4d),r3KDTs(0x4e),r3KDTs(XhkegF(0xca)),r3KDTs(XhkegF(0xfc)),r3KDTs(0x51),r3KDTs(0x52),r3KDTs(XhkegF(0xd2)),r3KDTs(0x54),r3KDTs(XhkegF(0x47)),'4Q,4@bxH_"Jy&|(4XJx1',r3KDTs(0x55),r3KDTs(0x56),r3KDTs(0x57),r3KDTs(XhkegF(0x90)),'`q|;l}z4<',r3KDTs(0x59),r3KDTs(0x44),r3KDTs(0x5a),'|*[p3xP^',r3KDTs(0x5b),r3KDTs(0x5c),r3KDTs(XhkegF(0x1b6)),r3KDTs(XhkegF(0xb3)),r3KDTs(XhkegF(0xd3)),r3KDTs(0x60),r3KDTs(0x61),r3KDTs(XhkegF(0x83)),r3KDTs(XhkegF(0xd7)),r3KDTs(0x64),r3KDTs(0x57),r3KDTs(0x65),r3KDTs(0x66),r3KDTs(0x67),r3KDTs(0x68),r3KDTs(0x69),r3KDTs(0x6a),r3KDTs(XhkegF(0xb8)),r3KDTs(0x6c),r3KDTs(XhkegF(0x48)),r3KDTs(0x45),r3KDTs(0x6d),r3KDTs(0x44),r3KDTs(XhkegF(0x49)),r3KDTs(0x6e),r3KDTs(XhkegF(0xde)),r3KDTs(0x70),r3KDTs(0x71),r3KDTs(XhkegF(0x146)),r3KDTs(XhkegF(0x50)),r3KDTs(0x74),r3KDTs(0x75),r3KDTs(0x76),'Q)s$|.$zT!`bA',r3KDTs(0x77),'je;|',r3KDTs(0x78),r3KDTs(XhkegF(0x15d)),r3KDTs(XhkegF(0x4b)),r3KDTs(0x7a),r3KDTs(0x7b),XhkegF(0x4a),r3KDTs(0x39),'|5W9$#i&i:|fT<qUo(',r3KDTs(0x6b),r3KDTs(0x6c),r3KDTs(0x7c),r3KDTs(0x7d),r3KDTs(0x7e),XhkegF(0x4a),r3KDTs(XhkegF(0xaa)),r3KDTs(0x80),'M|r:xm[`',r3KDTs(0x81),r3KDTs(0x82),r3KDTs(XhkegF(0x177)),r3KDTs(XhkegF(0x5a)),r3KDTs(0x85),r3KDTs(XhkegF(0xf6)),r3KDTs(0x87),r3KDTs(0x88),'H*R|B',r3KDTs(XhkegF(0x47)),r3KDTs(XhkegF(0xf8)),r3KDTs(0x8a),'je;|',r3KDTs(XhkegF(0xf9)),r3KDTs(0x8c),r3KDTs(XhkegF(0x47)),r3KDTs(0x8d),r3KDTs(0x8e),r3KDTs(XhkegF(0x103)),r3KDTs(0x90),r3KDTs(0x91),XhkegF(0x4a),r3KDTs(0x92),r3KDTs(0x93),r3KDTs(0x68),'y_J|:,9`',XhkegF(0x4a),r3KDTs(XhkegF(0x105)),'q_R|/','y_J|:,9`',r3KDTs(0x95),'je;|','I?T|5}K`',r3KDTs(0x96),r3KDTs(0x97),r3KDTs(0x98),r3KDTs(0x99),r3KDTs(0x9a),r3KDTs(0x9b),r3KDTs(0x9c),r3KDTs(0x9d),r3KDTs(0x9e),r3KDTs(XhkegF(0x13f)),r3KDTs(0xa0),r3KDTs(0xa1),r3
|
||
|
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
|