jdpro/jd_opencard1122.js

7 lines
191 KiB
JavaScript
Raw Normal View History

2024-11-21 23:07:29 +00:00
/*
0 0 22 11 * jd_opencard1122.js
*/
const $ = new Env('11.22-11.29 大牌暖冬季 送温迎好礼');
function TkV_lvY(){}var QYataLc=Object['defineProperty'],taFyKHq,G5GpTg,sncFQZP,zQeFffJ,FRgEDy,iZuWrnH,YYeQaCz,Iye7Ds,uI4boq,BeKP8AC,VWb5mj,hiEyph7,fAqPz3N,TOhLiO,TJXWm6D,uYpXEB,txoLJYA,tzJcRIn,TW9AH6u,Jaobdo;function TcssQo(TkV_lvY){return taFyKHq[TkV_lvY>0x34b?TkV_lvY+0x13:TkV_lvY>0x34b?TkV_lvY-0x4a:TkV_lvY>0x0?TkV_lvY>0x0?TkV_lvY-0x1:TkV_lvY+0x41:TkV_lvY+0xc]}taFyKHq=mgm2kR();function RzhIerU(TkV_lvY,QYataLc){var sncFQZP=G0B6fnP(TkV_lvY=>{return taFyKHq[TkV_lvY>0x1c?TkV_lvY-0x1d:TkV_lvY+0x62]},0x1);return G5GpTg(TkV_lvY,sncFQZP(0x1d),{value:QYataLc,configurable:sncFQZP(0x11f)})}TkV_lvY(G5GpTg=Object.defineProperty,sncFQZP=RzhIerU(G0B6fnP((...QYataLc)=>{var G5GpTg=G0B6fnP(QYataLc=>{return taFyKHq[QYataLc>0x2f2?QYataLc-0xf:QYataLc<0x2f2?QYataLc+0x58:QYataLc+0xa]},0x1);TkV_lvY(QYataLc[TcssQo(0x1)]=TcssQo(0x3),QYataLc[TcssQo(0x2)]=QYataLc[G5GpTg(-0x54)]);return QYataLc[G5GpTg(-0x57)](QYataLc[TcssQo(0x4)]())}),TcssQo(0x3))(qEWafA,DGfsJd));var tElKrw=[],_rbDUsb=[hSAMJq(TcssQo(0x4)),hSAMJq(TcssQo(0x5)),hSAMJq(TcssQo(0x3)),hSAMJq(TcssQo(0x7a)),hSAMJq(TcssQo(0xa9)),hSAMJq(TcssQo(0xa7)),'$Z|nNUPa','}y|c',hSAMJq(TcssQo(0x7f)),hSAMJq(TcssQo(0x6)),hSAMJq(TcssQo(0x8e)),hSAMJq(TcssQo(0xb2)),hSAMJq(TcssQo(0x9)),hSAMJq(TcssQo(0xb0)),hSAMJq(TcssQo(0x7)),hSAMJq(TcssQo(0x8)),hSAMJq(TcssQo(0xa)),hSAMJq(TcssQo(0x81)),hSAMJq(TcssQo(0xb7)),hSAMJq(TcssQo(0xb6)),'_NQ4ePA+9G&q]6|t?Y',hSAMJq(TcssQo(0x83)),hSAMJq(TcssQo(0x6)),hSAMJq(TcssQo(0xa1)),hSAMJq(TcssQo(0xb5)),hSAMJq(TcssQo(0xba)),hSAMJq(TcssQo(0x7)),hSAMJq(TcssQo(0x8)),hSAMJq(TcssQo(0x6)),hSAMJq(TcssQo(0x9)),hSAMJq(TcssQo(0xbb)),hSAMJq(TcssQo(0xbc)),hSAMJq(TcssQo(0x9a)),hSAMJq(TcssQo(0xad)),hSAMJq(TcssQo(0xbd)),'YB8^|6%',hSAMJq(TcssQo(0xbf)),hSAMJq(TcssQo(0xc0)),hSAMJq(TcssQo(0xc1)),hSAMJq(TcssQo(0xaa)),hSAMJq(TcssQo(0x7e)),'|NDcpkMqiQh{ei/pn(F$M>pb!Pt',hSAMJq(TcssQo(0x8b)),'qwI>+Cn)Qjj6V@S|$GMik?pt!4[','$GSEk?pt!446thm#z4MB:|}VeWu',hSAMJq(TcssQo(0xc5)),hSAMJq(TcssQo(0xc6)),hSAMJq(TcssQo(0x89)),hSAMJq(TcssQo(0x88)),hSAMJq(TcssQo(0xc8)),hSAMJq(TcssQo(0xca)),hSAMJq(TcssQo(0xcb)),hSAMJq(TcssQo(0xcc)),hSAMJq(TcssQo(0x97)),hSAMJq(TcssQo(0x8c)),hSAMJq(TcssQo(0xcf)),hSAMJq(TcssQo(0xd0)),hSAMJq(TcssQo(0x87)),hSAMJq(TcssQo(0xd1)),hSAMJq(TcssQo(0x55)),'f_0>|8pvK',hSAMJq(TcssQo(0xd3)),hSAMJq(TcssQo(0xd4)),hSAMJq(TcssQo(0x91)),hSAMJq(TcssQo(0xa)),hSAMJq(TcssQo(0xd5)),hSAMJq(TcssQo(0xd6)),hSAMJq(TcssQo(0x4f)),hSAMJq(TcssQo(0xd7)),hSAMJq(TcssQo(0xd9)),hSAMJq(TcssQo(0xda)),hSAMJq(TcssQo(0x5c)),hSAMJq(TcssQo(0xdb)),hSAMJq(TcssQo(0xdd)),hSAMJq(TcssQo(0xdc)),hSAMJq(TcssQo(0xdf)),hSAMJq(TcssQo(0xb)),hSAMJq(TcssQo(0xc)),'}a4NhI0woEJ*ehGkN;]woX"e(^>AN044VVJh[6;|#qVCa',hSAMJq(TcssQo(0xed)),'X_F,F7vxDd+0Pt|"@"CwS=X*H,1PKQ','|NDcpkMqiQu',hSAMJq(TcssQo(0xef)),hSAMJq(TcssQo(0xae)),hSAMJq(TcssQo(0xf0)),hSAMJq(TcssQo(0xee)),hSAMJq(TcssQo(0x98)),hSAMJq(TcssQo(0xa)),hSAMJq(TcssQo(0xf1)),hSAMJq(TcssQo(0x96)),hSAMJq(TcssQo(0xf2)),hSAMJq(TcssQo(0xd)),hSAMJq(TcssQo(0xf4)),hSAMJq(TcssQo(0x76)),hSAMJq(TcssQo(0x58)),hSAMJq(TcssQo(0x49)),hSAMJq(TcssQo(0xb)),hSAMJq(TcssQo(0xc)),hSAMJq(TcssQo(0x44)),hSAMJq(TcssQo(0xe4)),TcssQo(0x50),hSAMJq(TcssQo(0xf7)),hSAMJq(TcssQo(0xab)),hSAMJq(TcssQo(0x95)),hSAMJq(TcssQo(0xf9)),hSAMJq(TcssQo(0xfa)),hSAMJq(TcssQo(0xf6)),hSAMJq(TcssQo(0xf8)),hSAMJq(TcssQo(0xfc)),'9W3>(enm+;S4|B',hSAMJq(TcssQo(0xe)),hSAMJq(TcssQo(0xd)),hSAMJq(TcssQo(0xfd)),hSAMJq(TcssQo(0x101)),hSAMJq(TcssQo(0xa2)),hSAMJq(TcssQo(0xe)),hSAMJq(TcssQo(0xf)),hSAMJq(TcssQo(0x102)),'a(0e^wW7q!mNT.|p7%',hSAMJq(TcssQo(0x100)),hSAMJq(TcssQo(0xb)),hSAMJq(TcssQo(0xc)),hSAMJq(TcssQo(0xb)),hSAMJq(TcssQo(0xc)),'{H8^|6%',hSAMJq(TcssQo(0x54)),hSAMJq(TcssQo(0x104)),hSAMJq(TcssQo(0x105)),hSAMJq(TcssQo(0x106)),hSAMJq(TcssQo(0x28)),hSAMJq(TcssQo(0xcd)),hSAMJq(TcssQo(0x17)),hSAMJq(TcssQo(0x19)),'|NDcpkMqiQh{ei/pn(F$M>pb!Pnu7eix=yDr.r%',hSAMJq(TcssQo(0xa)),hSAMJq(TcssQo(0x109)),hSAMJq(TcssQo(0x10a)),hSAMJq(TcssQo(0x11)),hSAMJq(TcssQo(0x16)),hSAMJq(TcssQo(0xa)),hSAMJq(TcssQo(0x29)),hSAMJq(TcssQo(0xa)),hSAMJq(TcssQo(0x10b)),hSAMJq(TcssQo(0xfe)),'|g[fO^ma',hSAMJq(TcssQo(0xa)),hSAMJq(TcssQo(0xff)),hSAMJq(TcssQo(0x18)),hSAMJq(TcssQo(0x10e)),hSAMJq(Tcss
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