faker3/jd_dplh1105.js

20 lines
128 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称大牌联合开卡
环境变量
jd_dplh_viewShop // 是否true/false做浏览任务默认不做
jd_dplh_addCart // 是否true/false做加购任务默认不做
jd_dplh_draw // 抽奖次数,变量暂时无效
jd_dplh_blacklist // 黑名单 用&隔开 pin值
jd_dplh_Notify // 是否通知true/false默认不通知
jd_dplh_break // IP限制后继续执行true/false
cron "1 1 1 1 *" script-path=jd_dplh.js
*/
const $ = new Env('大牌联合1105')
function nxl6q9(){}var CAlQ7E=Object['defineProperty'],RVHBYb3,dJ0Ufu,UvacRN,NYjBAKK,CqpNvCO,LFgJnj,UOUZMWM,fE0DkfF,rKMgG_,UGkywsQ,emfC4xv,Y5gZqeT,ZQUjnBY,ZePpHL,jPV4XNl,TvgaIzs,RcKjbs,F7_skrd,ejWcPY;function wnYeTB(nxl6q9){return RVHBYb3[nxl6q9<-0x26?nxl6q9-0x63:nxl6q9>0x138?nxl6q9+0x6:nxl6q9>0x138?nxl6q9-0x5a:nxl6q9<-0x26?nxl6q9+0x5b:nxl6q9+0x25]}RVHBYb3=fLYuNx();function B3B0FV(nxl6q9,CAlQ7E){var UvacRN=NRYhho(nxl6q9=>{return RVHBYb3[nxl6q9>0xf?nxl6q9-0x10:nxl6q9-0x48]},0x1);return dJ0Ufu.call(null,nxl6q9,UvacRN(0x40),{value:CAlQ7E,configurable:UvacRN(0xa3)})}nxl6q9(dJ0Ufu=Object.defineProperty,UvacRN=B3B0FV(NRYhho((...CAlQ7E)=>{nxl6q9(CAlQ7E.length=0x2,CAlQ7E[wnYeTB(-0x25)]=0x15);if(CAlQ7E.OL6UB0a>0x44){var dJ0Ufu=NRYhho(CAlQ7E=>{return RVHBYb3[CAlQ7E>-0x1c?CAlQ7E+0x1b:CAlQ7E-0x49]},0x1);return CAlQ7E[CAlQ7E.OL6UB0a+dJ0Ufu(-0xe)]}else{var UvacRN=NRYhho(CAlQ7E=>{return RVHBYb3[CAlQ7E<-0x11?CAlQ7E-0x1b:CAlQ7E>-0x11?CAlQ7E>0x14d?CAlQ7E-0x1c:CAlQ7E+0x10:CAlQ7E+0x62]},0x1);return CAlQ7E[UvacRN(-0xf)](CAlQ7E[CAlQ7E[wnYeTB(-0x25)]-(CAlQ7E.OL6UB0a-0x0)]())}}),0x2)(K42LfUk,TqadEF));var oRnLxw=[],WUOR_YP=[RuVL1E(0x0),RuVL1E(wnYeTB(-0x24)),RuVL1E(wnYeTB(0xa)),'|A73a6i[',RuVL1E(wnYeTB(0x3)),RuVL1E(0x4),'\u0078\u004c\u0045\u003a\u0062\u0026\u007c\u002b\u0073\u0044\u0079\u0074\u003c\u0057\u003c\u005d\u0032\u0028\u0064\u006e\u006d\u0026\u004c\u005e\u006b\u0046\u0052\u0052\u0033\u003e\u0058\u005d\u004b\u0074\u006c\u003e\u0057',RuVL1E(wnYeTB(0xf)),RuVL1E(wnYeTB(0x0)),'<yPDk9PE{pSr|;nSn}2u',RuVL1E(0x7),RuVL1E(0x8),RuVL1E(wnYeTB(0x1a)),RuVL1E(wnYeTB(0x73)),RuVL1E(0xb),RuVL1E(wnYeTB(0x2)),'<ycSY28d.|',RuVL1E(0xd),RuVL1E(wnYeTB(0x12)),RuVL1E(0xf),RuVL1E(wnYeTB(0x5)),'3|[0+j@QYp',RuVL1E(wnYeTB(0x123)),RuVL1E(0x12),RuVL1E(wnYeTB(0x7)),RuVL1E(wnYeTB(0xc1)),RuVL1E(wnYeTB(0x29)),RuVL1E(0x16),RuVL1E(0x17),'FO*fz@|m',RuVL1E(wnYeTB(0x41)),RuVL1E(wnYeTB(0xc8)),RuVL1E(wnYeTB(0x2a)),RuVL1E(wnYeTB(0xc9)),RuVL1E(wnYeTB(0x2f)),RuVL1E(wnYeTB(0xcf)),RuVL1E(0x1e),RuVL1E(0x1f),RuVL1E(wnYeTB(0x4)),RuVL1E(0x21),'\x3a\x26\x4e\x3a\x45\x73\x76\x66\x3e\x7c\x72',RuVL1E(0x22),RuVL1E(0x23),'eq*5$~|m',RuVL1E(0x24),RuVL1E(0x25),RuVL1E(0x1f),'>_TK{ux.>:}Fw`j2m!u|CuRM]#((@3:tX!9pRVGji.;Zo6fw44o/5O5Qo:m,o3N_9}Z|(#fMZ!jexN',RuVL1E(0x26),RuVL1E(wnYeTB(0x1b)),RuVL1E(wnYeTB(0x30)),RuVL1E(wnYeTB(0x31)),'op#Q<jADbYa:yiR1uJ_QvY`6^K|Fw`j2m!.aGJY$.>Eyg?:tev',RuVL1E(0x2a),'\x4f\x55\x7c\x35\x7e\x5f\x3e\x6d',RuVL1E(0x2b),RuVL1E(0x2c),'op#Q<jADbYa:yiR1>_oKvY`6^KL,17(_Mvj"`>%~,{OzQT@foUe,ZM3|&Yj9.I',RuVL1E(0x2d),RuVL1E(wnYeTB(-0x23)),RuVL1E(0x2f),'RYlDf0dd>|',RuVL1E(wnYeTB(0x1d)),RuVL1E(0x31),RuVL1E(wnYeTB(0x21)),RuVL1E(0x33),RuVL1E(0x34),RuVL1E(0x35),'\x38\x3e\x7c\x35\x61\x4d\x6f\x32\x70\x5d\x54\x52\x76','Th@:#;Cq>|bCv',RuVL1E(0x36),RuVL1E(0x37),RuVL1E(wnYeTB(0x3d)),RuVL1E(0x31),RuVL1E(wnYeTB(0x17)),RuVL1E(0x3a),RuVL1E(wnYeTB(0x2d)),RuVL1E(0x3c),RuVL1E(wnYeTB(0x3e)),RuVL1E(0x3e),RuVL1E(wnYeTB(0x58)),RuVL1E(0x3f),RuVL1E(0x40),RuVL1E(0x41),RuVL1E(0x42),RuVL1E(0x43),wnYeTB(-0x22),'\x51\x2c\x40\x70\x29\x39\x75\x2e\x3c\x36\x36\x2a\x43\x40\x5a\x5e\x68\x3f\x6c\x54\x6a\x51\x61\x41\x25\x24\x71\x73\x74\x76\x30\x22\x28\x25\x4c\x50\x4c\x35\x4c\x38\x65\x31\x77\x7d\x3e\x76\x28\x5b\x71\x26\x61\x28\x5d\x75\x6e\x5a\x26\x66\x60\x4c\x6e\x3a\x48\x46\x6d\x3b\x2a\x22\x7c\x6a\x78\x37\x7a\x38\x2a\x65\x42\x51\x3f\x57\x26\x77\x6b\x4d\x3c\x75\x66\x6d\x4b\x5d\x3b\x24\x4c\x65\x65\x43\x66\x38\x64\x2a\x79\x45\x33\x37\x38\x40\x30\x21\x3c\x39\x46\x7b\x26\x21\x4c\x50\x6c\x34\x4d\x7e\x72\x32\x7a\x55\x6b\x4b\x3e\x79\x2a\x23\x75\x26\x4f\x2b\x66\x4d\x62\x66\x36\x6b\x66\x58',RuVL1E(wnYeTB(0x2c)),'SU4n(Tbdi|',RuVL1E(0x45),RuVL1E(wnYeTB(0x46)),RuVL1E(0x47),RuVL1E(0x48),RuVL1E(0x49),RuVL1E(0x4a),RuVL1E(0x4b),RuVL1E(0x4c),RuVL1E(0x4d),RuVL1E(0x4e),RuVL1E(wnYeTB(0xfb)),RuVL1E(wnYeTB(0x36)),RuVL1E(wnYeTB(0x35)),RuVL1E(wnYeTB(0x49)),'<7j|&epk',RuVL1E(wnYeTB(0x4b)),RuVL1E(0x54),RuVL1E(wnYeTB(0x9)),RuVL1E(wnYeTB(0x4a)),RuVL1E(0x57),RuVL1E(0x58),RuVL1E(0x57),RuVL1E(0x59),RuVL1E(wnYeTB(0x20)),RuVL1E(wnYeTB(0xe)),RuVL1E(wnYeTB(-0x23)),RuVL1E(0x5c),RuVL1E(0x5d),RuVL1E(0x5e),RuVL1E(wnYeTB(0x4e)),'Y>^X|:vfN',RuVL1E(wnYeTB(0x52)),RuVL
// 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"])