mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
24 lines
90 KiB
JavaScript
24 lines
90 KiB
JavaScript
|
/*
|
|||
|
活动名称:邀请关注(超级无线)
|
|||
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10068&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|||
|
环境变量:jd_lzkj_inviteFollowShop_url // 活动链接
|
|||
|
jd_lzkj_inviteFollowShop_opencard // 是否入会(true/false),默认不入会
|
|||
|
jd_lzkj_inviteFollowShop_Notify // 是否推送通知(true/false),默认不推送
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('邀请关注店铺有礼(超级无线)')
|
|||
|
const jdCookie = require('./jdCookie')
|
|||
|
const common = require('./function/jdCommon')
|
|||
|
const notify = require('./function/sendJDNotify')
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
const { wuxianDefense, getJdEnvInfo } = require('./function/jdCrypto')
|
|||
|
const { loreal_savePrize } = require('./function/savePrize')
|
|||
|
|
|||
|
var iil='jsjiami.com.v7';const lil11Iii=Ii1llil;(function(I1Illlil,liIiil1l,i1il1ll,IIiIlI11,l11iiiIl,IliIl11,IIi1IlIi){return I1Illlil=I1Illlil>>0x4,IliIl11='hs',IIi1IlIi='hs',function(iiIIllll,lI1li1,lIii1Ili,IIIIIIIi,li1l1ili){const lII111li=Ii1llil;IIIIIIIi='tfi',IliIl11=IIIIIIIi+IliIl11,li1l1ili='up',IIi1IlIi+=li1l1ili,IliIl11=lIii1Ili(IliIl11),IIi1IlIi=lIii1Ili(IIi1IlIi),lIii1Ili=0x0;const lilI1lli=iiIIllll();while(!![]&&--IIiIlI11+lI1li1){try{IIIIIIIi=-parseInt(lII111li(0x41c,'N#m^'))/0x1*(-parseInt(lII111li(0x452,'w5jR'))/0x2)+-parseInt(lII111li(0x45d,'i[YW'))/0x3*(parseInt(lII111li(0x498,'#(UM'))/0x4)+-parseInt(lII111li(0x1ca,'8z!l'))/0x5*(parseInt(lII111li(0x549,'Z4mS'))/0x6)+-parseInt(lII111li(0x3ab,'!uZw'))/0x7+-parseInt(lII111li(0x20c,'jq87'))/0x8*(-parseInt(lII111li(0x494,'[hBK'))/0x9)+parseInt(lII111li(0x624,'IEyB'))/0xa+parseInt(lII111li(0x3c7,'EUYg'))/0xb;}catch(l1iiIIiI){IIIIIIIi=lIii1Ili;}finally{li1l1ili=lilI1lli[IliIl11]();if(I1Illlil<=IIiIlI11)lIii1Ili?l11iiiIl?IIIIIIIi=li1l1ili:l11iiiIl=li1l1ili:lIii1Ili=li1l1ili;else{if(lIii1Ili==l11iiiIl['replace'](/[EVtLGdCUbDSJhnBWRX=]/g,'')){if(IIIIIIIi===lI1li1){lilI1lli['un'+IliIl11](li1l1ili);break;}lilI1lli[IIi1IlIi](li1l1ili);}}}}}(i1il1ll,liIiil1l,function(liI1liIl,lIIil1Ii,iIIl1i,I1Ii1111,Ii1ili1I,Il1l1I11,IlIlliii){return lIIil1Ii='\x73\x70\x6c\x69\x74',liI1liIl=arguments[0x0],liI1liIl=liI1liIl[lIIil1Ii](''),iIIl1i=`\x72\x65\x76\x65\x72\x73\x65`,liI1liIl=liI1liIl[iIIl1i]('\x76'),I1Ii1111=`\x6a\x6f\x69\x6e`,(0x16f5a1,liI1liIl[I1Ii1111](''));});}(0xc00,0xb1ed5,il1iI1l,0xc2),il1iI1l)&&(iil=0x398);const activityUrl=process[lil11Iii(0x30b,'GjfD')][lil11Iii(0x355,'BzEQ')]||'',joinMember=process[lil11Iii(0x375,'DMnK')][lil11Iii(0x4f9,'GjfD')]===lil11Iii(0x46a,'3[Y$'),isNotify=process[lil11Iii(0x43c,'f17C')][lil11Iii(0x482,'#(UM')]===lil11Iii(0x2b4,'8z!l');function il1iI1l(){const IIlIili1=(function(){return[...[iil,'ELdjUdstRVjGiWSanWmbSi.tncCJotBmhDC.XJv7==','vmkwWOhcTq','kW09W7Lq','W5JcRSokn2u','W6FdHgVcVHa','W7tcRr4bW4i','W4HYmmkru8oADZW','W73dMmkdW4/dK23dLev2WONdSSky','teZcGmomgSkJWRKCnSkZcG','8yM9Lmkc','mdxdVhG','nSkgtSkubCklWRBcMe4','WQedW7dcOq','zmktWPRcT8ou','W4dcR8oGe0C','FXrtWQ40','bCoZh1Kg','W7HVlSkxWRyMW5m','5yM95yUb56gI5P2G5Ak25yET5OI35ysw5AYY5yYF5zIP','W5lcUCoogh9DmsNcNNu','W6tdLSk8W5hdSq','kG/cJSkOjG','wmogW6uZwa','o8o7d2qM','WRpcVmouCwnGWOHeb0tdRX4','poITL+AWTUwNKoI3QxNINPLP5PwM5zg85BMA5PEl5O+K','W5PwAIRdIxm','r2RcP2RcOG','WQJdMSkpW7u','jd3dPK1ql8kiwG','W6FdMx4','W4uBWQFcOX5LWPddGmo2cq','W4zsysRdRNVcUNpcK8ovB8oa','z8onBCoDm8o0','W7K4WRm1mG','a3Gt','W4ZdKZxdOevdgq','W4dcPCoOp8kFWRpcTtO','WRrnW4hdK8kzWRGH','Cmklpmor','W6WsWO8wWQ8','imkMDCkVmG','ddOsW6DbW6i','atWiW4vBW64sW7egAW','orVdJuPm','hcZcISoDfSoZWQK','WQ9hW57dHSkdWQGJW47dK8kXfv0','WOxcQ8oXomo5WQ3cOtZdK1SLeIvuW67dSmo5W5STiSo9aSo/','uZ9AWO87aCo7W58','AZKECW','W5fctZRdPq','W442WORcHd0','f8koW4rUCW','Bmk8W7/dGSkm','gCkrW5b8Aq','WQtcJczQ','mYVcVSkxomkWWPhdSSobWPW2W78','W6n1mCk0WRq','WQnhW5ZdGG','WP0GmrdcKW','5lQS5A+U5z2U','rCkMW43dM8kl','6i6A5y+5W5tdSqpcOCkOc0pLP7dOTypVVlq','WOapW5ZcLxG','zmkdWOdcSmo4','uSkwWOBcVCo4W45cWQldUW','WPdcTqPZWO4','W4BdNLFcKY4','uCkpW6/dISk6fx0','WQCYaJJcUaDYfmoqW7tcVhC','E8kQfSowuq','W6RdOstdMfC','W7n7lSkW','tsjMWPqCdG','wMZdVK4ncSov','WOrFW7/dP8kN','E8kvp3ZcRW','WQCoWPxcNMKs','tsrqWP4qlSo3W5D6','lCknwCkbiG','BIj7WOO0','c8oaWRnodt/cHvjh','W5ldGJtdUKPdfCoKAW','W67cV8oRhmkz','wXRdLwH7W5CE','mCo4iL0f','W7BcTqWKW4y','n8kxt8knnmkpWRdcMLi','yJtdHvr0','aKqMW4tdMmo+BmoeWOi','wSoeW74aW5S','FCoxB8ofm8oJjCog','tJLuWOe','W5NcTCoth01rnG','xCoaW7WvW6FdSmky','W7j3kSkLWQm','Dmo5W5KEBG','EhXKW6WdDSod','W4dcSCotavTbkW','WRlcS8olyhTSWOPGjLRdPWm','jG7cLmokB8omWQBcVq','BJSEqrzMW7lcTmoiW65Vqa','wHtdN31aW5qvWQmKW5tcHHRcOG','W711m8k/WPKOW5ddNSodWR0BWQW','D8oubCouBSoBW6NcPuhdJZ7cS8ov','W6pdO2VcTI8','WQ0pWP/cNxG','WPhcUCoNEL1mWOPsjG','cSkVfJqiW6NcHG','zce5vZy','8jIrIM/NQ5/MSla','WRlcIcf7WPuhlmoJWRe','mbGrW5vp','sCkSg1VcSmoWW79Xs8kF','W6uppeDf','psFdJhXziCkdr0RcRK9t','D3xcNv7cVK4','kSokWRjqfG','ymowz8omka','56MM5Rk08kkrIq','5yQi5ysu5BIR6zoI5lYZ5zo65Awb6lEw772A5RAg5yMu5lQ66zQb5BIB6zcb5l2
|
|||
|
|
|||
|
// 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"])
|