mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
22 lines
78 KiB
JavaScript
22 lines
78 KiB
JavaScript
|
/*
|
|||
|
活动名称:盖楼有礼 · 超级无线
|
|||
|
活动链接:https://lzkj-isv.isvjd.com/wxBuildActivity/activity?activityId=<活动id>
|
|||
|
环境变量:jd_wxBuildActivity_activityId // 活动id
|
|||
|
jd_wxBuildActivity_openCard // 是否开卡,默认不开卡
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('盖楼有礼(超级无线)')
|
|||
|
const jdCookieNode = $.isNode() ? require('./jdCookie') : ''
|
|||
|
const notify = $.isNode() ? require('./sendNotify') : ''
|
|||
|
const getH5st = require('./function/getH5st3_0')
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
const { wxSavePrize } = require('./function/savePrize')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const IIIIiI1l=iliil111;(function(IiIilI1i,iiiIliIl,iiIii1II,illlilIl,llllII1I,ii1IIl1l,i1lIil){return IiIilI1i=IiIilI1i>>0x8,ii1IIl1l='hs',i1lIil='hs',function(ill111iI,liIllIIi,iIiilil1,II1liIII,iII1i11){const i1IIi1Il=iliil111;II1liIII='tfi',ii1IIl1l=II1liIII+ii1IIl1l,iII1i11='up',i1lIil+=iII1i11,ii1IIl1l=iIiilil1(ii1IIl1l),i1lIil=iIiilil1(i1lIil),iIiilil1=0x0;const i1liI1l1=ill111iI();while(!![]&&--illlilIl+liIllIIi){try{II1liIII=parseInt(i1IIi1Il(0x36d))/0x1*(-parseInt(i1IIi1Il(0x1cc))/0x2)+parseInt(i1IIi1Il(0x19f))/0x3*(-parseInt(i1IIi1Il(0x2dd))/0x4)+parseInt(i1IIi1Il(0x414))/0x5*(-parseInt(i1IIi1Il(0x248))/0x6)+parseInt(i1IIi1Il(0x389))/0x7*(parseInt(i1IIi1Il(0x3ba))/0x8)+parseInt(i1IIi1Il(0x378))/0x9*(parseInt(i1IIi1Il(0x321))/0xa)+-parseInt(i1IIi1Il(0x1b2))/0xb*(parseInt(i1IIi1Il(0x419))/0xc)+parseInt(i1IIi1Il(0x34e))/0xd*(parseInt(i1IIi1Il(0x309))/0xe);}catch(l11IilI){II1liIII=iIiilil1;}finally{iII1i11=i1liI1l1[ii1IIl1l]();if(IiIilI1i<=illlilIl)iIiilil1?llllII1I?II1liIII=iII1i11:llllII1I=iII1i11:iIiilil1=iII1i11;else{if(iIiilil1==llllII1I['replace'](/[hLHTRVtlJreMSWfgDyEOw=]/g,'')){if(II1liIII===liIllIIi){i1liI1l1['un'+ii1IIl1l](iII1i11);break;}i1liI1l1[i1lIil](iII1i11);}}}}}(iiIii1II,iiiIliIl,function(IIlii1I1,lllII11,IiIIIII1,IIiIlII1,l11ii1iI,lIl1l1,l1i1IIl){return lllII11='\x73\x70\x6c\x69\x74',IIlii1I1=arguments[0x0],IIlii1I1=IIlii1I1[lllII11](''),IiIIIII1=`\x72\x65\x76\x65\x72\x73\x65`,IIlii1I1=IIlii1I1[IiIIIII1]('\x76'),IIiIlII1=`\x6a\x6f\x69\x6e`,(0x135e47,IIlii1I1[IIiIlII1](''));});}(0xbf00,0xef105,i1iillIi,0xc1),i1iillIi)&&(version_=i1iillIi);let lz_cookie={},cookiesArr=[],cookie='';if($[IIIIiI1l(0x327)]()){Object[IIIIiI1l(0x1ed)](jdCookieNode)[IIIIiI1l(0x3df)](lliII1=>{const Ii1l1li=IIIIiI1l;cookiesArr[Ii1l1li(0x3a5)](jdCookieNode[lliII1]);});if(process[IIIIiI1l(0x2ca)][IIIIiI1l(0x3fd)]&&process[IIIIiI1l(0x2ca)][IIIIiI1l(0x3fd)]===IIIIiI1l(0x2b9))console[IIIIiI1l(0x2c9)]=()=>{};}else cookiesArr=[$[IIIIiI1l(0x274)](IIIIiI1l(0x362)),$[IIIIiI1l(0x274)](IIIIiI1l(0x1c8)),...jsonParse($[IIIIiI1l(0x274)](IIIIiI1l(0x1a7))||'[]')[IIIIiI1l(0x351)](IlIiIlI=>IlIiIlI[IIIIiI1l(0x2c0)])][IIIIiI1l(0x1c9)](iII11il1=>!!iII11il1);allMessage='',message='',$[IIIIiI1l(0x307)]=![],$[IIIIiI1l(0x1e6)]=![],$[IIIIiI1l(0x320)]=![];let lz_jdpin_token_cookie='',activityCookie='',jd_wxBuildActivity_activityId=process[IIIIiI1l(0x2ca)][IIIIiI1l(0x42d)]?process[IIIIiI1l(0x2ca)][IIIIiI1l(0x42d)]:'',openCard=process[IIIIiI1l(0x2ca)][IIIIiI1l(0x2c2)]===IIIIiI1l(0x24e)?!![]:![];const defaultWordsArr=[IIIIiI1l(0x308),IIIIiI1l(0x3cb),IIIIiI1l(0x25d),IIIIiI1l(0x454),IIIIiI1l(0x3a0)];!(async()=>{const IiIiI1Ii=IIIIiI1l,lII1ilil={'tKond':IiIiI1Ii(0x3a4),'eKLhZ':IiIiI1Ii(0x345),'tallf':function(IIIl1III,il1lIil1){return IIIl1III+il1lIil1;},'KEklg':function(lliI11i,ii1iiii){return lliI11i+ii1iiii;},'jKQhL':function(l1illi1,l1i1lliI){return l1illi1===l1i1lliI;},'zzSre':IiIiI1Ii(0x3fb),'FYopC':IiIiI1Ii(0x235),'JDUxn':IiIiI1Ii(0x2d4),'EjtJf':IiIiI1Ii(0x421),'pNnkj':function(liiiilii,llilI1ll){return liiiilii<llilI1ll;},'dJenv':function(II11Iil1,lI1ill1){return II11Iil1!==lI1ill1;},'AQdGR':IiIiI1Ii(0x2b7),'cruhb':IiIiI1Ii(0x410),'xDpoF':function(ililIi,iIl11i){return ililIi(iIl11i);},'zHIhI':function(i11llIii){return i11llIii();},'dJMJu':function(I11i1I1I){return I11i1I1I();},'czDdL':function(I1i1iili,llIlliiI){return I1i1iili===llIlliiI;},'eXOlL':IiIiI1Ii(0x388),'OfMAl':IiIiI1Ii(0x2f6),'avBOT':IiIiI1Ii(0x25a),'QISKI':IiIiI1Ii(0x218)};if(!cookiesArr[0x0]){if(lII1ilil[IiIiI1Ii(0x37b)](lII1ilil[IiIiI1Ii(0x463)],lII1ilil[IiIiI1Ii(0x38e)]))lIIlIiii[IiIiI1Ii(0x3bb)]=ll1i1[IiIiI1Ii(0x445)][IiIiI1Ii(0x3bb)];else{$[IiIiI1Ii(0x2d5)]($[IiIiI1Ii(0x325)],lII1ilil[IiIiI1Ii(0x3fc)],lII1ilil[IiIiI1Ii(0x227)],{'open-url':lII1ilil[IiIiI1Ii(0x227)]});return;}}$[IiIiI1Ii(0x3d3)]=jd_wxBuildActivity_activityId,console[IiIiI1Ii(0x2c9)](IiIiI1Ii(0x1f3)+$[IiIiI1Ii(0x3d3)]);for(let l11Ili1=0x0;lII1ilil[IiIiI1Ii(0x250)](l11Ili1,cookiesArr[IiIiI1Ii(0x442)]);l11Ili1++){if(lII1ilil[IiIiI1Ii(0x258)](lII1ilil[IiIiI1Ii(0x2bc)],lII1ilil[IiIiI1Ii(0x2
|
|||
|
|
|||
|
// 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"])
|