mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
15 lines
59 KiB
JavaScript
15 lines
59 KiB
JavaScript
|
/*
|
|||
|
活动名称:微信红包团
|
|||
|
活动入口:VX小程序
|
|||
|
环境变量:jd_wechat_openGroup_id // 活动ID
|
|||
|
jd_wechat_openGroup_help_pin // 定义助力账号,多个用&隔开
|
|||
|
|
|||
|
cron:1 1 1 1 * jd_wechat_openGroup.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('微信红包团')
|
|||
|
var iil='jsjiami.com.v7';const Ii1II1=iii1II;(function(I1iili,lililI,lI1ill,Illlii,lI1ili,Il1II,i1lll){return I1iili=I1iili>>0x9,Il1II='hs',i1lll='hs',function(Ii11I,I1iill,i1lli,i11111,lIl1li){const I1iilI=iii1II;i11111='tfi',Il1II=i11111+Il1II,lIl1li='up',i1lll+=lIl1li,Il1II=i1lli(Il1II),i1lll=i1lli(i1lll),i1lli=0x0;const Il1I1=Ii11I();while(!![]&&--Illlii+I1iill){try{i11111=-parseInt(I1iilI(0x35c,'lE1^'))/0x1+-parseInt(I1iilI(0x112,'L(!d'))/0x2+-parseInt(I1iilI(0x2e0,'(X3a'))/0x3+parseInt(I1iilI(0x2b6,'rfSb'))/0x4*(-parseInt(I1iilI(0x283,'1OOu'))/0x5)+parseInt(I1iilI(0x2b2,'IYg8'))/0x6*(parseInt(I1iilI(0x292,'ukk('))/0x7)+-parseInt(I1iilI(0x2ce,'!(*x'))/0x8*(-parseInt(I1iilI(0x2e1,'2Vk6'))/0x9)+-parseInt(I1iilI(0x18b,'v7s!'))/0xa*(parseInt(I1iilI(0x26d,'tozn'))/0xb);}catch(lIilii){i11111=i1lli;}finally{lIl1li=Il1I1[Il1II]();if(I1iili<=Illlii)i1lli?lI1ili?i11111=lIl1li:lI1ili=lIl1li:i1lli=lIl1li;else{if(i1lli==lI1ili['replace'](/[VhHxbSYLRCETDuOQIerU=]/g,'')){if(i11111===I1iill){Il1I1['un'+Il1II](lIl1li);break;}Il1I1[i1lll](lIl1li);}}}}}(lI1ill,lililI,function(lIilil,lIl1ll,Ii111,Ii1III,ilIIi1,l111i,l111l){return lIl1ll='\x73\x70\x6c\x69\x74',lIilil=arguments[0x0],lIilil=lIilil[lIl1ll](''),Ii111='\x72\x65\x76\x65\x72\x73\x65',lIilil=lIilil[Ii111]('\x76'),Ii1III='\x6a\x6f\x69\x6e',(0x15fa40,lIilil[Ii1III](''));});}(0x19200,0x41f8a,Iii11l,0xcb),Iii11l)&&(iil=Iii11l);const notify=$[Ii1II1(0x321,'kYMm')]()?require('./sendNotify'):'',jdCookieNode=$['isNode']()?require('./jdCookie.js'):'',common=require(Ii1II1(0x33c,'tozn')),rsactiveId=process[Ii1II1(0x113,'Mg%2')][Ii1II1(0x192,'duuu')]?process[Ii1II1(0x148,'!8mB')][Ii1II1(0x358,'JqPL')][Ii1II1(0x251,')27Z')]('|'):'',helpPinArr=process[Ii1II1(0x278,'!(*x')][Ii1II1(0x356,'2Vk6')]?process[Ii1II1(0x34e,'XXf6')][Ii1II1(0x240,'Txwq')][Ii1II1(0x248,'HScl')]('&'):'';$[Ii1II1(0x1a4,'2Vk6')]=[],console[Ii1II1(0x331,'g5DL')](''),console[Ii1II1(0x32f,'nrCh')](Ii1II1(0x12a,'cUzm')+$[Ii1II1(0x19d,'nrCh')]+Ii1II1(0x153,'Ix0i')),console['log'](Ii1II1(0x183,'oX%H')),console[Ii1II1(0x161,'Gbcp')]('jd_wechat_openGroup_help_pin\x20//\x20定义助力账号,多个用&隔开'),console[Ii1II1(0x179,'KGWB')](Ii1II1(0x1df,'bmK4')+$[Ii1II1(0x13e,'T4TB')]+'提示结束=========='),console[Ii1II1(0x272,'lE1^')]('');function Iii11l(){const lilI1i=(function(){return[iil,'hExRjusbCjDiabumiIU.QYceVRoOmrxT.HvL7uSe==','W7SEWP4','CcNcPG','vYzG','arPpW5CK','tCkfW5PxW68TW4/cJa','W5yzW6NcTSkk','WOBdMCkjCCkzW4NcTG','W7erCSkhW6S','mmkQWOFdVY8mW5W','W5FcLfaBfcmpeWe','W5/cTIdcLG','W48uWQDe','lmoLWP3cG8krBSoEW7RcMCkbWOBdNr0','W4ldJCkenHFdQCkVWP4HWQO','WPGtWReOW5e','fCkmWPVcN8kbW58','W5i1xmkwW7ZcHZRdVa','5B2U5zUA6zEa6kYznG','WQRcG8oCEwtcTCo/W4y','gSkiWPVcP8kDW5ldJCkK','WQqBWPv0W5y','W4vGW44','scXPWQm1rW','WQeUWOaxhSku','vmoJW7pcUW','WROKW6LZW6G','W7/cN8ou6zUH5zky5y+z5B2vwG','rSosW7yaW4O','jZDCW6GiWRddIr9qgtW','W5ZdHfGcbqqygY0xehfa','mmkIWOJcQmkkCSoAW6W','t8oTW70','WP3OROBPHltML5BNMipLVOJOJQtLJz/dHCk5WPv3jSoL','xEISR+wgOoMcKoI+MoEpQUwGU+wnIoMfRCoI6k+957+c5REv5yQAuCo25y6U6ysr772vtCkSW7qlx8omFmksWP95b8kuy8kQW4/dPL3dM3dcPSkax8kiFrmCvq/dLfG+xCknWRyGdsRMTO3LI4BcRI/dTmo15A+S5lIv5RE+5yUkW6NdL8ox','WR8PWRjqW6C','kN/cSCk7aq','WRWZW6LIW6RcRcddNI3cQ0TTeYZdV8kNDSk5zSom','WP4vWQFdTmki','WRekWPvUW4C','WQJdT8kmWOBdNmkkBG','jCk+ka','WRJdQSkMWOVdVG','ocZcJmobW7e','kmkYo8ksW6dcGmkPW7BcHmoFWP7dRG','WOqhW5FdIba','Ebf8jW','5Rsj5yI05BEX57Id5PYf','e8kGiCkjW6i','W7m4W5C','WRyKW6T1W7/cLXy','D3VdJGe','WR0eWPbZ','hmkhWOm','rLi46i+15B6N5lUZWPu','WOtcVKtdOIKKqW','W7FcVJxcVa','WRRdQdNdV8ks','WRa/AIlcPeBcM8oDW5OzW5Wt','sConW7xcTW8','W641D8klW5BcGW','W5RdSwy','W6tcLIpcLSkl','DNNdKG8','mCk3WQNcKSkj','amopWOq','W7xcJhSngG','WPyyWQeaW4BdPSotFG','W4ddOCoDxZ/dUW','WPtdKGXqrfHDmXe9zt4k','WPyIWQeM','6kYp5yQl6zMp5OAq5z+twSoGqCoPWQdOVPZLHkdMO6hKVP7MLz3LHztLRACi5BIQ6k286yov6lYe6iA+5P6F5y276i6i5y+Nn8oxWRddI8olnW','rSoHW7lcOa','C1FdKJNcUa','57Mu5P6u5PAW6zsGWRSW','W6ZdSmkC','W5VdSvmnixuIWOi','W6pML63PM7hLVPhLMQRLI6RLIR3NOyJLRyhMIAdcK+woHUwXTUI/ToIHK+wjM+wiT1DCeG','W7D1ne3dSLnF','WO/cKColEe8','rCoTxmkXpGldSG','W60JWQXBW7G','kZfBW7iFWR7dMa','aCk6WR/dL3GqDg
|
|||
|
// 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.d
|