faker3/jd_wyw_ffl.js

20 lines
52 KiB
JavaScript
Raw Normal View History

2024-07-02 23:09:05 +08:00
/*
活动名称新版玩一玩翻翻乐 5.17-8.31结束
活动入口APP-我的-更多工具-玩一玩
活动建议定时自行修改奖票有效期2个月
活动变量jd_wyw_turnnum //默认翻倍投入50奖票,可自行修改最低1最高100
jd_wyw_turnmax //默认翻倍2次,可自行修改
jd_wyw_notify // 是否推送通知true/false默认不推送
jd_wyw_pinFilter // 账号pin过滤多个用@进行分割
翻倍请自行修改定时建议运行10次每次间隔30分钟以上
cron:1 1 1 1 *
*/
const $ = new Env('新版玩一玩翻翻乐')
2024-07-15 14:28:01 +08:00
const _0x569a07=_0x4432;(function(_0x19f9bf,_0x2abf77){const _0x365e76=_0x4432,_0xe4e410=_0x19f9bf();while(!![]){try{const _0x30c9e5=parseInt(_0x365e76(0x1dd,'fu%6'))/0x1+parseInt(_0x365e76(0x2ea,'IZTE'))/0x2+parseInt(_0x365e76(0x284,'ao2$'))/0x3*(parseInt(_0x365e76(0x23c,'^Q8A'))/0x4)+-parseInt(_0x365e76(0x1e5,'nm4r'))/0x5*(-parseInt(_0x365e76(0x27b,'o*u1'))/0x6)+parseInt(_0x365e76(0x10b,'^2YS'))/0x7*(parseInt(_0x365e76(0x22f,'ao2$'))/0x8)+parseInt(_0x365e76(0x24b,'NNp4'))/0x9+-parseInt(_0x365e76(0x2f0,'R5Go'))/0xa;if(_0x30c9e5===_0x2abf77)break;else _0xe4e410['push'](_0xe4e410['shift']());}catch(_0xe09add){_0xe4e410['push'](_0xe4e410['shift']());}}}(_0x2c3f,0xd0b11));function _0x4432(_0x58120c,_0x31d201){const _0x2c3fff=_0x2c3f();return _0x4432=function(_0x44328b,_0x626a90){_0x44328b=_0x44328b-0xf8;let _0x4e3c3f=_0x2c3fff[_0x44328b];if(_0x4432['BgtZrB']===undefined){var _0x3ad104=function(_0x137a0f){const _0x1cd30b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x28b3d8='',_0x53fe9e='';for(let _0x2a3fc6=0x0,_0x517a6e,_0x4a9b90,_0x58b163=0x0;_0x4a9b90=_0x137a0f['charAt'](_0x58b163++);~_0x4a9b90&&(_0x517a6e=_0x2a3fc6%0x4?_0x517a6e*0x40+_0x4a9b90:_0x4a9b90,_0x2a3fc6++%0x4)?_0x28b3d8+=String['fromCharCode'](0xff&_0x517a6e>>(-0x2*_0x2a3fc6&0x6)):0x0){_0x4a9b90=_0x1cd30b['indexOf'](_0x4a9b90);}for(let _0x51a073=0x0,_0x2a355e=_0x28b3d8['length'];_0x51a073<_0x2a355e;_0x51a073++){_0x53fe9e+='%'+('00'+_0x28b3d8['charCodeAt'](_0x51a073)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x53fe9e);};const _0x1e9638=function(_0x8618f1,_0x1f8c91){let _0x38239e=[],_0x475e92=0x0,_0x56a9f3,_0x351125='';_0x8618f1=_0x3ad104(_0x8618f1);let _0x24d8c6;for(_0x24d8c6=0x0;_0x24d8c6<0x100;_0x24d8c6++){_0x38239e[_0x24d8c6]=_0x24d8c6;}for(_0x24d8c6=0x0;_0x24d8c6<0x100;_0x24d8c6++){_0x475e92=(_0x475e92+_0x38239e[_0x24d8c6]+_0x1f8c91['charCodeAt'](_0x24d8c6%_0x1f8c91['length']))%0x100,_0x56a9f3=_0x38239e[_0x24d8c6],_0x38239e[_0x24d8c6]=_0x38239e[_0x475e92],_0x38239e[_0x475e92]=_0x56a9f3;}_0x24d8c6=0x0,_0x475e92=0x0;for(let _0x613d49=0x0;_0x613d49<_0x8618f1['length'];_0x613d49++){_0x24d8c6=(_0x24d8c6+0x1)%0x100,_0x475e92=(_0x475e92+_0x38239e[_0x24d8c6])%0x100,_0x56a9f3=_0x38239e[_0x24d8c6],_0x38239e[_0x24d8c6]=_0x38239e[_0x475e92],_0x38239e[_0x475e92]=_0x56a9f3,_0x351125+=String['fromCharCode'](_0x8618f1['charCodeAt'](_0x613d49)^_0x38239e[(_0x38239e[_0x24d8c6]+_0x38239e[_0x475e92])%0x100]);}return _0x351125;};_0x4432['czufPj']=_0x1e9638,_0x58120c=arguments,_0x4432['BgtZrB']=!![];}const _0x404a35=_0x2c3fff[0x0],_0x1d65e9=_0x44328b+_0x404a35,_0x42d2e1=_0x58120c[_0x1d65e9];return!_0x42d2e1?(_0x4432['CYkADT']===undefined&&(_0x4432['CYkADT']=!![]),_0x4e3c3f=_0x4432['czufPj'](_0x4e3c3f,_0x626a90),_0x58120c[_0x1d65e9]=_0x4e3c3f):_0x4e3c3f=_0x42d2e1,_0x4e3c3f;},_0x4432(_0x58120c,_0x31d201);}const jdCookie=require('./jdCookie'),notify=require('./utils/Rebels_sendJDNotify'),common=require(_0x569a07(0x2c4,'NNp4')),{H5st}=require(_0x569a07(0x2c8,'o*u1'));let turnlinkId=_0x569a07(0x233,'fu%6'),superlinkId=_0x569a07(0x2e5,'fu%6'),taskThreads=process[_0x569a07(0x1de,'XSDb')][_0x569a07(0x12b,'2CPl')]||'1';const runInterval=process['env']['jd_wyw__interval']||_0x569a07(0x2e9,'nm4r'),isNotify=(process[_0x569a07(0x22d,'xF[Q')][_0x569a07(0x1c5,'E)JY')]||process[_0x569a07(0x115,'MY&*')][_0x569a07(0x218,']Sd%')])===_0x569a07(0x2b4,'NNp4'),pinFilter=(process['env'][_0x569a07(0x112,'3er%')]||'')[_0x569a07(0x132,'kd6U')]('@');let turnNum=process[_0x569a07(0x237,'o*u1')][_0x569a07(0x11f,'NNp4')]||'50',turnmaxTime=process[_0x569a07(0x2cb,'2nj2')][_0x569a07(0x26f,'X%MM')]||'2',shareCodes=[],needRemoveCodes=[],cookiesArr=Object['keys'](jdCookie)[_0x569a07(0x118,'(FrS')](_0x1e9638=>jdCookie[_0x1e9638])[_0x569a07(0x181,'^@vl')](_0x137a0f=>_0x137a0f);!cookiesArr[0x0]&&($[_0x569a07(0x1d2,'oRN4')]($[_0x569a07(0x2b9,'o@Q5')],'【提示】请先获取Cookie'),process[_0x569a07(0x29c,'xwM^')](0x1));!(async()=>{const _0x524199=_0x569a07;notify['config']({'title':$[_0x524199(0x2bb,'*s&B')]}),await Main(),isNotify&&notify[_0x524199(0x1fa,'Lh*@')]()&&a
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"])