mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
24 lines
74 KiB
JavaScript
24 lines
74 KiB
JavaScript
|
/*
|
|||
|
活动名称:每日抢好礼(超级无线)
|
|||
|
活动链接:https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10022&templateId=<模板id>&activityId=<活动id>&prd=cjwx
|
|||
|
环境变量:jd_lzkj_dailyGrabs_url // 活动链接
|
|||
|
jd_lzkj_dailyGrabs_opencard // 是否入会(true/false),默认不入会
|
|||
|
jd_lzkj_dailyGrabs_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 iilIl1ii=il1Illil;function il1Illil(_0x2864ba,_0x705cee){const _0x2ec764=i1Ii1Ii();return il1Illil=function(_0xa011ce,_0x5859f1){_0xa011ce=_0xa011ce-0x160;let _0x3a6d89=_0x2ec764[_0xa011ce];if(il1Illil['MtbSZw']===undefined){var _0x54ef41=function(_0x2af9c3){const _0x75e35='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x37e44f='',_0x1ce2fb='';for(let _0x3413f0=0x0,_0x169678,_0x1065e9,_0x34eba5=0x0;_0x1065e9=_0x2af9c3['charAt'](_0x34eba5++);~_0x1065e9&&(_0x169678=_0x3413f0%0x4?_0x169678*0x40+_0x1065e9:_0x1065e9,_0x3413f0++%0x4)?_0x37e44f+=String['fromCharCode'](0xff&_0x169678>>(-0x2*_0x3413f0&0x6)):0x0){_0x1065e9=_0x75e35['indexOf'](_0x1065e9);}for(let _0x504f41=0x0,_0x36657a=_0x37e44f['length'];_0x504f41<_0x36657a;_0x504f41++){_0x1ce2fb+='%'+('00'+_0x37e44f['charCodeAt'](_0x504f41)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ce2fb);};const _0x11e16a=function(_0x29fcb2,_0x5bd32b){let _0x107694=[],_0x378f7e=0x0,_0x4460ce,_0x224205='';_0x29fcb2=_0x54ef41(_0x29fcb2);let _0x1f84e6;for(_0x1f84e6=0x0;_0x1f84e6<0x100;_0x1f84e6++){_0x107694[_0x1f84e6]=_0x1f84e6;}for(_0x1f84e6=0x0;_0x1f84e6<0x100;_0x1f84e6++){_0x378f7e=(_0x378f7e+_0x107694[_0x1f84e6]+_0x5bd32b['charCodeAt'](_0x1f84e6%_0x5bd32b['length']))%0x100,_0x4460ce=_0x107694[_0x1f84e6],_0x107694[_0x1f84e6]=_0x107694[_0x378f7e],_0x107694[_0x378f7e]=_0x4460ce;}_0x1f84e6=0x0,_0x378f7e=0x0;for(let _0x743ba8=0x0;_0x743ba8<_0x29fcb2['length'];_0x743ba8++){_0x1f84e6=(_0x1f84e6+0x1)%0x100,_0x378f7e=(_0x378f7e+_0x107694[_0x1f84e6])%0x100,_0x4460ce=_0x107694[_0x1f84e6],_0x107694[_0x1f84e6]=_0x107694[_0x378f7e],_0x107694[_0x378f7e]=_0x4460ce,_0x224205+=String['fromCharCode'](_0x29fcb2['charCodeAt'](_0x743ba8)^_0x107694[(_0x107694[_0x1f84e6]+_0x107694[_0x378f7e])%0x100]);}return _0x224205;};il1Illil['pYXEeR']=_0x11e16a,_0x2864ba=arguments,il1Illil['MtbSZw']=!![];}const _0x1e33ad=_0x2ec764[0x0],_0x3cf8d6=_0xa011ce+_0x1e33ad,_0xc47078=_0x2864ba[_0x3cf8d6];return!_0xc47078?(il1Illil['EICwCt']===undefined&&(il1Illil['EICwCt']=!![]),_0x3a6d89=il1Illil['pYXEeR'](_0x3a6d89,_0x5859f1),_0x2864ba[_0x3cf8d6]=_0x3a6d89):_0x3a6d89=_0xc47078,_0x3a6d89;},il1Illil(_0x2864ba,_0x705cee);}(function(i1lI1iI1,IilIliIl,I1ilIIl1,ii1III1I,IlIiIIii,iIlI1iiI,iiiIiII){return i1lI1iI1=i1lI1iI1>>0x2,iIlI1iiI='hs',iiiIiII='hs',function(iI1l1l,I1I1iIlI,lI1i1l1I,iiI1iiIi,I11l1Iii){const lii1llII=il1Illil;iiI1iiIi='tfi',iIlI1iiI=iiI1iiIi+iIlI1iiI,I11l1Iii='up',iiiIiII+=I11l1Iii,iIlI1iiI=lI1i1l1I(iIlI1iiI),iiiIiII=lI1i1l1I(iiiIiII),lI1i1l1I=0x0;const IIIII1Ii=iI1l1l();while(!![]&&--ii1III1I+I1I1iIlI){try{iiI1iiIi=parseInt(lii1llII(0x294,'7LM3'))/0x1*(-parseInt(lii1llII(0x347,'G[MG'))/0x2)+parseInt(lii1llII(0x514,'%GqB'))/0x3*(parseInt(lii1llII(0x1d3,'G[MG'))/0x4)+-parseInt(lii1llII(0x4e3,'b#&d'))/0x5*(-parseInt(lii1llII(0x3c6,'T@u0'))/0x6)+-parseInt(lii1llII(0x3df,'D$sC'))/0x7*(parseInt(lii1llII(0x37d,'%YnT'))/0x8)+parseInt(lii1llII(0x1a3,'tVc$'))/0x9+parseInt(lii1llII(0x438,'efkj'))/0xa+parseInt(lii1llII(0x18d,'b#&d'))/0xb;}catch(II1Iil11){iiI1iiIi=lI1i1l1I;}finally{I11l1Iii=IIIII1Ii[iIlI1iiI]();if(i1lI1iI1<=ii1III1I)lI1i1l1I?IlIiIIii?iiI1iiIi=I11l1Iii:IlIiIIii=I11l1Iii:lI1i1l1I=I11l1Iii;else{if(lI1i1l1I==IlIiIIii['replace'](/[xSNDTlpdGWQItCnObq=]/g,'')){if(iiI1iiIi===I1I1iIlI){IIIII1Ii['un'+iIlI1iiI](I11l1Iii);break;}IIIII1Ii[iiiIiII](I11l1Iii);}}}}}(I1ilIIl1,IilIliIl,function(Iii1Ii1,lI1i1lli,il1iiIll,iIIiII1i,iIIiIII1,lIIiIII,il1Il11l){return lI1i1lli='\x73\x70\x6c\x69\x74',Iii1Ii1=arguments[0x0],Iii1Ii1=Iii1Ii1[lI1i1lli](''),il1iiIll=`\x72\x65\x76\x65\x72\x73\x65`,Iii1Ii1=Iii1Ii1[il1iiIll]('\x76'),iIIiII1i=`\x6a\x6f\x69\x6e`,(0x16f59c,Iii1Ii1[iIIiII1i](''));});}(0x334,0x557e1,i1Ii1Ii,0xcf),i1Ii1Ii)&&(iil=0x7f6);const activityUrl=process[iilIl1ii(0x236,'Z9Fe')][iilIl1ii(0x291,'ITQx')]||'',joinMember=process[iilIl1ii(0x1a9,'sD20')][iilIl1ii(0x27c,'IsHe')]===iilIl1ii(0x520,'efkj'),isNotify=process[iilIl1ii(0x17c,'D$sC')][iilIl1ii(0x310,'*DtZ')]===iilIl1ii(0x2a0,'tVc$');let cookie='';function i1Ii1Ii(){const liiIIIi=(function(){return[.
|
|||
|
|
|||
|
// 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"])
|