faker3/jd_wxShopFollowActivity.js

18 lines
144 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称关注店铺有礼 · 超级无线/超级会员
活动链接https://cjhy-isv.isvjcloud.com/wxShopFollowActivity/activity?activityId=<活动id>
https://lzkj-isv.isvjcloud.com/wxShopFollowActivity/activity/activity?activityId=<活动id>
2024-09-03 15:20:23 +08:00
环境变量jd_wxShopFollowActivity_url // 活动链接
jd_wxShopFollowActivity_opencard // 是否开卡,默认不开卡
2024-06-28 15:38:28 +08:00
jd_wxShopFollowActivity_notify // 是否推送通知,默认不推送
2024-09-03 15:20:23 +08:00
jd_wxShopFollowActivity_forbiddenQuit // IP被限制后继续执行默认退出运行true/false
2024-06-28 15:38:28 +08:00
2024-09-03 15:20:23 +08:00
cron:1 1 1 1 *
2024-06-28 15:38:28 +08:00
*/
const $ = new Env('关注店铺有礼(超级无线/超级会员)')
2024-09-03 15:20:23 +08:00
function ycLbk4C(){}var Qf9OmE8=Object['defineProperty'],U1QcfT,KZsRPY,gLcm2_,gMa6hdt,U7I2FA,gBkde99,MeG4gpe,GZyvec2,iGabmTD,ifrIQcs,anIfiI_,SWGuoE,cOFHo9,Z3HS5Jk,LHp6pC,uCraPi,pShpdZ5,PWn4Ucz;function OMlx2c(ycLbk4C){return U1QcfT[ycLbk4C<0x178?ycLbk4C-0x36:ycLbk4C-0x62]}U1QcfT=U30taNv();function Bj95vVw(ycLbk4C,Qf9OmE8){return KZsRPY.call(OMlx2c(0x167),ycLbk4C,OMlx2c(0x63),{value:Qf9OmE8,configurable:!0x0})}ycLbk4C(KZsRPY=Object.defineProperty,gLcm2_=m7rBeYJ((ycLbk4C,Qf9OmE8)=>{return Qf9OmE8(ycLbk4C())},0x2)(jT3W9V,SvTZHrZ));var OZIL92=[],JCY_ITe=[QkjVseg(OMlx2c(0x66)),QkjVseg(0x1),'e1fv|Jb+',QkjVseg(OMlx2c(0x74)),QkjVseg(0x3),'P.|oByqH',QkjVseg(0x4),'P.|oBy<CY&1^Zl4T0<r|',QkjVseg(OMlx2c(0x83)),QkjVseg(0x6),QkjVseg(OMlx2c(0x7b)),'\u003e\u0062\u0076\u0035\u0047\u007b\u0078\u004f\u0030\u002a\u004d\u0024\u005e\u0077\u003a\u0077\u0044\u0033\u0071\u0044\u0053\u0073\u0059\u0052\u0039\u002b\u0036\u0063\u0056\u0078\u0045\u0050\u0043\u007c\u0030\u0068\u0068\u006f\u0062\u0032\u0078\u0056\u0063\u0039\u005a\u0025\u006b\u0036\u0043\u0041\u004a\u005f\u0065\u0042\u0063\u006a\u0069\u0034\u0045\u0037\u006f\u0061\u002b\u0061\u0042\u006d\u0064\u0068\u0067\u0072\u003c\u006a\u006f\u0039\u003b\u0042\u0041\u0069\u007d\u003e\u004d\u0059\u0064\u0068\u0078\u0075\u007e\u0070\u007c\u0047\u0069\u0069\u0057\u0066\u0069\u0041\u007b\u004b\u0055\u007e\u005f\u0052\u0026\u0022\u006a\u0047\u007a\u0058\u0076\u007b\u003b\u0023\u0072\u004b\u007a\u0069\u004b\u003b\u0022\u0045\u004c\u0035\u007d\u0079\u0054\u006c\u0029\u0034',QkjVseg(OMlx2c(0x71)),QkjVseg(OMlx2c(0xa4)),QkjVseg(0xa),QkjVseg(OMlx2c(0x82)),QkjVseg(OMlx2c(0x68)),'\x6c\x2b\x6a\x6d\x71\x4f\x7c\x48',QkjVseg(0xd),QkjVseg(OMlx2c(0x70)),QkjVseg(0xf),QkjVseg(OMlx2c(0xe6)),QkjVseg(OMlx2c(0x6b)),QkjVseg(0x12),QkjVseg(0x13),QkjVseg(OMlx2c(0x6c)),QkjVseg(0x15),'$3|m',QkjVseg(OMlx2c(0x3d)),QkjVseg(OMlx2c(0x6f)),QkjVseg(0x18),'\u0050\u0021\u007c\u006d',QkjVseg(0x19),QkjVseg(OMlx2c(0xb3)),OMlx2c(0x37),QkjVseg(0x1b),QkjVseg(0x1c),QkjVseg(0x1d),QkjVseg(0x1e),QkjVseg(OMlx2c(0x78)),QkjVseg(OMlx2c(0x87)),'iTd|*?4H',QkjVseg(0x21),QkjVseg(OMlx2c(0x38)),QkjVseg(0x23),QkjVseg(OMlx2c(0x36)),QkjVseg(0x25),QkjVseg(OMlx2c(0x160)),QkjVseg(0x27),QkjVseg(OMlx2c(0x39)),QkjVseg(OMlx2c(0x36)),QkjVseg(0x29),QkjVseg(0x26),OMlx2c(0x37),QkjVseg(OMlx2c(0x76)),'Y{7bghF@@J<D<u)/|;lSr5`','P!|m',QkjVseg(0x16),QkjVseg(OMlx2c(0xe7)),QkjVseg(0x2b),QkjVseg(OMlx2c(0x8a)),QkjVseg(OMlx2c(0x3c)),QkjVseg(0x2e),QkjVseg(OMlx2c(0x8b)),QkjVseg(OMlx2c(0xae)),QkjVseg(OMlx2c(0x8d)),QkjVseg(OMlx2c(0x51)),'QbP|V<qH',QkjVseg(0x33),QkjVseg(0x34),QkjVseg(OMlx2c(0x60)),QkjVseg(OMlx2c(0x4d)),QkjVseg(0x37),QkjVseg(0x38),QkjVseg(OMlx2c(0x92)),QkjVseg(0x3a),QkjVseg(OMlx2c(0x116)),QkjVseg(0x3c),QkjVseg(0x3d),QkjVseg(0x3e),QkjVseg(0x3f),QkjVseg(OMlx2c(0x111)),QkjVseg(OMlx2c(0x12d)),QkjVseg(0x42),QkjVseg(OMlx2c(0x38)),QkjVseg(0x43),QkjVseg(0x44),QkjVseg(0x45),QkjVseg(OMlx2c(0x97)),QkjVseg(0x47),QkjVseg(OMlx2c(0x94)),QkjVseg(OMlx2c(0x56)),QkjVseg(OMlx2c(0x98)),'gwr|En}*q)@nJ0$P"`',QkjVseg(0x4b),QkjVseg(0x4c),QkjVseg(0x4d),'\x46\x73\x2f\x7a\x29\x4e\x55\x43\x2c\x24\x7c\x55\x60',QkjVseg(OMlx2c(0x4c)),QkjVseg(0x4f),QkjVseg(0x50),QkjVseg(OMlx2c(0x38)),QkjVseg(0x43),QkjVseg(0x51),OMlx2c(0x37),QkjVseg(0x52),QkjVseg(0x53),QkjVseg(OMlx2c(0xa3)),QkjVseg(0x55),QkjVseg(0x56),QkjVseg(0x57),QkjVseg(0x58),QkjVseg(0x59),'4wy_t<RH})I`Aipg|4s30]=','P!|m','\x34\x77\x79\x5f\x74\x3c\x52\x48\x7d\x29\x49\x60\x41\x69\x70\x67\x7c\x34\x73\x33\x30\x5d\x40\x41\x2a\x30\x34\x62\x4c\x63\x5e\x7b\x6a\x39\x29\x49\x5d\x77\x4a\x78\x63\x5b\x3d\x4a\x23\x2a\x21\x64\x24\x34\x4f\x5d\x21',QkjVseg(OMlx2c(0x3b)),QkjVseg(OMlx2c(0x3a)),QkjVseg(0x5c),QkjVseg(0x5d),QkjVseg(OMlx2c(0x39)),OMlx2c(0x37),'OZ7qakJes$|xS[RkKfMw#>eSU])',QkjVseg(0x5a),QkjVseg(OMlx2c(0x3a)),QkjVseg(0x5e),QkjVseg(0x5f),QkjVseg(0x26),QkjVseg(OMlx2c(0x4e)),QkjVseg(0x60),QkjVseg(OMlx2c(0x169)),'iTjm*M}{_$|xS[f','\u0050\u0021\u007c\u006d',QkjVseg(OMlx2c(0x52)),QkjVseg(0x5a),QkjVseg(OMlx2c(0x3a)),QkjVseg(OMlx2c(0xa7)),QkjVseg(OMlx2c(0xc8)),QkjVseg(OMlx2c(0xcc)),QkjVseg(0x66),'P!|m','0{:VyHai,Kl*^s6{,jgUL6KDd~L@%W!d$4O]i]Km|',QkjVseg(OMlx2c(0x3b)
2024-06-28 15:38:28 +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"])