jdpro/jd_opencard0903.js

7 lines
209 KiB
JavaScript
Raw Normal View History

2024-09-02 23:13:19 +00:00
/*
0 0 3 9 * jd_opencard0903.js
*/
const $ = new Env('9.3-9.11 早秋尚新季 狂欢大促销');
const _0x502f=['WP7dS8oBkSoVWQldQJm','W587W4zrtW','WRC/W6hdU8kL','W63cLcLVomolW7e','tKNdPCo/WR19','ALRdUSomWQ0','W6CBECkBkNuYWO7dKa','W6ZdMConW5lcUa','oCoBgSomWP0','WPfzW445W7ecF8owyCkk','sUAiMoIIV+s5MUwjLow8O+w7Pq','mmkpW77cNCoj','WP0XW7tdRCkZ','WOulW5ddLdG','mgBdV8obW60nWONcUmkw','WObezYldTq','WO9rwCknW4dcQCkwba','nqebcCkh','WOZdMeuFaWhdJG','WO02W4JdP8kJ','bmozfCkprG','fZa+hSkO','6k6V5yQF6zU65OwL5z+hWPBdSCoQdX4','ruNdV8onWRPWW4yEFq8','WQCzW6JdNW','W7eWqmkTymoCWQlcHCk8WRK','W68dW6Hc','W79xrNWSqH5wh8on','W4jxCZ0','nKldKmkZWOO','W78nzCkWx3ldVHe','bfNdVSoXWQ0O','W6HRWQTtdW','W5L9Eq','W5vlDd0','W7eoWRJcOCo5','t8oYuapdJG','ESoPFYBdJa','W4ndAtiri8oyW4Wpfa','W6iduCk7ca','g8kVoxFcJ8oFW510','W711w0e4','vK8xyConqW','W7ZcKZOtqq','W5ZdNCoQFs8','dSkzW7BcJSoLDSoKWO5p','lmoeW4O','d8oLjSoyWOu','hZFcPSoUWQm','uSkyW7ZcKSoNEmoCWO4oWQ4','WOZdM+wjREMsSEwqO+wgVUAkKUIJV+IgI+AEIq','hNzKhMf1WQO','W6WtWPnaEq','FgzLjwW','WQimW6JdJbvtWRdcQb3cUG','W4SAoCkrigqOWRldVCkX','WQG1W7FdMSksvq','FqaPWPpdKCkC','C1CoW6NcH8obCvNcUG','W6qkWRdcUW','W74qWOXaFSo0W78OW5v2','gexdTmkeWPrNBW','W7uHrSkNECorWRm','WQnGqaJdLG','pSozfCkCvW','fuGqz8oBm8kJW7D4rW','W77dKmoquba','W5OCq8kkEW','tfiwjSos','h3RdK8kBWQG','WOTLgSoIgxGfCYHN','W7mNFCkQCmoAWOdcKW','lYNdO3Oe','W60gWOXCyCo0','5Q2cW7vH5BAq6kcK6zUA5yUy77Y96k6T6lYa','W7mgWPfoECoO','W5KzW40','pmo1W61Qia','f8k9W6dcVCoL','ihSFW77cVq','Da1z5OIX55MT5Q6d5PwG','W707dfuE','WRqAW4xdMtS','pSkwW6pcImo6','zIpcMg7dUSo1WPpdKq','WRePW7xdRCkPqW','W7yvwCk3AW','W7VcMIDyzG','W4eKWPlcOSoW','W7xcHGPFqW','mIBcG8ogWPi','axRdLa','WQOwW7JdMZLZWQm','W65yWOXlfq','WORdV8oBkG','nmoxW5jtjW','hsWgmmkF','EuZdKCoLxau','m8ksyG','axyeW7xcIW','v1e4a8o0','WPRcImkyevC','vCoSAqxdQq','W7yzW6y','gW8AaCkgWRe','m8ozW49Egq5WWO8qWRi','WOZdT8oblW','erq7WP7dGa','ECkyFCkSW7LjeIPxBa','nSoApmok','fSoBn8kHFW','WQOPWRatxtDAkMFdGW','emo2aSkXrLzJW5iAbq','WPVdVSoApSogWRNdKcm','W6XcENOMhq','W6qsu8k2FgVdMWtdN8o6','WO7dJrtcSCowW5iw','leFdTmokW40','WQykW67dKtnXWQdcGWFcUG','WQJdIr3cVmoh','W4mrySk9oLmOWQddHmkS','a0OoyCoD','hfZdObGQ','54oV6zws5PA956Qw','wue8','cL8SASoQ','qMtdIYv5','mmocW45XcW','WPbWySkdW7K','p2tdNq','bfJdPmoZWQX7WOK','xf4BaSoK','mGxLJRpOGiFOOj7PM7hLIRBVV4JOVzxcJa','lbK8dG','W5ddQmoTvsZcTxegDuy','fhNdVSo8W6C','rfynhSox','WQa7W6tdVG','mCkja0FcMLlcUeBdTdtcNrS','W5xdJ8o7','W78JuCkQo8oaWQtcKa','FrCnW6NcH8ogxKtcQNK','W48IjmoxW6K','W5FdUCoYuWC','W55Czwqc','D30yiCo1','W7BcUrTSva','bNhdGYu3','pXlcGSoxWOu','WOKCW4a5WReEAmkuBCkc','mmomoSoCWRi','ofuFW7/cVq','WOSqF8kEjgOPWQ3cU8kV','kGugh8kdWQa','W5fcsgyb','evKbBCoAdCkkW6TSCq','EmkwCmoSW71Cf2W','W5xcHb9OqvlcKG','WR1TrsVdKW','fmoNbmk3qNjYW5GGaa','W6X6WRrfma','oINcKN/dMmkZWPpdJmk9WP4','W7CmWRZcUW','mCooo8okWRHS','lWeChG','5lQy5AEm6ykf55+F','WO0mW7hdJby','ydJcKMZdV8o4','WPyaW77dJSkI','AvC0CSo8FYW','W70FW6DstMKaFG','pCoxW5jr','W5iZoeK','kdBcSSoTWOC','pqhdVwm5','5OEr55wlW5yjAmo4W4WOW5jS','WOVcISkjb0hdL1ldHmk6oa','WPpdRSo+stxcRNuzC0i','W6CeWORcU8o4','eL8dzSoA','WPmCW6BdVCkf','W54mcmos','WO4iW73dVqW','W54ag8oiW5BcHSknWP5Fva','W7ClCCkUwW','WPDAusa','jJ/dVmkipG','ASoBstpdGqu','krdcNCovWPbpWQKfmSo4','jGFcLmovWPO','hMWxW4FcVa','WQW1W6a','w8oDuHldQW','W5hdU8oRwW','zvBdL8oYvaJcPmo0jbO','pmoeW5rFpsz7WPGgWQe','WPZdV8oyk8oLWQxdLW','WQvEsSkhW6a','hCo6eq','leS0B8o5tJLwdLa','nI4Hb8kH','WQzyFZtdRa','W74YwCkH','WPqaW5mCWRy','j3NcRCkEW6ekWQ/dV8krWQS','lSooiConWR8','WOmpW4H2WOngWQpdPCkBWQ0','oGFcQSovWQ8','mhBdVSoaW7Wl','fmo7mmojWP8','l8otW4HukHLxWO9i','WQOwW6JdKrnzWRtcHrhcQa','e1uny8oagW','jSkcvq','W47OHRdMT5VMNPBMLidMSjpVV4JVVA/VVAW','W505iK4jzhC','yeddSSowWP4','W6GtW7jtBNq','W5Pjb8owWQddSmoxbgCV','WOVcMSkzc0hdKf3dHmkOaq','xmo2EcFdImk9WOvhw8oYW5O6cW','WRZcRCkFohK','m8kozSkTW6X+hZalyG','WPNcJmkebNZdI2RdGSk7fG','natdKfOM','Dc/cK13dL8oUWPq','j8oQpSoOWQC','b0SByCoW','eCkzW7VcM8o0AG','W7iiWQ3cPSo8W5O+ECk/W5O','o8kuW5/cT8oO','WOBcHSkn','W53dNCoCvahdTxVdG8kTlfe','WRNcMCkKk3O','WRpdOdNcLSo2','uLNdUmoW','yCoxxI7dTW','h2WRq8oD','yu3dUCo8WOb7W5i4','W53dRSoRsI3dGJTAB0O','W6BcHc0ZAmksW6RcV8oIWPO','W7WcW48','WQmUW7RdI8kw','W57dT8o+sqO','rKpdPCo9','c3ddIYuJ','WOtdS8oBkCo+WRG','WPKzW485WReCx8osyCkD','W5hdGCoUW67cMhrcW4KI','nmoopmoA','cCoSyW3dT8oZW4bBkq','fCk0r8kpW5S',
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