faker3/jd_video_shua.js

14 lines
91 KiB
JavaScript
Raw Normal View History

2024-07-02 23:09:05 +08:00
/*
活动名称逛视频刷视频
环境变量jd_video_notify // 是否推送通知true/false默认不推送
jd_video_pinFilter // 账号pin过滤多个用@进行分割
自行定时多次运行
*/
const $ = new Env('逛视频刷视频')
const _0x10ce37=_0x51dc;(function(_0x173fb7,_0x3c94e7){const _0x18185a=_0x51dc,_0x1edf34=_0x173fb7();while(!![]){try{const _0x1942ae=-parseInt(_0x18185a(0x463,'W*bZ'))/0x1*(parseInt(_0x18185a(0x244,'mw5h'))/0x2)+parseInt(_0x18185a(0x216,'kIJt'))/0x3*(-parseInt(_0x18185a(0x45c,'FQ6i'))/0x4)+-parseInt(_0x18185a(0xf9,'$LgP'))/0x5*(parseInt(_0x18185a(0x297,'1uk@'))/0x6)+-parseInt(_0x18185a(0x16e,'FQ6i'))/0x7*(parseInt(_0x18185a(0x283,'mw5h'))/0x8)+-parseInt(_0x18185a(0x29c,'lTro'))/0x9*(parseInt(_0x18185a(0x203,'gytX'))/0xa)+parseInt(_0x18185a(0x421,'[Ie^'))/0xb+-parseInt(_0x18185a(0x262,'6qK&'))/0xc*(-parseInt(_0x18185a(0x2e5,'sqB^'))/0xd);if(_0x1942ae===_0x3c94e7)break;else _0x1edf34['push'](_0x1edf34['shift']());}catch(_0x4d6b33){_0x1edf34['push'](_0x1edf34['shift']());}}}(_0x1e9a,0x31b4a));var il=_0x10ce37(0x309,'KuiT');function _0x1e9a(){const _0x45bba6=['xmo2lSkKWOK','wmkCqwzbzg7cHvxcJmkZWOXwWQdcLSo8l00PWPrXWOudW6lcRSkhWQu','WQtdSIJdUJ9fW6NcVryR','W63dKGbDW4X9W5Ceu8oJuLbrkSkZWQdcVMxdOJJcRrRdI8kYW6HMWPtcUG','W7OvWPGpm8ocWPy','vSk8W7tdNCkJWPOeoSouWRqs','W5TvjSoUcCkfdqhcTCkaW6K','WPrKaZtdPL0lW7D9ia','W4CIWRvVWQFcT1ldGHnLae7dV3reWPiaWQCy','bSktxNiKEfZcMWVcGmo3WPa3W67cKmkBttKnWP0','WRnMBW3dQ8kD','WPvGW4tcQSo8W4/dMSke','WO52DMNdUCk5W5ftwZ8','W5xcRSoXW7/cKb7cT8oW','WP3cHtldRd51W7JdTJz9xW','WR1HpmktW7a','WO3cOr3cVZxdSHZdS8ottSkHjW','WPFcRSoWvW','n8kLW7RdGa','WQtcLbpdTWjlW7ZcOZyywLtcQCkPW4RcMwFcUSokW73cQaZdGJ8XWRfwW7ddLSo7','W4jrx8ozWRBcRXxcNq','fmoJoSkZW7/cNq','W7yJi8kIrGO1W6tdKhVcSG/cHSoDW50','WO0VW7O6','lSoEtvdcIa','WO/cQxX3WRueW6TCmCoWq24gbCkDWO7cVMFdOq','q1ddUmkJWQdcIGxdOSokW6O','W7O3W64+','p8k3WPFdTZjYkSkkW61FWOFcJmobvYFcUCo5WOVcNSoKyticvSkpW4pcHry','W7KGEmkIq181W6FdPuxcSNC','WO/dLZrCW6DLW5H8','WQbdfIxdHhCMW4bDbG','W744ASox','WO98k8kJW44CbG','aCkzW6e3hW','W7dcTSobAmo3pCkOWPS3dqq','WR1sC8kuvSo2esBcK8omW4b5','W7dcT8obDSota8kSWOmxaGRdH8oxAupdMSo9W6i','cSk6l3CRCLhdPwtcNmkCxq','W6rJxSk/','WQbdyghdKfKIWQzAbG','WRW7emkxamkxW7eMWOnUr3ldKG','bCkyW7Cg','W7pdGMldNG','W4ddSarU','WRldQmoUWRK','atpdOmov','WPddMCkOW4RdIYtcMCkbcmkRW73cRdxcUrfZWQuysCoLWRCDWRfjcCkjW5W','ySoIWQtcL8k3WRPqnCocW7y','W40tAXC','W4W3WPyEcSoMWO7cNKe','vW3dSSksWQxcVYFdR8oEW744WQjZrSksCW8ZWRFcSti','d8odtCoW','W44VW7TCWOfg','WOVdO2vdyIm5W4TYWPKRWRtcPCkUWQySWQRdOSooWOtcRSoQt8kIeI/dRfJdIJW','W6ZdNCk8DCkfsSk1W4nCW4q','W7rubmoP','W5X8ACogvW','aCoSeSkrW4hcMSodWPCKha','WQfpWROi','W4RdIqv3','WO4OW5WK','Cbb4WQy','W5Tul8ojnmkYtsNcQmoBW41WW458W4rrWPCSsmotWP/cV0FcOh3dOvrIW4PLWP84lmo7W4j6vgXovq','WP3cOZJdSardW77cTHCVBvJcLSkbW4JcIfNcH8obW67cLG','W4i3tSoOWOFdJIRcQvm2','W4ObcCkF','lae2lSovqgDEW53dU8kwemoeWPhcNCogA1BcGmoYWONdKmoAW4NdKmoGBHe','FSkJW6pcGa','BCoiW6ldHCkXAcXzW4BcOcddJG','d8omWQpdPq','W5LDFmoBxSojWQm6WO5X','WRXVW6dcJq','W4P/uSoYqmoxz8k4qCoV','pSo2W7JdPW','W6VdPhjb','qSkHW50h','WQa3BSoPW4VcP3pcQWi+emkqW6NcH8oJcCoAgr8gACkZnmo7','WO3dQ2hdHJtdSuxcPmkSDmkQhmkLW5ldIWGwWOmjsmk/q8o3WPRdO8k/dx0','kmktuxOH','W6/cOCkQWP7cP2TGcCk8eCoS','W69Hr8oAvSoq','WRbgdmkXW4WqemoOW6uqkvJcLSo7if7cIJPUWRpdPcf6WOVdJLlcQ2C','WQbKW4FcH1lcIfVcPqxcR2tcK8kSjLhcQmkWb1VdISkzWQ3cImo+W6WU','Af9CmCkEWR3dTJmMBaJdJa','mXFdSCoS','W43cJmkVW7S','WOfXW4H7W7dcQ1JdGNf1rghcMYPGWRGaWQqxnbzYCSkyqIa5WPu1rbn0EsVdSbddPtzdW4qhiCoKiM/cS2hdRmkIWRZcQSoIyLBdOJy4xYbrvmoBW4Pf','E8kpcSoB','uc5AWRenCIBcP8ofwG','W5jdW7RcQq','W73cVmkYWO/cHa','zSkGW6ldMq','W5SqdCky','WRBdOCkKxSoatCo3Bq3cLCkTtdCScx/dGSkbWRJdISocWRPaWRhdU1WYEY8jaHq+A8onWQBdSxSzW4FdPCkwW4CtW5NdSCkq','cSomWRZcHaips0P8iLi','WQ1nfW4','WRJcJmkoWOi','WPPGW7DBW6hdTddcQuDuhIVcPdzRWPr5W7isk14','W4BcQ8oMD8oV','ymkIWPldK0y','W6SbgZu','W6hdMmoZia','W5FdNmosW6ZcUw3cKW','u8ozW7hdRSk3tYbEW5JdVZNcMa','WPBdS8oZj8o+fCkRyXxcKSkU','W5ddVhtdKq','zmo8WQJcNG','WOfFW6FcMLBdUfBdIdZdVMBcVCkoy27cPmk8muBdKCkjWRlcGSobW7WQpCoQxepdQbybWQ/cSCoBWPfpW4xcJmo7mCkD','WQSuvgG','oSkIW5aP','W4L2CSkg','ssVdVmktWQdcIYC','W6fpxCoO','WPiQv8o+r8koB8oo','W4iRn8oc','B8osW5JdKa','tEISKUAXHUwKP+I1KqVINQVdSW','W4PkA8o+w8ozi8oTFmo/W4m','W7pdPqf0','Aei6imk5W6ldPtuJit0','n8oYFf7cS8o8uv7dJCkRe1qBeG','W7/dQh7cRG','W7hcOmoJua','WPD3t8oo','tNGXlSkZjKvjWR/dUCk7jmk5WOxcT8oKpqldHmox','vMNdLZaqW7OtWOhdJmkhW6nLp8kgWQS','5yEQ5
// prettier-ignore
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.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])