mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
22 lines
90 KiB
JavaScript
22 lines
90 KiB
JavaScript
|
/*
|
|||
|
活动名称:集卡有礼 · 超级无线
|
|||
|
活动链接:https://lzkjdz-isv.isvjd.com/wxCollectCard/activity/entry.html?activityId=<活动id>
|
|||
|
环境变量:jd_wxCollectCard_activityId // 活动id
|
|||
|
|
|||
|
默认助力第一个CK,第一个CK失效会退出脚本
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('集卡有礼(超级无线)')
|
|||
|
const jdCookieNode = $.isNode() ? require('./jdCookie') : ''
|
|||
|
const notify = $.isNode() ? require('./sendNotify') : ''
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
const { wxSavePrize } = require('./function/savePrize')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const _0x28e8f7=_0x32db;(function(_0x2d507e,_0x1fc463,_0x4ef112,_0x54dfd7,_0x1b06c6,_0x555d0f,_0x2064fa){return _0x2d507e=_0x2d507e>>0x8,_0x555d0f='hs',_0x2064fa='hs',function(_0x51de68,_0xc273e4,_0x5223e8,_0x4965ef,_0x371af4){const _0xcfac95=_0x32db;_0x4965ef='tfi',_0x555d0f=_0x4965ef+_0x555d0f,_0x371af4='up',_0x2064fa+=_0x371af4,_0x555d0f=_0x5223e8(_0x555d0f),_0x2064fa=_0x5223e8(_0x2064fa),_0x5223e8=0x0;const _0x428f1b=_0x51de68();while(!![]&&--_0x54dfd7+_0xc273e4){try{_0x4965ef=parseInt(_0xcfac95(0x2b4,'sZ9V'))/0x1+-parseInt(_0xcfac95(0x2b2,'Gac)'))/0x2*(-parseInt(_0xcfac95(0x12a,'@6qR'))/0x3)+parseInt(_0xcfac95(0x2f5,'fEpG'))/0x4*(-parseInt(_0xcfac95(0x3a7,'@6qR'))/0x5)+parseInt(_0xcfac95(0x20b,'68ei'))/0x6+parseInt(_0xcfac95(0x2ec,'Cc(L'))/0x7+parseInt(_0xcfac95(0x2b1,'!^2M'))/0x8+-parseInt(_0xcfac95(0x3a8,'3Y%w'))/0x9;}catch(_0xbf4e26){_0x4965ef=_0x5223e8;}finally{_0x371af4=_0x428f1b[_0x555d0f]();if(_0x2d507e<=_0x54dfd7)_0x5223e8?_0x1b06c6?_0x4965ef=_0x371af4:_0x1b06c6=_0x371af4:_0x5223e8=_0x371af4;else{if(_0x5223e8==_0x1b06c6['replace'](/[qAptFwyYPkSDVCNWxEn=]/g,'')){if(_0x4965ef===_0xc273e4){_0x428f1b['un'+_0x555d0f](_0x371af4);break;}_0x428f1b[_0x2064fa](_0x371af4);}}}}}(_0x4ef112,_0x1fc463,function(_0x6eb05f,_0x24fdff,_0x499d8b,_0x1f3818,_0x382202,_0x23f4fd,_0x9927cc){return _0x24fdff='\x73\x70\x6c\x69\x74',_0x6eb05f=arguments[0x0],_0x6eb05f=_0x6eb05f[_0x24fdff](''),_0x499d8b='\x72\x65\x76\x65\x72\x73\x65',_0x6eb05f=_0x6eb05f[_0x499d8b]('\x76'),_0x1f3818='\x6a\x6f\x69\x6e',(0x135e53,_0x6eb05f[_0x1f3818](''));});}(0xbf00,0xaed7e,_0x5c49,0xc1),_0x5c49)&&(version_=_0x5c49);let lz_cookie={},cookiesArr=[],cookie='';if($[_0x28e8f7(0x217,'#E[8')]()){Object[_0x28e8f7(0x229,'3A51')](jdCookieNode)[_0x28e8f7(0x108,'F6Qe')](_0x3146c3=>{const _0x1746c7=_0x28e8f7;cookiesArr[_0x1746c7(0x1cc,'XaGw')](jdCookieNode[_0x3146c3]);});if(process[_0x28e8f7(0xef,'68ei')][_0x28e8f7(0x2e9,'#DN$')]&&process[_0x28e8f7(0x2c1,'3[Vj')][_0x28e8f7(0xbc,'Ty7R')]==='false')console[_0x28e8f7(0x135,'iSNi')]=()=>{};}else cookiesArr=[$['getdata'](_0x28e8f7(0x417,'fEpG')),$[_0x28e8f7(0x298,'L]TX')]('CookieJD2'),...jsonParse($[_0x28e8f7(0x290,'h[TY')](_0x28e8f7(0x7a,'*WJg'))||'[]')[_0x28e8f7(0x15b,'A2vs')](_0x16a379=>_0x16a379[_0x28e8f7(0x350,'#E[8')])]['filter'](_0x4d84fe=>!!_0x4d84fe);allMessage='',message='',$[_0x28e8f7(0xd0,'f8q7')]=![],$['outFlag']=![],$[_0x28e8f7(0xd8,'Allm')]=![];let lz_jdpin_token_cookie='',activityCookie='',jd_wxCollectCard_activityId='';jd_wxCollectCard_activityId=$['isNode']()?process[_0x28e8f7(0x255,'F^BW')]['jd_wxCollectCard_activityId']?process[_0x28e8f7(0x375,'Ag@n')]['jd_wxCollectCard_activityId']:''+jd_wxCollectCard_activityId:$[_0x28e8f7(0xb4,'np#&')](_0x28e8f7(0xd7,'VA17'))?$[_0x28e8f7(0x79,'M9N4')]('jd_wxCollectCard_activityId'):''+jd_wxCollectCard_activityId,!(async()=>{const _0x2e28fe=_0x28e8f7,_0x458f95={'gkyub':function(_0x4e10ef,_0x228784){return _0x4e10ef===_0x228784;},'irSUs':_0x2e28fe(0x137,'W[n2'),'NZcPA':'sNcST','WCQTO':_0x2e28fe(0x413,'F6Qe'),'jvrjw':_0x2e28fe(0x315,'*WJg'),'pvPmK':function(_0x58b362,_0x528c00){return _0x58b362<_0x528c00;},'NLHHq':function(_0x544926,_0x200c4f){return _0x544926(_0x200c4f);},'QRePv':function(_0x2547c0,_0x2d5e78){return _0x2547c0+_0x2d5e78;},'QUrtL':function(_0xae4b6b,_0x2b9ae9){return _0xae4b6b==_0x2b9ae9;},'GWLvQ':_0x2e28fe(0x379,'x@kS'),'YsDKj':function(_0x19bf19,_0x4ff8aa){return _0x19bf19(_0x4ff8aa);},'PEVpK':function(_0x4ec541,_0x1327e3){return _0x4ec541+_0x1327e3;},'vXnzf':function(_0x368873){return _0x368873();},'HNsGb':_0x2e28fe(0x159,'!^2M'),'EalaU':_0x2e28fe(0xba,'Ag@n')};if(!jd_wxCollectCard_activityId){if(_0x458f95[_0x2e28fe(0x145,'3A51')]===_0x458f95[_0x2e28fe(0xeb,'Ty7R')]){console['log'](_0x2e28fe(0x154,'VA17'));return;}else _0x1642f2[_0x2e28fe(0x220,'VA17')](_0x449170[_0xa42871]);}if(!cookiesArr[0x0]){$['msg']($[_0x2e28fe(0x387,'%vny')],_0x458f95[_0x2e28fe(0x3df,'L]TX')],_0x458f95[_0x2e28fe(0x2c7,'[su^')],{'open-url':_0x458f95[_0x2e28fe(0x2bd,'iSNi')]});return;}$[_0x2e28fe(0x174,'99NT')]=jd_wxCollectCard_activityId,$[_0x2e28fe(
|
|||
|
|
|||
|
// 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"])
|