jdpro/jd_video_task.js

6 lines
97 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('看视频赚现金-任务');
var _0xoda='jsjiami.com.v7';const _0x512e6a=_0x4640;if(function(_0x2b3a70,_0x24b921,_0xc30788,_0xf4a805,_0x46abbc,_0x491b95,_0x305777){return _0x2b3a70=_0x2b3a70>>0x4,_0x491b95='hs',_0x305777='hs',function(_0x3d64b5,_0x4b7f9b,_0x41cfa2,_0x4ffe98,_0x255ead){const _0x1d151e=_0x4640;_0x4ffe98='tfi',_0x491b95=_0x4ffe98+_0x491b95,_0x255ead='up',_0x305777+=_0x255ead,_0x491b95=_0x41cfa2(_0x491b95),_0x305777=_0x41cfa2(_0x305777),_0x41cfa2=0x0;const _0x549073=_0x3d64b5();while(!![]&&--_0xf4a805+_0x4b7f9b){try{_0x4ffe98=-parseInt(_0x1d151e(0x20a,'!hYz'))/0x1+parseInt(_0x1d151e(0x4fa,'[Gtm'))/0x2*(-parseInt(_0x1d151e(0x270,'v%*K'))/0x3)+-parseInt(_0x1d151e(0x4ef,'Cskl'))/0x4+-parseInt(_0x1d151e(0x1e7,'7Kj]'))/0x5+parseInt(_0x1d151e(0x384,'s[V4'))/0x6+parseInt(_0x1d151e(0x4a0,'cLx4'))/0x7*(-parseInt(_0x1d151e(0x5a0,'XgjG'))/0x8)+-parseInt(_0x1d151e(0x259,'ynm!'))/0x9*(-parseInt(_0x1d151e(0x5f9,'[Gtm'))/0xa);}catch(_0x419a14){_0x4ffe98=_0x41cfa2;}finally{_0x255ead=_0x549073[_0x491b95]();if(_0x2b3a70<=_0xf4a805)_0x41cfa2?_0x46abbc?_0x4ffe98=_0x255ead:_0x46abbc=_0x255ead:_0x41cfa2=_0x255ead;else{if(_0x41cfa2==_0x46abbc['replace'](/[DeUSBRVlYOkutpGPxEg=]/g,'')){if(_0x4ffe98===_0x4b7f9b){_0x549073['un'+_0x491b95](_0x255ead);break;}_0x549073[_0x305777](_0x255ead);}}}}}(_0xc30788,_0x24b921,function(_0x3fed13,_0xcb7ea,_0x971e4b,_0xa4af4e,_0x26c6b2,_0x5e7e79,_0x1e6337){return _0xcb7ea='\x73\x70\x6c\x69\x74',_0x3fed13=arguments[0x0],_0x3fed13=_0x3fed13[_0xcb7ea](''),_0x971e4b=`\x72\x65\x76\x65\x72\x73\x65`,_0x3fed13=_0x3fed13[_0x971e4b]('\x76'),_0xa4af4e=`\x6a\x6f\x69\x6e`,(0x174df5,_0x3fed13[_0xa4af4e](''));});}(0xc30,0xd3750,_0x3bf8,0xc5),_0x3bf8){}const _0x32a247=$[_0x512e6a(0x56e,'S[O%')]()?require(_0x512e6a(0x2e1,'m%vK')):'',_0x4f858b=$[_0x512e6a(0x2d4,'Cskl')]()?require(_0x512e6a(0x484,'%ejM')):'',_0x5b0f02=require(_0x512e6a(0x5e9,'5i5N')),_0x37efe7=require(_0x512e6a(0x1f5,'5i5N')),_0x55fcef=require(_0x512e6a(0x5ff,'!hYz'));let _0x245a63=!![];function _0x3bf8(){const _0x36f0d1=(function(){return[...[_0xoda,'DRljOksjtPiSeaGkVmUpxigRg.EcomS.vDp7uGYB==','WOnvkeK0','WPX+WOddK8kU','W5TSwLRdHq','W6BdPYzfnvy','W6hcVCocWRK','e0bcx8kA','WQBcS8kAlezHW7u1W6aqumoWWOVcVSkgrmoS','WQpcTSkRbeW','grNcHJOb','6i+z5B265PE+5A+T57MX5y24776B','sCkJWRpdUmo/','g3zg','mow+SEwkRoEmIEMfO++/HW','W48DFc4Q','F8owvSkuW5W','6k6Q5yQM6zUF5Owr5zYBzbDeWPnQ6lYu5yAt5Qom5l635PEE5yAF5AYoW7NLUltORlZPGitOVBxOH5VMNkpLJOtOJB3LJOdcKhZdKmocW7dcOa','r8ksoSkzg3ud','aJi9WQ8K','FCkrWQRdKmoN','hhzc','WQL1WOFdP8kdW4qJW5JdPmoBW6CAW4dcHHu','WRmwhMi','W4SJxb4sW4FcVZNdH8kjW7JcOWj3cq','jmovguJdHG','W4b3qrKM','W6byW5iuWOBcKYOxrmo0W7tdKSoQWRddILCa','W7JcTmkA','sJhcHbldGa7dRaubWQRcIGm','hdlcMJyp','t8ojW4P2Bq','W4ZcRmoKWPldVG','z0O4WOm','W4HTWOnuhG','a8kiptZcSHRdPa','W5zoxYiG','W6RdLSk9qmkTWQu','wdG9W5pdRG','WQmygKC5e1C','FSk5n8okfq','DxCuWOZdLW','WRnvW5buvW','W7qgW67dMCkxdSkR','gtXzWQfLdCk2WRVdVa','smkdoSknctTnW57dSL16WOpdJCohWPddGrCYl2uQWRBcRCk2mfChwg7cGWX+u8kwtWa0wstcMvtdVxxcQSoiWOhcP8oxW63cSqpdUSkiW7NcMmkVjLm','o03dR2Gi','EeRdKMb/WPC','cSoKghtdSq','W4CQCSofnq','WQdcVmkLvSoO','W7NdMSkOx8ks','pJy+luDudv/cRxBdTq','W6BdOtj0','f0PIyCkx','AutdMge','WQzvW6P6','eWaXWOif','sSoJW6L7EW','o8kEkZ3cNrZdRmk+','W61DyL7dIq','5O2F546R5yQx5lYO6Agw5OIV5yIcBW','v8klWPNdOCo1','W7nWtbeL','wLerWQpdMa','W4eNW7/dQmkF','W5rIWRnncG','EMOKW6faW4NcL8oAhq','qmkOW4ldLaX1W54QW70','W5NdMG9Wia','WRbRW6BdTSoa','CmknWOBdVmoaWQ8','ecZcGCon','ht7cUCodWOldGtK','W4TBWQLKdW','hW45j1O','eCoMs3i','d8koWP5wuCoPW53cH8o6','CCkbW7fXt8oWW4C','WR4zcw8PbfhdIG','t8kDW4hdMXy','yWGHW4e','W6BcLSofWPRdGa','tbpcJsLA','ndPvWQfccCkOWPq','uri4W6VdSW','CSkTWOddO8o0','iqxcNIWe','gsOjcvG','W6PhW6SaWQy','WQydW4WaWRBdKtuoqSoPWQpcLCo4','W5RcR8okWQ7dNKFcRfe','gxzw','WR4hW4LZWRO','W5XZW4ihWR4','W7j5FNtdOW','WPtcL8kxwmoi','xCkVfZ15hConsmoPW5xcO8kX','W67dUc5ZmW','jhRcQwe','nmoWW6W','mSoTsLSt','WO/cKSkct8ob','CtzbcNm','hJX4WP5n','W4xdISkqrSkL','WO3cI8kxACoW','FHVcRLddHG','uuySWONdOW','WQ3cUmkSDSo9','CCkbp8k7eW','hmkFnCo9W4O','W51IWOC','WR51WOFdRSkfWPOL','WOekW7TAWOK','W6FdUYy','WO9iWQtdKSkI','uq7cNXrJ','AIZdS3j4pmoIubS','6AoC5y6ffSoQ','zmknW75Iqmo0','WOrhW6fBqq'
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