jdpro/jd_zzhb_new.js

8 lines
181 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
转赚红包2
1 0,12 * * *
*/
const $ = new Env('Jd转赚红包2');
2024-09-15 02:05:09 +00:00
const _0x3d40=['6lEr5y+35lIaW6u8WQCjWRhcKSkt','W68VW58','FfVcTh0B','W6bjE8kMwJu4WPbuW60','W6elB8kqamoACgaupW','W59YW4VdNKLBW4hcVq','WRddMoISRUAWMowKRUI1ME+/LoIUMUAIRoAFJG','uJ9qa17dQCk5dbK','Fmokmv5g','W6/cJeX1WOe','WPtcULhcGCosFa','o2hdKa','W5tcUqtdJCkgta','W745W4f4WQlcOeFcOKuV','adhdNWpcSW','uSkXW5GSea','auVdVG','W4FdOLLMtSoB','AdhcUSoIW4W','W6hcMgLL','DCokWPD3','WP3dLmoiW5xcQCot','WQ84W4rVW6y','W7mJW4e1WRJdTrVcQ1yX','W68HW4CdWRG','lLFcOfhcLIddQrxdNW','W4pdU010qG','W5ymmSoRW4G','5QcR5P6f57+/6lEz6ywT6k+n','pbqKWRizDbjVW7aq','WPtcSfG','WRHxAZjyfCoeW7FcImka','f0hdGG7cUYqwDmoGWQu','jXRdVq','r8ogWRuLCCo5ra','yKJcTgS6WPVdOq','WQJcV3RcL00jlCoS','tmkbWPqFhG','5Ocq6k+f77+o','WPmVWO/cH+ACJoIoH+w8S+AmG+EmMEMgUW','W5zhnCkfwG','zCopnxT0','5O+d54Y75QMd5BY177Y96BQ/6k6K5O+15B2a5yUr','ksJcKq','umkzW54PnwpdRKXsWQ4','WOJcTCo0zXKe','WPJdPvDXW7u','mt/cHCkzgG','WR8RhmoiW4u','vmoTWPf4W6y','v8oaWQyNEmoQua','bCoiWPaX','WRhcR3RcRfCw','WO8AWQ8tdmkJW6a','WQmhv8k5d8kdyeKsoG','W7BcOSkDrxa','nvBdIsRcVfaLa8oGW4q','W7Pbn8k3tsSU','pmoMa1zlsgfgz8o1','jq3dRsVcQq','WOBcHSoUW7ZcMcbXW7/cS8k1','4PY/77MRW7q','5OIS6kc55REB56MU77+N6lY75AE75B2H5zIapa','zSojrq','j8o9WOakoa','qtbBhYOdW7xdUbPR','W63cU8kfAbH5cSoDWOhcMW','W7FMNQ3MJABLR5ZdH2Cd6BMh6k+UWOK','WPmdW5XqW4X5WQW','WOCpW4K','W4zAuSo/mmkMoW','W6XNW4tdJ1rvW5y','W5uTW5CWWRS','ao+9NEMaI+wnL+wlKowlPqpdQ8kTW7i','W7zwvtTsa8os','bmo/W6nbmHlcNmk4WPFcVW','W7LwqbDybmotW6G','W53dK8kacJW8WPfv','W7WbC8kpi8oCzG','aYfLiaj1W6pdMq','WQ7dGCkvcbS5W4frnCkh','5OQd55QG5yU/5yMi56cP772d','WQ1QvCoUhW','4OoQ6l6m5AsO5B665zUk4OkC4OoE4OoG4Ocg4Oko','jxFdSZJcHreW','W7ZcOCo/FxfIDCk7W7JcHq','CCoQuXJdVG','o1dcT8olWR7cV8oab1JdKa','WOVcMha','WRhcJmk9W5VcGa','W5FcNSk4rqKIjmo3','FmkLdXrnaY5gFmoX','vf/cPL/ORQlMSR3LPRxOTRtVV5VORlC','xb8pWPKX','WRhcR2ZcQKWfiCoKeW','5AE26isX5yQ25OM+5Aw0772Uc8oAimoF','WPTlca','WPFVV6/OTlVLHAtVV7y','W4pcMmk6va','W4ZcULjuWP8','W7VcI3fL','W5pcKmkTrt4Tp8o7WR/cSa','W79drdno','tKD7lG','W4qxzCkodmoABMa','lslcMSkCkXSKW5/dOCkM','xSkDW5S1e37dSvbnWQ4','w8kDW4q2ihZdPW','WQ4ZBNBdJq','gghdKSkRua','W5PJW5BdIW','xmoxWRaUyCo/','W4NcT1i','W5FcRaFdH8k9tCoa','W4pcRxncWPm','eCoJW4LbmsBcH8oGWOJcIa','BJ3cM8oCW6G','WRZcJSkWlNyzWQSYheC','gCo0Ce8/','xCkIW7eccW','AHK5WQyv','fdz4hGzpW7m','nN3dGtxcNaa1','WOWDvSk8WRxdKq','W6LsxsS','eGBcM8k7eW','WOy2WRuvbSk/WRCWCCos','W47cOG7dSmkww8oibfj+','eCoAWOyT','W43cGSkXvgKCmW','W4H6vSorW4XMW7tdKgldJW','5P+s6l6e5O+m54Yk6yE56lY25OUA77+U','5Pwq6yEP77Ym6BQt6k++WR3cKUAVUE+/Nw0','DupcSq','nxdcSSoqW78','wmo2WRjfW6K','kSocWOatfa','h0xcSCoqW7VdUSoUjGW','C8kJWO4Jdq','44gX5O2/56Ep44gu6k6A5yA36i2O5y6G5lQu5lIl','Ftq9WO01','F8oKbq','WPCLESkvWRu','gCoLAgig','mtpcHSkFq1f4W4JdQmkZ','lh3dSa','w8k9vvfEAmoF','WPOPWO4Jgq','W7dcU8kGwvm','ESoTo3Xp','WQyrdmo0W4WGW6WO','BGnpi2q','nf7cQSolW6hcPCkltu7dJG','WOqqWRW','W5OMr8kvpmodWQFcHmko','WP3dPCoGW7xcKa','AYPhaxK','WOGBw8kNWQu','W7pcG29ZWRldRSoi','WO/dIGy/W60','5O2l54+N6zwb6zUr77+r6BIx6k6qWRhNP7rJ','ASkxEffIsW','5BYG5zcj5OIg5yUu772w57MF5P+95PsU6zsL77Y0','W7Hsxtm','vmk2WQu8gSkJDG','WPq54OcG4Ogl4OcJ4OgL4Ok14Okp4OkH4Oo9','gIFMN6VMRiNMI6JLPQNOJlpLViBNJAFPHje','WOioW4PtW5G','WOhcNSkHfLW','yCosuIddGYtcOmo5','feVdLJxcJG','WQKjW5qlW5D9WQWDWQe9','gs/dGctcGW','WQVcGCoeDqe','5As86l2M5As05OI75Asf5zge5O6Y542O4OoJ4Okn','q8k7W7SmnCoOACosctK','EmoqWPGivG','WQJcR8o+rWG','W7aCySoLeq','W4pcJ8kWuY4','WPhcHLhdK0C','WPW9zw7dJq','WOqqamoYW6C','s8k2WRaQcCkHyq','BSourG','5P696lYk5BEY5OMb5Asu5Q6A5PwZ77YF','tCkwWO8AiG','pvRcRSoxW6S','DbKMWRa','bSo0W5q','w8oBWRiGFCoN','WRWjfJLEaSosW7ldMSkh','W5pcQbiJW7Lka8oWpSkJ','WPSYFq','W68Hb8oEW65hW5ZcMW','WOJcQKZcJG','WQPMWOD3W77dUaFdH0WqvthdVG','WRpcHmo+tY4','xmoOfgX3','W4LJW4VdNG','WOpcV8ocCYu','pGlcOv07WPZdSmo4WRJcRG','5lQV5lQ76lsh5y6+','p8oAEL0sbSkqArzw','wCopohjLvurGx8oD','W7PuusS','x8kpxuHv','lY/dIZZcMq','WPdcG3/dKwBdQCkNWPe','DCk0W6eUeG','aH7cGmkQma','W4/cS8kUvHK','WQxcUCoW','WQGHD8kIWPu','lexcRCop','W5u9x8kSemo0w1W','w8osAc7dMW','WPOrjCoPW6uOW68','W4hcICkXzaG','FSo4chrg','W6uOBmkbWP0R','jrZdUq7cPtZcOGq','W6lcIsNdI8kF','smkJC1PJ','fs3cOCk4pq','W7jCuW','WPJcSmkoW7ZcOa','cCo0W4fFmqlcLq','WO3dQbiY','WOZdJ8oiW4m','xCkYWQiU','vYDodKC','pvRcRSoxW7VdVmoffLFdKW','WO0nWQK8emk
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