mirror of https://github.com/KingRan/KR.git
27 lines
90 KiB
JavaScript
27 lines
90 KiB
JavaScript
|
/*
|
|||
|
爱让好物 成为礼物 2
|
|||
|
新增开卡脚本,一次性脚本
|
|||
|
|
|||
|
变量
|
|||
|
//export opencard_draw="3" //抽奖次数 3
|
|||
|
|
|||
|
————————————————
|
|||
|
入口:[ 爱让好物 成为礼物 2]
|
|||
|
|
|||
|
请求太频繁会被黑ip
|
|||
|
过10分钟再执行
|
|||
|
|
|||
|
cron:11 11 11 11 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#爱让好物 成为礼物 2
|
|||
|
11 11 11 11 * jd_opencardL323.js, tag=爱让好物 成为礼物 2, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('爱让好物 成为礼物 2');
|
|||
|
var version_='jsjiami.com.v7';const lIlIi1=iii1II;(function(l111Ii,lI1i11,lili1I,i1iiII,l111Il,I1III,l1II1I){return l111Ii=l111Ii>>0x7,I1III='hs',l1II1I='hs',function(iiliI1,iIi11I,iiii11,iIl1II,il1lIi){const iiii1I=iii1II;iIl1II='tfi',I1III=iIl1II+I1III,il1lIi='up',l1II1I+=il1lIi,I1III=iiii11(I1III),l1II1I=iiii11(l1II1I),iiii11=0x0;const Ili1=iiliI1();while(!![]&&--i1iiII+iIi11I){try{iIl1II=parseInt(iiii1I(0x478,'Z!KK'))/0x1*(parseInt(iiii1I(0x359,'tJiU'))/0x2)+-parseInt(iiii1I(0x44b,'OBA8'))/0x3*(-parseInt(iiii1I(0x3ec,'(0pX'))/0x4)+parseInt(iiii1I(0x3b5,'^*RG'))/0x5+-parseInt(iiii1I(0x21e,'tJiU'))/0x6+parseInt(iiii1I(0x137,'DZdA'))/0x7+-parseInt(iiii1I(0x43b,')WuO'))/0x8+-parseInt(iiii1I(0x333,'[D^j'))/0x9;}catch(ii11iI){iIl1II=iiii11;}finally{il1lIi=Ili1[I1III]();if(l111Ii<=i1iiII)iiii11?l111Il?iIl1II=il1lIi:l111Il=il1lIi:iiii11=il1lIi;else{if(iiii11==l111Il['replace'](/[SWndrFOHAUwLXEuIpBDl=]/g,'')){if(iIl1II===iIi11I){Ili1['un'+I1III](il1lIi);break;}Ili1[l1II1I](il1lIi);}}}}}(lili1I,lI1i11,function(i1IIl1,I1IIl,i1iiIi,iiliII,i1iiIl,I11llI,I1IIi){return I1IIl='\x73\x70\x6c\x69\x74',i1IIl1=arguments[0x0],i1IIl1=i1IIl1[I1IIl](''),i1iiIi='\x72\x65\x76\x65\x72\x73\x65',i1IIl1=i1IIl1[i1iiIi]('\x76'),iiliII='\x6a\x6f\x69\x6e',(0x1391fa,i1IIl1[iiliII](''));});}(0x6280,0xa4c83,Iii11l,0xc7),Iii11l)&&(version_=Iii11l);const iilIi1=$[lIlIi1(0x39d,'l1*P')]()?require(lIlIi1(0x3ba,'Vn)d')):'',I111=$[lIlIi1(0x30f,'ljVE')]()?require('./sendNotify'):'',I1I11l=require(lIlIi1(0x2dc,'V8%J')),I1I11i=require(lIlIi1(0x260,'UIcD')),l1iI1l=require(lIlIi1(0x4b2,'so*d')),III1ll=require(lIlIi1(0x302,'tJiU'));let l1lIIi='https://lzdz1-isv.isvjcloud.com',iII11I=$[lIlIi1(0x315,'&Je#')]()?process[lIlIi1(0x48a,'7IxD')]['opencard_draw']?process['env'][lIlIi1(0x4f5,'Vn)d')]:'0':$['getdata'](lIlIi1(0x1c0,'W3T!'))?$['getdata'](lIlIi1(0x319,'$NNg')):'0',IiIii1=[],l1lIIl='';function Iii11l(){const IiIl11=(function(){return[version_,'WdUjBDsFjSiamWHilD.coOmIr.vd7IpuXLAnEHwH==','WO7cShddOeG','WOKgW55gWRaEW4S','W4ZcVmopWPVcRMyigCkq','n0JcMmolfvBcSa','W5VcKmozWRNcNa','5ysC5RoCW4ng','xrjsymojWP1HW5PIWQP+','p1xcMcVdLa','BSo9W5mhW7RcNSkXAqdcV3JdSxBcPq','W6HaWObPWOpcQ2P8WO0RWPNcG0JdPG','kX/dQSkYaSooisrYbq5n','cCk2WPLzjq','zWrLWQS','raldQ8kCW6C','eapdJConEa','5RAh5yMu57Ik5P2X','W5vhWQjSWPy','lcPJqSks','WOxdRtG0W4Sz','Abzntmom','5Q+aW67dI+w1RUIIOoMyMowiPE+8LoIVJoI8V1JcQUwiL+MrG+wtHUwgNEAkMEIIIEIgJ+AEVSog','y8o7W4Klcq','tCoXW54','nWhdP8oZDMNcImkvkaGXW45dWRS','W4xdO8oFW55Ukx1wtSkv','WR44W6BdICoSW4G1nsRdUKKTvq','rtCxW6zRcmoK','W5VcPSopWP7cMfasaSkr','W6ldVSkVW7FcOa','W5ldK23cMXu','Fmo7W4qhW6BcR8kiAqO','W7/dHX5lW5W','W5HSWR9KWPNcUW','5OUv5AEV5AA95AwV5QYr77YW5AEn5l2Y55QI5Q+d5PAo6k6y5ysi5OUd6kog6iwI5P2I','jxZdOW','W6KRrh4','CqJdJ8kqqHxdS8otjCkVWPDftG','o0ZcSIRcPmk9t8k1','W43dQCopW7L5lwbSsmkQhmo2DmkqWQfJWOO','W4ZdJqf9W5TdW4ldUSk6W5pcQSk0WPhdH8olCwxcKa','b8kRWPnLoCoF','CCo3W5C','DmkwW7VcJJ/cKSoeWRVdICkVire','5Q2XWRdcG+w1G+IIGUMzUEwiIo+9SEIVSEI/LSorW7VLI4BPKltLKOJLH4lMIP7OOlZOHORMNOed','dmoyW6mu','vSkZWRiTW7a','wCoWWOCeWRtcL8kPxghcNIyU','vSo0WP/cLcuDr0JcHry','ySk+WR8OW4tcJCkWCvddMG','WORcKmogxfe','W5JcTZ7cOCoFy8ozDmol','W6NcOXxcS8oV','rWPhtSkIoCkv','WO3cSgNdPG','5REB5yUa5AAq54gi54Uo772D6k2A56Mt5zkS5yAJ6kYr','W7tdNMJcQJOAW41YoG','W61fW5P+ia','W7tdRSov','ySkBWR3dG3m','W7DOWQZcJa','tsRdP8ojohfuWRye','hJPV','W4JdQmoC','lmkrW6fxW6G','iCoLW4BdIb8','6iYt5BYq776H','iJXM','W5ddLSo+W75X','BXddKSovpW','fCkOW4JdNmkhWOX0lmkkW48KrYBdPMZcMSkk','5y+/5yQD5yAE776Y','zJ3dHe5hpa','WRxdI2e1eCk8Fqe','wSo5WPRcTrqBxwlcKGfm','BbbLWOX8Ab0','lwhdPCoJW7ddVSk0Emo+hdi','WP3dUmkmWOVcOL0zmSkncSkIBHOYWPLInmkeWPyRW4eZjZuqwsxdLZNdRCoqW4VdSCoBWRq7W4eUW7pcOSkqW4VdS3C6W4ffmc1VsSkVW5bAWPrpyCkrE0tdG8kra3Se','rmoyW4WRc8kE','WOqKW77dGmoB','kqJdRmkqh8oTmd8','AGTLWQ9IBaNdT8kyWOddR8oqfSoaW7NcJCkv','f8oBeGHP','WOWhW50','FeDPbmkT','eWZcU8oFWQ7cIW','avpcLSoVBG','zG3dJmoId2z0WPG','W4NdVsbkW4q','WOhcL8o5vgO5eMdcPNHzcq','WPBcTmo4qwS','zCk4WOhdGKW','WOldUYyHW5TxWRddKIBdI27cRCo6cmk7jwfKls/dSHddM2STWO4jiSoJCmk0WQ95WQxdMmo6A8omW6ZdGYiVWPxcKCkPWQ8UW4vjWRzmy8kZW53dLSk1qepdGCkyp0JcISkhv1hdOmkeW4pdLISsnSkJW4RdPmoWW4BcTXzBW4SVWQxdH
|
|||
|
// 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
|
|||
|
|