faker3/jd_plantBean.js

25 lines
88 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
种豆得豆 脚本更新地址jd_plantBean.js
活动入口京东APP我的-更多工具-种豆得豆
会自动关注任务中的店铺跟商品介意者勿使用
=====================================Quantumult X=================================
[task_local]
1 7-21/2 * * * jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true
=====================================Loon================================
[Script]
cron "1 7-21/2 * * *" script-path=jd_plantBean.js,tag=京东种豆得豆
======================================Surge==========================
京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=3600,script-path=jd_plantBean.js
====================================小火箭=============================
京东种豆得豆 = type=cron,script-path=jd_plantBean.js, cronexpr="1 7-21/2 * * *", timeout=3600, enable=true
*/
const $ = new Env('种豆得豆');
var il='jsjiami.com.v7';const Ill1ii=iii1II;function iii1II(_0x454f91,_0x584381){const _0x5bd365=Iii11l();return iii1II=function(_0x51755c,_0x433e3d){_0x51755c=_0x51755c-0x80;let _0x4e2824=_0x5bd365[_0x51755c];if(iii1II['pBFJrf']===undefined){var _0x717f7=function(_0x157f61){const _0x516261='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b059a='',_0x562c78='';for(let _0x132fb1=0x0,_0x31fd8e,_0x4e82ae,_0x5a7f9e=0x0;_0x4e82ae=_0x157f61['charAt'](_0x5a7f9e++);~_0x4e82ae&&(_0x31fd8e=_0x132fb1%0x4?_0x31fd8e*0x40+_0x4e82ae:_0x4e82ae,_0x132fb1++%0x4)?_0x3b059a+=String['fromCharCode'](0xff&_0x31fd8e>>(-0x2*_0x132fb1&0x6)):0x0){_0x4e82ae=_0x516261['indexOf'](_0x4e82ae);}for(let _0x4a19fa=0x0,_0x23c235=_0x3b059a['length'];_0x4a19fa<_0x23c235;_0x4a19fa++){_0x562c78+='%'+('00'+_0x3b059a['charCodeAt'](_0x4a19fa)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x562c78);};const _0xf695ce=function(_0x50a6b5,_0x3ec53e){let _0x52b3d7=[],_0xb7ac9e=0x0,_0x38617a,_0x17d72b='';_0x50a6b5=_0x717f7(_0x50a6b5);let _0x33c8ca;for(_0x33c8ca=0x0;_0x33c8ca<0x100;_0x33c8ca++){_0x52b3d7[_0x33c8ca]=_0x33c8ca;}for(_0x33c8ca=0x0;_0x33c8ca<0x100;_0x33c8ca++){_0xb7ac9e=(_0xb7ac9e+_0x52b3d7[_0x33c8ca]+_0x3ec53e['charCodeAt'](_0x33c8ca%_0x3ec53e['length']))%0x100,_0x38617a=_0x52b3d7[_0x33c8ca],_0x52b3d7[_0x33c8ca]=_0x52b3d7[_0xb7ac9e],_0x52b3d7[_0xb7ac9e]=_0x38617a;}_0x33c8ca=0x0,_0xb7ac9e=0x0;for(let _0x1c5ca6=0x0;_0x1c5ca6<_0x50a6b5['length'];_0x1c5ca6++){_0x33c8ca=(_0x33c8ca+0x1)%0x100,_0xb7ac9e=(_0xb7ac9e+_0x52b3d7[_0x33c8ca])%0x100,_0x38617a=_0x52b3d7[_0x33c8ca],_0x52b3d7[_0x33c8ca]=_0x52b3d7[_0xb7ac9e],_0x52b3d7[_0xb7ac9e]=_0x38617a,_0x17d72b+=String['fromCharCode'](_0x50a6b5['charCodeAt'](_0x1c5ca6)^_0x52b3d7[(_0x52b3d7[_0x33c8ca]+_0x52b3d7[_0xb7ac9e])%0x100]);}return _0x17d72b;};iii1II['xLwlgL']=_0xf695ce,_0x454f91=arguments,iii1II['pBFJrf']=!![];}const _0x2ae896=_0x5bd365[0x0],_0x3e2612=_0x51755c+_0x2ae896,_0x1949ce=_0x454f91[_0x3e2612];return!_0x1949ce?(iii1II['DZbPQJ']===undefined&&(iii1II['DZbPQJ']=!![]),_0x4e2824=iii1II['xLwlgL'](_0x4e2824,_0x433e3d),_0x454f91[_0x3e2612]=_0x4e2824):_0x4e2824=_0x1949ce,_0x4e2824;},iii1II(_0x454f91,_0x584381);}(function(Il11I,li1lll,lill1,IiIIl,IiIIi,li1lli,iiiIl1){return Il11I=Il11I>>0x6,li1lli='hs',iiiIl1='hs',function(I1i1I,IIl1,l1ili,i1Ii11,l1iill){const I1i11=iii1II;i1Ii11='tfi',li1lli=i1Ii11+li1lli,l1iill='up',iiiIl1+=l1iill,li1lli=l1ili(li1lli),iiiIl1=l1ili(iiiIl1),l1ili=0x0;const l1ill=I1i1I();while(!![]&&--IiIIl+IIl1){try{i1Ii11=-parseInt(I1i11(0x3ad,'M8Bg'))/0x1+-parseInt(I1i11(0x37f,'jE7U'))/0x2*(-parseInt(I1i11(0x3f9,'XP1k'))/0x3)+-parseInt(I1i11(0x15c,'M^AU'))/0x4+-parseInt(I1i11(0x1d1,'bQbQ'))/0x5*(-parseInt(I1i11(0x14a,'&RaS'))/0x6)+parseInt(I1i11(0x23e,'r@hr'))/0x7*(parseInt(I1i11(0x2e0,'qRt6'))/0x8)+-parseInt(I1i11(0x33e,'LG#E'))/0x9+-parseInt(I1i11(0xcc,'033w'))/0xa*(-parseInt(I1i11(0x36e,'^^qy'))/0xb);}catch(lIi1I1){i1Ii11=l1ili;}finally{l1iill=l1ill[li1lli]();if(Il11I<=IiIIl)l1ili?IiIIi?i1Ii11=l1iill:IiIIi=l1iill:l1ili=l1iill;else{if(l1ili==IiIIi['replace'](/[UfOEpFMDNVQPSKBYedRhWg=]/g,'')){if(i1Ii11===IIl1){l1ill['un'+li1lli](l1iill);break;}l1ill[iiiIl1](l1iill);}}}}}(lill1,li1lll,function(l1iili,illIIi,iiIi,iiIl,Iil1I,illIIl,iiiIlI){return illIIi='\x73\x70\x6c\x69\x74',l1iili=arguments[0x0],l1iili=l1iili[illIIi](''),iiIi=`\x72\x65\x76\x65\x72\x73\x65`,l1iili=l1iili[iiIi]('\x76'),iiIl=`\x6a\x6f\x69\x6e`,(0x159fa4,l1iili[iiIl](''));});}(0x3200,0x5e3d0,Iii11l,0xca),Iii11l)&&(il=0x35d4);let jdNotify=!![],cookiesArr=[],cookie='',jdPlantBeanShareArr=[],isBox=![],notify,newShareCodes,option,message,subTitle;const common=require(Ill1ii(0x23f,'!(&v')),{H5st}=require(Ill1ii(0x27d,'qRt6')),JD_API_HOST=Ill1ii(0x319,'V)Gg');let shareCodes=[],allMessage='',currentRoundId=null,lastRoundId=null,roundList=[],awardState='',randomCount=$['isNode']()?0x14:0x5,num;$[Ill1ii(0x2fc,'rEjk')]=[];let NowHour=new Date()[Ill1ii(0x246,'9Vb8')](),lnrun=0x0;!(async()=>{const IllII=Ill1ii,IiIii={'lzLlH':IllII(0x2fb,'VuEc'),'FmypP':IllII(0x266,'wD38'),'Lbmoa':IllII(0x36f,'MUZJ')
// 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