mirror of https://github.com/6dylan6/jdpro.git
31 lines
128 KiB
JavaScript
31 lines
128 KiB
JavaScript
|
/*
|
|||
|
店铺签到,有新的店铺直接添加token即可
|
|||
|
可设置变量DPSTOKEN='A&B&C'
|
|||
|
或DPSTOKEN="A
|
|||
|
B
|
|||
|
C"
|
|||
|
优先使用变量token,没有则使用内置token
|
|||
|
每日最多签到22家店铺,超出失败
|
|||
|
更新日期:2023-8-21 fix
|
|||
|
cron 3 0,23 * * * jd_dpsign.js, tag=店铺签到
|
|||
|
*/
|
|||
|
|
|||
|
var token = [//内置token
|
|||
|
//"72486155DE9716BB143C16A41C96EF26",
|
|||
|
//"4C82289AE45A4CC696232B7A4AF282D3",
|
|||
|
//"CA9FEDDCABD4DA31223441563C163B47",
|
|||
|
//"E00B0DC7738C5662F745A7BC6D137B97",
|
|||
|
//"776D3DAAD242B860E89DF11077F82169",
|
|||
|
//"F95A1A59A36015BE04EE37236DB6CE87",
|
|||
|
//"33D71DB237DA8C9D84DC3B34F74AAC07",
|
|||
|
//"E969CCB6A0DF9392A021E3D604D892A2",
|
|||
|
//"D4A243F51F645969EF77A35C93F686A5",
|
|||
|
//"445AF0A22B42AFE6D6ABADDE2FD161C2",
|
|||
|
//"43B0F3550B339D30B1DC1B85198F5871",
|
|||
|
//"710F970D2C9D83AE4547C6CD97754DCB",
|
|||
|
//"264D069FBD411345AC26F8173FB9ABDB",
|
|||
|
]
|
|||
|
|
|||
|
const $ = new Env('店铺签到');
|
|||
|
const _0x27e389=_0x5534,_0xffe785=_0x5534,_0x351f19=_0x5534,_0x287dd6=_0x5534,_0x3845e0=_0x5534,_0x54c16c=$[_0x27e389('0x263','gsE[')]()?require(_0xffe785('0xcd','8CZV')):'',_0x1dd514=$[_0x27e389('0x353','oiX!')]()?require(_0x27e389('0x3c7','wU$$')):'',_0x30806e=require(_0xffe785('0x1c9','vWVv'))[_0xffe785('0x277','hl0C')],_0x1b46be=require(_0x27e389('0x16b','8CZV')),_0x2ff18a=require('fs');let _0x54772d=[],_0x4aad35='',_0x5f1d11,_0x29359b=-0xcbe+0x1df2*0x1+-0x4*0x44d,_0x44fd98=[];const _0x4cc7d6=_0x27e389('0x3b3','J%t]');function _0x2b66(){const _0x33a267=['DwhcNCojoq','C0KfgKSf','W61osCkGha','FSoKWQv9nCkosCkzW4awor/dGCoIsXpcGSoTw8kFWPVcUSo6W7aG','WPdcQSo/WOq','WPnCWPqQoW','WPtcN8o7WPFcOG','zmoiW4VdTsO','WRRdRXhcVCo9WQ3cU8obAmktfdKspW','WQzIWOyZmSotbCoA','lmo2qW','W41BW5/cImkI','WO3dJSkPjG','qubWqbK','WPrmW6VdGWW7jSkuWQfihSoXW4JdHfzLW7SQBLz7WQ7cOCkWuCobWOpdM3pdHhBcPSoCW53dO8oJWRVdVY9NWRtcICoT','W4r7W4lcUmkB','gNefWPldQmkq','W7TlwSos','W5hdJ8kJjuNdNci/W7VdRmoVpmozrbZcT8koWPK+W5K','F8oXW5q5W48','W4b+W5pcN8kgFvW','cuqkkW','fxqyWPZdTa','562G5yIk5AE16lsbW60','W4RcTavmWQG','W7NdHe83zG','W5/dHSkYmG','W5LMW6tcOSkH','W4JdOSk4dh4','BvlcQ1tcGHrtWRa','WRqwW4tdT2e','aSo5W55Vrmoy','5BEd56+S5yQR77+2','WPnZWOvcDq','WOlcSSoJWPlcGa','6i6R5B6yW5K','W69KwCkdrZDnk0aNzmoUWO3dQcldPgi','WP1mWOdcOcdcM8oPjMhcGSoZWR/dO0xdIehdSdKyWPNdULddImkjW7xcPSonW6/cPdKNWPrezNu0WOK','AhfxqW','E2RcJCoolHLb','WOCxtwTe','sWGPWOPYWOmeW54','uc1G','F8kZymksWOa','t8o5xCkNDa','bmoFFLPm','hmoXg8oOduO','vEITSUMfMUAwSUEBREw/VoIpTowmUSkYhSkTB8ozF8ooaSo3be3dM8okWOfpWReYhCkBWRWHWRLgiCo3WP1sWPnfW7eWCH/dTmoGW7GNWPpdQK5awmkMFW','w3RcVHSKWRr5W5hdS8oFcCkk','pCo6WQ4','eYxcOtKE','5lQJ5lMe6lwC5yYP','wSkqrSk+WQGXWRe','p314WOddVa','xJylWPuV','WOzuWP3cSZy','lSoIxfisD8o9WQRcKGVdPmofWQS','FCoxWOxdTY4','fL0PCda','BbBdGrf2','wh9irZRcTehdTSoeWPy','6kYz5yME6zMu5OwA5z+zpHFcK1tcSEI9QEwhNEAJV+s8MEAuQEwfR+wVH8o95BMm6k2+6yky6l2i6iAN5P6J5y2n6i6t5y6JWPJdT3BcI8oBgq','x3ZcPw3cPa','W7rrW6xcRmkK','BHFdRqbKEeddMa','pmo5zKfQ','FdtdUtjs','5lII5BI66zgh776C5B2g5As056+e5yQOomo0WP4','e1RcQg3cVZ5CAY/cLwu','W7TTzmosvq','vZVdNtrJw2BdUSodWQO0W6i','wuZcPw/cPtm','WPOfW5a','W5ZdP0VcGgSwxuC','zIuaWRrOmCk7W5e','W643CM3cN8kaW5G','r03cJuhcHq','5B645Awf5PEo6zsx77YE','W7pcGtbB','W7vKW63cPCkQWQ1q','Be7cVSoNfq','xraDWOTZ','5BwI566t5yMI77Yd','WOdcSSo7WOa','W4xcNJDRW7hcRwRdQSkjW5G','jSoyW7XfEa','WPNcL3i9WRm','5lIB5BIf6zgH77+G5B6a5AwU562Y5yUrWPFdPSkC','i8oquMrp','j38PxtldVSoq','W5ZdGmkJiq','WROeW6ZdUvK','W6XRW7VcS8k3','sCoWW7RcI8ox','uHRdOaPw','WPrDW77dLXPZEG','fwXqWOVdOq','yapdOrbUCvddKq','F1NcSe3cOXS','wSoIACk3uZBcPSom','rKJcPM3dVcHdFIy','cu/dMq','c8orW6XFwq','ECoPW4SHW5pdKConW6rh','nJ7cTcqd','FfnmBHe','5P+76k+y5RE/5yQm5lYT5OcAF8kfWOhOR4FMS7hLP6hOTQtIG7lVUym','W5FdU24MvCkAW5ZdHSonWQBdISoDWQu7WOdcTafhW5lcOSo1','z0xdQ0T7','uetcU3ZcQa','A27dHN5j','W6G3BgVcNW','DgtdJvv9WR3dLSkn','w8kktSkP','vq3cKdDWWOa','W4vXW4pcJa','dZBcPcGB','W7xcGYq','WP0Kwwjd','W4tcGJL8WRlcOgtdVmktW58','W5ilW70FcWeIWO94W4qJW7q','5REm5yMg5Bwq5AsM5PsG','5B+K5Asy5Pw56zsv77+/','W5VdOvBcL20nrLBdTCkzWR3cSCkjo8kBW4nwW77cSYxcKq','hZ3cQtaN','WQTEW5JdUGG','zYWoWQ5oW7jUWR9OC0FdVq7cSmkfr8o+W5TABmorW7lcHcxcOGfZDmorW7/cUNtcRdmWqSoH','W7DMW4hcG8kC','ymozW4NdOdxdHCkvWRD0WR/dKCoQwWBcUWyYFSouWRNcNqHYnSoMWQxcJI3cUvpcMSkWBLddRmoGW6DyW6VcILXqWQi','aZpcMbKy','pmoQW7LXW6ldMZBcJ8omgCkR','WPRdJSkxoSkshrtcJK3cTSkiW5hdL8kq','W57cIbvuvG','W67dT0K/Fq','rJtdLZ5x','hSoDWQNdRh7dHa','utzAW5ZcQmoqCd7cVfjqmmozWPNdPhRcQ8oGWQe','eCoVF1Hs','W7bLW64','b8o4W41prmols2lcL8k+WR3dHgRdTWBcV2r5W6qoWRVdP8kkW6Xklh3cUsOSo8oWBYRcMCkhWRFcVa8c','WO3dJSk1iCkyeG3cJK7cSmktW4ldNmkLzCkgg8k7W5/cO8o2','y0mla0ei','WO/dGSk4mmkbcfxcJNdcOCkvW5ZdKmkzDW','5Pse6lkv5PwV57Md5y+G776W56sX5yUA5l+z5Ocj5yUN776k','ENRcL8opnrrxWPxcJCkiFbVdVJJcL8o6','r0ZcVw3cOYHp','wZCrWRTtWOqOW6n9Ca','fCoxWRRdJw3dGSkX','gSogWRRdMx/cJmo/tJxcGCoyzCkhW4vjyepcRCoCESooF8kaW5qMhttdRdxcJcLwW4jOEqa0WOZdOSk1WOiDcWxdOgddSI3dN8kGWOS5CgzCWRxcUK3dV8kRoCodW5i3gX3dRNjKWR9mqMBdUmkJqv/dTx3cRa','zYaiWRGGnG','W5ddVxmXu8kbW4FdLW','amoxWRJdJh7dHCk1','Bf/cOKhcVHbm','BxnxsYlcKvZdVmo1WOVcVq','kCoSW7m','WQNdQvxcIG','W7hcTZnjWRG','W716W7NcRmkR','utqJWO0R','ymo1W5y+W4tdNSo
|
|||
|
function Env(t,e){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((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}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.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.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)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(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.
|