jdpro/jd_opencard1110.js

7 lines
152 KiB
JavaScript
Raw Normal View History

2024-11-10 03:29:26 +00:00
/*
0 0 10 11 * jd_opencard1110.js
*/
const $ = new Env('11.10-11.17 大牌放“价” 好礼不停');
function Eta25j(){}var CXsJaWO=Object['defineProperty'],jyBGlG,dY_zwl,t7bhrEr,aH9RwxE,PwDXbcH,_A_VVh,fZviIyw,zjas9D8,KC_S7Ho,mY3VXw8,HKNxHK,UpQqPpL,r3BehSu,AiKU63,V8kQmu,bzbS74,FyKV0DA,QUpuTLD,tYJ2R0;function Uky22u(Eta25j){return jyBGlG[Eta25j<0x141?Eta25j>0x141?Eta25j+0x2d:Eta25j+0x27:Eta25j-0x1a]}jyBGlG=LIthykB();function xFR_Mlm(Eta25j,CXsJaWO){return dY_zwl.call(null,Eta25j,Uky22u(0x38),{value:CXsJaWO,configurable:Uky22u(0x3d)})}Eta25j(dY_zwl=Object.defineProperty,t7bhrEr=SBQFBsN((Eta25j,CXsJaWO)=>{return CXsJaWO(Eta25j())},0x2)(kKXB2El,S_MG1T));var eJH1KR=[],KpQbHO=[ZUL2PY(Uky22u(0xc)),ZUL2PY(0x1),ZUL2PY(Uky22u(0xa)),ZUL2PY(Uky22u(0xe)),ZUL2PY(0x4),ZUL2PY(Uky22u(0x8)),ZUL2PY(Uky22u(0x16)),ZUL2PY(Uky22u(0x36)),'`2|QQzj',ZUL2PY(Uky22u(0x35)),ZUL2PY(0x9),ZUL2PY(Uky22u(0x8e)),ZUL2PY(Uky22u(0x44)),ZUL2PY(Uky22u(0x18)),ZUL2PY(0xd),ZUL2PY(Uky22u(0x2e)),ZUL2PY(0xf),ZUL2PY(0x10),ZUL2PY(0x11),ZUL2PY(0x12),ZUL2PY(Uky22u(0x2f)),ZUL2PY(0x14),ZUL2PY(0x15),ZUL2PY(Uky22u(0x33)),ZUL2PY(Uky22u(-0x27)),ZUL2PY(Uky22u(0x0)),ZUL2PY(0x11),ZUL2PY(Uky22u(0x32)),ZUL2PY(Uky22u(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ZUL2PY(Uky22u(-0xa)),ZUL2PY(Uky22u(-0xd)),ZUL2PY(Uky22u(-0xc)),ZUL2PY(0x6f),ZUL2PY(0x70),ZUL2PY(0x71),Uky22u(-0x7),ZUL2PY(Uky22u(-0x6)),ZUL2PY(0x73),ZUL2PY(Uky22u(-0x22)),ZUL2PY(Uky22u(-0x23)),ZUL2PY(Uky22u(-0x25)),ZUL2PY(0x48),ZUL2PY(Uky22u(-0x23)),ZUL2PY(Uky22u(-0x22)),ZUL2PY(Uky22u(0x77)),ZUL2PY(0x76),ZUL2PY(Uky22u(0x76)),ZUL2PY(Uky22u(-0x25)),ZUL2PY(0x48),ZUL2PY(0x78),ZUL2PY(Uky22u(0x7a)),ZUL2PY(0x7a),ZUL2PY(Uky22u(0x7b)),ZUL2PY(Uky22u(0xe9)),ZUL2PY(0x7d),ZUL2PY(0x7e),ZUL2PY(Uky22u(0x15)),ZUL2PY(Uky22u(-0x25)),ZUL2PY(Uky22u(-0x24)),ZUL2PY(Uky22u(0x14)),ZUL2PY(Uky22u(-0x25)),ZUL2PY(Uky22u(-0x24)),ZUL2PY(Uky22u(-0x9)),ZUL2PY(Uky22u(0x7c)),ZUL2PY(Uky22u(-0x21)),ZUL2PY(Uky22u(0x131)),ZUL2PY(0x84),ZUL2PY(Uky22u(-0x20)),ZUL2PY(Uky22u(-0x1d)),ZUL2PY(0x86),ZUL2PY(Uky22u(-0x12)),ZUL2PY(0x86),ZUL2PY(Uky22u(0x134
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