mirror of https://github.com/KingRan/KR.git
17 lines
73 KiB
JavaScript
17 lines
73 KiB
JavaScript
|
/*
|
|||
|
活动名称:大转盘抽奖 · 京耕
|
|||
|
活动链接:https://jinggeng-isv.isvjcloud.com/ql/front/showDrawOne?id=<活动id>&user_id=<店铺id>
|
|||
|
环境变量:jd_jinggeng_showDrawOne_activityUrl // 活动链接
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#大转盘抽奖
|
|||
|
1 1 1 1 * jd_jinggeng_showDrawOne.js, tag=大转盘抽奖, enabled=true
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('大转盘抽奖(京耕)')
|
|||
|
var version_='jsjiami.com.v7';const II1i1l=iii1II;(function(iil1Il,IlIll,liil,i11l11,IlIli,liIIIl,iliil1){return iil1Il=iil1Il>>0x4,liIIIl='hs',iliil1='hs',function(i1i1ll,IIllI1,lIl1iI,iil1II,iii11I){const IIil1I=iii1II;iil1II='tfi',liIIIl=iil1II+liIIIl,iii11I='up',iliil1+=iii11I,liIIIl=lIl1iI(liIIIl),iliil1=lIl1iI(iliil1),lIl1iI=0x0;const IIil11=i1i1ll();while(!![]&&--i11l11+IIllI1){try{iil1II=-parseInt(IIil1I(0x26a,'vdB#'))/0x1+-parseInt(IIil1I(0x347,'F[YT'))/0x2+parseInt(IIil1I(0x227,'j8rF'))/0x3+parseInt(IIil1I(0x33f,'B5Ro'))/0x4+-parseInt(IIil1I(0x328,'9x0['))/0x5*(parseInt(IIil1I(0x155,'j8rF'))/0x6)+parseInt(IIil1I(0x1ec,'kCG9'))/0x7+parseInt(IIil1I(0x181,'NDb6'))/0x8*(parseInt(IIil1I(0x3d2,']6QG'))/0x9);}catch(iI11iI){iil1II=lIl1iI;}finally{iii11I=IIil11[liIIIl]();if(iil1Il<=i11l11)lIl1iI?IlIli?iil1II=iii11I:IlIli=iii11I:lIl1iI=iii11I;else{if(lIl1iI==IlIli['replace'](/[MKWpIYdLruxRSkBnHAEeG=]/g,'')){if(iil1II===IIllI1){IIil11['un'+liIIIl](iii11I);break;}IIil11[iliil1](iii11I);}}}}}(liil,IlIll,function(l1IliI,liIIIi,iIilI,liii,iliilI,I111iI,IlIlI){return liIIIi='\x73\x70\x6c\x69\x74',l1IliI=arguments[0x0],l1IliI=l1IliI[liIIIi](''),iIilI='\x72\x65\x76\x65\x72\x73\x65',l1IliI=l1IliI[iIilI]('\x76'),liii='\x6a\x6f\x69\x6e',(0x136896,l1IliI[liii](''));});}(0xc30,0xb0d86,Iii11l,0xc5),Iii11l)&&(version_=Iii11l);const liIIii=$[II1i1l(0x31e,'1cP(')]()?require('./sendNotify'):'',Iii1lI=$['isNode']()?require(II1i1l(0x3c4,'ImPL')):'',I1liii=require(II1i1l(0x280,'ai(s')),liiiIi=require('./function/krh5st'),l1I11I=require('./function/krgetua');let I1liil={},IliIi1='',Iii1ll='';function Iii11l(){const l1Illi=(function(){return[version_,'LSHjuGsWjKixkxaRpAmir.IGcEedoEmMY.EAnvB7==','WQrDw14','he7cVSkgqq','zmkKWRlcGa0','6zId5P+15OUo5y2z5yUr55MC5Ps06lA05z+75z2o5l6m5Og45QkS5BYc5A+M5z2k6zsc6k2D77+y5y6e5Ps+5lI/6ioE5lII56UM77Y3','W6hcKCk3hmoe','ywreirnCea40xmo9W5e1W611WR3cSmoUW5e5cCkFWPKhk8ogW71zW5WOc8kUWQrloSontCouetyvzGldP8oXW7a','W6SbWPihi8kZ','uqZcGHVdUW','WRtcIqyIWRDDcahdRSoNW74dvq','W6FdJmkrWPrj','5yEw5l+H6i2s5BYaW68A','W58EWQ3dM8oW','pXNcPSkyra8IW5XXbmoN','W4NcK8oiW7tcUW','cCk+W55pl0XkpmkU','W5i1WQqTW7e','W5tcOrFdMSkZ','Br3cGdBdObm','nXtcTSkusIKW','W7BcImovWQ4T','tvXvhXi','tmoiz8kApG','DWJcSmks','WRZdOuxcImkXuZDfrG','5RAu5yQtW5G25lI15A2y5z6i','mmkjW5z0la','WRDhr13cMLy','WOxcPmone1K','W7BcPePIWQC','huRcPmkcxCoJ','DhfmovvxbrCXh8oYWO4VW7jZWRddVCk6W4WZh8oeW44fpSoDW7abW4C3dSoYWRexASklc8kDs2innfZdPSk5WQZcVuXdwCkpiCoRw3ddTW7cI8omxdnMvh3dTYmzW7lcP33cSSkbW5u4jSk0WRtdMCk4yJ7dP2/cIf/dMM44zfuGW47cSxOkWRnuWRniWQzMWQ7dJffyAqVcQszyWPRdHGnlk8ovtd4aaw/dT8o3jSkTWRZdPcJcSmoJWPlcLNFcHrK','vg1Nw8kLW5JcPMZcTLjKoq','lmkmW7xdVa','W6FcGCkQpCou','cX3cPZhcLa','W4CXWQ3dNq','ySowwdnpAG','W7/cUHhdVmkvWQO','cb7cQbCl','W5mgsa','gmoErG','WRJdR1GPxG','CZNcOJRdNW','WQldIvO8W6yAua7dUmklW78OxKJcVrjqjvzbFCkKwW','WOaWWOOMW4a','WRxdMIJdSxu','sCoRva5l','W7/dNuvMW6WC','W4hcHazZWOhdM8kqW75DW5OSWOxcOCkwWPtdSComWQbK','W4/cGZBdGCke','WQaXWPldR1mGddy','WR5brLhcLfBcG8oyWRxdUvFdKCkmo1eDWPDWWPZdSfKuW5hcKLJcIW','eH7cVZ0f','nXtcPSkuqamLW5fhomo2WRJdPs4HW6Ob','p8ofxSkFn15t','W7VcTdBdGSkcsG','W5NdQKFdNZi','WPJcJ8kfA+IVRoAZO+wMUEI2V++/KUISNUAGM+AFU+E8OUI1PoMgH+IULG','tun1jrq','jrJcNZWb','WP3cRSoVsZO','hW5cW7zu','W6ddS0hdRrLbW4G','WQmfWQ4BW4fB','W6xdS1DYW5K','rmo2W5PpBdivW57cN3VcVMldIq','WQJdHxGYB3HFdSo3dsdcISoDWOS','kqvpo3vSic7cKGXXWPa','W5JcNSkCW6q','W7KgWOWgW6BcP10','AfynEYK','hHjmW6fZoedcSq','hmodrCoZwadcPq','W43cMIFdH8k+WPTDW4BcMeS/','WQdcUCoUnxW','W6BdUr7dUwC','tbFdPa','W6X2W7WItW','wmoEDCkvhq','Da/cRmkwW4/cOW','lmo8nCoSW7/cNwuVhJpdJmoLn8oZDLq','cZ46dq','CrNcHcZdLGhcGMiYWOayW582ka','W7eFWPKrW7dcI0RdUCkziwVdTSo4','W7pcU8kL','W4dcVtJdUSkI','WOtcJSoj','B8o7Bavh','kmoDtrDkw8k2aYJcUCoIW452z8kyW79uemkgaIK0','6AgI5yY654IQ5Ogb77YT','W4WTWPCgbW','W6RdTX3dNfy','W5fsbq','W5pcK8oFWRigW6yOjq','W49rdKvW','tSoYW41z','44cx5lUl5lUF6lEa5y2r','omkgW7PijG','W4ldPsRdNw8','W4i8WOmsoq','qJVdUmoYW6K','WR47WQFdRwO','WPdcPmoMWQrVEwldJ2OIWOS','tf9cbZW','lXJcOdyqBW','geVcPSk0WQKikxboimoAW5K','W6FdQuNdQXi','tLiztGG','kmkIW6NdGGi','o8kDe8khoL8EW4ddSmoIeaS','o8oNySoswG','6k2H5Ak+5ywk5RwH5yIl6zcV5O25','oHxcVmk
|
|||
|
// prettier-ignore
|
|||
|
function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);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("",`🔔${this.name}, 开始!`)}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("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(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"])
|