mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
26 lines
71 KiB
JavaScript
26 lines
71 KiB
JavaScript
|
/*
|
|||
|
活动名称:关注店铺有礼(超级无线)
|
|||
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10069&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|||
|
https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v1/index?activityType=10069&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|||
|
https://lorealjdcampaign-rc.isvjcloud.com/interact/index?activityType=10069&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|||
|
环境变量:jd_lzkj_lkFollowShop_url // 活动链接
|
|||
|
jd_lzkj_lkFollowShop_opencard // 是否入会(true/false),默认不入会
|
|||
|
jd_lzkj_lkFollowShop_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 ii11lIii=l1iIIill;if(function(lIi11llI,Iil1Il1i,llllI1Il,li1iiiIi,I1Iiliil,lliiIi,l11Ill1I){return lIi11llI=lIi11llI>>0x4,lliiIi='hs',l11Ill1I='hs',function(iilI1l1l,IiIlilil,lIIiIllI,I11IiI11,iiiiIl1I){const iil1ii=l1iIIill;I11IiI11='tfi',lliiIi=I11IiI11+lliiIi,iiiiIl1I='up',l11Ill1I+=iiiiIl1I,lliiIi=lIIiIllI(lliiIi),l11Ill1I=lIIiIllI(l11Ill1I),lIIiIllI=0x0;const Il11lIi1=iilI1l1l();while(!![]&&--li1iiiIi+IiIlilil){try{I11IiI11=parseInt(iil1ii(0x3ed,'*mFi'))/0x1+parseInt(iil1ii(0x364,'4ufo'))/0x2*(-parseInt(iil1ii(0x20a,'&xvc'))/0x3)+-parseInt(iil1ii(0x1f0,'0g$E'))/0x4+-parseInt(iil1ii(0x2e9,'4BM^'))/0x5+parseInt(iil1ii(0x35f,'08JV'))/0x6+-parseInt(iil1ii(0x44b,'UK%f'))/0x7*(parseInt(iil1ii(0x239,'08JV'))/0x8)+parseInt(iil1ii(0x489,'47f6'))/0x9;}catch(IliII1I1){I11IiI11=lIIiIllI;}finally{iiiiIl1I=Il11lIi1[lliiIi]();if(lIi11llI<=li1iiiIi)lIIiIllI?I1Iiliil?I11IiI11=iiiiIl1I:I1Iiliil=iiiiIl1I:lIIiIllI=iiiiIl1I;else{if(lIIiIllI==I1Iiliil['replace'](/[eOPJrpRqHKxNTubBWdFyD=]/g,'')){if(I11IiI11===IiIlilil){Il11lIi1['un'+lliiIi](iiiiIl1I);break;}Il11lIi1[l11Ill1I](iiiiIl1I);}}}}}(llllI1Il,Iil1Il1i,function(iIIlIiii,Ililil1,i1Iil1ll,III1li1,IIiIlliI,iIIiIlIi,Il1111ii){return Ililil1='\x73\x70\x6c\x69\x74',iIIlIiii=arguments[0x0],iIIlIiii=iIIlIiii[Ililil1](''),i1Iil1ll=`\x72\x65\x76\x65\x72\x73\x65`,iIIlIiii=iIIlIiii[i1Iil1ll]('\x76'),III1li1=`\x6a\x6f\x69\x6e`,(0x16f5a3,iIIlIiii[III1li1](''));});}(0xc90,0x3614a,Ii11IlI,0xcb),Ii11IlI){}function l1iIIill(_0x40aad4,_0x1cca22){const _0x478a49=Ii11IlI();return l1iIIill=function(_0x274c99,_0x270f47){_0x274c99=_0x274c99-0x1c9;let _0x1d994b=_0x478a49[_0x274c99];if(l1iIIill['kHFRJt']===undefined){var _0xe5f816=function(_0x457842){const _0x5f238e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1bc8fb='',_0x470e80='';for(let _0x529119=0x0,_0x511307,_0x1bf500,_0x1bd4f4=0x0;_0x1bf500=_0x457842['charAt'](_0x1bd4f4++);~_0x1bf500&&(_0x511307=_0x529119%0x4?_0x511307*0x40+_0x1bf500:_0x1bf500,_0x529119++%0x4)?_0x1bc8fb+=String['fromCharCode'](0xff&_0x511307>>(-0x2*_0x529119&0x6)):0x0){_0x1bf500=_0x5f238e['indexOf'](_0x1bf500);}for(let _0x462ce7=0x0,_0x2e3a3f=_0x1bc8fb['length'];_0x462ce7<_0x2e3a3f;_0x462ce7++){_0x470e80+='%'+('00'+_0x1bc8fb['charCodeAt'](_0x462ce7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x470e80);};const _0x2345d1=function(_0x18a13e,_0x3ed8ce){let _0x3f6614=[],_0x9f8325=0x0,_0x2ea88e,_0x4027bf='';_0x18a13e=_0xe5f816(_0x18a13e);let _0x2f4ac2;for(_0x2f4ac2=0x0;_0x2f4ac2<0x100;_0x2f4ac2++){_0x3f6614[_0x2f4ac2]=_0x2f4ac2;}for(_0x2f4ac2=0x0;_0x2f4ac2<0x100;_0x2f4ac2++){_0x9f8325=(_0x9f8325+_0x3f6614[_0x2f4ac2]+_0x3ed8ce['charCodeAt'](_0x2f4ac2%_0x3ed8ce['length']))%0x100,_0x2ea88e=_0x3f6614[_0x2f4ac2],_0x3f6614[_0x2f4ac2]=_0x3f6614[_0x9f8325],_0x3f6614[_0x9f8325]=_0x2ea88e;}_0x2f4ac2=0x0,_0x9f8325=0x0;for(let _0x10f856=0x0;_0x10f856<_0x18a13e['length'];_0x10f856++){_0x2f4ac2=(_0x2f4ac2+0x1)%0x100,_0x9f8325=(_0x9f8325+_0x3f6614[_0x2f4ac2])%0x100,_0x2ea88e=_0x3f6614[_0x2f4ac2],_0x3f6614[_0x2f4ac2]=_0x3f6614[_0x9f8325],_0x3f6614[_0x9f8325]=_0x2ea88e,_0x4027bf+=String['fromCharCode'](_0x18a13e['charCodeAt'](_0x10f856)^_0x3f6614[(_0x3f6614[_0x2f4ac2]+_0x3f6614[_0x9f8325])%0x100]);}return _0x4027bf;};l1iIIill['lACmhx']=_0x2345d1,_0x40aad4=arguments,l1iIIill['kHFRJt']=!![];}const _0x47ad9=_0x478a49[0x0],_0x3f673a=_0x274c99+_0x47ad9,_0x50a80c=_0x40aad4[_0x3f673a];return!_0x50a80c?(l1iIIill['uGtIrp']===undefined&&(l1iIIill['uGtIrp']=!![]),_0x1d994b=l1iIIill['lACmhx'](_0x1d994b,_0x270f47),_0x40aad4[_0x3f673a]=_0x1d994b):_0x1d994b=_0x50a80c,_0x1d994b;},l1iIIill(_0x40aad4,_0x1cca22);}const activityUrl=process[ii11lIii(0x5a6,'47f6')][ii11lIii(0x1fe,'OX$H')]||'',joinMember=process[ii11lIii(0x2b8,'y5zI')][ii11lIii(0x3cb,'S@@k')]===ii11lIii(0x476,'Bopn'),isNotify=process[ii11lIii(0x1f2,'jMs^')][ii11lIii(0x3b8,'#S6X')]===ii11lIii(0x44f,'2p4o');function Ii11IlI(){const I11III1i=(function(){return[...[iil,'JNjTusKHRjFbixaePmriJy.WOcqpoFmB.Duv7bDd==','WPVcOmo0W6/cVG','WR3cPq3dLeS','WQDmq27cKG','WR4WWROfW7m','cSkWlSogFG'
|
|||
|
|
|||
|
// 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"])
|