faker3/jd_txzj_lottery.js

19 lines
80 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称幸运抽奖 · 收藏大师
活动链接https://txzj-isv.isvjcloud.com/lottery/home?a=<活动id>
环境变量jd_lottery_activityUrl // 活动链接
7 7 7 7 *
*/
const $ = new Env('幸运抽奖(收藏大师)')
const notify = $.isNode() ? require('./sendNotify') : ''
const jdCookieNode = $.isNode() ? require('./jdCookie') : ''
const getToken = require('./function/getToken')
var version_='jsjiami.com.v7';const i1lillIi=i1IllIii;function i1IllIii(_0x56de73,_0x3cde27){const _0x25543c=I11iil1();return i1IllIii=function(_0x84f8b1,_0x3e282e){_0x84f8b1=_0x84f8b1-0x1e2;let _0xba584=_0x25543c[_0x84f8b1];if(i1IllIii['FnVsWi']===undefined){var _0x264558=function(_0x370dbc){const _0x659d7d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1674f2='',_0x258361='';for(let _0x2b2877=0x0,_0x58116d,_0x2abe9a,_0x436944=0x0;_0x2abe9a=_0x370dbc['charAt'](_0x436944++);~_0x2abe9a&&(_0x58116d=_0x2b2877%0x4?_0x58116d*0x40+_0x2abe9a:_0x2abe9a,_0x2b2877++%0x4)?_0x1674f2+=String['fromCharCode'](0xff&_0x58116d>>(-0x2*_0x2b2877&0x6)):0x0){_0x2abe9a=_0x659d7d['indexOf'](_0x2abe9a);}for(let _0x23ea90=0x0,_0x4e07e3=_0x1674f2['length'];_0x23ea90<_0x4e07e3;_0x23ea90++){_0x258361+='%'+('00'+_0x1674f2['charCodeAt'](_0x23ea90)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x258361);};i1IllIii['nTjWID']=_0x264558,_0x56de73=arguments,i1IllIii['FnVsWi']=!![];}const _0x54c0a9=_0x25543c[0x0],_0x2335bc=_0x84f8b1+_0x54c0a9,_0x56202f=_0x56de73[_0x2335bc];return!_0x56202f?(_0xba584=i1IllIii['nTjWID'](_0xba584),_0x56de73[_0x2335bc]=_0xba584):_0xba584=_0x56202f,_0xba584;},i1IllIii(_0x56de73,_0x3cde27);}function I11iil1(){const IlIi1lli=(function(){return[...[version_,'uyHKjgsJjrUiEyafNtmJKGidyB.dRGchoSmQr.v7==','zw52','zhjHD251Bq','Ee1SB0i','5Rs75yQOAwtKUi3LRzJLNkG','AwzAEfi','z2v0u2vJB25KCW','EMGTq04SEMGTsgfUCZTXptaUoq','Dxjyrum','wwTPvfK','wwXhqNC','nZe5odyWCKTZDK5n','rNjjtMS','CNvwt0y','44crioACQUIdVEIoT+wpLUA0U+wkQos/OEAbRW','tKrTtfu','uMH1qvm','6k+35AgR5yAz5Rs75yQO6zo+5O6L','z2LMDeLUzM8','r05MDKq','zvzsBMu','vg1zvNK','v2zQueq','AfHeuvq','ChvZAa','seDUt08','tKPZAhG','Dgv4Dc9ODg1SlgfWCgXPy2f0Aw9Ul3HODg1Sk3HTBcXHChbSAwnHDgLVBI94BwW7Ct0WlJKSAw1Hz2uVyxzPzIXPBwfNzs93zwjWlgLTywDLl2fWBMCSkI8Qo3e9mc44lgfWCgXPy2f0Aw9Ul3nPz25Lzc1LEgnOyw5NztT2pwiZo3e9mc45','ugPmC1G','5lUk5AsP5RkH5PYj5OQ95Aww5PY65lYA5lQg77Ym5PIo5AsP5yAn5P2L5zcNFG','tMnkC1q','wMjmAKG','zgPysuy','qMjRAxi','vxjowwO','wMjVEui','C2v0lwnVB2TPzq','zgvJBee','C2voq2e','BgPlvuO','AwTdEgO','wufRtwi','qK5ZAxm','ug1Owgu','thLttee','wKvbyLm','AwfRzNi','z2v0rgf0zq','C3bSAxq','twPnthq','zMLSDgvY','Ahr0Chm6lY9HCgKUBs5Qzc5JB20Vy2XPzw50lMfJDgLVBJ9HChbPzd1Qzf9ZAg9Wx21LBwjLCIzMDw5JDgLVBKLKpwDLDfnOB3bpCgvUq2fYzeLUzM8MyM9KEt0','wKrmwgG','BxPXBKC','t2zsvuW','5Rs75yQO5BEY57Ut5P2F5OIw6icf5PYQ5BYa5AEl','BxnN','o00Vns4Wo25LDhDVCMSVD2LMAtTbreLelZTTB2rLBc9PugHVBMuXmIWXo2fKzhjLC3nPzc80mtK5mtC1mtKZo2fWCej1AwXKlZe2nZG2mZTQzfn1ChbVCNreyxjRtw9Kzs8Wo01VEMLSBgeVns4WicHPugHVBMu7ienqvsbPugHVBMuGt1mGmtrFmYbSAwTLie1HyYbpuYbyksbbChbSzvDLyKTPDc82mduUms4XnsaOs0HutuWSigXPA2uGr2vJA28Pie1VyMLSzs8XnuuXndG7C3vWCg9YDePeu0HxsY8XoW','jMnSAwvUDfzLCNnPB249os4YlJaMy2XPzw50puG1jNv1Awq9odG4odGMAdvZDd0','whHSs1C','EMnNCxy','vhjHD3O','AMHhCNq','ChDOq3O','EenKq2K','t1PND2e','DK9eALO','cUwoU+wkOowfPEw6L+MtUUs8MUwrMo+8MG','AfL1rKS','z1j2ueC','r3fsyw0','wvHZAw8','yuPmDhC','ntzYwgfQuNe','DMvUzgvYq2fYze5HBwu','EePqv3u','yNvSq2G','BxPLChy','sK9UBgi','DMfVAxq','D2T5EeW','zKzJDeC','ihrHC2TFC2HVCf93Aw5FBNvTiefqsEIVT+AXGUwKSEI0PE+8JoIVT+AJGoAFPEE9KEI3R+MhJEIVLq','vMr2tfC','qKvowe0','t1b0A3C','vgvOvfu','t2XZuhK','ywjJzgvMmdeYmZq1nJC4oq','u2LswNi','y291Cg9U','t1vfAgS','ze56tg8','yMvHBG','rKX0CeS','zxjYCW','zMfSC2u','C3jezMm','zezHCwu','sMj4Cxq','z2v0sg91CNm','y29VA2LL5BEY5AsX5Pwiic0G','wLHjzKK','BgDwCfu','igXVDhrLCNLFD2LUx3bYAxPLiefqsEIVT+AXGUwKSEI0PE+8JoIVT+AJGoAFPEE9KEI3R+MhJEIVLq','rwT5vuW','zMPAvgO','5OQ95Aww5PY65lYA','reXSAKq','y2HqEMe','wvrQu1u','qxDSD3G','vfzuBM0','DMzwBey','sMz2uMi','CwjOBMy','reLuAuG','EfHtsg0','AvDdExK','B0HfEgq','wLvysgK','s3vztLm','A0P1sfm','EhPlugS','uuLxDMm','EMvjEgW','mtjtvu1lruK','zgnJBxm','tfHJA0y','vKv3vuq','EMzYq2y','uMvZCg9UC2uGy29Kzsa0mdmGkezVCMjPzgrLBIK','yvPiALK','tKnQvLa','z1LUreW','r1PrAgG','rKHKr3e','EeHhr1C','q29VA2LLsKqY','D2TVrum','sM1qy2e','wu1kEey','txnNquS','AMTAzwK','u3DHsKC','z2v0twLSBgLZzwnVBMrZ','y1fcAxK','sK9Usu4','BgvUz3rO','ChjPEMvoyw1L','z2v0rNvSBfLLyxi','sKrFrevcvuC','Dw5KzwzPBMvK','zvrnD1G','AMrFC2HVCf9Tzw1Izxi','wMzjCvO','rgHovKu','wvbcC2W','Bw9vtMS'
// 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