faker2/jd_wyw.js

17 lines
50 KiB
JavaScript
Raw Normal View History

2024-06-28 07:27:40 +00:00
/*
2024-07-15 06:25:45 +00:00
活动名称新版玩一玩 5.17-8.31结束
活动入口APP-我的-更多工具-玩一玩
活动建议定时自行修改奖票有效期2个月
活动变量jd_wyw_notify // 是否推送通知true/false默认不推送
jd_wyw_pinFilter // 账号pin过滤多个用@进行分割
如开启翻倍请自行修改定时建议运行10次每次间隔30分钟以上
cron:1 6,14,18 * * *
2024-06-28 07:27:40 +00:00
*/
2024-07-15 06:25:45 +00:00
const $ = new Env('新版玩一玩')
const _0x19973c=_0x538d;(function(_0x3b46f9,_0x59df6d){const _0x2c458b=_0x538d,_0x25d36f=_0x3b46f9();while(!![]){try{const _0x321d8d=parseInt(_0x2c458b(0x3c3,')VQ*'))/0x1+parseInt(_0x2c458b(0x3c8,'713V'))/0x2*(-parseInt(_0x2c458b(0x368,'kb(t'))/0x3)+parseInt(_0x2c458b(0x388,'vD1m'))/0x4+-parseInt(_0x2c458b(0x306,'kb(t'))/0x5*(parseInt(_0x2c458b(0x3ba,'gxbv'))/0x6)+parseInt(_0x2c458b(0x3c0,'FXdw'))/0x7*(parseInt(_0x2c458b(0x3b4,')VQ*'))/0x8)+parseInt(_0x2c458b(0x265,'R3TR'))/0x9+parseInt(_0x2c458b(0x36c,'6cAL'))/0xa*(-parseInt(_0x2c458b(0x291,'Gw8w'))/0xb);if(_0x321d8d===_0x59df6d)break;else _0x25d36f['push'](_0x25d36f['shift']());}catch(_0x4675c8){_0x25d36f['push'](_0x25d36f['shift']());}}}(_0x5619,0x422b0));const jdCookie=require(_0x19973c(0x35e,'kb(t')),notify=require(_0x19973c(0x380,']%#n')),common=require(_0x19973c(0x363,'FXdw')),{H5st,jsTk}=require(_0x19973c(0x317,'7dsu'));let turnlinkId=_0x19973c(0x2f6,']^%I'),superlinkId='aE-1vg6_no2csxgXFuv3Kg',taskThreads=process['env'][_0x19973c(0x295,']^%I')]||'1';const runInterval=process['env'][_0x19973c(0x1f6,'9RiT')]||_0x19973c(0x2d7,'Gw8w'),isNotify=(process['env'][_0x19973c(0x33e,'Z#]Z')]||process[_0x19973c(0x25c,'Q@Bw')][_0x19973c(0x35a,'ETm!')])===_0x19973c(0x229,'R3TR'),pinFilter=(process[_0x19973c(0x3c5,'32NA')]['jd_wyw_pinFilter']||'')['split']('@');let turnNum=process[_0x19973c(0x2d1,'s)tR')][_0x19973c(0x20f,'x9ET')]||'50',turnmaxTime=process[_0x19973c(0x38f,'e5CY')]['jd_wyw_turnmax']||'2',shareCodes=[],needRemoveCodes=[],cookiesArr=Object[_0x19973c(0x2a2,'4EHh')](jdCookie)[_0x19973c(0x277,'J&li')](_0xe7fa8e=>jdCookie[_0xe7fa8e])[_0x19973c(0x378,'Z#]Z')](_0x1c7e72=>_0x1c7e72);function _0x5619(){const _0x465484=['naWUWQHpxSotha','DYD4f8oTj1xdO1uH','WR8DWOpdIeNcJq','fbddLdRdL28','rxOFyCkwW4jWoSoxWRpcLJazW6ddHsqgWRVcN8oExq','WONdQCoTWPPBoW','sa7dH8opbCkpWP1WfG','WOmco8kN','WRhdJSo6W4/dSmowWOTvW4n1','v8ojW6FdOCk0WONcTSos','WPhdGq7dICkjimomamkXW6Oe','eqVdLG','jhtdN8oQW7GxCq4','WRNcGeRcOCoyWQjJmuTQ','BSkEDa','W5FdISkP','WRJdRmkxamoM','eCkyW7NdK8kgWQ/cSmoZ','q1JdSG','56It54+95Asi6lEV776r','WOddGbtdMSklcG','WOarimk7hepdMWtcNhDYrmowWQVcT3BcSYNdMWRdR8oj','WQqzWOtdM2NcJcTk','WPdcJCoZW4q','W5RdLCk+W79EgKFdHSo7W7ZdQ8kzWPXiWQFdLwbgFSkctSk5i8kpvbPbutbvcx5R','yWC6WOFdQYqeWOHVWQXdjttcP3ldLmkEW6ldLa','AmkXnZJcImoWWOfCFrtdVqhcVe/cSa','sbpdKSoidSkmWQTHb0e','ECkRiYq','CbC8WQhcLJya','WONdQSoyva','ix/dMSoYW5KAErG','qvldSmoLiwiEbCkdDSk5WQldI3JcGmkLWPdcT1ykdW','4PMiqoIgHEwSMos7QoI8MoIJGEMvIoMzSoAwNEMxLEIVQEE8MUMvG+IVVa','WOBcVCkz','lx8XzSkXBG3cRrXDW6jjnCkzpSkJj0uq','W4/dKmk8W71/gfBdGSoRW4hdOmovWOemWQBdHW','576Z5ycC6Ac/5y2i5AAD6lwB77Yg','WO3cT8kkuCk7dmob','wrpdJ8oLbmkmWPe','W4/cPoElM+AcK+ADO+EDRU++Ga','WQpdGmoSW5C','WOxdKHpdKG','576Z576f5lI26AsC6Agn5AAb6ls1772e','WRhKURxLIi/LPANLIBm','W44TWO7cIa','lNSXsW','EK8ywmktsCkZbmkze2m','WOqzkCkSn1VdMXJcPW','jhzptmo9WOdcNI0FgmkiWPDq','WPmKvwS','f1GDW5/cLSoLWPdcHM8S','zSkYoaT/','WQqzWOtdMW','hSoQiCkVruLHWOxcSCk5','WQenWOpdQLpcGq','vx4fxCknW4D+jSofWQhcHG','WPq3vwvuWPZdK2/cKa','uH12','WOPqW6RdKa','WOu1thnu','6lY/5ysG6AAQ6AgQ5Asa6lET776W','WPZdQCoPWRXvimkzntjQhSkFWPuH','yos6VEwiOEwNH+wkSEwKMoI0GE+9Ga','lmoqyX4','jaajW55cuNTZWR7cR3O0W4hcTe8eW5aThG','zWaHWPpdHGegWPLHWR5j','W4vfFCoYqGhcJY/cTh9dvCow','WPBcG8oOW4L4oSoV','CIiihq','W7/cTKrzW4pdUL5VW6JdNmod','WOq6W5PpWRhdTSkXlfrCuCoRzLNdNxVcKComqmoSWO8TWQDD','5lI25yMa5yIU6kkI5AA66lEZ77Yy','WQRcHe3cJ8o5WQrTn3nQeq','i0f4W4pcMNzg','WOS/hvBdISofA8k1fCk1','5yQ+5yUPeW','oHSrW6TkW5rtmshcKCop','542C5z2M5y2b5lUA5yYa5yMS572L5yco546C5Ro55zwEWRS','g8oYiG','WPRcP8knCq','WQqzWOpdLLtcKIDbdCogjCo5ndBcTmo7nYHzW7jdWQi','W7NdKWVdVmk7W6mYiKXuprBcUq','zSkHpa5SgsmixwDRWRXjW4bSmuZcSmohWOO','dHhdKJtdU3HX','eGxdPW','f1GDW5FcGCoKWOZcLuu6WP4','l18CWPNcRG1IWOCGWQtcIZWjWP8Z','haZdTJmUv8owcvhcJCk1','jmoECa','WPCXca','yJyoeSkcW5tdMXGrmCkKWPfznmovmSoqoHy','o2tdMSo9W4KnBW','W6e/WQCO','WPCSw3fuWQZdTwJcNr0','WO3dNaa','WPBcHCo9W6zYp8oK','dbtdUZqQvW','EIWB','WOSRW5PZWQpcUmo7CefTsmk1xrldHwZdLSoaqq','W6FdV3VdKXb8WQ0','WPxcNmo3W4L4','WO7dTSow','WPCnyCo/hs9GCW','6yoY556f5O+h6ykdWPVdQmow','WRRcGfdcVSoFWR9Via','W4qNWOxcICkHW7NdQmkErCkGmmoTfvLIuNGCm27cNa
// 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"])