mirror of https://github.com/6dylan6/jdpro.git
7 lines
217 KiB
JavaScript
7 lines
217 KiB
JavaScript
|
/*
|
||
|
0 0 9 9 * jd_opencard0909.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('9.9-9.16 月满中秋 大牌相惠');
|
||
|
const _0x4565=['W5GyyY44W65emG','oY/cRmo1zW','ASoRn8kcsa','WQLBW7RcG2FdNexdQCoRWQu','WP4AWR/dKq','kGtcSCoYyq','W7SYWPNcJ3ZdOSkl','WRuFWQJdUL4','nay2WRq','5y626ig85B6W5y+S6BQf5lQaWRlOT6/LHOG','ectcOW','WQ4jWPaAlq','WQpdUKzwW5S','AtuGW5HMWR7cQmowWR97','WPNdSMBdGmkc','W4WVWO/cHxZdS8ozW43cPWK','5BEW57Um5yQr5yUx6l+X5lUz5zoQCa','Emo7W4WVySoJW6TH','ECoLW705EW','u8o+lmoF','WRvnWOS0lgXn','svT4WPWCW6G','cCknW67cSvq','5lQx5lIM6lsW5yYp','a1pdIGeT','WRmAW7BcNIyAW4K','WQJdRuxdMmknoG','5lQW6icD5yIJ5yU56iwK5BwR','WQBdVey','W5mcWO7dGrTIW6pcHwddLG','pdddGfVcQmozW6y3WRCp','FYRcRmkQDq','WPhdSfXhW6qBcu96WQ0','f1RdObSD','WRiMWP08bG','W5/dM8k1gmotDIBdUaddNa','ivKccHK','WPOAAZDl','WRlcSmo6dSoZW7rcA2Wb','WOpcM8oCW5CKW43cIq','WROKW6pdHdy','kHewcJio','WRZdKxDwW5i8lKe','ktWSWPK4W73dRSkpWR4L','WQ/dPMfBr8k7rCotW5BcIq','WPulWQBdLvxcJ3/cQCoLWQq','ErtcJCkqsG','hsJcSmoFy8o9WPb8WRTM','WROwWQJdJYXdm33cPSoq','EEw0U+weUUMbNEw8J+wnKW','xSoSWRRcGmkui3hcRSkRW7e','5lQv5As06yg45565','zrjnWQztW5JdLbTjca','xCocW4iwsq','WPrwWPbEpG','z8oud8ornq','WOVdR8oVW7a','W5uWlZJcJG','WQFdNCo0W5dcOq','tuP+pfK','W6a4WPVcKM0','5OM85lUK5A6h54IF77YQ','WPG8W6NcJX8','WPhdSfXWW7GAaG','othdNelcN8oRW78MWQ0h','duqJfWG','WO3dU8ovoCkLW4aDoGvo','W5hdISkSfmodDG','W5ZcG8o+c8o4W7pcLSkA','sSo6W5OTzhGcWPVdGcG','aIRdIwRcLW','W4FdOHNdQa','duCTctfpybm','bue8jZ5nzq','WRRcN8okv8kq','wtRcRmkZDG','ELL1WP0dW7hdKNyhqa','mEAaGEwfPW','n8o9W5bxW4O','W55GC3ZcUCo2xW','hsJcSmoFy8o9WPb8WQz7','WPuJWRuyr8odW67cTSozW4G','dI7cT8odECoG','WR3dV0/dH8kD','W4GHnHdcQG','hmk/lmowbSkCbCkHv24','W4pcHmohW7X4','5Rsj6kAz5zsp5zg3','sxLRhMC','w8ohW7qTEG','WQWAW6tdKa','WOxcNmk/hSk8','f8oQW4DrW7q','W4hdPWNdSmoNBCokWO5dW7a','W5XKCwpcVq','W57dOfJdTYVdNKq4WPXF','5lQE5lUz6lwe5yY0','W5ZcG8o+c8o4W7pcLSkAv3K','W4tcUColm8o3','WPTHWRXulG','jCkuW6/cOLfmW7tcSW','WPOEyYODW5Tqj3DQ','WO8QWROldCkcWPddR8kx','WRGRW5xcNIO','uCo1fmk7za','WO8hW47dHdzQW6xcHapdMW','W70VuaSc','W5HEmM0sW64ABNfL','W53ORjhPHA7ML7BNMlpLVj7OJzRLJ404WQq','amo2rmk3WOVdKSkkpYDt','WO3cNv8/EG','cs7dUq','W43dNmkNbCovCtBdOWxdJq','CSo+b8kEDCoa','W57dLweCBq','W453W7NdHCkaCW','W4RdICowFH8','fCkeW7dcK1y','W6ddStdcPa8','W6hdQSo7bXZcNf7cH8kbEa','WOyTpCoDW58','WQxcOgOvx8k5xmkkW6pcKG','cZ7cQCo0zW','x8orW6ylqG','W77dOW7dUCoWnSopW4nuW7y','zCoOa8kctW','eZVcOCoyDSo1WPzH','5Bso6k+X57635OUe5As+','WOZcM8oaW5SHWPpcIc/dS2e','6k2B5yU66zQm5OsF5z+WW5DvrCo2WOu','W7RdMc3dKmoC','WOP1AN7cKCo4xqa','hCkGmCoEqvm6oq','W5BdVHNdTCo7Bmo9W5rbW6S','x1TIWPK','W7KamYZcOa','W5D7W77dP8kO','WP3dTCoIW7e','C2XYcvK','W57dValcPrBdTei8WOC','CwzBpLmRzwCy','tmo9W54RpgOMWPhdIJK','W7TWW7RdOCkD','jdGNW5i','eSkMW4hcSwu','W5PMu1hcKa','W6FdPaq','WP/dU0X3W68','W6zCWRJdHtbdpN3cP8ox','yCobmSkBrG','hHySpcS','ywPCgf8','kCoGtmkgwmkkya3cRmog','WQ3cOSoTdq4','WOGOW5xdOJC','WRlcTmoNeCoT','WQBcVmobx8k2dSoAW5S','k8kWamo4Bq','A8oOW5G8DG','WRFcSSo6bG','b8kNimoMW5e','xCorW6awq8oyW6bmdcS','W73dOq0','WPZcSCogC8oV','W5baWOrsgCkikSocWPNdVG','kHSF','W7LBW7JdHmklAxftqWe','WR8lW7hcNXmsW5LkW5Cm','jK0beHa','W5O/WPdcMM/dPmknW4VcOqu','kSo5W4nkW6m','xSkQbq','W7tPUylORklKUPNLIAROTO/VVlRLJkRPH7JdRa','dXS5W6fG','WQ0lW7FcHcKAW4v0W4C','WRpcRSoIyCk6','W5ynfq','u8k2eCkQWPNdLq','WRtdTu/dHSkLmSot','a8kpW6xcOfXmW6VcSSoXW7e','W53dRmolmJW7WP4HDmoK','j8k2W7ZcS1W','WR8iW5xcIWu','WPuIWR5xc8kzWQ3cQCkqWO0','WQtcU2SzqSkbv8knW4pcHW','mWeUW7j1','tSoApCoYaG','WPj+WRDfbG','5lMw6lc9W6VWS6wS','WQ0xW6RcNq4z','wLL1WP0aW7BcS1WoDa','W5tcTSoVmSo0','WRldTeLDW6i','oSoYiCorW4C','WR3cSCoJnCow','W4G0WOVcG3JdRSknW5VcNGG','hCkGmCoEyvm6oq','u1vIWR4FW6tcMa','WPO4WQNdTd8','WRhcQSoKv8kl','WPNcVvxdOfRcIq','CSo4dmk7Ba','WP4OWO7dHM8','WPhcJCoNW7y','WPtdTCoVW7RcNmohwmkwuSoX','WPVdQmo0W7VcUmoVu8kbrmoI','DCo9nCoQca','WPiaW5y','kwyFnqK','aXiWW6zB','v194WP8hW60','W5naW77dSCkQ','WPjsWOvr','vmoCW7y9CG','w8oRW5O3yG','lCoGW4pdPGb/W655','WPagWOxdKJG','WOWkW4/dLXr5W7pcVYZdKW','isSGW4yTW6tcPmoAW7z9','W5tcK8oedCoQW78','W5HTB0NcSG','huX3WPqgW6ddGG','WR0EWPVdSt0','lHSi','W53dH8kPgSojz+w2H+wMVEAuQCki','WO3dRSoNW6BcVSoMrmktqa','orZcLSoFCG','cHSRhaS','tSoxW78A','W4ldVJdcTGC','WRRcHmoXzCk7','f8kOjSou','fLFdMZuc','W4vRz3xcOmoAxa','56Et5yQKWRm','tCoCk8kgFW','BCoTW4SYwG','jaGPWRdcLa','gY7cSa','uSk0jSo6WOK','WQKoWO4hig9C',
|
||
|
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
|