faker3/jd_dplh1220.js

20 lines
154 KiB
JavaScript
Raw Permalink Normal View History

2024-12-20 20:46:19 +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('大牌联合1220')
function d0zJMj(){}var SeJLze=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],Ybj4Bg,NGneLUd,p5VB0g,nGlnaD,bno1wI7,v_DVVAr,XFMMfae,xSp24rU,MbdNM4w,gq1n2Ml,SuqFMR0,VUiq3T7,R1qAiqt,h5VOKMu,eauJTK,_WLffFs,tegbVkK,WRsnfDP,qZ7HhxU,pXVwXxa,urmjqc,V8771ro,elcgjM;function eVc5ke(d0zJMj){return Ybj4Bg[d0zJMj>-0x5c?d0zJMj+0x5b:d0zJMj-0x49]}d0zJMj(Ybj4Bg=ITnIUyy(),NGneLUd=l0hnmc((d0zJMj,SeJLze)=>{return SeJLze(d0zJMj())},0x2)(rBhhe4S,JFBIMX6));var YTs4lU=[],HILW8qB=[HrCibGJ(0x0),'\u003d\u0051\u004d\u0029\u002a\u0038\u0075\u0046','\u004d\u0079\u0072\u0024\u0060\u0028\u0040\u0057\u0055',HrCibGJ(eVc5ke(-0x47)),'\u0055\u0053\u007b\u0050\u003d\u0052\u005e\u004f','\u003a\u0051\u0041\u0058\u003f','\x46\x31\x5a\x58',HrCibGJ(0x2),'\u0035\u0041\u0025\u004c\u0052\u0034\u0060\u0053\u0065\u002f\u0024\u0030\u007d\u003c\u0022\u004e\u0022\u0045\u0070\u0050\u0055\u006e\u004f\u004e\u002b\u0038\u007b\u0072\u004b\u0044\u0051\u0077\u0049\u0067','\x7b\x6b\x4d\x64\x63\x3a\x4d\x36\x21\x6d\x41\x5b\x5f\x21\x40\x6e\x57\x53\x30\x64',HrCibGJ(0x3),HrCibGJ(0x4),'\x7b\x6b\x4d\x64\x63\x3a\x4d\x36\x21\x6d\x2a\x53\x2a\x7b\x4e\x6e\x36\x6a\x45',HrCibGJ(eVc5ke(-0x2f)),'\x7b\x6b\x4d\x64\x63\x3a\x4d\x36\x21\x6d\x75\x36\x2e\x59\x70',HrCibGJ(eVc5ke(-0x42)),'\x7b\x6b\x4d\x64\x63\x3a\x4d\x36\x6c\x38\x3a\x6c\x57\x2a\x34\x5a','{kJ?13#oB^','\x7d\x6b\x25\x38\x68\x72\x4b\x5a\x31\x38','\u0078\u0066\u0073\u002f\u0026',HrCibGJ(eVc5ke(-0x40)),HrCibGJ(eVc5ke(-0x39)),'\u0060\u005e\u0073\u0037\u0074\u0021\u0034\u002c\u0031\u0038',HrCibGJ(eVc5ke(-0x3c)),HrCibGJ(0xa),'u*MK:TK)B8',':ST$S7yD(',HrCibGJ(eVc5ke(-0x3e)),'\x78\x66\x3f\x58\x6e\x61\x7b\x4f',HrCibGJ(0xc),'/}C);4^O',HrCibGJ(eVc5ke(-0x35)),'7EzXs','\u0075\u002a\u007c\u006e\u0033\u0054\u005a\u0042\u0031\u0038',HrCibGJ(0xe),'\u0039\u0063\u0033\u0024',HrCibGJ(0xf),'\x54\x79\x4f\x7a\x54\x2c\x6c\x44\x75','\u0042\u005b\u0071\u004c\u0077\u0032\u0069\u0034\u0075',HrCibGJ(0x10),HrCibGJ(eVc5ke(0x21)),'\u0031\u0078\u0049\u0024\u0022\u0021\u0074\u004f',eVc5ke(-0x55),HrCibGJ(eVc5ke(-0x3f)),'\u0046\u004f\u0069\u006a\u0038\u0041\u0053\u0042\u0062\u004a\u007d\u0032\u003c\u0038\u0021\u0052\u006a\u0055\u0060\u0042\u0062\u007a\u0033\u003c\u0073\u003d\u0022\u0048\u006e\u0031\u0041\u0025\u002a\u0022\u006c\u0050\u0073','j[D$?',HrCibGJ(0x13),HrCibGJ(eVc5ke(0xa)),HrCibGJ(eVc5ke(-0x32)),'\x5b\x53\x43\x3d\x7c\x61\x62\x33\x23\x79\x61\x6c\x5a\x63',HrCibGJ(0x16),'\x4f\x63\x41\x22\x73','\x78\x52\x35\x65\x6c\x24\x5d\x42\x78\x4c\x66\x2f\x57\x56\x21\x33\x4f\x44\x24\x5e\x51\x24\x59\x54\x4e\x26\x41\x41\x34\x60\x4c\x49\x22\x44\x3a\x38\x59\x72\x75\x21\x58\x42\x3c\x77\x62\x5f\x29\x57\x48\x48\x62\x70\x3d\x7d\x3d\x2c\x62\x4c\x4f\x6a\x62\x60\x28\x52\x3a\x66\x77\x5e\x41\x26\x29\x54\x77\x44\x21\x5b\x5d\x28','\x45\x6b\x51\x4a\x47\x58\x3a\x59\x34\x5d\x7a\x66\x79\x75\x24\x3a\x21\x4c','\x35\x22\x4a\x71\x51\x66\x2c\x48\x47\x63\x23\x57\x30\x6e\x3e\x7a\x38\x65\x30\x7b\x63\x5b\x61\x59\x46\x7c\x33\x30\x7c\x33\x2b\x68\x28\x48\x45\x67\x72\x2f\x43\x23\x22\x2e\x57\x57\x44\x53\x61\x72\x35\x6b\x34\x7b\x25\x66\x52\x56\x3b\x63\x28\x31\x51\x30\x74\x7a\x24\x68\x6b\x6b','\u002b\u0035\u0051\u004a\u0041\u003a\u0037\u0063\u0043\u0053\u002c\u0033\u0040\u002e\u0050\u0031\u0079\u0067\u0025\u0024\u002c\u0043\u002f\u0049\u0046\u0051\u002e\u005d\u006f\u0075\u0075\u0034\u004a\u0049\u0025\u0041\u0050\u0046\u0052\u0052\u007a\u0052\u0030','\x5f\x6d\x24\x47\x7d\x2e\x6f\x6c\x5d\x43\x67\x38\x54\x4a\x75\x3d\x41\x37\x68\x47\x4c\x43\x3a\x40\x52\x34\x5e\x7a\x3c\x3a\x2e\x58\x2f\x21\x69\x67\x4d\x37\x43\x23\x69\x79\x59\x54\x36\x53\x38\x25\x4f\x4c',HrCibGJ(eVc5ke(-0x5b)),HrCibGJ(eVc5ke(-0x58)),'l{yZ|^aW:W=3z','\x7d\x6f\x62\x78\x53\x2f\x45\x49\x37\x39\x46\x4c\x66\x5a\x4f\x3b\x59\x36\x7d\x6d\x7a\x39\x4a\x34\x57\x6d\x55\x3c\x3b\x7e\x43\x36\x77\x7a\x2f\x75\x4a\x59\x79\x5e\x3c\x21\x38\x64\x78\x63\x70\x31\x7d\x74\x72\x3c\x3f\x77\x23\x29\x35\x39\x2f\x5d\x32\x41','\u0049\u0041\u0076\u0046\u0026\u0077\u007c\u0021\u0034\u005d\u0065\u0039\u0028\u0056','uCvl2;tty^',HrCibGJ(0x19),eVc5ke(-0x4d),'\u004e\u002a\u002b\u0022\u005a\u0033\u006e\u004f\u0058\u0077\u0063\u0036\u0075\u006d\u003b\
// 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"])