faker3/jd_dwapp.js

13 lines
37 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称积分换话费
入口首页-话费充值
cron: 56 7,19 * * * jd_dwapp.js
*/
const $ = new Env('积分换话费');
var il='jsjiami.com.v7';function iii1II(_0x386200,_0x21d5bb){const _0x6f553=Iii11l();return iii1II=function(_0x4246a2,_0x2596a8){_0x4246a2=_0x4246a2-0x1d1;let _0x22aa24=_0x6f553[_0x4246a2];if(iii1II['vOlbyW']===undefined){var _0x2efd34=function(_0x5026e1){const _0x283388='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4bb49e='',_0x2d3840='';for(let _0xe44d14=0x0,_0x3d8434,_0x5787f8,_0x205b15=0x0;_0x5787f8=_0x5026e1['charAt'](_0x205b15++);~_0x5787f8&&(_0x3d8434=_0xe44d14%0x4?_0x3d8434*0x40+_0x5787f8:_0x5787f8,_0xe44d14++%0x4)?_0x4bb49e+=String['fromCharCode'](0xff&_0x3d8434>>(-0x2*_0xe44d14&0x6)):0x0){_0x5787f8=_0x283388['indexOf'](_0x5787f8);}for(let _0x172eab=0x0,_0x381b23=_0x4bb49e['length'];_0x172eab<_0x381b23;_0x172eab++){_0x2d3840+='%'+('00'+_0x4bb49e['charCodeAt'](_0x172eab)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2d3840);};const _0x1c4571=function(_0x2c4bfa,_0x50ba41){let _0x50c462=[],_0x57aecb=0x0,_0x481e23,_0x36e63c='';_0x2c4bfa=_0x2efd34(_0x2c4bfa);let _0x17a47d;for(_0x17a47d=0x0;_0x17a47d<0x100;_0x17a47d++){_0x50c462[_0x17a47d]=_0x17a47d;}for(_0x17a47d=0x0;_0x17a47d<0x100;_0x17a47d++){_0x57aecb=(_0x57aecb+_0x50c462[_0x17a47d]+_0x50ba41['charCodeAt'](_0x17a47d%_0x50ba41['length']))%0x100,_0x481e23=_0x50c462[_0x17a47d],_0x50c462[_0x17a47d]=_0x50c462[_0x57aecb],_0x50c462[_0x57aecb]=_0x481e23;}_0x17a47d=0x0,_0x57aecb=0x0;for(let _0x1c1a98=0x0;_0x1c1a98<_0x2c4bfa['length'];_0x1c1a98++){_0x17a47d=(_0x17a47d+0x1)%0x100,_0x57aecb=(_0x57aecb+_0x50c462[_0x17a47d])%0x100,_0x481e23=_0x50c462[_0x17a47d],_0x50c462[_0x17a47d]=_0x50c462[_0x57aecb],_0x50c462[_0x57aecb]=_0x481e23,_0x36e63c+=String['fromCharCode'](_0x2c4bfa['charCodeAt'](_0x1c1a98)^_0x50c462[(_0x50c462[_0x17a47d]+_0x50c462[_0x57aecb])%0x100]);}return _0x36e63c;};iii1II['UBnSxw']=_0x1c4571,_0x386200=arguments,iii1II['vOlbyW']=!![];}const _0x598783=_0x6f553[0x0],_0x4632b3=_0x4246a2+_0x598783,_0x47dc95=_0x386200[_0x4632b3];return!_0x47dc95?(iii1II['ntFpXh']===undefined&&(iii1II['ntFpXh']=!![]),_0x22aa24=iii1II['UBnSxw'](_0x22aa24,_0x2596a8),_0x386200[_0x4632b3]=_0x22aa24):_0x22aa24=_0x47dc95,_0x22aa24;},iii1II(_0x386200,_0x21d5bb);}const Ilil1i=iii1II;(function(iiliI,Ill11I,I1il1i,IliIIi,lI1l1i,i1iil,llI11l){return iiliI=iiliI>>0x5,i1iil='hs',llI11l='hs',function(I1llIl,i1iii,I1llIi,IIii1I,llI11i){const Ii1iil=iii1II;IIii1I='tfi',i1iil=IIii1I+i1iil,llI11i='up',llI11l+=llI11i,i1iil=I1llIi(i1iil),llI11l=I1llIi(llI11l),I1llIi=0x0;const i1iIi1=I1llIl();while(!![]&&--IliIIi+i1iii){try{IIii1I=-parseInt(Ii1iil(0x24f,'ID%A'))/0x1+parseInt(Ii1iil(0x2aa,'H^2$'))/0x2+parseInt(Ii1iil(0x28a,'T)X4'))/0x3+-parseInt(Ii1iil(0x244,'dNkW'))/0x4*(-parseInt(Ii1iil(0x205,'ugy!'))/0x5)+-parseInt(Ii1iil(0x216,'JvN#'))/0x6+-parseInt(Ii1iil(0x31c,'uozw'))/0x7*(-parseInt(Ii1iil(0x2c7,'f4Zh'))/0x8)+-parseInt(Ii1iil(0x278,'9mLW'))/0x9*(parseInt(Ii1iil(0x2f5,'S%g^'))/0xa);}catch(l1l1il){IIii1I=I1llIi;}finally{llI11i=i1iIi1[i1iil]();if(iiliI<=IliIIi)I1llIi?lI1l1i?IIii1I=llI11i:lI1l1i=llI11i:I1llIi=llI11i;else{if(I1llIi==lI1l1i['replace'](/[MRKhXbSCQDdyLxBplW=]/g,'')){if(IIii1I===i1iii){i1iIi1['un'+i1iil](llI11i);break;}i1iIi1[llI11l](llI11i);}}}}}(I1il1i,Ill11I,function(I11i1I,iliIi1,l1l1ii,Il1i1I,Ii1iii,iIIilI,il1l1){return iliIi1='\x73\x70\x6c\x69\x74',I11i1I=arguments[0x0],I11i1I=I11i1I[iliIi1](''),l1l1ii=`\x72\x65\x76\x65\x72\x73\x65`,I11i1I=I11i1I[l1l1ii]('\x76'),Il1i1I=`\x6a\x6f\x69\x6e`,(0x173a0b,I11i1I[Il1i1I](''));});}(0x17c0,0x9b88a,Iii11l,0xc0),Iii11l)&&(il=0xc0);const jdCookie=require(Ilil1i(0x298,'3*Gh')),notify=require('./utils/Rebels_sendJDNotify'),common=require(Ilil1i(0x1df,'7#tu')),cryptoJS=require(Ilil1i(0x275,'BUxN')),isNotify=![];let cookie='';const cookiesArr=Object[Ilil1i(0x23a,'3*Gh')](jdCookie)['map'](lI1lll=>jdCookie[lI1lll])[Ilil1i(0x1e9,'f4Zh')](iIiII=>iIiII);!cookiesArr[0x0]&&($[Ilil1i(0x27f,'f4Zh')]($[Ilil1i(0x2f2,'6Pw%')],'【提示】请先获取Cookie'),process[Ilil1i(0x1de,'Ude#')](0x1));function Iii11l(){const II111=(function(){return[...[il,'MKDjxsjWRiKShabdmDByiXpC.xScodm.xlvBQ7LX==','W4eMufLlWPnwnf
// 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