faker3/jd_wyw_exchange.js

18 lines
84 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称新版玩一玩兑换奖品 5.17-8.31结束
活动入口APP-我的-更多工具-玩一玩
活动建议定时自行修改奖票有效期2个月
活动变量jd_wyw_exchange // 填写兑换值,指定兑换奖品,不填默认只兑换当前价值最高京豆奖品(查看打印兑换值)
jd_wyw_notify // 是否推送通知,默认不推送
jd_wyw_pinFilter // 账号pin过滤多个pin用@分隔,默认不过滤
jd_wyw_autotx // 是否强制查询提现接口兑换后提现接口403可以开启
cron:1 1 1 1 *
*/
const $ = new Env('新版玩一玩兑换奖品')
2024-12-11 16:57:36 +08:00
function xPe6kl(){}var cwsO8RR=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],B2Rzz7h,o6Mvoe,POiJ9q,qgRr387,KqCB4i,MwzZjUz,tKswmQ,Kxm2Y74,d5TIDL7,FFjVY4A,V7xj9W,MwlNH8B,qbBclh,DuqBD2,Tsjg88B,Sa37VY4,a7kCO0;function WVPJZjw(xPe6kl){return B2Rzz7h[xPe6kl<0x4c?xPe6kl+0x40:xPe6kl<0x4c?xPe6kl+0x29:xPe6kl>0x4c?xPe6kl<0x4c?xPe6kl-0x2b:xPe6kl-0x4d:xPe6kl-0x3f]}xPe6kl(B2Rzz7h=A3rfKS(),o6Mvoe=QreRBJ((xPe6kl,cwsO8RR)=>{return cwsO8RR(xPe6kl())},0x2)(FXM8MK,D9i7IC));var WX19898=[],quXjeas=['Lv,<ytIC','\u0056\u004d\u0049\u0062\u0079\u006a\u0025\u0048','\u002e\u0060\u003e\u0055\u0032\u0038\u0031\u0079',nKjOIz(0x0),'\x6a\x38\x26\x42','\x75\x37\x74\x4a\x75\x36\x4f\x39\x73\x7e\x23\x35\x61\x4d\x73\x75\x29\x4d\x4e\x5a\x6c\x62\x34\x5e\x3a\x7e\x78\x70\x4f',nKjOIz(WVPJZjw(0x5d)),'\u003f\u006a\u0069\u0047\u0037','\u0075\u0037\u0074\u004a\u0075\u0036\u004f\u0039\u0026\u0025\u0072\u0062\u0077\u0070\u007c\u006c','\u0075\u0037\u0074\u004a\u0075\u0036\u004f\u0039\u006f\u0034\u0072\u0062\u0077\u0070\u007c\u006c','\x55\x48\x4a\x59\x7a','\x75\x37\x74\x4a\x75\x36\x4f\x39\x54\x25\x7a\x6d\x7d\x6b\x3a\x75\x7d\x4d\x52\x42','zSVY_#1',nKjOIz(0x2),'\x75\x37\x74\x4a\x75\x36\x4f\x39\x3a\x7c\x6f\x62\x74\x35\x59\x6c','\u0057\u002e\u0052\u003f\u0030\u004a\u0073\u0034\u006e\u0025\u0034\u0067\u0042\u0074\u0039\u0051\u0069\u002f\u005d\u006e\u0059\u0038\u006b\u003d\u0041\u0064\u0038','\u0066\u0048\u0058\u0045\u0030\u0036\u007a\u0054\u0037\u007c\u0032',nKjOIz(WVPJZjw(0x59)),'OG@`','\u0038\u0078\u0068\u0060\u0059\u006f\u0053\u0049','\u006e\u002f\u0058\u0045\u0049\u0053\u003f\u0049','\x2e\x6e\x5a\x60','\x49\x47\x3a\x59\x7a','\x6a\x49\x6d\x64\x46\x3a\x48\x6c\x7b\x2c\x2f\x3f\x55\x46\x6f\x23\x64\x66\x57\x6c\x7b\x52\x40\x55\x7a\x4b\x59\x71\x51\x38\x3a\x30\x4d\x59\x67\x7d\x7a',nKjOIz(0x4),nKjOIz(WVPJZjw(0x64)),'\u002f\u0037\u002a\u0046\u006b\u0070\u0023\u0049\u0051\u0038\u0028\u005f\u0042\u0047','/70FPb2&8F','\u0057\u0076\u0048\u0037\u005e\u0073\u002a\u005a\u0044\u0046',nKjOIz(0x6),nKjOIz(WVPJZjw(0x63)),'\u006e\u0078\u0069\u0042\u005e\u006f\u0031',nKjOIz(WVPJZjw(0x5f)),'\u0029\u004d\u0041\u0059\u0071\u006f\u0026\u0065\u0077\u007c\u002a\u0058\u004f',nKjOIz(0x9),'\u0074\u0056\u0072\u004b\u0026\u0062\u0031',nKjOIz(WVPJZjw(0x68)),nKjOIz(0xb),'\x3e\x21\x65\x59\x7a',nKjOIz(0xc),'\u003a\u0047\u005d\u0060\u003b\u002e\u0044\u004a\u004a\u007e','\u004e\u0021\u005a\u0060',nKjOIz(0xd),WVPJZjw(0x4d),nKjOIz(WVPJZjw(0x5b)),'\u0078\u003b\u0075\u0051\u003c\u0059\u0068\u007d\u003f\u0072\u0071\u006e\u0041\u002c\u0072\u0040\u0046\u0040\u006b\u0052\u005a','\x74\x3d\x5f\x34\x67\x60\x5b\x7d\x4d\x2b\x7c\x2a\x78\x33\x42\x23\x2e\x53\x52\x5b\x55\x42\x46\x24\x45\x7a\x3f\x65\x26\x57\x6e\x3f\x7b\x4d\x7a\x51\x37\x70\x24\x6b\x66\x38\x21\x4c\x77\x2a\x76\x6a\x53\x24\x75\x77\x75\x44\x62\x68\x7a\x7d\x6f\x58\x62\x73\x66\x40\x30\x47\x47',nKjOIz(WVPJZjw(0x6b)),'\x62\x78\x66\x46\x3d\x55\x5d\x37\x54\x3b\x30\x5f\x70\x33\x39\x79\x76\x35\x64\x7b\x45\x5e\x5a\x5a\x78\x31',nKjOIz(0x10),'Wlm%u|X3(!Tn]96d?(l','\u005e\u0032\u0065\u0059\u003f\u004b\u0029\u0049','\x2f\x4d\x76\x4b\x43\x23\x78\x49','58AZEt^^xv','\x29\x4d\x41\x59\x71\x6f\x26\x65\x77\x7c\x2a\x58\x4f','\u002b\u004d\u0040\u0060\u0028\u0072\u002c\u005e\u004c','\x3c\x52\x5b\x77\x36\x71\x31',',eiE',nKjOIz(WVPJZjw(0x69)),'\x29\x4d\x72\x4b\x71\x43\x5e\x25\x35\x57\x6a\x7d\x78\x35\x78\x44\x42\x4f',nKjOIz(WVPJZjw(0x6a)),nKjOIz(0x13),'\u005f\u0048\u007a\u006e\u0040\u0023\u003f\u0058\u002e\u007e\u0074\u0050\u004f','\u0066\u0048\u0075\u007d\u004b\u0023\u0076\u0049',nKjOIz(0x14),'\u0035\u0038\u0041\u005a\u0045\u0074\u005e\u005e\u0078\u0076','\u0038\u0078\u0045\u0042','vA%M{YX!N$vdaDJ#pi99g:ABATR9r|"hR]U2"o5l:',WVPJZjw(0x4d),'\u0029\u004d\u0041\u0059\u0048\u004b\u004f\u0045\u0075\u0025\u0067\u0047\u0026\u0070\u0036\u0038\u006a\u0038\u0069\u0042',nKjOIz(0x15),nKjOIz(WVPJZjw(0x66)),'\x29\x4d\x69\x42\x7a\x43\x74\x58\x75\x25\x6e\x62\x78\x35\x3e\x44\x5d\x4f',nKjOIz(0x16),WVPJZjw(0x4d),nKjOIz(0x17),'\x73\x34\x6b\x26\x46\x3a\x70\x26\x25\x78\x5e\x6e\x45\x4c\x7e','\x7a\x4d\x55\x5a\x3d\x64\x24\x4a\x45\x65\x57\x58\x66\x23\x46\x30\x6a\x78\x75\x7d\x48\x4b\x5e\x5e\x4d\x69'
2024-11-12 11:17:55 +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"])