faker3/jd_market_task.js

13 lines
40 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
超市做任务赚汪贝
只是做任务
cron "15 10 * * *" script-path=jd_market_task.js, tag=超市做任务赚汪贝
*/
const $ = new Env('超市做任务赚汪贝')
var il='jsjiami.com.v7';const IIIII1=iii1II;(function(iiillI,l1l111,l1iIII,llI1I1,IlIlil,lIli1I,II1il){return iiillI=iiillI>>0x9,lIli1I='hs',II1il='hs',function(lllI11,I1lIll,I1lIli,II1ii,IIIIII){const lIli1i=iii1II;II1ii='tfi',lIli1I=II1ii+lIli1I,IIIIII='up',II1il+=IIIIII,lIli1I=I1lIli(lIli1I),II1il=I1lIli(II1il),I1lIli=0x0;const lillII=lllI11();while(!![]&&--llI1I1+I1lIll){try{II1ii=-parseInt(lIli1i(0x23f,'BIU8'))/0x1+parseInt(lIli1i(0x1a4,'DPU5'))/0x2*(-parseInt(lIli1i(0x23c,'7nuW'))/0x3)+-parseInt(lIli1i(0x1c1,'[(0u'))/0x4*(parseInt(lIli1i(0x12d,'Ak&g'))/0x5)+-parseInt(lIli1i(0x1a2,'x8Ww'))/0x6*(-parseInt(lIli1i(0x24f,'&l5('))/0x7)+parseInt(lIli1i(0x22c,'76dP'))/0x8*(-parseInt(lIli1i(0xe6,'00D3'))/0x9)+parseInt(lIli1i(0xda,'fnd$'))/0xa+parseInt(lIli1i(0x206,'6oOD'))/0xb;}catch(ii1ilI){II1ii=I1lIli;}finally{IIIIII=lillII[lIli1I]();if(iiillI<=llI1I1)I1lIli?IlIlil?II1ii=IIIIII:IlIlil=IIIIII:I1lIli=IIIIII;else{if(I1lIli==IlIlil['replace'](/[LQgCNFSKhOBPxunWqXlI=]/g,'')){if(II1ii===I1lIll){lillII['un'+lIli1I](IIIIII);break;}lillII[II1il](IIIIII);}}}}}(l1iIII,l1l111,function(lI1ll1,iIiI1,liil1I,i11ii1,IlIliI,l1iII1,iiill1){return iIiI1='\x73\x70\x6c\x69\x74',lI1ll1=arguments[0x0],lI1ll1=lI1ll1[iIiI1](''),liil1I=`\x72\x65\x76\x65\x72\x73\x65`,lI1ll1=lI1ll1[liil1I]('\x76'),i11ii1=`\x6a\x6f\x69\x6e`,(0x1732db,lI1ll1[i11ii1](''));});}(0x17c00,0xd4e0d,Iii11l,0xc0),Iii11l)&&(il=`\x4a4`);function Iii11l(){const lIli1l=(function(){return[...[il,'IPBjIFsLSnjWBigaOmXiI.NNcnholSqmx.CKv7uQ==','W73dJ8oQWQv+WRpdKmkvAbn7W4ae','n8klW4tcMG','pxhcQmkbWQ8rymoAmmkE','hMdcVmk5W6GwW4GyW7dcSmklWQddKG','W53cVue','W7lcTeNdUmkehSoFW6m','772o44oi566f5yI+5AAw5PAI44kC','WRpcOmoCbvi','W4tcQeJdRW','ktX0BSkoW7VdIhFcTqe','WPtdTrhcKW','WRDDWQhdHCkoWPRdQh/cQg51WRiQW5qhsMZcLuRcNsK','uZxdGG','44oq566v5yQc54M/5Ocm44orW74','hfZcUwimWRuVW6vxxrhdKb1YW7NcK3BdQgTbWPrAvry5WOjbWQy/WPjzkw3cJ8kPWQ7dVSkLpCoH','WRPoWORdU8kG','WOVcTSodfuCQv1jui8kpWQ0sW5e','4PYgxoIfJ+ADLUI8MoIIHoMbPUwlO+s6JoMxV+IVJvG','W5tdU8kqkx8ZW5LV','WQ/cG8kXW6myW6NcJSkTtW1lW4aCqb7dJmkfW73dHI9zW6j0bmoKW6xcOupcPq','WQJcN8ogWRL+W7RdStzMW5hcPmkrWQXxW759W5C0uSosW7e','WRrzWOZdUCkd','WQhcSSoDegS','WO0JW6DVWP01AwNcTG','CSkQWRPyvq','kx3cU8kJWP0rzmoDmCkSrHxcK8o8DG5wWOVdUq','W6PYW7u','WPbnWPFdOCkE','6lsq5y6F5PAw5PEn','WP8KW6zVWPq8','c1xcHCoycG','W6tcVwTGr8kwWQdcIa','jWVcIMdcTq','n8o5W4vtqW','BYZdM0a','wYRdPSoLWQHgWOWjW7VcSSkkWOG','qYZdVCoXWQ4FW5DvW4lcRSkdW4NdLrrOW71/WPZcOmomjSkUWQVcIWhdQ8kDdwfoW4RdJLRcV8kUWPrlySocxMNdSq14DmkqhKhdL3P/WQCoWP7dLKP5qmoXW6BdRKC+h8kmWPhdP8kbWRifWPddJW','mSorW5L4rmol','jYWLm8kq','laRcGwNcQb83','W4/dSmkcmg8KW4G','lqVcIhZcNW','wW0fW7BdKSoJWOW','kCk9WOj9','WQmeWRxcJMCN','W5xdOCkhnxLTWPmZW5RdPSoYr8obj1nCW5JdMmopWRu','pqZcIwVcIr8Gdq','W55yeNiXW4aX','iGGHcSk7W7ioW7XRWPzlFmo7W4dcKSklgmoAkCoBWPK','WOqmWPS','C8ozvNrb','avZcTq','CCocWRG','AmkrWP9ZCa','oYFdV8kE','jXKMcCkPWQ9e','W5FcU0RdLrdcSW','hHddI8kKaZDPFKNcT8oKirSW','kWG6cSkxWQTjWRjKWOHhpSojWO3cL8kcrSovi8ocW5n5gHlcSCow','eahdMSkkhW','j8o+W75ara','evf8W5NdOG','ps1YsSkfW6/dKNdcQW','W5xdOJJdNW','dtKb','zmoKBK1UuvW','WQWoWRBcMx8QWOBcMHBcJfdcTXJdQW','WQDFWOdcQX4sWOhdK8orrgmbzq','WPJcKqXls2ZcISoWWOO','WQrmWRNdLmkJWP3dHhVcTwm','ydhdMmoSWPW','WOtdTJSQpmoeW73cJ8kIW4FcV00S','W6OByG','k3pcPv4M','fL5UW4e','W6OAyG','WQyvWR7cHga','A8k6WRbUqceJ','WPpdQrS','aq0sW6ddKa','W5BdICkwdW','mSobW554tmol','W4bje2G+W4a9hfK','W6ivW4dcJee','W5tcVhX9EW','bZxdSSo+W6m','WQpcHmoFWRLHWQxcQNbOW4/cJSorWRu','oGtcNw7cGrCQcG','WRT8WOZdU8kt','rGKeW6tdNSo3WQ3dVCkVWOm','W4nCe2a9W5qqg1qR','W5rNWPL6W7C','WPldPbldG8o1WPGB','zCoStLTC','WRvgWQRdKa','cM7dGtBdGCkOuZ3cHbq','FCo1Aq8','WPVcHrC','WOjgWRddQG','W5ZdSCkfdg4','W5bRcwG6','EKVcOq','WOFcOmodd0eJxW','W5hdUSku','EctdIe9vB2FcNCk/xG','l2VcVmkgWPSlBmolk8kzEatcQmo8','imocW4f4xW','pSoxW55IsSocW7m','W5tdRs/dJgrWW5aUWR/cTmo0W6K0qaZdOGhcHmkL','WRpcN8oaWQbJWQFcT39+','W5jjdNepW4q8g04Ko8kjW50uW74OkSkRn8orA8ozhmkZzSokW6mCrmkkxIJdKmkXkmo6WO3dGG','WQKnWRtcHMe','ft3dKCkikG','W6b2W7hdUZ4vW60','W7qdW5VdRv5sW4hdVCoft0aNx8kkW6L0Fmk6Cq','W53cS8oucuKCBG','W7aEW6JdPwa','kXGJm8kS','W7tORAZMSilLKihLUi04','jW00pSk7','i8kRWOHNW5JcVmoGD8oCW6VdIMrRWPm',
// 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