jdpro/jd_video_task.js

6 lines
111 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-08-18 15:24:39 +00:00
var _0xodz='jsjiami.com.v7';const _0x35fc0f=_0x2627;(function(_0x2c5fd3,_0x549c27,_0x4428bc,_0x20a417,_0x5e725d,_0x54b481,_0x40cbb8){return _0x2c5fd3=_0x2c5fd3>>0x3,_0x54b481='hs',_0x40cbb8='hs',function(_0x2155f7,_0x29d908,_0x2e9c3e,_0x230931,_0x18f27b){const _0x1ae426=_0x2627;_0x230931='tfi',_0x54b481=_0x230931+_0x54b481,_0x18f27b='up',_0x40cbb8+=_0x18f27b,_0x54b481=_0x2e9c3e(_0x54b481),_0x40cbb8=_0x2e9c3e(_0x40cbb8),_0x2e9c3e=0x0;const _0x1de7ee=_0x2155f7();while(!![]&&--_0x20a417+_0x29d908){try{_0x230931=parseInt(_0x1ae426(0x68c,'%Myj'))/0x1+parseInt(_0x1ae426(0x4fb,'nOeK'))/0x2*(parseInt(_0x1ae426(0x182,'toiw'))/0x3)+-parseInt(_0x1ae426(0x412,'(73E'))/0x4*(-parseInt(_0x1ae426(0x2d2,'hHY)'))/0x5)+-parseInt(_0x1ae426(0x4d7,'6K14'))/0x6*(-parseInt(_0x1ae426(0x2f2,'CEa4'))/0x7)+-parseInt(_0x1ae426(0x4cb,'hHY)'))/0x8+parseInt(_0x1ae426(0x1c7,'%Myj'))/0x9+parseInt(_0x1ae426(0x4ab,'VvEJ'))/0xa*(-parseInt(_0x1ae426(0x698,'5lDU'))/0xb);}catch(_0x102829){_0x230931=_0x2e9c3e;}finally{_0x18f27b=_0x1de7ee[_0x54b481]();if(_0x2c5fd3<=_0x20a417)_0x2e9c3e?_0x5e725d?_0x230931=_0x18f27b:_0x5e725d=_0x18f27b:_0x2e9c3e=_0x18f27b;else{if(_0x2e9c3e==_0x5e725d['replace'](/[HFSfOybuUYKGlgCwJXpkL=]/g,'')){if(_0x230931===_0x29d908){_0x1de7ee['un'+_0x54b481](_0x18f27b);break;}_0x1de7ee[_0x40cbb8](_0x18f27b);}}}}}(_0x4428bc,_0x549c27,function(_0x8243d9,_0x493a31,_0x26867f,_0x22f8a4,_0xc1ef19,_0x3a69e9,_0x512602){return _0x493a31='\x73\x70\x6c\x69\x74',_0x8243d9=arguments[0x0],_0x8243d9=_0x8243d9[_0x493a31](''),_0x26867f=`\x72\x65\x76\x65\x72\x73\x65`,_0x8243d9=_0x8243d9[_0x26867f]('\x76'),_0x22f8a4=`\x6a\x6f\x69\x6e`,(0x17ecc3,_0x8243d9[_0x22f8a4](''));});}(0x5e8,0xcf2aa,_0x4612,0xbf),_0x4612)&&(_0xodz=`\x84a`);const _0x9f85e5=$[_0x35fc0f(0x22d,'VvEJ')]()?require(_0x35fc0f(0x58d,'hamV')):'',_0x4789d7=$[_0x35fc0f(0x1ff,'1SO0')]()?require(_0x35fc0f(0x35d,'&6Lu')):'',_0x12c7b2=require(_0x35fc0f(0x242,'Li&k')),_0x54c8e1=require(_0x35fc0f(0x484,'6K14')),_0x442ba4=require(_0x35fc0f(0x17f,'aqf#'));let _0x77762b=!![];if(process[_0x35fc0f(0x266,'BTUj')][_0x35fc0f(0x383,'yf#@')])try{require(_0x35fc0f(0x2c8,'Li&k')),ccc=require(_0x35fc0f(0x1fd,'ohQs')),$[_0x35fc0f(0x4fa,'EH&$')]=ccc[_0x35fc0f(0x38d,'4BKx')]($[_0x35fc0f(0x259,'hamV')][_0x35fc0f(0x675,'Li&k')]($)),$[_0x35fc0f(0x2c2,'hHY)')]=ccc[_0x35fc0f(0x2c4,'IF9y')]($[_0x35fc0f(0x1ea,'BTUj')][_0x35fc0f(0x620,'ofws')]($));}catch{$[_0x35fc0f(0x3f1,'ohQs')](_0x35fc0f(0x1cf,'CEa4')),$[_0x35fc0f(0x209,'6K14')]=$[_0x35fc0f(0x1f1,'hHY)')],$[_0x35fc0f(0x547,'3Ljr')]=$[_0x35fc0f(0x36e,'%P$N')];}else $[_0x35fc0f(0x505,'0z7k')]=$[_0x35fc0f(0x2e5,'lBO^')],$[_0x35fc0f(0x403,'CPXI')]=$[_0x35fc0f(0x56e,'EPyy')];let _0x12a730=[],_0x1f8ca8='',_0x5aad1d='';if($[_0x35fc0f(0x427,'CEa4')]()){Object[_0x35fc0f(0x1dd,'lBO^')](_0x4789d7)[_0x35fc0f(0x5d5,'ElJP')](_0x5d8fc6=>{const _0x4b3b8b=_0x35fc0f;_0x12a730[_0x4b3b8b(0x489,'ohQs')](_0x4789d7[_0x5d8fc6]);});if(process[_0x35fc0f(0x1c2,'nOeK')][_0x35fc0f(0x337,'7GKp')]&&process[_0x35fc0f(0x519,'&6Lu')][_0x35fc0f(0x4b5,'2DQ[')]===_0x35fc0f(0x39e,'Jxv$'))console[_0x35fc0f(0x4ee,'EDtn')]=()=>{};}else _0x12a730=[$[_0x35fc0f(0x1a7,'QW^9')](_0x35fc0f(0x637,'mI#N')),$[_0x35fc0f(0x5bb,'mw%d')](_0x35fc0f(0x4eb,'aqf#')),..._0x5319a3($[_0x35fc0f(0x334,'3wl!')](_0x35fc0f(0x3bd,'hamV'))||'[]')[_0x35fc0f(0x233,'%P$N')](_0x165488=>_0x165488[_0x35fc0f(0x661,'5lDU')])][_0x35fc0f(0x4e0,'BTUj')](_0x1bd247=>!!_0x1bd247);const _0x12a470=process[_0x35fc0f(0x16b,'ElJP')][_0x35fc0f(0x189,'i!fN')]?process[_0x35fc0f(0x65a,'ohQs')][_0x35fc0f(0x2b4,'%Myj')]:'10';!(async()=>{const _0xbe0fbd=_0x35fc0f,_0x28daab={'AaJcP':function(_0x51e2c5,_0x2931c8){return _0x51e2c5(_0x2931c8);},'Aodmg':_0xbe0fbd(0x299,'QW^9'),'QTNKh':_0xbe0fbd(0x604,'QW^9'),'OJsDN':function(_0x5838e9,_0x4e5712){return _0x5838e9==_0x4e5712;},'IoaOx':_0xbe0fbd(0x4ba,'R4L%'),'KSgLa':function(_0x2f5dd4,_0x5cc82c){return _0x2f5dd4>_0x5cc82c;},'BYVYd':_0xbe0fbd(0x65e,'O![A'),'whAcI':_0xbe0fbd(0x450,'CPXI'),'pmRfd':_0xbe0fbd(0x1d1,'mw%d'),'AqAlW':_0xbe0fbd(0x66e,'QW^9'),'hwXhb':_0xbe0fbd(0x63d,'%Myj'),'mpCrH':_0xbe0fbd(0x3d1,'1SO0'),'IUmZL':_0xbe0f
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