jdpro/jd_video_task.js

6 lines
108 KiB
JavaScript
Raw Normal View History

2024-06-30 15:19:36 +00:00
/*
1 1 1 1 * jd_video_task.js
*/
const $ = new Env('看视频赚现金-任务');
2024-07-29 01:34:51 +00:00
var _0xodr='jsjiami.com.v7';const _0x5c4be7=_0x5f2a;(function(_0x220fe8,_0x29c55d,_0x18b85f,_0x2f27e8,_0x21ea29,_0x30b06e,_0x11983b){return _0x220fe8=_0x220fe8>>0x2,_0x30b06e='hs',_0x11983b='hs',function(_0x39ed54,_0x24dffb,_0x1dc689,_0xb920a9,_0x3f5fb1){const _0x4fc7bc=_0x5f2a;_0xb920a9='tfi',_0x30b06e=_0xb920a9+_0x30b06e,_0x3f5fb1='up',_0x11983b+=_0x3f5fb1,_0x30b06e=_0x1dc689(_0x30b06e),_0x11983b=_0x1dc689(_0x11983b),_0x1dc689=0x0;const _0x422a25=_0x39ed54();while(!![]&&--_0x2f27e8+_0x24dffb){try{_0xb920a9=-parseInt(_0x4fc7bc(0x3cc,'&CDx'))/0x1*(parseInt(_0x4fc7bc(0x400,'IJ*@'))/0x2)+-parseInt(_0x4fc7bc(0x2ff,'b1JC'))/0x3+-parseInt(_0x4fc7bc(0x327,'%aFE'))/0x4*(-parseInt(_0x4fc7bc(0x530,'pft^'))/0x5)+parseInt(_0x4fc7bc(0x1ea,'kAgj'))/0x6*(parseInt(_0x4fc7bc(0x153,'kAgj'))/0x7)+parseInt(_0x4fc7bc(0x507,'Tb$K'))/0x8+-parseInt(_0x4fc7bc(0x419,'JZNb'))/0x9*(parseInt(_0x4fc7bc(0x161,'Hwm['))/0xa)+parseInt(_0x4fc7bc(0x55c,'BWHe'))/0xb*(parseInt(_0x4fc7bc(0x48c,'W9[N'))/0xc);}catch(_0x12570d){_0xb920a9=_0x1dc689;}finally{_0x3f5fb1=_0x422a25[_0x30b06e]();if(_0x220fe8<=_0x2f27e8)_0x1dc689?_0x21ea29?_0xb920a9=_0x3f5fb1:_0x21ea29=_0x3f5fb1:_0x1dc689=_0x3f5fb1;else{if(_0x1dc689==_0x21ea29['replace'](/[tbERdrPTBGeyNXxUSlVD=]/g,'')){if(_0xb920a9===_0x24dffb){_0x422a25['un'+_0x30b06e](_0x3f5fb1);break;}_0x422a25[_0x11983b](_0x3f5fb1);}}}}}(_0x18b85f,_0x29c55d,function(_0x5670e0,_0x183887,_0x3bb2d1,_0x2db701,_0x4ac704,_0x1e590b,_0x54e48c){return _0x183887='\x73\x70\x6c\x69\x74',_0x5670e0=arguments[0x0],_0x5670e0=_0x5670e0[_0x183887](''),_0x3bb2d1=`\x72\x65\x76\x65\x72\x73\x65`,_0x5670e0=_0x5670e0[_0x3bb2d1]('\x76'),_0x2db701=`\x6a\x6f\x69\x6e`,(0x17b6d1,_0x5670e0[_0x2db701](''));});}(0x314,0x47f8e,_0x161a,0xc7),_0x161a)&&(_0xodr=0x2d6);const _0x7c3628=$[_0x5c4be7(0x132,'Gc#@')]()?require(_0x5c4be7(0x19a,'g(p^')):'',_0x5b4799=$[_0x5c4be7(0x14d,'&CDx')]()?require(_0x5c4be7(0x348,'isny')):'',_0x645b8f=require(_0x5c4be7(0x323,'YZE9')),_0x323493=require(_0x5c4be7(0x538,'8Wc]')),_0x2504bb=require(_0x5c4be7(0x28c,'Hwm['));let _0x5abb7b=!![];if(process[_0x5c4be7(0x3f0,'TXF%')][_0x5c4be7(0x171,'Hwm[')])try{require(_0x5c4be7(0x586,'pft^')),ccc=require(_0x5c4be7(0x37e,'(]8!')),$[_0x5c4be7(0x2a2,'Ig#O')]=ccc[_0x5c4be7(0x32b,'$Jp9')]($[_0x5c4be7(0x35b,'TXF%')][_0x5c4be7(0x3ee,'OPF5')]($)),$[_0x5c4be7(0x28f,'Ig#O')]=ccc[_0x5c4be7(0x600,'JZNb')]($[_0x5c4be7(0x298,'%aFE')][_0x5c4be7(0x365,'SaGt')]($));}catch{$[_0x5c4be7(0x286,'IJ*@')](_0x5c4be7(0x401,'(]8!')),$[_0x5c4be7(0x2ab,'PAx#')]=$[_0x5c4be7(0x3ae,']71&')],$[_0x5c4be7(0x47c,'CgZE')]=$[_0x5c4be7(0x4dc,'*vJs')];}else $[_0x5c4be7(0x1fb,'sw7I')]=$[_0x5c4be7(0x4dc,'*vJs')],$[_0x5c4be7(0x4a1,'Vq5x')]=$[_0x5c4be7(0x38b,'G1Pf')];let _0x4c14fb=[],_0x2a4a65='',_0x33fbbf='';if($[_0x5c4be7(0x135,'Vpdj')]()){Object[_0x5c4be7(0x36c,'SaGt')](_0x5b4799)[_0x5c4be7(0x512,'$Vv^')](_0x22c48a=>{const _0x25d649=_0x5c4be7;_0x4c14fb[_0x25d649(0x233,'CgZE')](_0x5b4799[_0x22c48a]);});if(process[_0x5c4be7(0x3b3,'g(p^')][_0x5c4be7(0x3c4,'G1Pf')]&&process[_0x5c4be7(0x3e6,'$Vv^')][_0x5c4be7(0x5a3,'CgZE')]===_0x5c4be7(0x464,'G1Pf'))console[_0x5c4be7(0x325,'SaGt')]=()=>{};}else _0x4c14fb=[$[_0x5c4be7(0x5da,'MD*S')](_0x5c4be7(0x3f5,'g(p^')),$[_0x5c4be7(0x4ec,'7li$')](_0x5c4be7(0x3dd,'Gc#@')),..._0x438987($[_0x5c4be7(0x243,'CgZE')](_0x5c4be7(0x3f8,'8Wc]'))||'[]')[_0x5c4be7(0x1c7,'IJ*@')](_0x5d133d=>_0x5d133d[_0x5c4be7(0x26f,'99x*')])][_0x5c4be7(0x3ea,'7li$')](_0x5bd662=>!!_0x5bd662);const _0x4de222=process[_0x5c4be7(0x2cf,'&CDx')][_0x5c4be7(0x593,'t9VA')]?process[_0x5c4be7(0x52a,'(]8!')][_0x5c4be7(0x1e7,'MD*S')]:'10';!(async()=>{const _0x414a92=_0x5c4be7,_0x427fe5={'SuLBr':function(_0x113823,_0x4c5b63){return _0x113823==_0x4c5b63;},'QqmGR':function(_0x2b69e5,_0x5b9850){return _0x2b69e5+_0x5b9850;},'hnjen':function(_0x225ca9,_0x39e001){return _0x225ca9(_0x39e001);},'JCEjH':function(_0x48df55,_0x509097){return _0x48df55*_0x509097;},'VqfzL':_0x414a92(0x147,']71&'),'usTCf':_0x414a92(0x2ee,'*vJs'),'InViu':function(_0x2441c2,_0x30403d){return _0x2441c2(_0x30403d);},'xZoMl':_0x414a92(0x1a2,'Tb$K'),'pjRaK':function(_0x29d857,_0x55b16d
2024-06-30 15:19:36 +00:00
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