mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
25 lines
153 KiB
JavaScript
25 lines
153 KiB
JavaScript
|
/*
|
|||
|
活动名称:加购有礼 · 超级无线/超级会员
|
|||
|
活动链接:https://lzkj-isv.isvjd.com/wxCollectionActivity/activity?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjcloud.com/wxCollectionActivity/activity?activityId=<活动id>
|
|||
|
https://lzkj-isv.isvjd.com/wxCollectionActivity/activity2/activity?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjd.com/wxCollectionActivity/activity2/activity?activityId=<活动id>
|
|||
|
环境变量:jd_wxCollectionActivity_activityUrl // 活动链接
|
|||
|
jd_wxCollectionActivity_openCard // 是否开卡,默认不开卡
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('加购有礼(超级无线/超级会员)')
|
|||
|
const jdCookieNode = $.isNode() ? require('./jdCookie') : ''
|
|||
|
const notify = $.isNode() ? require('./sendNotify') : ''
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
const getH5st = require('./function/getH5st3_0')
|
|||
|
const { wxSavePrize } = require('./function/savePrize')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const ilIl1IIl=lI1111Ii;(function(iII11Il1,llll1iIi,I1iI11I1,IIl1iI,iII1lI1i,liIl1ii,il1I1iil){return iII11Il1=iII11Il1>>0x9,liIl1ii='hs',il1I1iil='hs',function(l1I11l1I,I1l1lIi1,Ii1il1I1,IiIi1IlI,l1IIl11){const IiiIii1l=lI1111Ii;IiIi1IlI='tfi',liIl1ii=IiIi1IlI+liIl1ii,l1IIl11='up',il1I1iil+=l1IIl11,liIl1ii=Ii1il1I1(liIl1ii),il1I1iil=Ii1il1I1(il1I1iil),Ii1il1I1=0x0;const Ill1ilI1=l1I11l1I();while(!![]&&--IIl1iI+I1l1lIi1){try{IiIi1IlI=parseInt(IiiIii1l(0x882,'Op6F'))/0x1*(-parseInt(IiiIii1l(0x38c,'Mlyr'))/0x2)+parseInt(IiiIii1l(0x39c,'MqdH'))/0x3*(-parseInt(IiiIii1l(0x35e,'Op6F'))/0x4)+parseInt(IiiIii1l(0x1e9,'mgEW'))/0x5+-parseInt(IiiIii1l(0x5cb,'uZL9'))/0x6+parseInt(IiiIii1l(0x5fb,'B&^9'))/0x7*(-parseInt(IiiIii1l(0x76b,'OWIP'))/0x8)+-parseInt(IiiIii1l(0x46f,'MqdH'))/0x9+parseInt(IiiIii1l(0x20c,'e$)w'))/0xa;}catch(Iiilili1){IiIi1IlI=Ii1il1I1;}finally{l1IIl11=Ill1ilI1[liIl1ii]();if(iII11Il1<=IIl1iI)Ii1il1I1?iII1lI1i?IiIi1IlI=l1IIl11:iII1lI1i=l1IIl11:Ii1il1I1=l1IIl11;else{if(Ii1il1I1==iII1lI1i['replace'](/[rLuqVbPXewRFSBGDfMO=]/g,'')){if(IiIi1IlI===I1l1lIi1){Ill1ilI1['un'+liIl1ii](l1IIl11);break;}Ill1ilI1[il1I1iil](l1IIl11);}}}}}(I1iI11I1,llll1iIi,function(lillI1I1,i1I1iII1,l1i1il1i,l1IIIiIi,iil11IiI,II11li,li1li){return i1I1iII1='\x73\x70\x6c\x69\x74',lillI1I1=arguments[0x0],lillI1I1=lillI1I1[i1I1iII1](''),l1i1il1i=`\x72\x65\x76\x65\x72\x73\x65`,lillI1I1=lillI1I1[l1i1il1i]('\x76'),l1IIIiIi=`\x6a\x6f\x69\x6e`,(0x146d14,lillI1I1[l1IIIiIi](''));});}(0x18e00,0xc63f4,Ii1Il1ii,0xc9),Ii1Il1ii)&&(version_=ilIl1IIl(0x430,'(7k@'));let activityUrl=process[ilIl1IIl(0x48f,']6uh')][ilIl1IIl(0x7e9,'hBoQ')]||'',openCard=process[ilIl1IIl(0x457,'bzEY')][ilIl1IIl(0x7b9,'7m#9')]===ilIl1IIl(0x5f1,'K3&C'),retryTimes=0x28,lz_cookie={},activityCookie='',cookiesArr=[],cookie='';if($[ilIl1IIl(0x5cd,'Qv$(')]()){if(JSON[ilIl1IIl(0x6ef,'jmRB')](process[ilIl1IIl(0x605,'K3&C')])[ilIl1IIl(0x5d5,'kp4V')](ilIl1IIl(0x5bf,'bzEY'))>-0x1)process[ilIl1IIl(0x189,'aZub')](0x0);Object[ilIl1IIl(0x606,')k[S')](jdCookieNode)[ilIl1IIl(0x186,'nHW7')](IiIIiI1I=>{const ii1II1I1=ilIl1IIl;cookiesArr[ii1II1I1(0x320,'6Nkl')](jdCookieNode[IiIIiI1I]);});if(process[ilIl1IIl(0x1b1,'nHW7')][ilIl1IIl(0x85d,'q5sP')]&&process[ilIl1IIl(0x885,'jmRB')][ilIl1IIl(0x5b9,'%BDJ')]===ilIl1IIl(0x8c8,'z9cK'))console[ilIl1IIl(0x8cf,'Op6F')]=()=>{};}else cookiesArr=[$[ilIl1IIl(0x4c8,']6uh')](ilIl1IIl(0x6d8,'aZub')),$[ilIl1IIl(0x453,'@gIZ')](ilIl1IIl(0x866,'e$)w')),...$[ilIl1IIl(0x6e3,'q5sP')]($[ilIl1IIl(0x5c8,'r$n^')](ilIl1IIl(0x255,'P]D4'))||'[]')[ilIl1IIl(0x6b1,'ext0')](il1i111I=>il1i111I[ilIl1IIl(0x537,'hN#g')])][ilIl1IIl(0x661,'GszT')](l1III1iI=>!!l1III1iI);if(activityUrl){const nfZFmK=ilIl1IIl(0x1c0,'uZL9')[ilIl1IIl(0x791,'o9Lh')]('|');let UuzdTh=0x0;while(!![]){switch(nfZFmK[UuzdTh++]){case'0':if($[ilIl1IIl(0x3f5,'z9cK')][ilIl1IIl(0x8c9,'GszT')](ilIl1IIl(0x532,'MqdH')))$[ilIl1IIl(0x84e,'rOKN')]=ilIl1IIl(0x2b2,'Mlyr');continue;case'1':$[ilIl1IIl(0x309,'[Gxr')]=getQueryString(''+activityUrl,ilIl1IIl(0x7d6,'I%*W'));continue;case'2':$[ilIl1IIl(0x298,'v(Kx')]=null;continue;case'3':$[ilIl1IIl(0x8bb,'P]D4')]=activityUrl[ilIl1IIl(0x84c,'hBoQ')](/https?:\/\/([^/]+)/)[0x1];continue;case'4':if($[ilIl1IIl(0x5e3,'zSIS')]==null){console[ilIl1IIl(0x730,'jhg5')](ilIl1IIl(0x8dc,'aZub'));return;}continue;case'5':$[ilIl1IIl(0x81c,'s7&c')]=null;continue;case'6':$[ilIl1IIl(0x50a,'e$)w')][ilIl1IIl(0x410,')k[S')](ilIl1IIl(0x830,'mdWL'))&&($[ilIl1IIl(0x17f,'mgEW')]=ilIl1IIl(0x55b,'MqdH'),$[ilIl1IIl(0x2ae,'MqdH')]=ilIl1IIl(0x7fe,'hBoQ'));continue;}break;}}else{console[ilIl1IIl(0x8a2,'aFT@')](ilIl1IIl(0x2c9,'e$)w'));return;}let domains=ilIl1IIl(0x3ad,'0m5!')+$[ilIl1IIl(0x61a,'7m#9')];!(async()=>{const ll1IIl11=ilIl1IIl,iiiiIIlI={'rPnNN':function(l11iIl1I,iIIii1l1){return l11iIl1I(iIIii1l1);},'sUOWF':function(l1liiIiI,i1lil1I){return l1liiIiI(i1lil1I);},'mGdCL':function(il1I111i,iIlI11l1){return il1I111i==iIlI11l1;},'QxMoC':function(Il1Il1iI,Ii1llIIl){return Il1Il1iI(Ii1llIIl);},'aBcAv':function(I11I1i1i,IiIlIii1){return I11I1i1i!==IiIlIii1;},'yYuAY':ll1IIl11(0x259,'0m5!'),'OvQzY':ll1
|
|||
|
|
|||
|
// 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"])
|