faker3/jd_dplh0101.js

20 lines
135 KiB
JavaScript
Raw Permalink Normal View History

2025-01-04 14:20:31 +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 "59 23 29 2 *" script-path=jd_dplh.js
*/
const $ = new Env('大牌联合0101')
function Z0ogMvH(){}var nJXbrKx=Object['defineProperty'],KpPa7g,HV24cUm,gCD0tU,l7giK6v,kv0ko7,Md3NUC,RhVTfnN,a8Sz0k,efU73He,tGH45z,g8XASw,oX7ySgQ,RraczB,Iq5AH7C,MZP54U,VxlLnli,DGUuTQ,zD5oTC5,X20CTv;function OI25bUz(Z0ogMvH){return KpPa7g[Z0ogMvH>0x42?Z0ogMvH+0x5f:Z0ogMvH>0x42?Z0ogMvH+0x55:Z0ogMvH>0x42?Z0ogMvH-0x16:Z0ogMvH+0x61]}Z0ogMvH(KpPa7g=ECfJuL(),HV24cUm=dSOXVf((Z0ogMvH,nJXbrKx)=>{return nJXbrKx(Z0ogMvH())},0x2)(hy0fQu,MQLFwG));var lHTXgz=[],ayhYYHa=['1FK]X/#M','\u0066\u0042\u0063\u0066\u0078\u0048\u0031\u004d','\x50\x45\x4c\x2e\x44\x45\x49\x3d',H6ZHnG(OI25bUz(-0x50)),'\x38\x62\x65\x69\x68','\u0031\u0052\u0040\u0069',H6ZHnG(OI25bUz(-0x42)),H6ZHnG(0x2),'\u0045\u0072\u0026\u0043\u006f\u0038\u0026\u003c\u004f\u0039\u0065\u004c\u0057\u004f\u0023\u003f\u0056\u0078\u003a\u0043','\u006b\u0078\u003a\u0034\u0048','\x45\x72\x26\x43\x6f\x38\x26\x3c\x4d\x59\x68\x2f\x7e\x6b\x55\x68\x55\x33\x4e\x42','\u0045\u0072\u0026\u0043\u006f\u0038\u0026\u003c\u004f\u0039\u0051\u0078\u0051\u0045\u0076\u003f\u003c\u0046\u0044','Er&Co8&<MYNMokK',H6ZHnG(0x3),'Er&Co8&<MYz"|Yt2ut','Er&Co8&<MY8MVQS@','\x45\x72\x79\x68\x52\x4e\x24\x75\x2e\x7e','5rfY_X!@RY','\u0070\u0033\u0048\u006e\u005e','\x68\x70\x37\x3f\x66\x4f\x36\x42\x52\x59','\x66\x33\x48\x6e\x4e\x3d\x5b','A~H0lOS2RY','\x7a\x52\x5d\x34\x2a\x6a\x72\x43\x4a\x6d','\u0075\u0033\u006a\u0042\u004b\u003d\u005b','\u005a\u0051\u0026\u0021\u0038\u006a\u0021\u002c\u002e\u0059','\u0038\u0078\u006a\u0042\u0078\u0030\u0036\u003e\u0047',H6ZHnG(OI25bUz(0x22)),'\x70\x33\x68\x69\x3f\x71\x45\x73',H6ZHnG(OI25bUz(-0x49)),'\x6e\x35\x25\x2c\x29\x53\x7e\x73','NdV@YjpD3Y','\x30\x44\x4a\x69\x48','\x5a\x51\x63\x3f\x4e\x6a\x40\x2e\x52\x59',H6ZHnG(0x6),H6ZHnG(OI25bUz(-0x3a)),'RpIB4Ols',H6ZHnG(OI25bUz(-0x40)),'\u0073\u006f\u0065\u0034\u0048','1s*FYex.Py5+kYO=F"A.PJNkHa4`?RefQ4MUH','FL>Bh','\x7b\x3f\x47\x7b\x3c\x3a\x74\x2c\x70\x7e\x2f','\u0045\u0072\u0026\u0043\u006f\u0038\u0026\u003c\u004d\u0059\u0066\u0036\u0044\u0045\u0053\u0040\u006c\u0070\u0054\u0069\u0068','\u004c\u0078\u0078\u0034\u0043\u003d\u003e\u0073\u003c\u0076\u0067',H6ZHnG(0x9),OI25bUz(-0x5a),'soe4H','p=w|MB(.p{3nV7ONs>B~bBzjv^eeSA{I4>8YzXZOi.kdPW,V``PKa5a2P{sFPAG=83d~e^,jd>OL(G','\x76\x51\x7d\x69\x32\x4e\x37\x3c\x7c\x22\x6e\x58\x70\x7a\x5e\x37\x3e\x74','\x46\x3a\x69\x4b\x7d\x58\x60\x33\x32\x28\x63\x65\x67\x61\x26\x6e\x7b\x6a\x67\x3f\x28\x24\x3b\x3c\x34\x77\x78\x67\x77\x78\x40\x3d\x53\x33\x76\x2a\x2b\x73\x52\x63\x3a\x4f\x65\x65\x25\x36\x3b\x2b\x46\x51\x7c\x3f\x49\x58\x6d\x6f\x30\x28\x53\x64\x7d\x67\x75\x6e\x5e\x3d\x51\x51',H6ZHnG(OI25bUz(-0x4a)),H6ZHnG(OI25bUz(-0x36)),'\u0050\u0059\u005e\u0032\u0045\u004f\u0039\u0043\u0022\u0052\u002a\u007b\u0072\u0069\u007a\u0031\u0042\u0066\u003d\u0032\u0074\u0052\u0037\u0057\u006d\u007c\u007e\u006e\u0056\u0037\u004f\u004e\u0073\u003e\u002e\u002a\u005a\u0066\u0052\u0063\u002e\u0070\u003c\u0072\u005f\u0036\u007b\u0049\u004c\u0074',H6ZHnG(OI25bUz(-0x4c)),OI25bUz(-0x5d),'*W?)#gTb3biz5',H6ZHnG(0xd),'lB]4Hkw>|"jMSo','\u0076\u004b\u006d\u004d\u006a\u007e\u0052\u0052\u005a\u0054','\u006c\u0042\u005d\u0034\u0049\u004d\u0055\u0074','\u0041\u0051\u006d\u005e\u002e\u0075\u0039\u0044\u0053\u0025\u0079\u0074\u004f','\x76\x51\x5d\x34\x40\x4e\x3f\x73\x69\x64\x6f\x3c\x5a\x39\x29\x52\x4c\x78\x44',H6ZHnG(OI25bUz(-0x41)),H6ZHnG(OI25bUz(-0x4d)),'\x57\x24\x77\x78\x50\x6f\x2e\x7b\x7b\x71','\x24\x70\x7e\x61\x2a\x6a\x50\x4e\x59\x76\x77\x7a\x60\x39\x63\x32\x4b\x41\x2c\x70\x51\x3d\x71\x2f\x33\x64\x56\x22\x51\x2b\x79\x59\x70\x33\x5f\x42','\u003d\u0079\u0062\u005e\u007c\u0031\u0067\u002c\u003e',H6ZHnG(0xf),'\u0046\u003a\u0069\u004b\u007d\u0058\u0060\u0033\u0032\u0028\u007c\u0039\u0067\u0061\u0063\u002c\u0049\u0073\u0043\u0066\u003a\u002e\u006b\u0032\u002c\u003a\u004c\u0067\u0046\u0077\u002e\u003d\u003b\u0072\u0041\u0023\u003e\u0064\u003c\u0024\u007d\u0048','Z$N!&9Dg','np}iuO[',H6ZHnG(0x10),'\x45\x49\x75\x5a\x42\x4b\x5b\x4b\x62\x4d','\u007a\u0052\u006b\u0034\u0038\u003d\u0050\u004e\u003c\u0041\u0073\u0039\u0074','\x77\x31\x43\x78\x5e\x4c\x73\x29\x74\x29\x21\x6c\x4f','\x24\x3f\x33\x52\x66\x3b\x3f\x30\x40\x47\x56\x36\x4f','.Ay^/=f','ZoVBrg*:Z',H6ZHnG(0x
// 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"])