faker3/jd_daily_bean.js

14 lines
38 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
轻松赚豆
jd_daily_bean_wait 任务间隔默认 5
cron "31 5,18 * * *" script-path=jd_daily_bean.js, tag=轻松赚豆
*/
const $ = new Env('轻松赚豆')
var il='jsjiami.com.v7';const ii1ill=iii1II;(function(l1iIII,llI1I1,IlIlil,lIli1I,II1il,lllI11,I1lIll){return l1iIII=l1iIII>>0x2,lllI11='hs',I1lIll='hs',function(I1lIli,II1ii,IIIIII,lillII,ii1ilI){const I1lIlI=iii1II;lillII='tfi',lllI11=lillII+lllI11,ii1ilI='up',I1lIll+=ii1ilI,lllI11=IIIIII(lllI11),I1lIll=IIIIII(I1lIll),IIIIII=0x0;const lI1ll1=I1lIli();while(!![]&&--lIli1I+II1ii){try{lillII=-parseInt(I1lIlI(0x206,'KRhk'))/0x1+parseInt(I1lIlI(0x1ea,'Wx&K'))/0x2+-parseInt(I1lIlI(0x24d,'GuVp'))/0x3*(parseInt(I1lIlI(0x1c5,'zl0X'))/0x4)+-parseInt(I1lIlI(0x246,'yKAC'))/0x5+parseInt(I1lIlI(0x2f2,'8!ET'))/0x6*(parseInt(I1lIlI(0x2c3,'e)YD'))/0x7)+parseInt(I1lIlI(0x1bf,'yKAC'))/0x8*(-parseInt(I1lIlI(0x285,'D1J6'))/0x9)+parseInt(I1lIlI(0x2a8,'kewp'))/0xa;}catch(iIiI1){lillII=IIIIII;}finally{ii1ilI=lI1ll1[lllI11]();if(l1iIII<=lIli1I)IIIIII?II1il?lillII=ii1ilI:II1il=ii1ilI:IIIIII=ii1ilI;else{if(IIIIII==II1il['replace'](/[IBftGkgueCUYDJbqwTyQO=]/g,'')){if(lillII===II1ii){lI1ll1['un'+lllI11](ii1ilI);break;}lI1ll1[I1lIll](ii1ilI);}}}}}(IlIlil,llI1I1,function(liil1I,i11ii1,IlIliI,l1iII1,iiill1,lIli1i,IIIII1){return i11ii1='\x73\x70\x6c\x69\x74',liil1I=arguments[0x0],liil1I=liil1I[i11ii1](''),IlIliI=`\x72\x65\x76\x65\x72\x73\x65`,liil1I=liil1I[IlIliI]('\x76'),l1iII1=`\x6a\x6f\x69\x6e`,(0x16c427,liil1I[l1iII1](''));});}(0x2fc,0x1a76a,Iii11l,0xc1),Iii11l)&&(il=ii1ill(0x300,'aJtd'));const jdCookie=require(ii1ill(0x2b2,'[AqK')),notify=require(ii1ill(0x1ca,'L07R')),common=require('./utils/Rebels_jdCommon'),{H5st,jsTk}=require(ii1ill(0x1e4,'Bbwh')),isNotify=![],floorToken=ii1ill(0x295,'&1^L'),task_map={'taskReceive':'领取任务','taskFinish':ii1ill(0x21d,'0B)g'),'taskReward':ii1ill(0x2ca,'5$!#')},qszdwait=process[ii1ill(0x1de,'&1^L')]['jd_daily_bean_wait']||'5';function iii1II(_0x276931,_0x4978c1){const _0x2496bb=Iii11l();return iii1II=function(_0x4af85d,_0x5d59da){_0x4af85d=_0x4af85d-0x1a9;let _0x153a5f=_0x2496bb[_0x4af85d];if(iii1II['CPVLmE']===undefined){var _0x2bbf43=function(_0x3f4791){const _0x439c8a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7a8487='',_0x40d871='';for(let _0x48b251=0x0,_0x2f663f,_0x2b3840,_0xffa5fb=0x0;_0x2b3840=_0x3f4791['charAt'](_0xffa5fb++);~_0x2b3840&&(_0x2f663f=_0x48b251%0x4?_0x2f663f*0x40+_0x2b3840:_0x2b3840,_0x48b251++%0x4)?_0x7a8487+=String['fromCharCode'](0xff&_0x2f663f>>(-0x2*_0x48b251&0x6)):0x0){_0x2b3840=_0x439c8a['indexOf'](_0x2b3840);}for(let _0x5be0f2=0x0,_0x3168a6=_0x7a8487['length'];_0x5be0f2<_0x3168a6;_0x5be0f2++){_0x40d871+='%'+('00'+_0x7a8487['charCodeAt'](_0x5be0f2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x40d871);};const _0x34ec72=function(_0x536496,_0xfc8576){let _0x45b133=[],_0x40c0da=0x0,_0x1d6767,_0x4cedd8='';_0x536496=_0x2bbf43(_0x536496);let _0x441ded;for(_0x441ded=0x0;_0x441ded<0x100;_0x441ded++){_0x45b133[_0x441ded]=_0x441ded;}for(_0x441ded=0x0;_0x441ded<0x100;_0x441ded++){_0x40c0da=(_0x40c0da+_0x45b133[_0x441ded]+_0xfc8576['charCodeAt'](_0x441ded%_0xfc8576['length']))%0x100,_0x1d6767=_0x45b133[_0x441ded],_0x45b133[_0x441ded]=_0x45b133[_0x40c0da],_0x45b133[_0x40c0da]=_0x1d6767;}_0x441ded=0x0,_0x40c0da=0x0;for(let _0x7005b6=0x0;_0x7005b6<_0x536496['length'];_0x7005b6++){_0x441ded=(_0x441ded+0x1)%0x100,_0x40c0da=(_0x40c0da+_0x45b133[_0x441ded])%0x100,_0x1d6767=_0x45b133[_0x441ded],_0x45b133[_0x441ded]=_0x45b133[_0x40c0da],_0x45b133[_0x40c0da]=_0x1d6767,_0x4cedd8+=String['fromCharCode'](_0x536496['charCodeAt'](_0x7005b6)^_0x45b133[(_0x45b133[_0x441ded]+_0x45b133[_0x40c0da])%0x100]);}return _0x4cedd8;};iii1II['jEFtmo']=_0x34ec72,_0x276931=arguments,iii1II['CPVLmE']=!![];}const _0x19cb41=_0x2496bb[0x0],_0x14ac09=_0x4af85d+_0x19cb41,_0x530734=_0x276931[_0x14ac09];return!_0x530734?(iii1II['TdbPSc']===undefined&&(iii1II['TdbPSc']=!![]),_0x153a5f=iii1II['jEFtmo'](_0x153a5f,_0x5d59da),_0x276931[_0x14ac09]=_0x153a5f):_0x153a5f=_0x530734,_0x153a5f;},iii1II(_0x276931,_0x4978c1);}let waitTimes=parseInt(qszdwait)*0x3e8,cookie='';function Iii11l(){const ii1ili=(function(){return[...[il,'YetjsjIUigIaJImbi.TCcDQoBUm.DGvf7wqugOyk==','WOmejatcO
// 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