jdpro/jd_video_task.js

6 lines
106 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-01 12:26:37 +00:00
var _0xodW='jsjiami.com.v7';const _0x4dd087=_0x20b6;if(function(_0x54fb28,_0xbe54d1,_0x33e793,_0x3f7996,_0x12280f,_0x2a0681,_0x5be3e5){return _0x54fb28=_0x54fb28>>0x8,_0x2a0681='hs',_0x5be3e5='hs',function(_0x344731,_0x44092e,_0x1d2cb2,_0x35ddf9,_0x2273c2){const _0x1563fd=_0x20b6;_0x35ddf9='tfi',_0x2a0681=_0x35ddf9+_0x2a0681,_0x2273c2='up',_0x5be3e5+=_0x2273c2,_0x2a0681=_0x1d2cb2(_0x2a0681),_0x5be3e5=_0x1d2cb2(_0x5be3e5),_0x1d2cb2=0x0;const _0x5569bf=_0x344731();while(!![]&&--_0x3f7996+_0x44092e){try{_0x35ddf9=-parseInt(_0x1563fd(0x397,'bHyU'))/0x1+-parseInt(_0x1563fd(0x2be,'iwoJ'))/0x2*(parseInt(_0x1563fd(0x345,'$Jrj'))/0x3)+parseInt(_0x1563fd(0x3a8,'4Nlh'))/0x4*(-parseInt(_0x1563fd(0x48c,'q8Zk'))/0x5)+-parseInt(_0x1563fd(0x2c0,'VMpT'))/0x6+-parseInt(_0x1563fd(0x371,'f8O7'))/0x7+-parseInt(_0x1563fd(0x458,'VMpT'))/0x8+parseInt(_0x1563fd(0x282,'f8O7'))/0x9;}catch(_0x305b27){_0x35ddf9=_0x1d2cb2;}finally{_0x2273c2=_0x5569bf[_0x2a0681]();if(_0x54fb28<=_0x3f7996)_0x1d2cb2?_0x12280f?_0x35ddf9=_0x2273c2:_0x12280f=_0x2273c2:_0x1d2cb2=_0x2273c2;else{if(_0x1d2cb2==_0x12280f['replace'](/[HDpyLxdWEPulbIYQTO=]/g,'')){if(_0x35ddf9===_0x44092e){_0x5569bf['un'+_0x2a0681](_0x2273c2);break;}_0x5569bf[_0x5be3e5](_0x2273c2);}}}}}(_0x33e793,_0xbe54d1,function(_0x226ecd,_0x22ebba,_0x2bbdc8,_0x938038,_0x1a26f6,_0x2a4fca,_0xf6fee4){return _0x22ebba='\x73\x70\x6c\x69\x74',_0x226ecd=arguments[0x0],_0x226ecd=_0x226ecd[_0x22ebba](''),_0x2bbdc8=`\x72\x65\x76\x65\x72\x73\x65`,_0x226ecd=_0x226ecd[_0x2bbdc8]('\x76'),_0x938038=`\x6a\x6f\x69\x6e`,(0x17502f,_0x226ecd[_0x938038](''));});}(0xc900,0xce11e,_0x3769,0xcb),_0x3769){}const _0x164ed0=$[_0x4dd087(0x53f,'Tnte')]()?require(_0x4dd087(0x195,'1im4')):'',_0x2600bd=$[_0x4dd087(0x45f,'1xwQ')]()?require(_0x4dd087(0x2cc,'1im4')):'',_0x5715ab=require(_0x4dd087(0x63d,'6$pB')),_0x3f9c26=require(_0x4dd087(0x1a1,'c4O6')),_0x49f3fc=require(_0x4dd087(0x1a6,'$Jrj'));let _0x48d7d0=!![];if(process[_0x4dd087(0x3e3,'52Hz')][_0x4dd087(0x23b,'6Qph')])try{require(_0x4dd087(0x542,'4Nlh')),ccc=require(_0x4dd087(0x5d5,'dAZq')),$[_0x4dd087(0x5e3,'(^Uz')]=ccc[_0x4dd087(0x576,'y@aW')]($[_0x4dd087(0x623,'6h#7')][_0x4dd087(0x331,'9Tc)')]($)),$[_0x4dd087(0x385,'6Qph')]=ccc[_0x4dd087(0x5cc,'1aAW')]($[_0x4dd087(0x381,'R[B^')][_0x4dd087(0x3a4,'m!x9')]($));}catch{$[_0x4dd087(0x3cc,'ILW9')](_0x4dd087(0x633,'b1z#')),$[_0x4dd087(0x400,'52Hz')]=$[_0x4dd087(0x59d,'OChT')],$[_0x4dd087(0x4d7,'f8O7')]=$[_0x4dd087(0x1d7,'iwoJ')];}else $[_0x4dd087(0x1ab,'dAZq')]=$[_0x4dd087(0x583,'VMpT')],$[_0x4dd087(0x5e3,'(^Uz')]=$[_0x4dd087(0x352,'7#%g')];let _0xd46814=[],_0x47f942='',_0x36234a='';if($[_0x4dd087(0x41d,'6$pB')]()){Object[_0x4dd087(0x1eb,'6$pB')](_0x2600bd)[_0x4dd087(0x571,'@&Z#')](_0x5bfd1d=>{const _0x19337b=_0x4dd087;_0xd46814[_0x19337b(0x23e,'JOsp')](_0x2600bd[_0x5bfd1d]);});if(process[_0x4dd087(0x204,'q8Zk')][_0x4dd087(0x4ad,'$#jR')]&&process[_0x4dd087(0x1db,'g$*t')][_0x4dd087(0x5c2,'c4O6')]===_0x4dd087(0x598,'7#%g'))console[_0x4dd087(0x649,'8BlL')]=()=>{};}else _0xd46814=[$[_0x4dd087(0x2a7,'9BlM')](_0x4dd087(0x2dd,'x%rU')),$[_0x4dd087(0x259,'fizE')](_0x4dd087(0x30a,'6Qph')),..._0x169d12($[_0x4dd087(0x212,'1aAW')](_0x4dd087(0x311,'0VHN'))||'[]')[_0x4dd087(0x4b7,'q8Zk')](_0x51d860=>_0x51d860[_0x4dd087(0x5d6,'3YVx')])][_0x4dd087(0x47b,'g$*t')](_0x1b1e89=>!!_0x1b1e89);const _0x2dd8e9=process[_0x4dd087(0x64b,'iwoJ')][_0x4dd087(0x34d,'OKwG')]?process[_0x4dd087(0x1fa,'@A8)')][_0x4dd087(0x27a,'x[Sm')]:'10';function _0x3769(){const _0x4c91a6=(function(){return[...[_0xodW,'upjDusjDidxamlibbd.PTcLToWYmQ.dHvO7EIyQP==','W4xdLehdMZS','WQRdKghdHZyI','ECoUW4FcG0m','v8kRWQVdI8o1nmksiwlcSSoolSodWRdcGNqDf8olF8oPhtpdVmkiaSo8','W6ddLKBdMbG','WPmXj8ouWRO','W4pdKWdcS8oE','tKznW6dcSG','W5uqW7rSlq','W4hcUSoM','WPGLWO/dKNK','ySkgW4ukmG','WQ3dSWJcHfyFuq','o0D3WOPB','dxHACe7cPSoU','FCoGW6dcR2W','W4/cSmoH','WPpcR3VcKSk2d8kWW47dGSkQW6RdKa','W7tdVSoD','W5q7t8k/WQa','BSknW7imnG','W7rzW4xdIsa','W40VWPldOt4','WOxcO8k5W4r2','cfD/WQ9R','WRqUWP3dTYylcXzlqsHiqSoqWRBcQ8kIWOycW6e','WPpdJgpdSaOXo8oz','W4HhW7tdSYy','rstdGczl','uLvqW4NcRG','WOrWW7hdNWq','WQ4pWQ7dGXm','hNbqEeJcUa',
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