faker3/jd_video_shua.js

16 lines
34 KiB
JavaScript
Raw Normal View History

2024-07-02 23:09:05 +08:00
/*
活动名称逛视频刷视频
2024-07-03 19:51:03 +08:00
环境变量jd_video_threads // 控制并发线程数正整数默认1最大3
jd_video_notify // 是否推送通知true/false默认不推送
2024-07-02 23:09:05 +08:00
jd_video_pinFilter // 账号pin过滤多个用@进行分割
2024-07-12 16:13:49 +08:00
jd_video_signapi // 自定义SIGN的API
2024-07-02 23:09:05 +08:00
自行定时多次运行
*/
const $ = new Env('逛视频刷视频')
2024-07-12 16:13:49 +08:00
const _0x211c28=_0x2bb5;(function(_0xad26ca,_0x5348d6){const _0x5d12f5=_0x2bb5,_0x2237e9=_0xad26ca();while(!![]){try{const _0x2980ab=-parseInt(_0x5d12f5(0x75,'XS]['))/0x1+-parseInt(_0x5d12f5(0xce,'(mDw'))/0x2*(-parseInt(_0x5d12f5(0xea,'YH[7'))/0x3)+parseInt(_0x5d12f5(0x7a,'R&2&'))/0x4*(parseInt(_0x5d12f5(0xe6,'H6#Z'))/0x5)+parseInt(_0x5d12f5(0x185,'ox(i'))/0x6+parseInt(_0x5d12f5(0x95,'tkh@'))/0x7*(parseInt(_0x5d12f5(0x7b,'MykJ'))/0x8)+-parseInt(_0x5d12f5(0xc4,'b!Jl'))/0x9+-parseInt(_0x5d12f5(0xd6,'FCz5'))/0xa;if(_0x2980ab===_0x5348d6)break;else _0x2237e9['push'](_0x2237e9['shift']());}catch(_0x29f53f){_0x2237e9['push'](_0x2237e9['shift']());}}}(_0x3c15,0xd5724));const jdCookie=require(_0x211c28(0x163,'H6#Z')),notify=require(_0x211c28(0x178,'wBap')),common=require('./utils/Rebels_jdCommon'),{H5st}=require(_0x211c28(0x111,'84ki'));let taskThreads=process[_0x211c28(0x16f,'QpUT')]['jd_video_threads']||'1';const runInterval=process[_0x211c28(0x6d,'ox(i')][_0x211c28(0x13e,'KPsG')]||_0x211c28(0xb3,'QpUT'),isNotify=(process[_0x211c28(0xcc,'wD0E')]['jd_video_notify']||process[_0x211c28(0xe3,'q[Zp')]['jd_video_Notify'])===_0x211c28(0x91,'Gz2S'),pinFilter=(process[_0x211c28(0x158,'la5%')][_0x211c28(0x186,'b!Jl')]||'')[_0x211c28(0x79,'8o3W')]('@'),randomApi=process[_0x211c28(0x128,'Hq%5')][_0x211c28(0x160,'MykJ')]||'http://rsign.257999.xyz/rsign',maxThreads=0x3;let cookiesArr=Object[_0x211c28(0xb1,'mCPt')](jdCookie)[_0x211c28(0x17c,'YH[7')](_0x558873=>jdCookie[_0x558873])[_0x211c28(0x15e,'Gz2S')](_0x68c92e=>_0x68c92e);!cookiesArr[0x0]&&($['msg']($['name'],'【提示】请先获取Cookie'),process['exit'](0x1));function _0x3c15(){const _0x2a7e9e=['W5ijlG','ESortCoQp2RdVSkJW5rScg4x','WPS4tv4Ksgq','rSkBW4VdImkJ','WRNdPZDYpvHpdq','WOPKWPhdHvmtFayOWOZdLH7dNsRdVgBdJCkapdjkWQTMbgX2W50KW7tdKaC9oG','W542qem','W71gWP1qhSoj','W6vEW6xcJCoEW6nXW4u','W7ZcG8k7WOTyWPePW6n3v8k+W4ZcNmoiWPS','W61AW4hdQNrfjCk7W4tdISozWQKA','W5/dHWFcUWRdV8kvWOK','56+55yUX5OUq5yIAhIa','WQVdHxJcGa','W6rwW6JcNmoLW4j+W6pcOCo5nNdcGCox','W63cJ8kRWQnsW48OW6D0ua','eHpcVmoYyftdICk5jINcTCk8pcNdOsFcMmkPeb7dMgdcOr4cCcpcNxFdMfRdTmoHyCo4','C8ozdSoYnG1bWRW','WOidWO/cMG','W73dOSkOW4lcRSo2WO3dGq','WRhcVfOeWROVW7vRcXq','uCkJASo+','W5ePW77cISo+xmoC','WP7dNdG','W67cI8kRWO8','W4jWW5/cRq','BGFcM28jW7FcRf3dPSot','ChvlAaexWOddQCofW4Whq8oWW5D3W44JmmkdDCoT','obe0iCkOFCkaWRq','W7RdPwq','W6/cONaUtGyClmo6rmoZW6hdHq','WQCLW6PSW5ZdRmkZz8o/DNiP','5BU15yYQ57QH56QGqSkFWPi','W65tWP1zfSoEnSojW7HFW47cR8kgW5bhhdHmWRKFWPddJqNcKCk3y8kueGdcGI1jWR4','W77dTCkJ','5OY654+f5AAS6lE3W78','WRVdGwxcUmo1WPFcKmkJWOj+WR3dV8oScSo+W5TSyCo7','eHpcVmoYycVdNSk4eIRcT8kWDdxcNa','W7ZcKMtdMSkZdxtdQvW','W45vWOJdSfRcP8o5WPW','56+c5yQa5AwL6lEQma','bXVcQ8o/','yCo2WPRcMW','WPRdNYeGfSkJhSkdva','lCkhASkSjG','W7hcKgW','F8kpjq','WPKAW6/cPG','WRtOR6tMSyVLPjZOTjhcKEkCJb8','W6BcHCk4','W78iWQTUka','W6hdSGa','vbnJWPhcP2JdJ2mhWOOiA8k7CSojW4quuCk0o8kT','W6tcNMRdRGRdJCkMbSk0lwi','W6ZdQSkTW4lcN8oT','W74gWRT0','WOfwWQFcVmoGWORdQ0usxZ8','W6NcSvWDWOetmhebW4zeae5MW5RdOMq3WP90','W75qW6S','WQ4iWP3cPW','WPhdIt0','WPPGgaD5hJrnEXb3xCka','WOtcPG0','q8kRESo6W6FdUCkYW4SqW416WQxcRt5rWQdcGHytWOiuWOhcLSoiW6xcPmoDW4dcVmoHW6xcU38','W4/dNd3cRa4','6ycU6kse6Akp6Asj6Ao95AAA6lEYW7q','WRFdLsK','W54joYz6fSkvxq','W7xcI3/dN8kUqWJcSK/dKZz8FG83gCocyCoxifOsW7tcUcFdJmodacGhCCkGWQ/dUa','WRJcPxBcSdTkW7vPogJdSd55W4JdRmoN','WPalWP/cNSorsmotDatdVmkhoftdGW','CmoIWOFcTKHU','5O2c54YQ5AE16lw/W4W','WR4mWOdcM3mhyq','W7/cKgtdG8k4geK','qSkeW5BdKSk/W6/dVWLP','W6lcLNhdNHBdIW','5BsR6k+x576A6lsG6l6b6l6K6kgz5B6W5yUI6lAo5y2l','vSkWE8o+W7ZdJG','W5FdRu4mlsLfWOxcOJBdMWfQtSkIW4FdNxys','5yAb57+wnmopjsRMNkhLIBG','CSkvj8k/ysVcIupdKmkkWRpcMmonfSozWP/cGCkRW7XHfa','W6NdRmkVW5dcK8o4','W7xdPwFcOq','WQ3dKxtcHSoTWRdcGCkIWP9rWQRdM8ovimoUW4jGBCoH','fEISTEAXNowMRUI2RCkl4P2lWO/MLQdLKAhLUO3MLR7MJQy','W7/dV8k3kCo2reK','5RED5yUk5yAE5yYyWOqGW7bNi8ko5P+J5lMC6z216yk96AoUAUMdNq','kqS0b8ksEa','WRagWOC','W5ZdQumLpHPpWPRcSJtdHbHsAmkXW4tdH2WqW6dcSNpcOru','oCk+jSoRwL/cPshdPCk7WQO','WQ7cTCkr','WOXXWPxdPvSeEae1WQldIehdS2ldUwldK8ocna','WRVcTCoWWOtdGSkRW5xdImkSW60RW4P8','WOhdJMtdJMbezZW','WOGaW67cU8oNkSoFW78','nXe9','WQNcRSkuW4x
2024-07-02 23:09:05 +08:00
// 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"])