mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 17:49:19 +08:00
20 lines
51 KiB
JavaScript
20 lines
51 KiB
JavaScript
|
/*
|
|||
|
活动名称:新版玩一玩翻翻乐 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('新版玩一玩翻翻乐')
|
|||
|
function _0x15c4(){const _0x190be1=['8yYQGSoP','WQa7kh1jW7iEqSoGWPxdTHW','W79HWQO+W4up','B8k3WO3cPSoHlwRdUsZdSa','m8oqBW','5PMn5PEi57Yg5ygh5OQV57UnmW','WR/dJCkb','nSodW5VcT8oUymoboCodWPvCW4NdHCo5y8oKW4rBtW','E8oGxmkPWOWBWQe1W7OgpSkHaCoGs0X9','WPRcGrC','gaFdU00','5OUA5y6l5Asc6lAm776F','lmoUtSkFrCoLpSkkcHa','WQTiWR3dMW','m1hdTGO','WO3cLCk5kuldSCoPWO3dLKWXrY07eH9cW4mBW6a7','W44TW5O','57Y05ycK6Agp5y2S5AsM6ls677+t','vdm+WOi','W7vODbWoWQS5','r8kmdJfEW545fYtdOHJcPviTW5v1imkaWQjaWQm','W6hdTantW5JcGq','5yUx5yU/W40','tSkmhXb+W4K7cH/dTdW','t1NcMmoeWQRcJ8kJA8k9cmo1','DuJdLCot','nmkVCbDmFg3cIhO','gM5XWP/dKSoMW5VdR8o/r8o2','W6WjWQ7cH8oFr8oL','4P+2W73MNjlNNzVORztMSQ0D','WRdcR1tdHCokW5f9','W7RcO3u','qCo3W73dNCouW4K','zmkFifNcMbW8W7n5WPldQNCjv8kueq','n8kkmSoQW77dLSk3','5ysa5O+55yUv6kgX5AAN6lEp772c','5lMW5Ps45zk05PQw5Pwg6ycs5PIs5lM577++5BUR6k6E6lgp5PA157+35ycK5Q+L5Psm5zkE57+L5ygZ5PEq5yox','4PYMA+ADSUIaKEASOUEIOEwKHoEqGgS','W6fRWQK','kmoKxSk3','W7ZcKfWo','v8k1W5flWR8uW5hdISk9WPi','cuxdNwrEW5TDWRhcNSkj','5y+/6ysB54Iv5OcR57Ib5PY4WQJcLSo0W45uWR54WRvpW6m','W4FdLKe5pmodcmkGsmkXt8o0vW','5Bg75lQs6k6M5A2/572m5ykV5PEz5ykY','5zc/5y+m5ywo5QYj5yYW5lU6','d1NdMMaDW7XKWQxcNmkisG','fWRdTsmdyX8K','W7BMIzpLIlpdNokFPK4','WR9FW6RdQmkubSk4fCoJimox','WOFdNSk3W6RcT8kZzCkN','pCo0WQu','aKJcIqBdLLb+WO7cTmkwl2FcGSkRWRPZWOJdON4','5Aso77+y6iYu5B69','W5dcJ8k0W7G','B3xcJ8khWPNcI8k0B8kgdSocWO1aW6nKn8kebMKlcLy','W6zIst0jWQSZyq','rcS6WOBdMCkFWOVdTmkoeG','WQhdKmkFW6H5BmoZW5TwkCk6','W6zUlLu','WRddKSkgW755','WQa2t8kTuhqmm8o1AH/dT8oKctqzW7RdMSosimkma8kxzryhW5CiwmkIWRLZt8oGislcV8kgECkwW61waSovhSkQWOpcHmogyxXCWOiQWQ41xCotWQJdQ8kpbSowD8oGzmoaW7BcMmkuWO/dNa','gvNdMwagW7r+WQ3cG8kj','WOmPW7RcLq','W4NcQfVdNCogWPXo','576h5ygR6Acj5y+65AE56ls677+C','W7FcR2BcHmooWP99qmkmWPhdQ3ueoCkdf8klpKDN','WQHmWR3dV2vTWQzrWQxcUZ8','oCkUWP0OWRJdMNz+','WP9TWPS','DMZcReOc','WQDDWR3dIMqLW6ymWONcUdhcOr8CW5JdUCoDjJaLu8ogemkAjmorW6xcIG5zgCkpWQjJ','WOiMW63cHSkfWQddO8o9WRldSmoIm8o3W7RdNsRdPmoIkG','WPFcN8kpowldVCoQWOu','WPC6W6FcJSkzWPpdUmosWQFdQSoSgSo4W7RdNq','B8kwefVcJX8','W6hcOSkr','EshcGYtdLCoEWQLbW4ynW5mUWQNdT8k7W6y','DCoTmeOqk0FcQMhcHmkEta','BSo8u8k+WOWA','sSk1W5m','54UC5OcD5PYY55Ya776T','vKBcT2tcK8kasq1yimktmCk6WONdGSoXWOtcQ0i','572K57Ye5lMO6AE96AkJ5AAI6lAJ776V','5yIH5yIbkW','W6vWWRO7W5vqW67dNCowzce3W6hdJ8knW6OajColhGmGWQFcQq','rcC4WO3cOSk9WPtdSCkziSoKj8oIW6ao','W6xcPxxcG8oDWPjwtSk7W5q','WR8GmLxdHeTFkmkCWR3dLmkaxmkzW77cQNJdH2/cTmo8W7tdSW','WRTiW7VdJmkseq','omo+sSk3uSoekmkplXtcG8k9WPddISoP','BSo5pCksESoVWPpdQbFcQmkTW6ddSW','DtJdQMSujaFdIYaWW7C','W7L7m1hdNH0dkmkVWQJdN8olxCoeW4VcPdldP2/cTmk+W7JdSvVcPwyvW4hcVHvGjGOV','W6xdUWG','yJZdRe8ljsZdMbKI','WRPtW6tdRSkjemkY','wZNcVZpMIjxLH4Hv5PwH5yE4Ea','kCk6BXS','W6TTWQi/W4my','5Awi56sS77+7','cSoXcHhcQ3hdK1ldIJC','pfVdVaHrDq','6ygJ55295O+f6yg+W7q1W5C','WRNdUmocabtcKhfOoSktW4WO','W6hcNKFdMCo2WOWOa8ohAubIsY3cJCo/oXe6xt8eW4dcJa','gHxcQmonWQNcImoDWQmlgSoZnCoTpcpdQYBdQCkyWOtcISkay8kLrx/dMmkiW7ucWRxcI8ktkG','Cmo5oSkfrSocWP/dTa','W7NcUmkev2NdG0jxe8k0W7KtWRO','W7NcUmkev2NdG0jxe8kUW7mDWRPxW7CI','W7bTna','bqdcTCojWO7dM8kFW6Kz','jCozo8kDxComWOG','imk+DJPdB2e','5OMp5y+95AwT6lEu77Yi','W7zQm2tdN1vdDCkdWQVdKq','6Ao65y6W5AEz5yQD5AE56ls677+C','ESk5sSkZBCoBg8kF','W4dcIKSoWPFdV8oHW5RdTNZdSW4jsh8FWONcGW','5Asg56Ah772k','kmoWW50','ESkAdexcTritW4K','w0NOGidNJlRcGq','W5SIW57cNCkohCoIysj9','nSodW5VcV8oUymob','WR3dJCkr','57+P576M5lUo6AA46Act5AwN6lwn776J','uY8HW5tcGmkAWPddJCoFF8oVWPD4','o8oEFei','Amk/WPNcO8oqmexdQW','chvIWQBdMmogW4W','eCkUWRFcOa','5Q2l772h5BAQ6l2s5Q6o5PsQ57+75ycl5lMb6zQY','W67cJ0FdRmo3W4rOxSoRAK4','WRBdH8kcW559xmoKW4LvpSkLWQxdP8oUtHhdLG3dLa','Emk/WP7cQq','W5VcVKZdL8ovWOzjWP/cL2jVpmkTBv3cOHnGCW','EdNdGvKFitFdLWi3W7KcWOK','WQHmWR3dTNzRWQXqWPZcIsJdVYrxW4ddRSkAkJe','W6RcQmkcAKldJubc','5B205yQz6kYD5A6W57YP5ygQ5PEL5ykx','CIVcKa','AmksbW','WPhcIWrcp8kita','qmkXW5DVWQavW7RdMCkeWOao','CmoZoW','W7/dUX5pW4pcGJjDWOrgqhHS','fvJcJIi','5AEB56wS77+c','WR1mWRRdJ3TR','pUkFMmox','W7pcKf8','DJZdQK8','WPCPW6RcP8kiWRhdPCoi','eulcUYpdJ0f/','i2RcQ3WQjJldVJS','yLZdGSorWOaIW7K','t8oXW6a','q0BcS03cK8ka','6AcR5y+g5AwN5yM55AsJ6lsx772M','W7hcQwBcQmokWOrMs8kEWPldOa','WRvFW63dNSkhe8kY','56Qp546h5OUs5yQg776A5
|
|||
|
// 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"])
|