mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
28 lines
98 KiB
JavaScript
28 lines
98 KiB
JavaScript
|
/*
|
|||
|
活动名称:店铺签到 · 超级无线/超级会员/lorealjdcampaign
|
|||
|
活动链接:https://lzkj-isv.isvjd.com/sign/sevenDay/signActivity?activityId=<活动id>
|
|||
|
https://lzkj-isv.isvjd.com/sign/signActivity2?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjcloud.com/sign/sevenDay/signActivity?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjcloud.com/sign/signActivity?activityId=<活动id>
|
|||
|
https://lorealjdcampaign-rc.isvjcloud.com/prod/cc/cjwx/sign/signActivity2?activityId=<活动id>
|
|||
|
环境变量:jd_shopSign_activityUrl // 活动链接
|
|||
|
jd_shopSign_joinMember // 是否入会(true/false),默认不入会
|
|||
|
jd_shopSign_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 } = require('./function/jdCrypto')
|
|||
|
const { wuxian_savePrize } = require('./function/savePrize')
|
|||
|
|
|||
|
var iil='jsjiami.com.v7';const i1lliIi=il1IlI1I;if(function(lI1lllll,iII1l1lI,l1lIIlIl,lIi1ili,i1IIlII,llllIil,illli1ii){return lI1lllll=lI1lllll>>0x8,llllIil='hs',illli1ii='hs',function(IilI1Iil,lIiiliI1,IlIl1lI,liIIllil,li1iiIIl){const iIIIIiII=il1IlI1I;liIIllil='tfi',llllIil=liIIllil+llllIil,li1iiIIl='up',illli1ii+=li1iiIIl,llllIil=IlIl1lI(llllIil),illli1ii=IlIl1lI(illli1ii),IlIl1lI=0x0;const lill1l11=IilI1Iil();while(!![]&&--lIi1ili+lIiiliI1){try{liIIllil=-parseInt(iIIIIiII(0x13d,'2)Gq'))/0x1*(-parseInt(iIIIIiII(0x58c,'zR4c'))/0x2)+-parseInt(iIIIIiII(0x139,'s$hM'))/0x3*(parseInt(iIIIIiII(0x513,'x@rf'))/0x4)+-parseInt(iIIIIiII(0x50f,'&Q%#'))/0x5*(parseInt(iIIIIiII(0x5c1,'F$Bb'))/0x6)+-parseInt(iIIIIiII(0x469,'*#9u'))/0x7*(-parseInt(iIIIIiII(0x182,'qj@y'))/0x8)+-parseInt(iIIIIiII(0x602,'!D13'))/0x9+-parseInt(iIIIIiII(0x188,'!D13'))/0xa*(-parseInt(iIIIIiII(0x2ea,'![^9'))/0xb)+-parseInt(iIIIIiII(0x31e,'s$hM'))/0xc*(-parseInt(iIIIIiII(0x486,'ei@s'))/0xd);}catch(il1lili){liIIllil=IlIl1lI;}finally{li1iiIIl=lill1l11[llllIil]();if(lI1lllll<=lIi1ili)IlIl1lI?i1IIlII?liIIllil=li1iiIIl:i1IIlII=li1iiIIl:IlIl1lI=li1iiIIl;else{if(IlIl1lI==i1IIlII['replace'](/[JKlewdfgnEqXtRkWSDVNA=]/g,'')){if(liIIllil===lIiiliI1){lill1l11['un'+llllIil](li1iiIIl);break;}lill1l11[illli1ii](li1iiIIl);}}}}}(l1lIIlIl,iII1l1lI,function(lIiIi1I,illlilI,iIi11l1,llill1Il,Ili1iiIi,Il1llili,II1I1li){return illlilI='\x73\x70\x6c\x69\x74',lIiIi1I=arguments[0x0],lIiIi1I=lIiIi1I[illlilI](''),iIi11l1=`\x72\x65\x76\x65\x72\x73\x65`,lIiIi1I=lIiIi1I[iIi11l1]('\x76'),llill1Il=`\x6a\x6f\x69\x6e`,(0x1625a4,lIiIi1I[llill1Il](''));});}(0xbd00,0xecf6e,I1lIiIlI,0xbf),I1lIiIlI){}const activityUrl=process[i1lliIi(0x413,'wDMR')][i1lliIi(0x125,'vGff')]||'',joinMember=process[i1lliIi(0x144,'oJ3)')][i1lliIi(0x489,'oJ3)')]===i1lliIi(0x5d1,'Bg$U'),isNotify=process[i1lliIi(0x27a,'Bg$U')][i1lliIi(0x199,'nW)t')]===i1lliIi(0x32e,'JeuB');let cookie='',activityCookie='',originCookie='';const cookiesArr=Object[i1lliIi(0x505,'$zKw')](jdCookie)[i1lliIi(0x4c2,'!D13')](i1iiiIll=>jdCookie[i1iiiIll])[i1lliIi(0x418,'h3Ip')](I1i1iiIi=>I1i1iiIi);!cookiesArr[0x0]&&($[i1lliIi(0x3b8,'IGKD')]($[i1lliIi(0x421,'SveB')],i1lliIi(0x3f5,'gYjW')),process[i1lliIi(0x54a,'oJ3)')](0x1));!(async()=>{const ll1II1=i1lliIi,IliIi111={'VNbKr':function(IiI11Il,i1lllIIi){return IiI11Il===i1lllIIi;},'ceUYL':ll1II1(0x21d,'SveB'),'DkRnf':ll1II1(0x2f9,'qj@y'),'ileOD':ll1II1(0x532,'l]EF'),'RTClq':ll1II1(0x454,'v#]&'),'MorPx':ll1II1(0x37d,'gYjW'),'wSrNL':ll1II1(0x157,'99[6'),'TOmss':ll1II1(0x110,'bYkJ'),'WuEtx':function(iilI1l,iii11i1l){return iilI1l===iii11i1l;},'oQgTQ':ll1II1(0x502,'e7Ue'),'VoruX':ll1II1(0x292,'OLJZ'),'WEiPy':function(iIiI1iII,ill1il){return iIiI1iII+ill1il;},'AfqRL':ll1II1(0x340,'oJ3)'),'BBBHi':function(Il11iI11,llIIl1l1){return Il11iI11<llIIl1l1;},'VNrnr':function(lIIIlI,illl1il){return lIIIlI!==illl1il;},'CJcQo':ll1II1(0x51c,'v#]&'),'yBrbE':function(IiIiiIII,i1llliII){return IiIiiIII(i1llliII);},'Kdsbl':ll1II1(0x4cb,'5NdZ'),'ZPJhT':ll1II1(0x244,'WOPg'),'CUtWl':function(IllIlili,ilII1llI){return IllIlili*ilII1llI;},'zKbne':function(illI11ll){return illI11ll();}};if(!activityUrl){console[ll1II1(0x47e,'ei@s')](IliIi111[ll1II1(0x58e,'h3Ip')]);return;}const iIiilII=common[ll1II1(0x581,'l]EF')](activityUrl);if(!iIiilII){console[ll1II1(0x13f,'99[6')](IliIi111[ll1II1(0x2f7,'vmuc')]);return;}$[ll1II1(0x5b6,'v#]&')]=activityUrl,$[ll1II1(0x532,'l]EF')]=common[ll1II1(0x3a7,'&c54')](activityUrl,IliIi111[ll1II1(0x3ab,'SveB')]),$[ll1II1(0x4ad,'qj@y')]=iIiilII?.[ll1II1(0x605,'$C!$')];if($[ll1II1(0x5a2,'l]EF')]){if($[ll1II1(0xe8,'3xzW')][ll1II1(0x54d,'&zWS')](IliIi111[ll1II1(0xd9,'gLMN')]))$[ll1II1(0x2fb,'e7Ue')]=IliIi111[ll1II1(0x4eb,'gYjW')];else{if($[ll1II1(0x60d,'%*Ee')][ll1II1(0x326,'5NdZ')](IliIi111[ll1II1(0x61d,'99[6')]))$[ll1II1(0x2ce,'%*Ee')]=IliIi111[ll1II1(0x254,')Xlz')],$[ll1II1(0x609,'zR4c')]=IliIi111[ll1II1(0x3c0,'99[6')];else $[ll1II1(0x574,'c#b3')][ll1II1(0x3e5,'zR4c')](IliIi111[ll1II1(0x582,'gLMN')])&&($[ll1II1(0x5a5,'$C!$')]=IliIi111[ll1II1(0x5d3,'OLJZ')]);}IliIi111[ll1II1(0x21b,'6gsY')]($[ll1II1(0x2f
|
|||
|
|
|||
|
// 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"])
|