KR/jd_dlgf.js

19 lines
101 KiB
JavaScript
Raw Normal View History

2023-10-29 10:39:53 +08:00
/*
10.28-11.12 签到瓜分京豆
无助力
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-10-29 10:42:03 +08:00
var version_='jsjiami.com.v7';const Iii1lIiI=ilI1iIll;(function(l1I1ili1,llili1li,ilIliIl1,I1IlllI,ilI1II1,ll1Iill,ill1illI){return l1I1ili1=l1I1ili1>>0x1,ll1Iill='hs',ill1illI='hs',function(llIl1li1,iiiIi1ii,IlillIIi,i1iilIIl,iIiiilIl){const i1IIII1i=ilI1iIll;i1iilIIl='tfi',ll1Iill=i1iilIIl+ll1Iill,iIiiilIl='up',ill1illI+=iIiiilIl,ll1Iill=IlillIIi(ll1Iill),ill1illI=IlillIIi(ill1illI),IlillIIi=0x0;const lIii1ili=llIl1li1();while(!![]&&--I1IlllI+iiiIi1ii){try{i1iilIIl=parseInt(i1IIII1i(0x3ca,'PZpt'))/0x1*(-parseInt(i1IIII1i(0x40b,')v@A'))/0x2)+-parseInt(i1IIII1i(0x397,'DjTb'))/0x3+parseInt(i1IIII1i(0x2b3,'hzL#'))/0x4+-parseInt(i1IIII1i(0x231,']9iq'))/0x5+parseInt(i1IIII1i(0x3d1,')M$r'))/0x6*(parseInt(i1IIII1i(0x226,'sFgI'))/0x7)+-parseInt(i1IIII1i(0x13e,'B2e8'))/0x8+-parseInt(i1IIII1i(0x404,'!In['))/0x9*(-parseInt(i1IIII1i(0x1ca,'UR&('))/0xa);}catch(iIIl1lii){i1iilIIl=IlillIIi;}finally{iIiiilIl=lIii1ili[ll1Iill]();if(l1I1ili1<=I1IlllI)IlillIIi?ilI1II1?i1iilIIl=iIiiilIl:ilI1II1=iIiiilIl:IlillIIi=iIiiilIl;else{if(IlillIIi==ilI1II1['replace'](/[rkAUnPNQVMKJhXqOpEC=]/g,'')){if(i1iilIIl===iiiIi1ii){lIii1ili['un'+ll1Iill](iIiiilIl);break;}lIii1ili[ill1illI](iIiiilIl);}}}}}(ilIliIl1,llili1li,function(liIiIiiI,Illl1lIl,IlI1lli,ilIliIIl,I1l1i1I,IilI1l1l,Ii1Ii1I){return Illl1lIl='\x73\x70\x6c\x69\x74',liIiIiiI=arguments[0x0],liIiIiiI=liIiIiiI[Illl1lIl](''),IlI1lli=`\x72\x65\x76\x65\x72\x73\x65`,liIiIiiI=liIiIiiI[IlI1lli]('\x76'),ilIliIIl=`\x6a\x6f\x69\x6e`,(0x144eaf,liIiIiiI[ilIliIIl](''));});}(0x198,0x8b7a9,IIl1Il1l,0xce),IIl1Il1l)&&(version_=Iii1lIiI(0x485,'iXxZ'));const i11liiII=$[Iii1lIiI(0x310,'W6nG')]()?require(Iii1lIiI(0x2e9,'!In[')):'',ll1iII1=$[Iii1lIiI(0x45b,'iXxZ')]()?require(Iii1lIiI(0x33f,'CyqA')):'';CryptoJS=$[Iii1lIiI(0x2e6,'eV!*')]()?require(Iii1lIiI(0x230,'yCFU')):CryptoJS;const iil1li11=require('./function/krgetToken'),I1iii1=require(Iii1lIiI(0x430,'@Uud')),iI1iiIi1=require('./function/jdCommon');let lll1liIi=Iii1lIiI(0x3ae,'gR2K'),lIiIllli=Iii1lIiI(0x1f4,'XGsr'),I111i11=[],lliiI1l='';if($['isNode']()){Object['keys'](i11liiII)['forEach'](liil1iII=>{I111i11['push'](i11liiII[liil1iII]);});if(process['env'][Iii1lIiI(0x49d,'DjTb')]&&process[Iii1lIiI(0x188,'x)[1')][Iii1lIiI(0x45f,'x)[1')]==='false')console['log']=()=>{};}else I111i11=[$[Iii1lIiI(0x256,'W6nG')]('CookieJD'),$[Iii1lIiI(0x11c,'eV!*')]('CookieJD2'),...li1l1Ii($[Iii1lIiI(0x185,'Pqak')](Iii1lIiI(0x383,'g*kR'))||'[]')[Iii1lIiI(0x23a,'Q5gz')](IIIIIIIl=>IIIIIIIl[Iii1lIiI(0x4e4,'W6nG')])]['filter'](lllI1Il1=>!!lllI1Il1);lIiIllli=$['isNode']()?process[Iii1lIiI(0x1f1,'gR2K')][Iii1lIiI(0x3cc,'s2z[')]?process[Iii1lIiI(0x3b3,'iXxZ')][Iii1lIiI(0x1a4,'UmH4')]:''+lIiIllli:$['getdata'](Iii1lIiI(0x3db,'wUzK'))?$[Iii1lIiI(0x301,'K!4R')](Iii1lIiI(0x532,'iXxZ')):''+lIiIllli,$['exchangePostawardId']=process[Iii1lIiI(0x53f,'wUzK')][Iii1lIiI(0x463,'Q5gz')]?process[Iii1lIiI(0x470,'XFS5')]['jd_zqyb_exchangeid']:Iii1lIiI(0x336,'2ftF');let llIlIllI='30';llIlIllI=$['isNode']()?process[Iii1lIiI(0x31f,'DpUH')][Iii1lIiI(0x515,'DpUH')]?process[Iii1lIiI(0x28d,'B2e8')]['retrynum']:llIlIllI:$['getdata'](Iii1lIiI(0x1fe,'sFgI'))?$[Iii1lIiI(0x126,'tiQA')](Iii1lIiI(0x1dd,'(1!x')):llIlIllI;const lllI1IlI=process[Iii1lIiI(0x130,'W9ek')]['JD_PROXY_TUNNRL'],i1liliI1=process[Iii1lIiI(0x26a,'hzL#')][Iii1lIiI(0x2ea,'[j1(')]||'2';let il1IIIiI='0';il1IIIiI=$[Iii1lIiI(0x38f,'gR2K')]()?process[Iii1lIiI(0x13a,'%ZPL')][Iii1lIiI(0x518,'oJUu')]?process[Iii1lIiI(0x3d2,'UR&(')][Iii1lIiI(0x224,'9m5T')]:il1IIIiI:$[Iii1lIiI(0x185,'Pqak')]('jd_mpdz_draw')?$[Iii1lIiI(0x1f5,'CyqA')](Iii1lIiI(0x501,'%ZPL')):il1IIIiI;let il1Iii1=parseInt(i1liliI1)*0x3e8;lllI1IlI&&(il1Iii1=0x64);allMessage='',message='';let Ill1il1='';$['hotFlag']=![],$['outFlag']=![],$['activityEnd']=![];let i1Ill1l='',iIli1I1I='';!(async()=>{const lIlIllli=Iii1lIiI,I1illl={'AfjNk':function(IiII1Ill,l1ii1IiI){return IiII1Ill==l1ii1IiI;},'IfqrG':lIlIllli(0x125,'yCFU'),'SgukF':'请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie','DrMxI':function(IIIliIi1){return IIIliIi1();},'buslT':function(llili1l,li1IiIl1){return llili1l==
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