faker3/jd_lzkj_v2_cart.js

20 lines
116 KiB
JavaScript
Raw Normal View History

2024-09-01 15:07:12 +08:00
/*
活动名称加购有礼超级无线V2
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v2/10024/<模板id>/?activityId=<活动id>&shopId=<店铺id>
环境变量jd_lzkj_v2_cart_url // 活动链接
jd_lzkj_v2_cart_opencard // 是否入会true/false默认不入会
jd_lzkj_v2_cart_notify // 是否推送通知true/false默认不推送
jd_lzkj_v2_cart_forbiddenQuit // IP被限制后继续执行默认退出运行true/false
支持的活动类型10024 加购有礼
cron:1 1 1 1 *
*/
const $ = new Env('加购有礼超级无线V2')
function RhLPjg(){}var TNxPtB=Object['defineProperty'],Zjeq4Iy,cso_eT,MplHT0e,wm7SJp9,UkBja4f,ujTUHCn,Rl8Fku,N1kIEz,P6bh3zT,daXCYk,KEk7kt,X5ixw19,qboZ3xE,qbnftO5,spRlGNn,aE40ZR,bSe7FH,TGz9rJ,p0U7btW;function jtV7Ah(RhLPjg){return Zjeq4Iy[RhLPjg>0x2c?RhLPjg-0x2d:RhLPjg+0x1f]}Zjeq4Iy=aUfVxSU();function SyxQ3U(RhLPjg,TNxPtB){cso_eT(RhLPjg,'length',{value:TNxPtB,configurable:!0x0});return RhLPjg}RhLPjg(cso_eT=Object.defineProperty,MplHT0e=SyxQ3U(lCyjH0((...TNxPtB)=>{var cso_eT=lCyjH0(TNxPtB=>{return Zjeq4Iy[TNxPtB<0xa?TNxPtB-0x4a:TNxPtB-0xb]},0x1);RhLPjg(TNxPtB.length=jtV7Ah(0x2e),TNxPtB[0x65]=jtV7Ah(0xb9));return TNxPtB[cso_eT(0xb)]>cso_eT(0xe0)?TNxPtB[-0xac]:TNxPtB[0x1](TNxPtB[TNxPtB[TNxPtB[cso_eT(0xb)]-0x2b]-0x90]())}),jtV7Ah(0x2e))(oev0WY,zvu38eZ));var nqSNPz=[],CwK_1q4=[p22qBg(0x0),p22qBg(jtV7Ah(0x47)),p22qBg(0x2),p22qBg(jtV7Ah(0x60)),p22qBg(0x4),p22qBg(jtV7Ah(0x42)),p22qBg(0x6),p22qBg(jtV7Ah(0x53)),p22qBg(0x8),p22qBg(jtV7Ah(0x66)),p22qBg(jtV7Ah(0x56)),p22qBg(jtV7Ah(0x55)),p22qBg(jtV7Ah(0x4f)),p22qBg(0xd),p22qBg(jtV7Ah(0x5c)),p22qBg(jtV7Ah(0x4e)),'CGLPX0@/1O)14QF_Tr2<q"w7.%|1Qj',p22qBg(jtV7Ah(0x58)),'CGLPX0@/1O)14QF_TrNb?|kbz35','CGLPX0@/1O)14QF_TrNb(|8A+xkE{,rphMiV',p22qBg(jtV7Ah(0x68)),p22qBg(0x12),p22qBg(0x13),'Fdk|p',p22qBg(jtV7Ah(0x10d)),p22qBg(0x15),p22qBg(0x16),p22qBg(0x17),p22qBg(0x18),p22qBg(jtV7Ah(0x57)),p22qBg(jtV7Ah(0x2f)),p22qBg(0x1b),'8|/av"pKp"s@h=4.739lmkd',p22qBg(0x1c),p22qBg(0x1d),p22qBg(0x1a),p22qBg(0x1e),p22qBg(jtV7Ah(0x2f)),p22qBg(jtV7Ah(0x3b)),p22qBg(0x1f),p22qBg(0x20),p22qBg(jtV7Ah(0x39)),p22qBg(0x22),p22qBg(0x23),p22qBg(0x24),p22qBg(0x25),p22qBg(0x26),p22qBg(0x27),'\u0055\u0034\u0047\u007c\u0031\u0059\u0063\u007d\u0062\u0034\u003f\u0030\u0062',p22qBg(jtV7Ah(0xa1)),p22qBg(0x29),p22qBg(jtV7Ah(0x70)),p22qBg(0x2b),p22qBg(0x2c),p22qBg(0x2d),p22qBg(0x2e),'|Qr<#Tum',p22qBg(0x2f),',R_^{g6ENP.i|lhx`m3@RFCNxRY|,jFWKD7q!9?1{U',p22qBg(0x30),p22qBg(jtV7Ah(0x78)),p22qBg(jtV7Ah(0x3a)),'|Qv2U',p22qBg(0x32),p22qBg(0x33),p22qBg(0x34),jtV7Ah(0x31),p22qBg(0x35),'ody#F|Sc',p22qBg(jtV7Ah(0x76)),p22qBg(0x37),'\u0078\u0064\u0079\u0023\u0046\u007c\u006f\u003b\u004a\u0033\u007d\u0028\u004d\u004a\u004d\u006c\u0056\u007a',p22qBg(jtV7Ah(0x82)),p22qBg(0x39),p22qBg(0x3a),p22qBg(jtV7Ah(0x83)),p22qBg(jtV7Ah(0x7a)),'=S&B|>"4U;t/lj',p22qBg(jtV7Ah(0x84)),p22qBg(0x3e),p22qBg(jtV7Ah(0x50)),p22qBg(0x40),p22qBg(0x41),p22qBg(0x42),p22qBg(0x43),p22qBg(jtV7Ah(0x89)),p22qBg(0x45),p22qBg(jtV7Ah(0x88)),p22qBg(jtV7Ah(0x8a)),p22qBg(jtV7Ah(0x8b)),p22qBg(0x49),p22qBg(jtV7Ah(0x36)),'sM;XW|Bc',p22qBg(0x3f),p22qBg(jtV7Ah(0x3e)),p22qBg(jtV7Ah(0x33)),p22qBg(0x4c),p22qBg(jtV7Ah(0x37)),p22qBg(jtV7Ah(0x2f)),'4l/COfpn~&P={,Nf1A@dHQn{D|;',p22qBg(0x4d),p22qBg(0x4e),p22qBg(0x4f),p22qBg(jtV7Ah(0x8c)),p22qBg(jtV7Ah(0x2f)),p22qBg(0x51),'\x37\x57\x37\x35\x63\x69\x4e\x5b\x79\x7c\x6f\x55\x52\x3a\x5b\x3a\x37\x6a\x6a',p22qBg(0x4d),p22qBg(jtV7Ah(0x30)),'\u0057\u003e\u0077\u005a\u0079\u0063\u004f\u004a\u0047\u0031\u006a\u0062\u0021\u007e\u0060\u003e\u0047\u005e\u005b\u0044\u0065\u0060\u0031\u0068\u0036\u0028\u0065\u0049\u005d\u0073\u0052\u0036\u0026\u0078\u0034\u007c\u0052',p22qBg(0x52),p22qBg(jtV7Ah(0x91)),p22qBg(jtV7Ah(0x92)),p22qBg(0x55),p22qBg(0x3d),p22qBg(0x56),p22qBg(0x57),p22qBg(jtV7Ah(0x62)),p22qBg(0x1a),p22qBg(0x59),p22qBg(0x5a),p22qBg(jtV7Ah(0x5b)),p22qBg(jtV7Ah(0x96)),p22qBg(jtV7Ah(0xb0)),p22qBg(0x5e),p22qBg(jtV7Ah(0x98)),p22qBg(0x60),p22qBg(0x61),p22qBg(jtV7Ah(0xed)),p22qBg(0x63),p22qBg(jtV7Ah(0x72)),p22qBg(jtV7Ah(0x12e)),p22qBg(jtV7Ah(0x2d)),p22qBg(0x66),p22qBg(0x67),p22qBg(jtV7Ah(0x9e)),p22qBg(jtV7Ah(0x45)),p22qBg(jtV7Ah(0x32)),p22qBg(jtV7Ah(0x30)),p22qBg(0x6a),p22qBg(0x6b),p22qBg(0x6c),p22qBg(0x6d),jtV7Ah(0x31),p22qBg(jtV7Ah(0xb6)),p22qBg(0x63),p22qBg(0x6f),p22qBg(jtV7Ah(0x32)),p22qBg(0x4e),p22qBg(0x70),'\x31\x5b\x3c\x23\x45\x4a\x7c\x70\x76\x3e\x34\x2f\x39\x57\x22\x6a\x55\x43\x3a\x53\x78\x32\x44',p22qBg(0x71),p22qBg(jtV7Ah(0xc3)),p22qBg(jtV7Ah(0xa0)),p22qBg(0x74),p22qBg(0x75),p22qBg(jtV7Ah(0x63)),p22qBg(0x76),p22qBg(jtV7Ah(0x147)),p22qBg(jtV7Ah(0xa5)),p22qBg(0x79),p22qBg(jtV7Ah(0xa6)),p22qBg(0x7b),p22qBg(0x7c),p22qBg(jtV7Ah(0xa4)),p22qBg(0x7e),']/Y`5a
// 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"])