KR/jd_dlgf.js

19 lines
94 KiB
JavaScript
Raw Normal View History

2023-10-29 10:39:53 +08:00
/*
10.28-11.12 签到瓜分京豆
2023-11-09 18:25:13 +08:00
无助力 更新瓜分 差不多10豆的样子
2023-10-29 10:39:53 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#10.28-11.12 签到瓜分京豆
1 1 1 1 * jd_dlgf.js, tag=10.28-11.12 签到瓜分京豆, enabled=true
*/
const $ = new Env('10.28-11.12 签到瓜分京豆');
2023-11-09 18:25:13 +08:00
var version_='jsjiami.com.v7';const li11Ii=iii1II;(function(Ii1ll1,IIlIlI,I1III1,iIll1,l11li1,i1I,liII1I){return Ii1ll1=Ii1ll1>>0x9,i1I='hs',liII1I='hs',function(iIiIiI,iIlil,lIiII1,iIlii,lI1I){const l11liI=iii1II;iIlii='tfi',i1I=iIlii+i1I,lI1I='up',liII1I+=lI1I,i1I=lIiII1(i1I),liII1I=lIiII1(liII1I),lIiII1=0x0;const I1Ii=iIiIiI();while(!![]&&--iIll1+iIlil){try{iIlii=-parseInt(l11liI(0x3ac,'zXCD'))/0x1+-parseInt(l11liI(0x175,'u@eW'))/0x2*(parseInt(l11liI(0x178,'a#es'))/0x3)+-parseInt(l11liI(0x306,'BGu8'))/0x4+-parseInt(l11liI(0x40d,'%)uv'))/0x5+-parseInt(l11liI(0x210,'nwad'))/0x6+-parseInt(l11liI(0x544,'PcgS'))/0x7+-parseInt(l11liI(0x3dd,'u@eW'))/0x8*(-parseInt(l11liI(0x237,'#Ba8'))/0x9);}catch(I1Il){iIlii=lIiII1;}finally{lI1I=I1Ii[i1I]();if(Ii1ll1<=iIll1)lIiII1?l11li1?iIlii=lI1I:l11li1=lI1I:lIiII1=lI1I;else{if(lIiII1==l11li1['replace'](/[yOfrgYqnXSVwbWxtGILAM=]/g,'')){if(iIlii===iIlil){I1Ii['un'+i1I](lI1I);break;}I1Ii[liII1I](lI1I);}}}}}(I1III1,IIlIlI,function(l1li1i,l1li1l,il1Ill,il1Ili,i1IlI1,IIlIli,IIlIll){return l1li1l='\x73\x70\x6c\x69\x74',l1li1i=arguments[0x0],l1li1i=l1li1i[l1li1l](''),il1Ill=`\x72\x65\x76\x65\x72\x73\x65`,l1li1i=l1li1i[il1Ill]('\x76'),il1Ili=`\x6a\x6f\x69\x6e`,(0x146bbb,l1li1i[il1Ili](''));});}(0x18800,0xbf473,Iii11l,0xc6),Iii11l)&&(version_=li11Ii(0x188,'Xdbn'));const ll1lIl=$['isNode']()?require(li11Ii(0x170,'BGu8')):'',I1IIl1=$[li11Ii(0x1d6,'UP1D')]()?require(li11Ii(0x2e3,'91lM')):'';CryptoJS=$['isNode']()?require(li11Ii(0x2fc,'td#S')):CryptoJS;const l1I1l1=require('./function/krgetToken'),ll1lIi=require(li11Ii(0x3cf,'e&XJ')),lIi1i=require(li11Ii(0x3d8,'u@eW'));let iIIIil=li11Ii(0x2bc,'Ph*s'),Ii1Ii1='false',IIll1I=[],liii1I='';if($[li11Ii(0x255,'mSsK')]()){Object[li11Ii(0x1d2,'yXSG')](ll1lIl)['forEach'](iIIIl1=>{IIll1I['push'](ll1lIl[iIIIl1]);});if(process[li11Ii(0x459,'3rUv')]['JD_DEBUG']&&process[li11Ii(0x333,'91lM')][li11Ii(0x268,'tQd(')]===li11Ii(0x1ce,'zXCD'))console[li11Ii(0x27e,'nwad')]=()=>{};}else IIll1I=[$[li11Ii(0x2f7,'!rJB')](li11Ii(0x1fc,'#Ba8')),$[li11Ii(0x19a,'nwad')](li11Ii(0x3ea,'cSsL')),...liii1i($['getdata']('CookiesJD')||'[]')[li11Ii(0x40f,']PEm')](li11iI=>li11iI[li11Ii(0x4f5,'PcgS')])][li11Ii(0x1c1,'yXSG')](liliIl=>!!liliIl);Ii1Ii1=$[li11Ii(0x419,'yXSG')]()?process[li11Ii(0x194,'Xdbn')][li11Ii(0x3b2,'vapE')]?process['env'][li11Ii(0x532,'J7UO')]:''+Ii1Ii1:$['getdata'](li11Ii(0x24f,'a#es'))?$[li11Ii(0x176,'u@eW')](li11Ii(0x41e,'MTm5')):''+Ii1Ii1,$['exchangePostawardId']=process[li11Ii(0x267,'cSsL')][li11Ii(0x485,'U*#b')]?process[li11Ii(0x333,'91lM')][li11Ii(0x187,'tQd(')]:li11Ii(0x3ab,']PEm');let lI1iIi='30';lI1iIi=$[li11Ii(0x4aa,'L*Kn')]()?process[li11Ii(0x24b,'B]TY')][li11Ii(0x4da,'u@eW')]?process['env'][li11Ii(0x466,'MTm5')]:lI1iIi:$[li11Ii(0x19d,'Un(&')](li11Ii(0x387,'tQd('))?$['getdata'](li11Ii(0x41a,'1vU]')):lI1iIi;const lIi1l=process[li11Ii(0x2a9,'HhbB')][li11Ii(0x399,'Xdbn')],iIIIii=process[li11Ii(0x24b,'B]TY')][li11Ii(0x39f,'XhW7')]||'2';let li11ii='0';li11ii=$[li11Ii(0x4aa,'L*Kn')]()?process['env'][li11Ii(0x1c9,'u@eW')]?process[li11Ii(0x408,'R4#Y')][li11Ii(0x1a9,'#Ba8')]:li11ii:$[li11Ii(0x3d6,'u6mA')](li11Ii(0x4a9,'ZEdQ'))?$[li11Ii(0x463,'tpcH')](li11Ii(0x4e1,'&FR]')):li11ii;let I1iiIi=parseInt(iIIIii)*0x3e8;lIi1l&&(I1iiIi=0x64);allMessage='',message='';let li1i1='';$[li11Ii(0x42b,'1vU]')]=![],$['outFlag']=![],$[li11Ii(0x3f3,'u6mA')]=![];let I1iiIl='',liliII='';function Iii11l(){const ll1IIl=(function(){return[...[version_,'gYSrjnfVsjwLOitbaymGMiXM.xcrWoqmw.IvSA7y==','rf10BYhdQcu','ySopp8omW7W','sSoujSorW6vF','5P6C6i255y6V5yQa5PEt5OYovEIUVEMfK+AvS+I+O+IIVq','WP3cKqxdVa','W6mtW7K1WRCZW5ZcQq','WQdcSCooW5K','aaddOL/dLmkmWQdcUa','yCo4W5m6','jKtdTGpdTW','r1virSogdG','W6ZdPI8WjW','vgi9WRRcR8kkzt3cGbKqW6O','WQLKeSkMeW','hftcOW','WQ/cR8kPWR/cUCoQkmk5','W4X9Cmo1Ea','W7qeW78OWRWqW4ZcT11dW7JcKG','mmk7D8o4WPu','W4VdNKe','tGNdSLtdNSkNWOdcL8kqW6KqFehcLfFcMCkFWR8cW6ryFZJcQSoKW61qWRT8kmkhW5nrW60nW6H2CmkGaCk5WPK','BCo6eKfl','W7JcI8okjW','r8k1W59dWQy','xCozimovW7q','uKGFbCoGqCkq','uchdImkZfq','q8oLj8o4W5i','gCocvmkJbq','p8kRWOW','uffdW5HM','yNWRvdG','WPWBW6ddJL3cQG','c8outSkCnSoIqC
2023-10-29 10:39:53 +08:00
// 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