faker2/jd_channel_venue_sign.js

12 lines
31 KiB
JavaScript
Raw Normal View History

2024-06-28 07:27:40 +00:00
/*
活动名称频道场馆批量签到
cron: 56 9 * * * jd_channel_venue_sign.js
*/
const $ = new Env('频道场馆批量签到')
var il='jsjiami.com.v7';const i11ili=iii1II;(function(iI11Ii,iIII1l,lllil,iI11Il,iIII1i,iil1i1,il1i11){return iI11Ii=iI11Ii>>0x9,iil1i1='hs',il1i11='hs',function(IlIll1,IlIII,ilil1l,illlIi,I1lIii){const lllll=iii1II;illlIi='tfi',iil1i1=illlIi+iil1i1,I1lIii='up',il1i11+=I1lIii,iil1i1=ilil1l(iil1i1),il1i11=ilil1l(il1i11),ilil1l=0x0;const IiI1I=IlIll1();while(!![]&&--iI11Il+IlIII){try{illlIi=parseInt(lllll(0x1da,'D&UD'))/0x1+parseInt(lllll(0x21b,'8A]l'))/0x2+-parseInt(lllll(0x23b,'PR2U'))/0x3+parseInt(lllll(0x293,'@Cpt'))/0x4*(parseInt(lllll(0x24b,'w%F['))/0x5)+parseInt(lllll(0x1d0,'PR2U'))/0x6+-parseInt(lllll(0x26c,'KSKB'))/0x7+-parseInt(lllll(0x297,'w%F['))/0x8;}catch(illlIl){illlIi=ilil1l;}finally{I1lIii=IiI1I[iil1i1]();if(iI11Ii<=iI11Il)ilil1l?iIII1i?illlIi=I1lIii:iIII1i=I1lIii:ilil1l=I1lIii;else{if(ilil1l==iIII1i['replace'](/[pCNtVdIxYFwDhGABPWre=]/g,'')){if(illlIi===IlIII){IiI1I['un'+iil1i1](I1lIii);break;}IiI1I[il1i11](I1lIii);}}}}}(lllil,iIII1l,function(i11ill,IIIIIi,IIIIIl,I1lIil,IIIl1i,liiII1,IIIl1l){return IIIIIi='\x73\x70\x6c\x69\x74',i11ill=arguments[0x0],i11ill=i11ill[IIIIIi](''),IIIIIl=`\x72\x65\x76\x65\x72\x73\x65`,i11ill=i11ill[IIIIIl]('\x76'),I1lIil=`\x6a\x6f\x69\x6e`,(0x163b51,i11ill[I1lIil](''));});}(0x18800,0x2063b,Iii11l,0xc6),Iii11l)&&(il=0xc6);const jdCookie=require(i11ili(0x1ec,'b!z0')),notify=require(i11ili(0x217,'0DZs')),common=require('./utils/Rebels_jdCommon'),{H5st}=require('./utils/Rebels_H'),isNotify=![];let cookie='';const cookiesArr=Object[i11ili(0x209,'rS8#')](jdCookie)[i11ili(0x23d,'JOf@')](IilIll=>jdCookie[IilIll])[i11ili(0x221,'f@91')](lI11Ii=>lI11Ii);!cookiesArr[0x0]&&($[i11ili(0x20e,'8A]l')]($[i11ili(0x201,'#kg0')],i11ili(0x1b8,'mc^f')),process[i11ili(0x2b7,'fo(s')](0x1));function Iii11l(){const lllill=(function(){return[...[il,'tVGjesDPjiCaGDmwWihr.cFxormD.wYNvVpI7BAd==','W6xcVCkkW4JdUW','W7idbWyoo8knhrtcUvy','vZVdHGuQjmkMW5WAnSoTr8kWuSkcf8kvFCkwWQNdOxiTWOBcPCk+WOi','CuhcSG','b312','WPBORR3MSBxLPOxOT7L64P2aCUAwMUwsQEw6LoAwRUAnVW','uwVcPSoIgND2','W63cRt0rcqtcI8kQWOiPW7y','WRbYx1Dy','gu/dIa','sCkYW794whKEWP4tW4mTWRK','W64fwG','W641na','WQJcICoasvGdW7bJWR8YrcPEWOZcKCooW61/WPfiWQXMW6xcJgtdRhtdOWxcNCkKW48R','Aa/cMSk1Eq','WQRcVmo9W63cPq','WQ3dSmo6W6hdUq','dgNcNMX3DCkhW5S3fSo7qa','WQpdJx8','iwDHW4HD','W64FCCoSWRu','rNtcVSoYta','BZKeWRNdH1HeW7q','e2BcIG/dHCoAFK/cICkUW5y','WPJLJ7ROJzRPPB4f','WPlcU3LVWONdNmkJW6WpyCkoBry0W6/cHXGmja','WP7cI8oPW7BcTbFcSCoxWOiy','W7ddQSoLW7xdRmoZW5aTpmkPwYu','ACoZWQNdMCoh','w8oGWPxdTmoY','k1PpW5JdHIKCqSoRicP0W4GszNBcRItcSXWnFb7dSSkmgSkFE8oqWOFdJSoU','W4FdQdhcHqe','BmoJWPtdNSomhSkLWPfKWPS','W63cScGwnbBcGCkVWP4','WQVdJ0zrWRe','W7NcL8kCWRXU','W5xcNCoGo04FW6pcOKTdWRtcUW','W7hcPs0Npa','oCkRyCojxq','WRTLFsztWPZcPqDbBwC','b3VcIGpdLSo3','W4lcPCkPWOXa','xCo/W44mAsBdQmoTWPFdIs5+zCoGBhtdV8kyW5vRDSooWOuMmgtcIYFcKmoaWRJdKmkwW5FdM8keltSUWOrZWPpdGSohkXlcV8kMFSojW496W7mummoYj8kEW6FdPSo0tmkNt8oIW4RdJ8kWW5X5WP5p','WPJcJshcSmkOWRjpW7DqW6hdI2e','wt7dMJS','W6LGoGBdQSoczq','BmkjbCk/zW','WRldTeBdMrm','b0WKrX/cRCoP','wCoUW5qBBNq','tHlcLmoPEWRcHmkdm8oJWQFcUG','hujjW4Xy','W73dVgTioXldMSkRW5DUWRu0gX1KW4FdKSknWROLdfi6pJ1jyJapW7ZcVtm','kmk0WOe','8l+4QLm','W6/dJSopDSkP','W4BcM8kIWPfH','W6xcK8kHWQbr','WOhcTg/cIJm','C8oRWOpdHCoRcW','W7iScG','iCkOWOGn','lh4UtHu','4PYdW7lMNjhOGz3MRABNO5JLPBlNKOhcUa','C8okW5JcKdCh','D8ooWOpdOmoQ','hCoEaSkhqq','W7mMhSo/WRCKxG','W5hcVmoyaMq','lxm+uHS','cMhdGmkyaq','W60QcSoIWOi6s8kM','WQBcQedcUWW','b1pcQmkmWRO','W7pcOsKmoXBcJq','WQJcMSoeteCjW6vUWOmVrG','WORdTmkFaZuelSkJ','yCoyW6JdIrG','nW0w','WRpcS8k1WRK','A1ldNcXg','WR8yx2BdPW','mmohka','W5BcIWJdSmou','hCkGWQO+W54','W6FcKWWRdG','WOldLmonW6xdI8ozWR0','W5hcJYtdL8oHW6RdUchcLgjk','W4JcQ8oiw1bnd8k0WR7cILNdMa','BYKGgwhcOdi','iSk9WO8yWQVdMSo8jCktWRJcJmo8W7ZdHmoKWQ3dGG','vCo9WONdPmoj'],...(function(){return[...['W6xORzpMSyxLK67LUAed','dgFcL2n+DmoGW60/aSoeqCkN','WRlcSehdHMrnumo3r23dM2dcV8omWRHb','vXtdNsKU','WQNdGxjgWRO','hvTcW4T4ouOw','ymksiW','WONdQCkNhqGt','pv4uW4K','zCorW43cKqW','W4pNRl3LIz3MIPZLIyLV','W4yQiNmm','bmk6WO9slIxdTG','WPxORi/MSjlLPQpOTR/cNokCHCoB','W7i0yvCUW6dcRGKJvd8ipmo9aMnuqKGNW4RdVCkODSkJFmk4WRZcH
// 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