mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
23 lines
91 KiB
JavaScript
23 lines
91 KiB
JavaScript
|
/*
|
|||
|
活动名称:粉丝互动 · 超级无线
|
|||
|
活动地址:https://lzkjdz-isv.isvjd.com/wxFansInterActionActivity/activity/activity?activityId=<活动id>
|
|||
|
环境变量:jd_wxFansInterActionActivity_activityId // 活动id
|
|||
|
jd_wxFansInterActionActivity_addCart // 是否做加购任务,默认不做
|
|||
|
|
|||
|
脚本自动入会,不想入会勿跑!
|
|||
|
|
|||
|
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')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const _0x2a6b45=_0x83d2;(function(_0x170915,_0x420bfe,_0x301f45,_0x9c27d9,_0x26dc3c,_0x130993,_0x38ed28){return _0x170915=_0x170915>>0x4,_0x130993='hs',_0x38ed28='hs',function(_0x33b8f5,_0xa6be25,_0x264bef,_0x209d91,_0x37b84a){const _0x6ed9ca=_0x83d2;_0x209d91='tfi',_0x130993=_0x209d91+_0x130993,_0x37b84a='up',_0x38ed28+=_0x37b84a,_0x130993=_0x264bef(_0x130993),_0x38ed28=_0x264bef(_0x38ed28),_0x264bef=0x0;const _0x2e4d54=_0x33b8f5();while(!![]&&--_0x9c27d9+_0xa6be25){try{_0x209d91=parseInt(_0x6ed9ca(0x357,'fX2l'))/0x1+-parseInt(_0x6ed9ca(0x1c1,'$Jdn'))/0x2*(-parseInt(_0x6ed9ca(0x2b5,'T^]u'))/0x3)+parseInt(_0x6ed9ca(0x1b0,'AQrB'))/0x4+-parseInt(_0x6ed9ca(0x2c5,'bbSM'))/0x5*(-parseInt(_0x6ed9ca(0x32d,'mc$W'))/0x6)+-parseInt(_0x6ed9ca(0x216,'hu]('))/0x7*(parseInt(_0x6ed9ca(0x350,'Ngsb'))/0x8)+-parseInt(_0x6ed9ca(0x2cf,'Hqi2'))/0x9*(-parseInt(_0x6ed9ca(0x16f,'8KwX'))/0xa)+-parseInt(_0x6ed9ca(0x27c,')po0'))/0xb;}catch(_0x1c3de8){_0x209d91=_0x264bef;}finally{_0x37b84a=_0x2e4d54[_0x130993]();if(_0x170915<=_0x9c27d9)_0x264bef?_0x26dc3c?_0x209d91=_0x37b84a:_0x26dc3c=_0x37b84a:_0x264bef=_0x37b84a;else{if(_0x264bef==_0x26dc3c['replace'](/[HxNwJUPfFMhKnduBCVG=]/g,'')){if(_0x209d91===_0xa6be25){_0x2e4d54['un'+_0x130993](_0x37b84a);break;}_0x2e4d54[_0x38ed28](_0x37b84a);}}}}}(_0x301f45,_0x420bfe,function(_0x590970,_0x315b4f,_0x25ab19,_0x4180b3,_0x309737,_0x4cd9b0,_0x47e8de){return _0x315b4f='\x73\x70\x6c\x69\x74',_0x590970=arguments[0x0],_0x590970=_0x590970[_0x315b4f](''),_0x25ab19='\x72\x65\x76\x65\x72\x73\x65',_0x590970=_0x590970[_0x25ab19]('\x76'),_0x4180b3='\x6a\x6f\x69\x6e',(0x135e55,_0x590970[_0x4180b3](''));});}(0xc10,0x4ebf7,_0x25cc,0xc3),_0x25cc)&&(version_=_0x25cc);let cookiesArr=[],activityCookie='',lz_cookie={};$['outFlag']=![],$[_0x2a6b45(0x3b7,'RpAe')]=![];let jd_wxFansInterActionActivity_activityId='';jd_wxFansInterActionActivity_activityId=$[_0x2a6b45(0x2ce,'8%tw')]()?process['env']['jd_wxFansInterActionActivity_activityId']?process[_0x2a6b45(0x2e1,'T^]u')][_0x2a6b45(0x2e6,'H!k5')]:''+jd_wxFansInterActionActivity_activityId:$[_0x2a6b45(0x38c,'H!k5')](_0x2a6b45(0x41d,'aeW7'))?$[_0x2a6b45(0x1d5,'#q*k')](_0x2a6b45(0x18b,']ZPu')):''+jd_wxFansInterActionActivity_activityId;let addCart=process[_0x2a6b45(0x2e1,'T^]u')][_0x2a6b45(0x233,'Hqi2')]?process['env'][_0x2a6b45(0x3b6,'fX2l')]:'false';const activityList=jd_wxFansInterActionActivity_activityId;if($[_0x2a6b45(0x2a8,'#qWX')]()){Object['keys'](jdCookieNode)[_0x2a6b45(0x297,'#qWX')](_0x571b32=>{const _0x7a4ddc=_0x2a6b45;cookiesArr[_0x7a4ddc(0x1ed,'ABqs')](jdCookieNode[_0x571b32]);});if(process[_0x2a6b45(0x351,'$Jdn')]['JD_DEBUG']&&process['env'][_0x2a6b45(0x138,'mAGp')]===_0x2a6b45(0x3c7,'4#k@'))console['log']=()=>{};}else cookiesArr=[$['getdata'](_0x2a6b45(0x46b,'#q*k')),$[_0x2a6b45(0x16c,'RpAe')](_0x2a6b45(0x45e,'bbSM')),...$['toObj']($[_0x2a6b45(0x44a,'#qWX')](_0x2a6b45(0x459,'()QH'))||'[]')['map'](_0x39882c=>_0x39882c['cookie'])]['filter'](_0x7350e5=>!!_0x7350e5);!(async()=>{const _0x99283=_0x2a6b45,_0x3b6a56={'eVHGm':function(_0x58c998,_0x4e93ba){return _0x58c998+_0x4e93ba;},'KoZzE':'getFirstLZCK\x20此ip已被限制,请过10分钟后再执行脚本','aCivf':'lYfTg','XVvtF':'onzby','KYIZJ':_0x99283(0x305,'bbSM'),'QilIN':_0x99283(0x236,'W6pd'),'GNVSg':function(_0x58d7c6,_0x1824d8){return _0x58d7c6<_0x1824d8;},'hrBYP':_0x99283(0x30b,'ABqs'),'bvLDR':function(_0x143a1c){return _0x143a1c();},'sltCl':function(_0x86453f,_0x15b7e2){return _0x86453f(_0x15b7e2);},'rdAQa':function(_0x131799,_0x3005fc){return _0x131799===_0x3005fc;},'htvrA':'QJcKP'};if(!cookiesArr[0x0]){if(_0x3b6a56[_0x99283(0x3e0,'Ah%Z')]!==_0x3b6a56[_0x99283(0x4ca,']ZPu')]){$[_0x99283(0x13c,'mc$W')]($[_0x99283(0x161,'RpAe')],_0x3b6a56[_0x99283(0x412,'ABqs')],_0x3b6a56[_0x99283(0x24d,'JPiu')],{'open-url':_0x3b6a56[_0x99283(0x462,'DERp')]});return;}else _0x3be3c1[_0x99283(0x4a5,'Lw%E')](_0x3b6a56['eVHGm'](_0x99283(0x1cc,'jNm&')+_0x47dc39[_0x99283(0x3fb,'b!ju')]['shopName']+_0x99283(0x282,'mc$W')+_0x591f90[_0x99283(0x382,'f8zv')]+_0x99283(0x194,'()QH')+new _0x4e72bd(_0x59f011(_0xe608
|
|||
|
|
|||
|
// 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"])
|