KR/jd_ttlhb.js

13 lines
82 KiB
JavaScript
Raw Normal View History

2023-09-15 15:22:53 +08:00
/*
天天领红包
cron "25 7 * * *" script-path=jd_ttlhb.js, tag=天天领红包
轮询提现变量jd_ttlhb_num //轮询提现页数 一般无需填写
*/
const $ = new Env('天天领红包');
2023-12-26 03:15:42 +08:00
var il='jsjiami.com.v7';const IIlI=iii1II;(function(IiIIl,IiIIi,li1lli,iiiIl1,I1i1I,IIl1,l1ili){return IiIIl=IiIIl>>0x8,IIl1='hs',l1ili='hs',function(i1Ii11,l1iill,l1ill,lIi1I1,l1iili){const Ill1il=iii1II;lIi1I1='tfi',IIl1=lIi1I1+IIl1,l1iili='up',l1ili+=l1iili,IIl1=l1ill(IIl1),l1ili=l1ill(l1ili),l1ill=0x0;const illIIi=i1Ii11();while(!![]&&--iiiIl1+l1iill){try{lIi1I1=-parseInt(Ill1il(0xb2,'x5er'))/0x1+parseInt(Ill1il(0x284,'nRj('))/0x2*(parseInt(Ill1il(0xa5,'Sz4x'))/0x3)+-parseInt(Ill1il(0x161,'SRho'))/0x4+-parseInt(Ill1il(0x189,'OjQ%'))/0x5+parseInt(Ill1il(0x292,'Gk(u'))/0x6*(parseInt(Ill1il(0x174,'*fXY'))/0x7)+parseInt(Ill1il(0x2be,'5gTB'))/0x8*(parseInt(Ill1il(0x12d,'%JTe'))/0x9)+parseInt(Ill1il(0x390,'E)Uo'))/0xa*(parseInt(Ill1il(0xda,'sxTz'))/0xb);}catch(iiIi){lIi1I1=l1ill;}finally{l1iili=illIIi[IIl1]();if(IiIIl<=iiiIl1)l1ill?I1i1I?lIi1I1=l1iili:I1i1I=l1iili:l1ill=l1iili;else{if(l1ill==I1i1I['replace'](/[uVWfObeYSXgMFUrTBlDp=]/g,'')){if(lIi1I1===l1iill){illIIi['un'+IIl1](l1iili);break;}illIIi[l1ili](l1iili);}}}}}(li1lli,IiIIi,function(iiIl,Iil1I,illIIl,iiiIlI,I1i11,Ill1ii,IllII){return Iil1I='\x73\x70\x6c\x69\x74',iiIl=arguments[0x0],iiIl=iiIl[Iil1I](''),illIIl=`\x72\x65\x76\x65\x72\x73\x65`,iiIl=iiIl[illIIl]('\x76'),iiiIlI=`\x6a\x6f\x69\x6e`,(0x14d501,iiIl[iiiIlI](''));});}(0xbc00,0xa3477,Iii11l,0xbe),Iii11l)&&(il=0x2dc9);const I1iill=$[IIlI(0x179,'cm*7')]()?require(IIlI(0x26f,'[szj')):'',i1lli=$[IIlI(0x90,'2W1^')]()?require(IIlI(0xab,'BJf)')):'',i11111=require('./function/krgetH5st');let lIl1li=!![],Il1I1='l-yLvQMhLwCqYy6_nXUBgg',lIilii=process['env'][IIlI(0x22d,'UU$Z')]?process['env'][IIlI(0x285,'!i)3')]:'1',lIilil=Date['now'](),lIl1ll=[],Ii111='',Ii1III;if($['isNode']()){Object['keys'](i1lli)[IIlI(0x16a,'#cWH')](l1liii=>{lIl1ll['push'](i1lli[l1liii]);});if(process[IIlI(0x226,'nRj(')]['JD_DEBUG']&&process['env']['JD_DEBUG']===IIlI(0x85,'(MQn'))console['log']=()=>{};}else lIl1ll=[$[IIlI(0x345,'A@Hn')](IIlI(0x31b,'nRj(')),$[IIlI(0x1b2,'078m')](IIlI(0x10e,'B*Y)')),...l111l($['getdata'](IIlI(0x32e,'E)Uo'))||'[]')[IIlI(0x339,'K@jR')](I1Ili1=>I1Ili1['cookie'])]['filter'](l1liil=>!!l1liil);!(async()=>{const I1i1l=IIlI,i1ll1={'mSdAD':'请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie','GJNtN':'【提示】请先获取京东账号一cookie\x0a直接使用NobyDa的京东签到获取','wYlyq':'https://bean.m.jd.com/bean/signIndex.action','sOPSi':I1i1l(0x2f4,'E)Uo'),'shTId':I1i1l(0x72,'B*Y)'),'NuwHy':function(lilI1I,lI1I1l){return lilI1I(lI1I1l);},'gFGBX':function(Il1Il,i1IiiI){return Il1Il+i1IiiI;},'eyzNY':I1i1l(0x2d3,'ZHy)'),'DpIJm':I1i1l(0x173,'A@Hn'),'vcaDR':function(lI1I1I,l1lII){return lI1I1I*l1lII;}};if(!lIl1ll[0x0]){$['msg']($[I1i1l(0x239,'BJf)')],i1ll1[I1i1l(0x28f,'&(qY')],i1ll1[I1i1l(0x99,'J@1Y')],{'open-url':'https://bean.m.jd.com/bean/signIndex.action'});return;}for(let lilI1l=0x0;lilI1l<lIl1ll['length'];lilI1l++){if(i1ll1[I1i1l(0x381,'SRho')]!==i1ll1['shTId']){if(lIl1ll[lilI1l]){Ii111=lIl1ll[lilI1l],$[I1i1l(0x26b,'078m')]=i1ll1['NuwHy'](decodeURIComponent,Ii111['match'](/pt_pin=([^; ]+)(?=;?)/)&&Ii111[I1i1l(0x2f5,'078m')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[I1i1l(0x2fc,'A@Hn')]=i1ll1['gFGBX'](lilI1l,0x1),$[I1i1l(0x3a5,'BJf)')]=!![],$[I1i1l(0xfc,'euIV')]='',Ii1III='',console['log'](I1i1l(0x2d6,'UU$Z')+$['index']+'】'+($[I1i1l(0x159,'U[*g')]||$[I1i1l(0x244,'nRj(')])+I1i1l(0x17e,'BJf)'));if(!$['isLogin']){$[I1i1l(0x269,'Ee@O')]($[I1i1l(0x35d,'J@1Y')],'【提示】cookie已失效','京东账号'+$[I1i1l(0x35b,'Gk(u')]+'\x20'+($[I1i1l(0x2aa,'K@jR')]||$['UserName'])+I1i1l(0x298,'qG[S'),{'open-url':i1ll1[I1i1l(0x2f7,'s4F)')]});$['isNode']()&&await I1iill[I1i1l(0x13c,'Q^4I')]($[I1i1l(0x391,'@#9n')]+I1i1l(0x132,'s4F)')+$[I1i1l(0x346,'A@Hn')],'京东账号'+$[I1i1l(0xe0,'!D$b')]+'\x20'+$[I1i1l(0x17a,'o4D*')]+I1i1l(0x37c,'Q^4I'));continue;}$[I1i1l(0x374,'x5er')]=i1ll1[I1i1l(0x2c0,'nRj(')](i1ll1[I1i1l(0x293,'(WD2')],lI1I1i(i1ll1[I1i1l(0x190,'SRho')])),$['UA']=await Ili1I1(),await ilIIi1(),await $[I1i1l(0x18e,'$#kp')](parseInt(i1ll1['gFGBX'](i1ll1[I1i1l(0x143,'#cWH')](Math[I1i1l(0x287,'ZHy)')
2023-09-15 15:22: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