faker3/jd_bean_change.js

38 lines
185 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
2024-09-26 16:43:38 +08:00
活动名称京东资产变动
环境变量
jd_bean_change_interval // 自定义运行间隔时长整数单位毫秒默认1500
jd_bean_change_pinFilter // 账号pin过滤多个用@进行分割
jd_bean_change_farm // 是否开启东东农场查询true/false默认开启
jd_bean_change_xinfarm // 是否开启新东东农场查询true/false默认开启
jd_bean_change_wyw // 是否开启玩一玩奖票查询true/false默认开启
jd_bean_change_ecard // 是否开启E卡余额查询true/false默认开启
jd_bean_change_marketcard // 是否开启超市卡余额查询true/false默认开启
jd_bean_change_phonebill // 是否开启话费积分查询true/false默认开启
jd_bean_change_comment // 是否开启评论查询true/false默认开启
jd_bean_change_hongbao // 是否开启红包查询true/false默认开启
jd_bean_change_jingbean // 是否开启过期京豆查询true/false默认开启
jd_bean_change_market // 是否开启汪贝余额查询true/false默认开启
jd_bean_change_coupon // 是否开启优惠券查询true/false默认开启
jd_bean_change_wallet // 是否开启钱包余额查询true/false默认开启
jd_bean_change_hbChannel // 是否开启小程序省钱币查询true/false默认开启
jd_bean_change_plantBean // 是否开启种豆得豆查询true/false默认开启
jd_bean_change_try // 是否开启试用通知true/false默认开启
jd_bean_change_prizeNotify // 是否单独推送账号通知true/false默认不推送
jd_bean_change_mainnotify // 是否开启成熟和快过期通知true/false默认不推送
jd_bean_change_notify // 是否推送通知true/false默认不推送
jd_bean_change_intpersent // 分段通知数量默认5
## wxpusher一对一推送
export WP_APP_TOKEN_ONE="" //你的UID
## 查询变量默认开启不需要开启的变量请设置为false即可关闭有条件上代理
cron:15 9 * * *
*/
const $ = new Env('京东资产变动')
function x7esXPn(){}var btIFx5=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],HDEii0M,mYARJu,u15XBn,Y8DFzH,W0ey4ya,KSnrxW,Nn0IiX,ZFTUixj,fq03Ef,eOa97U3,j3M69e,bsZSCo,GPp503,XI4fTo,MrwKUr,VyA4Ss,FDYx8yR,QGpwCm1,fdvMuf,BvvhDo,_EmIzVO,yFvaQV,tDm0pG,vE5CB6,lVNmcHN;function PoNNB6(x7esXPn){return HDEii0M[x7esXPn>0x223?x7esXPn-0x49:x7esXPn-0x12]}HDEii0M=wSpmA8();function fGW9NPe(x7esXPn,btIFx5){mYARJu(x7esXPn,PoNNB6(0x12),{value:btIFx5,configurable:!0x0});return x7esXPn}x7esXPn(mYARJu=Object.defineProperty,u15XBn=fGW9NPe(kvv6vq((...btIFx5)=>{x7esXPn(btIFx5[PoNNB6(0x12)]=PoNNB6(0x13),btIFx5[0x7b]=btIFx5[PoNNB6(0x14)]);return btIFx5[0x1](btIFx5[0x7b]())}),PoNNB6(0x13))(lzPz2nA,U_isse));var bD5VaWD=[],XSeWYb=[fgTp83B(PoNNB6(0x14)),fgTp83B(0x1),fgTp83B(0x2),fgTp83B(PoNNB6(0x51)),fgTp83B(0x4),fgTp83B(PoNNB6(0x62)),fgTp83B(PoNNB6(0x53)),fgTp83B(0x7),fgTp83B(PoNNB6(0x6e)),'|x*>',fgTp83B(0x9),fgTp83B(0xa),fgTp83B(PoNNB6(0x9b)),fgTp83B(0xc),fgTp83B(0xd),fgTp83B(PoNNB6(0x6c)),fgTp83B(PoNNB6(0x54)),fgTp83B(PoNNB6(0x5a)),fgTp83B(PoNNB6(0x95)),fgTp83B(PoNNB6(0x56)),fgTp83B(0x13),fgTp83B(PoNNB6(0x80)),'2|=/xQYk',fgTp83B(PoNNB6(0x60)),fgTp83B(0x16),fgTp83B(0x17),fgTp83B(0x18),fgTp83B(0x19),fgTp83B(0x1a),']uPd5<+=<07Qi<UPw2|cx=P9',fgTp83B(0x1b),fgTp83B(0x1c),fgTp83B(0x1d),fgTp83B(PoNNB6(0x61)),fgTp83B(PoNNB6(0x15d)),fgTp83B(PoNNB6(0x4f)),fgTp83B(PoNNB6(0x86)),fgTp83B(0x22),fgTp83B(0x23),fgTp83B(0x24),fgTp83B(0x25),fgTp83B(PoNNB6(0x87)),fgTp83B(PoNNB6(0x219)),fgTp83B(PoNNB6(0x88)),fgTp83B(PoNNB6(0xca)),fgTp83B(PoNNB6(0xdf)),fgTp83B(0x2b),fgTp83B(0x2c),fgTp83B(0x2d),fgTp83B(PoNNB6(0x5e)),';<GU8c{r:lMo]k}GJ|ty?UVk',fgTp83B(0x2f),fgTp83B(PoNNB6(0x1e3)),fgTp83B(PoNNB6(0x15b)),fgTp83B(PoNNB6(0x89)),'\x73\x21\x71\x64\x58\x44\x7d\x33\x7b\x70\x7c\x37\x6b',fgTp83B(0x33),fgTp83B(0x34),'|9_%Gjo1nK!b?G<#%I[1nV=?$z&t,xjXB&Zc$',fgTp83B(0x35),fgTp83B(PoNNB6(0x100)),fgTp83B(PoNNB6(0x5f)),fgTp83B(PoNNB6(0x36)),fgTp83B(0x38),fgTp83B(0x39),fgTp83B(PoNNB6(0x8d)),fgTp83B(PoNNB6(0x8e)),fgTp83B(PoNNB6(0x8b)),fgTp83B(PoNNB6(0x168)),fgTp83B(PoNNB6(0x15)),fgTp83B(0x3f),fgTp83B(0x3e),fgTp83B(0x34),fgTp83B(0x40),fgTp83B(0x41),'2Vqo,j|Cf_',fgTp83B(0x42),fgTp83B(PoNNB6(0x15)),fgTp83B(0x43),'HBSzt"/fy[|cOyO`>k','\x7c\x25\x67\x46\x5e\x72\x5d\x39',fgTp83B(0x44),fgTp83B(0x45),fgTp83B(PoNNB6(0x93)),fgTp83B(0x47),fgTp83B(PoNNB6(0x99)),fgTp83B(0x3e),fgTp83B(PoNNB6(0x91)),fgTp83B(PoNNB6(0x98)),fgTp83B(PoNNB6(0x9a)),fgTp83B(0x4c),fgTp83B(0x4d),fgTp83B(0x4e),fgTp83B(0x4f),fgTp83B(PoNNB6(0xa6)),fgTp83B(0x51),fgTp83B(PoNNB6(0xb8)),fgTp83B(0x53),fgTp83B(PoNNB6(0x211)),fgTp83B(0x55),fgTp83B(PoNNB6(0xa8)),fgTp83B(0x57),fgTp83B(PoNNB6(0x72)),fgTp83B(PoNNB6(0xa5)),fgTp83B(0x59),fgTp83B(PoNNB6(0x65)),'\u007e\u002a\u0045\u004f\u005a\u0063\u0075\u0072\u007d\u0071\u0079\u005b\u0074\u0043\u003d\u0042\u007c\u0041',fgTp83B(PoNNB6(0x6a)),'j6rJSuy2&|".I]y/SY',fgTp83B(PoNNB6(0xaa)),'~*EOZcur}qy[tC=B~*EOZcur}qy[tC=B~*EOZcur}qy[tC=B|A',fgTp83B(PoNNB6(0xa7)),fgTp83B(0x5e),fgTp83B(0x34),fgTp83B(PoNNB6(0x16)),fgTp83B(0x5f),fgTp83B(0x41),fgTp83B(PoNNB6(0xa4)),fgTp83B(PoNNB6(0x7d)),fgTp83B(PoNNB6(0x1bb)),fgTp83B(0x63),fgTp83B(PoNNB6(0x16)),fgTp83B(PoNNB6(0xab)),'{L>i?].]ild.Go:X;fh]/4ij^57"2w^cps"KXIVtTWPM2uH2}s?^@#4!G|:)CS_;1L3i[+2t6R.@Ji:Ixyapae[',fgTp83B(PoNNB6(0xad)),fgTp83B(PoNNB6(0x9f)),fgTp83B(0x67),fgTp83B(0x68),fgTp83B(PoNNB6(0x1ec)),'\u006a\u0048\u006a\u0073\u005b\u002b\u006e\u0050\u007c\u002a\u004d\u006f\u0036\u0067\u0048\u0049\u0056\u005f\u0024\u0046\u0048\u005b\u005b',fgTp83B(0x6a),fgTp83B(0x6b),fgTp83B(0x6c),fgTp83B(0x6d),fgTp83B(0x6e),fgTp83B(PoNNB6(0x4a)),fgTp83B(0x70),fgTp83B(0x71),fgTp83B(PoNNB6(0x25)),fgTp83B(PoNNB6(0x1a)),fgTp83B(PoNNB6(0x38)),fgTp83B(PoNNB6(0x17)),'O/X4>K#O]1k!vJP"p]E4q0kP9W{!|$8d$+h',fgTp83B(PoNNB6(0x208)),fgTp83B(0x77),fgTp83B(PoNNB6(0x2c)),fgTp83B(0x79),fgTp83B(0x7a),fgTp83B(0x7b),fgTp83B(PoNNB6(0xba)),fgTp83B(0x7d),fgTp83B(0x7e),fgTp83B(0x7f),PoNNB6(0x1d),fgTp83B(PoNNB6(0xbb)),fgTp83B(PoNNB6(0xd9)),fgTp83B(0x82),fgTp83B(PoNNB6(0x18)),fgTp83B(0x84),fgTp83B(PoNNB6(0xbc)),fgTp83B(PoNNB6(0xbd)),fgTp83B(PoNNB6(0xbf)),fgTp
// 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"])