jdpro/jd_video_task.js

6 lines
101 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-27 09:41:49 +00:00
var _0xodz='jsjiami.com.v7';const _0x182921=_0x32c5;(function(_0x152a87,_0xd53750,_0x4589ee,_0xf7ad94,_0x2a58b3,_0x55c14f,_0x516ff2){return _0x152a87=_0x152a87>>0x8,_0x55c14f='hs',_0x516ff2='hs',function(_0x2e4350,_0xc9a4ff,_0x1252e0,_0x33534c,_0x498141){const _0x42ac54=_0x32c5;_0x33534c='tfi',_0x55c14f=_0x33534c+_0x55c14f,_0x498141='up',_0x516ff2+=_0x498141,_0x55c14f=_0x1252e0(_0x55c14f),_0x516ff2=_0x1252e0(_0x516ff2),_0x1252e0=0x0;const _0x1cbd99=_0x2e4350();while(!![]&&--_0xf7ad94+_0xc9a4ff){try{_0x33534c=parseInt(_0x42ac54(0x3dc,'Z0Fd'))/0x1+parseInt(_0x42ac54(0x2f8,'8l!A'))/0x2*(parseInt(_0x42ac54(0x33e,'K@1c'))/0x3)+-parseInt(_0x42ac54(0x515,'iLeb'))/0x4*(-parseInt(_0x42ac54(0x3b1,'[JOh'))/0x5)+parseInt(_0x42ac54(0x2fc,'1r1f'))/0x6*(parseInt(_0x42ac54(0x3cf,'pQgS'))/0x7)+parseInt(_0x42ac54(0x435,'$v8M'))/0x8*(parseInt(_0x42ac54(0x5ca,'h0*%'))/0x9)+parseInt(_0x42ac54(0x3b2,'V505'))/0xa*(parseInt(_0x42ac54(0x570,'AD2e'))/0xb)+-parseInt(_0x42ac54(0x5ac,'[JOh'))/0xc;}catch(_0xb89079){_0x33534c=_0x1252e0;}finally{_0x498141=_0x1cbd99[_0x55c14f]();if(_0x152a87<=_0xf7ad94)_0x1252e0?_0x2a58b3?_0x33534c=_0x498141:_0x2a58b3=_0x498141:_0x1252e0=_0x498141;else{if(_0x1252e0==_0x2a58b3['replace'](/[ehJNCrIWpKBkQDAVLGx=]/g,'')){if(_0x33534c===_0xc9a4ff){_0x1cbd99['un'+_0x55c14f](_0x498141);break;}_0x1cbd99[_0x516ff2](_0x498141);}}}}}(_0x4589ee,_0xd53750,function(_0x1f705a,_0x26c1b2,_0x1bb098,_0x54eac0,_0x1d1cc6,_0x30f306,_0x1070be){return _0x26c1b2='\x73\x70\x6c\x69\x74',_0x1f705a=arguments[0x0],_0x1f705a=_0x1f705a[_0x26c1b2](''),_0x1bb098=`\x72\x65\x76\x65\x72\x73\x65`,_0x1f705a=_0x1f705a[_0x1bb098]('\x76'),_0x54eac0=`\x6a\x6f\x69\x6e`,(0x17b177,_0x1f705a[_0x54eac0](''));});}(0xbd00,0xc37d0,_0x3354,0xbf),_0x3354)&&(_0xodz=0x4591);const _0x4671ad=$[_0x182921(0x45f,'hx&I')]()?require(_0x182921(0x44a,'$)dQ')):'',_0x6587a8=$[_0x182921(0x46b,'%[R%')]()?require(_0x182921(0x59f,'^y2y')):'',_0x25958d=require(_0x182921(0x421,'P3EN')),_0x27c61c=require(_0x182921(0x5a2,'g)hk')),_0x981f76=require(_0x182921(0x299,'oZ^f'));let _0x38f404=!![];if(process[_0x182921(0x4c1,'ICXF')][_0x182921(0x42f,'hx&I')])try{require(_0x182921(0x1a2,'rcp1')),ccc=require(_0x182921(0x372,'NN0n')),$[_0x182921(0x3bb,'286n')]=ccc[_0x182921(0x4b1,'$)dQ')]($[_0x182921(0x3a2,'rcp1')][_0x182921(0x5de,'oZ^f')]($)),$[_0x182921(0x269,'hlwz')]=ccc[_0x182921(0x427,'hlwz')]($[_0x182921(0x2f5,'1r1f')][_0x182921(0x51b,'NN0n')]($));}catch{$[_0x182921(0x22d,'hx&I')](_0x182921(0x55c,'PEX!')),$[_0x182921(0x442,'Z0Fd')]=$[_0x182921(0x33c,'pQgS')],$[_0x182921(0x269,'hlwz')]=$[_0x182921(0x2f5,'1r1f')];}else $[_0x182921(0x308,'Z0Fd')]=$[_0x182921(0x23e,'oZ^f')],$[_0x182921(0x55f,'M1wo')]=$[_0x182921(0x4f0,'[Ihe')];let _0x4df0cd=[],_0x30fbc8='',_0x9a9177='';function _0x32c5(_0x10d8ea,_0x5c7719){const _0x247581=_0x3354();return _0x32c5=function(_0x382bf3,_0x4436eb){_0x382bf3=_0x382bf3-0x144;let _0x33549c=_0x247581[_0x382bf3];if(_0x32c5['hPRoNc']===undefined){var _0x32c53d=function(_0x2a23b0){const _0x432d48='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x44cb80='',_0x24803c='',_0x3134c1=_0x44cb80+_0x32c53d;for(let _0x2bf91b=0x0,_0xc7b159,_0x56e102,_0xe3247b=0x0;_0x56e102=_0x2a23b0['charAt'](_0xe3247b++);~_0x56e102&&(_0xc7b159=_0x2bf91b%0x4?_0xc7b159*0x40+_0x56e102:_0x56e102,_0x2bf91b++%0x4)?_0x44cb80+=_0x3134c1['charCodeAt'](_0xe3247b+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0xc7b159>>(-0x2*_0x2bf91b&0x6)):_0x2bf91b:0x0){_0x56e102=_0x432d48['indexOf'](_0x56e102);}for(let _0x1d5eaa=0x0,_0x12b2c6=_0x44cb80['length'];_0x1d5eaa<_0x12b2c6;_0x1d5eaa++){_0x24803c+='%'+('00'+_0x44cb80['charCodeAt'](_0x1d5eaa)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x24803c);};const _0x52a835=function(_0xa7128f,_0x16f716){let _0x5cedbd=[],_0x351709=0x0,_0x2e1f99,_0x5e2787='';_0xa7128f=_0x32c53d(_0xa7128f);let _0x5b2c2f;for(_0x5b2c2f=0x0;_0x5b2c2f<0x100;_0x5b2c2f++){_0x5cedbd[_0x5b2c2f]=_0x5b2c2f;}for(_0x5b2c2f=0x0;_0x5b2c2f<0x100;_0x5b2c2f++){_0x351709=(_0x351709+_0x5cedbd[_0x5b2c2f]+_0x16f716['charCodeAt'](_0x5b2c2f%_0x16f716['length']))%0x100,_0x2e1f99=_0x5cedb
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