faker3/jd_lzkj_v2_draw.js

26 lines
130 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称幸运抽奖超级无线V2
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interaction/v2/<类型id>/<模板id>/?activityId=<活动id>&shopId=<店铺id>
2024-11-28 22:15:51 +08:00
环境变量jd_lzkj_v2_draw_url // 活动链接 多个用英文逗号,@,换行分割
2024-11-12 11:17:55 +08:00
jd_lzkj_v2_draw_opencard // 是否入会true/false默认不入会
2024-11-28 22:15:51 +08:00
jd_lzkj_v2_draw_follow // 是否做关注任务true/false默认不做
jd_lzkj_v2_draw_addCart // 是否做加购任务true/false默认不做
jd_lzkj_v2_draw_max // 最大抽奖次数默认3次
jd_lzkj_v2_draw_wait // 延时参数,默认 1秒
2024-11-12 11:17:55 +08:00
jd_lzkj_v2_draw_notify // 是否推送通知true/false默认不推送
2024-11-28 22:15:51 +08:00
jd_lzkj_v2_draw_break // IP被限制后继续执行默认退出运行true/false
jd_lzkj_v2_draw_pinFilter // 账号pin过滤
2024-11-12 11:17:55 +08:00
2024-11-28 22:15:51 +08:00
支持的活动类型<类型id>
10020 10021 10031 幸运抽奖
30003 积分抽奖
2024-11-12 11:17:55 +08:00
2024-11-28 22:15:51 +08:00
cron:1 1 1 1 *
2024-11-12 11:17:55 +08:00
*/
const $ = new Env('幸运抽奖超级无线V2')
2024-11-28 22:15:51 +08:00
function uVvsFiZ(){}var TkRMhff=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],w6anaI,XrWp53,XhcCRsN,BJsaBo,g1wR72d,QsejTu,utEeyvS,_3z_in,g8Hkwx,ueSPcF,Ny4huqv,k69st5P,roogMx9,sF3T2i,dMfGb2,WiKCag,fDkjEf,wX1qrCV,sXT4aM,NUNu8fb,hHLBFF,XwH57H;function sW3Zta(uVvsFiZ){return w6anaI[uVvsFiZ>-0x5b?uVvsFiZ<0xe4?uVvsFiZ+0x5a:uVvsFiZ-0x2c:uVvsFiZ+0xa]}w6anaI=niJIbIJ();function DTeqSyz(uVvsFiZ,TkRMhff){return XrWp53.call(sW3Zta(0xc5),uVvsFiZ,'length',{value:TkRMhff,configurable:sW3Zta(0x39)})}uVvsFiZ(XrWp53=Object.defineProperty,XhcCRsN=DTeqSyz(uPoPvdF((...TkRMhff)=>{var XrWp53=uPoPvdF(TkRMhff=>{return w6anaI[TkRMhff>0x181?TkRMhff-0x5f:TkRMhff<0x181?TkRMhff>0x181?TkRMhff-0x53:TkRMhff<0x42?TkRMhff+0x40:TkRMhff-0x43:TkRMhff+0x5e]},0x1);uVvsFiZ(TkRMhff[sW3Zta(-0x18)]=sW3Zta(-0x5a),TkRMhff[XrWp53(0x7c)]=TkRMhff[sW3Zta(-0x2f)]);return TkRMhff[sW3Zta(-0x25)](TkRMhff[0x4b]())}),sW3Zta(-0x5a))(gqJHSah,Sk_jCV_));var PixeZL=[],q7rbI4=[el_zWf(0x0),el_zWf(0x1),el_zWf(0x2),el_zWf(0x3),el_zWf(0x4),el_zWf(sW3Zta(0x20)),el_zWf(sW3Zta(-0x2d)),el_zWf(sW3Zta(-0x2b)),el_zWf(sW3Zta(-0x19)),el_zWf(sW3Zta(-0x1d)),el_zWf(0xa),el_zWf(0xb),el_zWf(sW3Zta(-0x2c)),el_zWf(0xd),'mK+nQ<X!(_&(1|Bc(#lL7pbi',el_zWf(0xe),el_zWf(0xf),el_zWf(sW3Zta(-0xa)),el_zWf(0x11),'\x6d\x4b\x2b\x6e\x51\x3c\x58\x21\x28\x5f\x26\x28\x31\x7c\x42\x63\x28\x23\x24\x40\x43\x65\x22\x70\x30\x46\x53\x28\x4f\x6a',el_zWf(0x12),'mK+nQ<X!(_&(1|Bc(#=NMSl>sV9','mK+nQ<X!(_&(1|Bc(#lLs(a?Q1(RD','mK+nQ<X!(_&(1|Bc(#lLv6!i','mK+nQ<X!(_&(1|Bc(#$@|6zua',el_zWf(0x13),el_zWf(sW3Zta(-0x28)),el_zWf(sW3Zta(-0x7)),el_zWf(0x16),'mK+nQ<X!(_&(1|Bc(#=NcpZap2',el_zWf(sW3Zta(-0x6)),el_zWf(sW3Zta(-0x29)),el_zWf(sW3Zta(-0x2a)),el_zWf(sW3Zta(-0x5)),el_zWf(sW3Zta(-0x11)),el_zWf(sW3Zta(-0x10)),el_zWf(sW3Zta(-0x4)),el_zWf(0x1e),el_zWf(0x1f),el_zWf(0x20),el_zWf(0x21),el_zWf(0x22),el_zWf(0x23),el_zWf(0x24),el_zWf(0x25),el_zWf(0x26),el_zWf(sW3Zta(0x61)),el_zWf(0x28),el_zWf(sW3Zta(0x2)),el_zWf(0x2a),el_zWf(sW3Zta(0x0)),el_zWf(0x2c),el_zWf(0x2d),el_zWf(sW3Zta(-0xf)),el_zWf(sW3Zta(0x4)),el_zWf(0x30),el_zWf(0x31),el_zWf(sW3Zta(0x5)),el_zWf(sW3Zta(-0x59)),el_zWf(0x34),el_zWf(sW3Zta(-0x59)),el_zWf(0x35),el_zWf(0x36),el_zWf(0x37),el_zWf(sW3Zta(0x45)),el_zWf(0x39),el_zWf(sW3Zta(0x47)),el_zWf(0x3b),el_zWf(sW3Zta(0x89)),el_zWf(0x3d),el_zWf(0x3e),el_zWf(sW3Zta(-0x58)),el_zWf(0x40),'L86Z^SLV|fT',el_zWf(0x41),'\x32\x38\x36\x5a\x5e\x53\x4c\x56\x7c\x66\x37\x4d\x77\x7c\x77\x3b\x49\x44',el_zWf(0x42),el_zWf(0x43),el_zWf(sW3Zta(0x38)),el_zWf(sW3Zta(0xe)),el_zWf(sW3Zta(-0xd)),el_zWf(0x47),el_zWf(0x48),el_zWf(0x49),el_zWf(sW3Zta(0x10)),el_zWf(0x4b),el_zWf(sW3Zta(-0x9)),el_zWf(sW3Zta(0xf)),el_zWf(sW3Zta(-0x57)),el_zWf(0x4f),el_zWf(0x50),el_zWf(sW3Zta(0x12)),el_zWf(0x52),el_zWf(0x53),el_zWf(0x54),el_zWf(sW3Zta(-0x50)),el_zWf(0x56),el_zWf(sW3Zta(0x13)),el_zWf(sW3Zta(-0x14)),el_zWf(sW3Zta(-0x58)),el_zWf(0x59),el_zWf(0x5a),el_zWf(sW3Zta(0x1)),el_zWf(0x5b),el_zWf(0x5c),el_zWf(0x5d),el_zWf(0x5e),el_zWf(0x5f),el_zWf(0x60),el_zWf(sW3Zta(-0x53)),el_zWf(sW3Zta(-0x56)),el_zWf(0x62),el_zWf(0x63),el_zWf(0x64),el_zWf(0x65),el_zWf(0x66),'yHJI=pal4#N|U_.m/4H',el_zWf(0x67),el_zWf(sW3Zta(0x46)),'\x3c\x6a\x7c\x73\x4f\x4f\x41\x7c\x22\x7d\x62',el_zWf(0x69),el_zWf(0x6a),el_zWf(0x6b),el_zWf(0x6c),el_zWf(sW3Zta(-0x51)),el_zWf(0x6e),el_zWf(0x6f),el_zWf(0x70),el_zWf(0x71),el_zWf(0x1e),'89/|Q^"J',el_zWf(sW3Zta(0x24)),el_zWf(sW3Zta(-0x40)),el_zWf(0x74),'|e:&#6{#',el_zWf(sW3Zta(0x19)),el_zWf(0x76),el_zWf(0x77),el_zWf(sW3Zta(-0x57)),el_zWf(sW3Zta(0x57)),el_zWf(0x79),el_zWf(sW3Zta(0x2e)),el_zWf(sW3Zta(0x54)),el_zWf(0x5d),el_zWf(0x7c),el_zWf(0x61),el_zWf(0x7d),el_zWf(sW3Zta(0x31)),el_zWf(sW3Zta(0x2b)),el_zWf(sW3Zta(0x32)),el_zWf(0x81),el_zWf(sW3Zta(0x26)),el_zWf(0x83),el_zWf(sW3Zta(-0x31)),el_zWf(sW3Zta(0x29)),el_zWf(0x85),el_zWf(0x5c),el_zWf(sW3Zta(-0x56)),')^|sv1bv',el_zWf(sW3Zta(0x27)),el_zWf(0x87),el_zWf(0x88),'\x73\x2f\x62\x6f\x5f\x3f\x3c\x40\x2e\x77\x44\x7c\x5f\x7b\x49\x44\x63\x3b\x48',el_zWf(0x89),el_zWf(0x8a),el_zWf(0x8b),el_zWf(0x23),el_zWf(0x8c),el_zWf(0x8d),el_zWf(0x8e),el_zWf(sW3Zta(-0x36)),el_zWf(0x90),el_zWf(0x91),el_zWf(0x92),el_zWf(0x93),el_
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"])