jdpro/jd_djggl_draw.js

8 lines
147 KiB
JavaScript
Raw Normal View History

2024-07-26 05:53:03 +00:00
/*
1 15 * * * https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_djggl_draw.js
*/
const $ = new Env('夺金刮刮乐_抽奖');
var _0xodA='jsjiami.com.v7';const _0x21998c=_0x5a47;(function(_0x53bc77,_0x5cc62a,_0x3f2374,_0x4d571b,_0x40f68c,_0x1bded2,_0x59bd46){return _0x53bc77=_0x53bc77>>0x5,_0x1bded2='hs',_0x59bd46='hs',function(_0x2892ef,_0x164e8d,_0x93563e,_0x31de14,_0x1841e5){const _0x2dd43a=_0x5a47;_0x31de14='tfi',_0x1bded2=_0x31de14+_0x1bded2,_0x1841e5='up',_0x59bd46+=_0x1841e5,_0x1bded2=_0x93563e(_0x1bded2),_0x59bd46=_0x93563e(_0x59bd46),_0x93563e=0x0;const _0x18d1b1=_0x2892ef();while(!![]&&--_0x4d571b+_0x164e8d){try{_0x31de14=-parseInt(_0x2dd43a(0x85a,'Zj2('))/0x1+-parseInt(_0x2dd43a(0x410,'Y(p5'))/0x2*(parseInt(_0x2dd43a(0x44b,'Spvc'))/0x3)+parseInt(_0x2dd43a(0x5d9,'I5]H'))/0x4*(parseInt(_0x2dd43a(0x3b9,'hlU]'))/0x5)+-parseInt(_0x2dd43a(0x6f6,'Zj2('))/0x6*(-parseInt(_0x2dd43a(0x67d,'13g4'))/0x7)+parseInt(_0x2dd43a(0x28f,'$wC['))/0x8*(parseInt(_0x2dd43a(0x764,'n(Rn'))/0x9)+-parseInt(_0x2dd43a(0x707,')eE!'))/0xa+parseInt(_0x2dd43a(0x42d,'Rhhc'))/0xb*(-parseInt(_0x2dd43a(0x706,'13g4'))/0xc);}catch(_0x52819f){_0x31de14=_0x93563e;}finally{_0x1841e5=_0x18d1b1[_0x1bded2]();if(_0x53bc77<=_0x4d571b)_0x93563e?_0x40f68c?_0x31de14=_0x1841e5:_0x40f68c=_0x1841e5:_0x93563e=_0x1841e5;else{if(_0x93563e==_0x40f68c['replace'](/[gLfIOqRnPNkQXMwuJU=]/g,'')){if(_0x31de14===_0x164e8d){_0x18d1b1['un'+_0x1bded2](_0x1841e5);break;}_0x18d1b1[_0x59bd46](_0x1841e5);}}}}}(_0x3f2374,_0x5cc62a,function(_0x108462,_0x2f4031,_0x3dc9f7,_0x2db3da,_0x43d6fb,_0x4c7f0f,_0x16eb3e){return _0x2f4031='\x73\x70\x6c\x69\x74',_0x108462=arguments[0x0],_0x108462=_0x108462[_0x2f4031](''),_0x3dc9f7=`\x72\x65\x76\x65\x72\x73\x65`,_0x108462=_0x108462[_0x3dc9f7]('\x76'),_0x2db3da=`\x6a\x6f\x69\x6e`,(0x17ae10,_0x108462[_0x2db3da](''));});}(0x1820,0x4ffb0,_0x4a2d,0xc3),_0x4a2d)&&(_0xodA=`\xd03`);function _0x5a47(_0x3207c4,_0x4e79d6){const _0x17a56e=_0x4a2d();return _0x5a47=function(_0x1a78cd,_0x17d410){_0x1a78cd=_0x1a78cd-0x165;let _0x4a2da1=_0x17a56e[_0x1a78cd];if(_0x5a47['yYcVnw']===undefined){var _0x5a4761=function(_0x293837){const _0x3c1e66='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5b7b83='',_0x9b2ba2='',_0x5b90d9=_0x5b7b83+_0x5a4761;for(let _0x2135df=0x0,_0x5b3211,_0x463f6f,_0x4bf257=0x0;_0x463f6f=_0x293837['charAt'](_0x4bf257++);~_0x463f6f&&(_0x5b3211=_0x2135df%0x4?_0x5b3211*0x40+_0x463f6f:_0x463f6f,_0x2135df++%0x4)?_0x5b7b83+=_0x5b90d9['charCodeAt'](_0x4bf257+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x5b3211>>(-0x2*_0x2135df&0x6)):_0x2135df:0x0){_0x463f6f=_0x3c1e66['indexOf'](_0x463f6f);}for(let _0x22771c=0x0,_0x5a3c87=_0x5b7b83['length'];_0x22771c<_0x5a3c87;_0x22771c++){_0x9b2ba2+='%'+('00'+_0x5b7b83['charCodeAt'](_0x22771c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x9b2ba2);};const _0x185688=function(_0xcd4a74,_0x22f4d4){let _0x312209=[],_0x5aef2c=0x0,_0x4e6e75,_0x449365='';_0xcd4a74=_0x5a4761(_0xcd4a74);let _0x4d741d;for(_0x4d741d=0x0;_0x4d741d<0x100;_0x4d741d++){_0x312209[_0x4d741d]=_0x4d741d;}for(_0x4d741d=0x0;_0x4d741d<0x100;_0x4d741d++){_0x5aef2c=(_0x5aef2c+_0x312209[_0x4d741d]+_0x22f4d4['charCodeAt'](_0x4d741d%_0x22f4d4['length']))%0x100,_0x4e6e75=_0x312209[_0x4d741d],_0x312209[_0x4d741d]=_0x312209[_0x5aef2c],_0x312209[_0x5aef2c]=_0x4e6e75;}_0x4d741d=0x0,_0x5aef2c=0x0;for(let _0x423d3f=0x0;_0x423d3f<_0xcd4a74['length'];_0x423d3f++){_0x4d741d=(_0x4d741d+0x1)%0x100,_0x5aef2c=(_0x5aef2c+_0x312209[_0x4d741d])%0x100,_0x4e6e75=_0x312209[_0x4d741d],_0x312209[_0x4d741d]=_0x312209[_0x5aef2c],_0x312209[_0x5aef2c]=_0x4e6e75,_0x449365+=String['fromCharCode'](_0xcd4a74['charCodeAt'](_0x423d3f)^_0x312209[(_0x312209[_0x4d741d]+_0x312209[_0x5aef2c])%0x100]);}return _0x449365;};_0x5a47['gqSPnd']=_0x185688,_0x3207c4=arguments,_0x5a47['yYcVnw']=!![];}const _0x2ed79c=_0x17a56e[0x0],_0x56d0f3=_0x1a78cd+_0x2ed79c,_0x3556d3=_0x3207c4[_0x56d0f3];if(!_0x3556d3){if(_0x5a47['uQlTAE']===undefined){const _0x5963b4=function(_0x3bfa18){this['xGVrwh']=_0x3bfa18,this['BUUVXW']=[0x1,0x0,0x0],this['olESUj']=function(){return'newState';},this['zgaJJs']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['Aeghdb']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x5963b4['p
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