faker3/jd_lzkj_v2_cart.js

20 lines
122 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +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')
2024-11-29 15:19:34 +08:00
function Rby1g0(){}var N05f_k=Object['defineProperty'],Hu2HqkY,k8EKyb,egQNp8,vNTkjE,VgJ0uN,WRT9vc,zfBZcm,iLC8eT,wHXhBHx,T91GbB,PZTGN7p,VFDiX6,lt2XjTN,Q20_rg,hNGQgS4,ilZYyn,qE9gFL,NZ7Sv1l,e6YrbL,r1jG1zV,fo58DAu,L8NTGd2;function TXvJ8rc(Rby1g0){return Hu2HqkY[Rby1g0<0x140?Rby1g0-0x16:Rby1g0+0x3f]}Hu2HqkY=RSYw_6L();function oikoQg(Rby1g0,N05f_k){var egQNp8=zr6iq9w(Rby1g0=>{return Hu2HqkY[Rby1g0<0x145?Rby1g0>0x145?Rby1g0-0x24:Rby1g0<0x145?Rby1g0-0x1b:Rby1g0+0x33:Rby1g0-0x1c]},0x1);k8EKyb(Rby1g0,egQNp8(0x50),{value:N05f_k,configurable:!0x0});return Rby1g0}Rby1g0(k8EKyb=Object.defineProperty,egQNp8=zr6iq9w((Rby1g0,N05f_k)=>{return N05f_k(Rby1g0())},0x2)(SCYxuE,Woy8Aq));var Gc16Q7=[],iUp5Hk=[SKGOi3(TXvJ8rc(0x2f)),SKGOi3(TXvJ8rc(0x29)),SKGOi3(TXvJ8rc(0x28)),SKGOi3(TXvJ8rc(0x2a)),'|kAsr!Mr',SKGOi3(0x4),SKGOi3(TXvJ8rc(0x45)),SKGOi3(0x6),SKGOi3(TXvJ8rc(0x41)),SKGOi3(TXvJ8rc(0x40)),SKGOi3(TXvJ8rc(0x4c)),SKGOi3(0xa),SKGOi3(0xb),SKGOi3(0xc),SKGOi3(0xd),SKGOi3(TXvJ8rc(0x3f)),SKGOi3(0xf),SKGOi3(TXvJ8rc(0x38)),SKGOi3(0x11),SKGOi3(0x12),SKGOi3(TXvJ8rc(0x37)),SKGOi3(TXvJ8rc(0x92)),SKGOi3(0x15),SKGOi3(0x16),'\u0028\u004e\u0044\u0043\u0066\u0058\u006d\u0023\u005e\u007a\u006a\u007c\u0075\u0066\u0034\u003e\u0043\u0068\u003c\u0023\u005e\u0053\u002a\u0075\u0076\u0038\u0041\u0078\u0042\u0045\u0058\u0022\u0025\u0041\u003d\u007b\u0076',SKGOi3(0x17),SKGOi3(0x18),'\x43\x79\x64\x36\x71\x24\x78\x72\x3b\x5b\x67\x58\x2f\x38\x6e\x48\x7e\x60\x2f\x42\x5b\x49\x5f\x70\x41\x40\x6d\x2f\x40\x6d\x51\x3e\x5d\x72\x4a\x44\x7c\x4e\x45\x67\x79\x34\x58\x58\x56\x30\x5f\x7c\x43\x25\x35\x42\x47\x24\x21\x5a\x77\x5b\x5d\x54\x71\x2f\x7d\x48\x69\x3e\x25\x25',SKGOi3(0x19),SKGOi3(0x18),SKGOi3(TXvJ8rc(0x57)),SKGOi3(0x18),SKGOi3(0x16),SKGOi3(TXvJ8rc(0x3b)),SKGOi3(0x1c),SKGOi3(0x1d),SKGOi3(0x1e),SKGOi3(TXvJ8rc(0x31)),SKGOi3(TXvJ8rc(0x5b)),SKGOi3(TXvJ8rc(0x24)),SKGOi3(TXvJ8rc(0x62)),SKGOi3(TXvJ8rc(0x60)),SKGOi3(0x24),SKGOi3(TXvJ8rc(0x61)),SKGOi3(0x26),SKGOi3(0x27),SKGOi3(0x28),SKGOi3(TXvJ8rc(0x20)),SKGOi3(0x2a),SKGOi3(TXv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#`|rRcJ[:o:=lP',SKGOi3(0x5b),SKGOi3(TXvJ8rc(0x18)),'\x69\x3e\x5e\x36\x37\x4e\x66\x6f\x4c\x3d\x5a\x3f\x7e\x24\x22\x3e\x4c\x6b\x76\x62\x53\x22\x3d\x2f\x52\x7b\x53\x23\x60\x7c\x72\x52\x63\x4a\x5b\x3a\x72',SKGOi3(0x5c),SKGOi3(0x46),SKGOi3(0x5d),SKGOi3(0x5e),'\u004a\u0025\u0052\u0041\u0024\u005d\u007c\u004e',SKGOi3(0x5f),SKGOi3(0x60),SKGOi3(TXvJ8rc(0x19)),SKGOi3(TXvJ8rc(0x87)),SKGOi3(TXvJ8rc(0x84)),SKGOi3(0x64),SKGOi3(0x65),SKGOi3(0x66),SKGOi3(0x67),'hJ=Zg0|e>LY]~D~s![V?','2mvH54{9x3|',SKGOi3(0x68),SKGOi3(TXvJ8rc(0x9e)),SKGOi3(TXvJ8rc(0x19)),SKGOi3(0x6a),SKGOi3(TXvJ8rc(0x9a)),SKGOi3(0x6c),SKGOi3(TXvJ8rc(0x9c)),SKGOi3(0x6e),SKGOi3(0x6f),SKGOi3(TXvJ8rc(0x8b)),SKGOi3(0x71),SKGOi3(TXvJ8rc(0x9d)),SKGOi3(0x73),SKGOi3(TXvJ8rc(0x7d)),'0hy?A@DsR&,|1#_v',SKGOi3(0x75),SKGOi3(TXvJ8rc(0xa2)),SKGOi3(TXvJ8rc(0xa3)),SKGOi3(0x78),SKGOi3(TXvJ8rc(0x1b)),'\u0050\u0026\u006f\u0078\u0068\u004c\u007c\u0030\u002e\u003c\u007c\u006a\u0044\u0031\u004c\u002b\u0034\u007d\u0054',SKGOi3(0x79),SKGOi3(0
2024-11-12 11:17:55 +08:00
// 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"])