faker3/jd_jinggeng_floor.js

21 lines
87 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称盖楼有礼 · 京耕
活动链接https://jinggeng-isv.isvjcloud.com/ql/front/floor?id=<活动id>&user_id=<店铺id>
2024-11-27 18:38:53 +08:00
环境变量jd_jinggeng_floor_url // 活动链接
jd_jinggeng_floor_opencard // 是否入会true/false默认不入会
jd_jinggeng_floor_Notify // 是否通知true/false默认不通知
2024-11-12 11:17:55 +08:00
2024-11-27 18:38:53 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#盖楼有礼 · 京耕
1 1 1 1 * jd_jinggeng_floor.js, tag=盖楼有礼 · 京耕, enabled=true
2024-11-12 11:17:55 +08:00
*/
const $ = new Env('盖楼有礼(京耕)')
2024-11-27 18:38:53 +08:00
function M81Y41K(){}var GDFivN=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],Rttl3Jq,k9ljOd,iPcNf8f,Kcqq9oy,MfvkZH,BuzOSB,KovRklI,Tyd16n,gWTrXD,eycmZMQ,DsM1nhk,YnOL0v,oD82Ag,SuVYEhD,zDVuz3,fv__pf,jdlSaU,JiQ02uH,cVXsIG,kmYidK7,kG1boBl,v3tGzB,elSUp48;function HaX5Ezt(M81Y41K){return Rttl3Jq[M81Y41K>0xf8?M81Y41K-0x5b:M81Y41K-0x2e]}Rttl3Jq=f4tldY();function QHRwT_(M81Y41K,GDFivN){var iPcNf8f=k3HGmXN(M81Y41K=>{return Rttl3Jq[M81Y41K>0x126?M81Y41K+0x1e:M81Y41K>0x126?M81Y41K-0x35:M81Y41K>0x126?M81Y41K+0x38:M81Y41K<0x5b?M81Y41K-0x44:M81Y41K-0x5c]},0x1);return k9ljOd(M81Y41K,iPcNf8f(0x7d),{value:GDFivN,configurable:!0x0})}M81Y41K(k9ljOd=Object.defineProperty,iPcNf8f=QHRwT_(k3HGmXN((...GDFivN)=>{var k9ljOd=k3HGmXN(GDFivN=>{return Rttl3Jq[GDFivN<0x77?GDFivN>-0x54?GDFivN+0x53:GDFivN-0x7:GDFivN-0x1e]},0x1);M81Y41K(GDFivN.length=HaX5Ezt(0x2f),GDFivN[HaX5Ezt(0x2e)]=GDFivN[HaX5Ezt(0x30)]);return GDFivN[k9ljOd(-0x53)](GDFivN[0x0]())}),HaX5Ezt(0x2f))(iVIl401,T0RrF_3));var h1HCzs=[],KDNVxRc=[kdlCOH(0x0),kdlCOH(HaX5Ezt(0x30)),kdlCOH(HaX5Ezt(0x2f)),kdlCOH(HaX5Ezt(0x40)),kdlCOH(0x4),kdlCOH(HaX5Ezt(0x57)),kdlCOH(HaX5Ezt(0x46)),kdlCOH(0x7),kdlCOH(0x8),kdlCOH(0x9),kdlCOH(HaX5Ezt(0x62)),kdlCOH(0xb),kdlCOH(HaX5Ezt(0x45)),kdlCOH(0xd),kdlCOH(0xe),kdlCOH(HaX5Ezt(0x4e)),kdlCOH(0x10),kdlCOH(0x11),kdlCOH(0x12),kdlCOH(0x13),kdlCOH(0x14),kdlCOH(0x15),kdlCOH(0x16),kdlCOH(HaX5Ezt(0x67)),kdlCOH(0x18),kdlCOH(0x19),kdlCOH(HaX5Ezt(0x68)),kdlCOH(HaX5Ezt(0x4c)),kdlCOH(HaX5Ezt(0x4b)),kdlCOH(HaX5Ezt(0xcc)),kdlCOH(HaX5Ezt(0x7f)),kdlCOH(HaX5Ezt(0x44)),kdlCOH(HaX5Ezt(0x5b)),'0|GPmt2',kdlCOH(0x21),kdlCOH(0x22),kdlCOH(0x23),kdlCOH(0x24),kdlCOH(HaX5Ezt(0x60)),kdlCOH(0x26),kdlCOH(0x27),kdlCOH(0x28),kdlCOH(0x29),kdlCOH(0x2a),kdlCOH(0x2b),kdlCOH(0x2c),kdlCOH(0x2d),kdlCOH(HaX5Ezt(0x97)),'g[+bwV@0AI^e{wY%bBf0Ap_{L|iqFWVGHi6)L',kdlCOH(0x2f),kdlCOH(0x30),kdlCOH(0x31),kdlCOH(0x32),kdlCOH(0x33),kdlCOH(HaX5Ezt(0x71)),kdlCOH(0x35),kdlCOH(0x36),kdlCOH(HaX5Ezt(0x3b)),kdlCOH(0x38),kdlCOH(0x39),kdlCOH(HaX5Ezt(0x75)),kdlCOH(0x3b),kdlCOH(0x3c),'\x4e\x4e\x31\x77\x7c\x6f\x53\x70\x70\x75','\u0052\u0025\u007c\u0058\u002c\u0021\u0039\u007a\u006d',kdlCOH(HaX5Ezt(0x76)),kdlCOH(0x3e),kdlCOH(HaX5Ezt(0x47)),kdlCOH(0x40),kdlCOH(0x41),kdlCOH(0x42),kdlCOH(HaX5Ezt(0x78)),kdlCOH(0x44),kdlCOH(HaX5Ezt(0x79)),kdlCOH(HaX5Ezt(0x6b)),kdlCOH(0x47),kdlCOH(HaX5Ezt(0x8b)),'s%v&t*.(IKZi5I5|Gp',kdlCOH(HaX5Ezt(0x84)),kdlCOH(0x4a),kdlCOH(0x4b),kdlCOH(HaX5Ezt(0x6e)),'vK{wb_|U/1BLr,g[vK{wb_|U/1BLr,g[vK{wb_|U/1BLr,g[Z&',kdlCOH(HaX5Ezt(0x6f)),kdlCOH(0x4e),kdlCOH(HaX5Ezt(0x31)),kdlCOH(0x50),kdlCOH(HaX5Ezt(0x81)),kdlCOH(0x52),kdlCOH(0x53),'\x60\x50\x62\x23\x2a\x58\x64\x56\x4f\x28\x34\x2f\x7c\x4c',kdlCOH(HaX5Ezt(0x83)),kdlCOH(HaX5Ezt(0x34)),kdlCOH(HaX5Ezt(0x7d)),kdlCOH(0x57),kdlCOH(HaX5Ezt(0x5d)),kdlCOH(0x59),kdlCOH(0x5a),kdlCOH(HaX5Ezt(0x5c)),kdlCOH(0x5c),kdlCOH(HaX5Ezt(0x32)),kdlCOH(HaX5Ezt(0x3a)),kdlCOH(0x55),kdlCOH(0x5f),kdlCOH(0x60),'R%|X,!9zm','\u006c\u0036\u0079\u007d\u002f\u007e\u0065\u0025\u005d\u007c\u0029\u0073\u005e\u0044\u0023\u007e\u007a\u0041\u0068\u0048\u004f\u006a\u0025\u005e\u0024\u0064\u0046',kdlCOH(0x4f),kdlCOH(HaX5Ezt(0x35)),'l6y}/~@cv|)s^DoXzAhHOjy%',kdlCOH(HaX5Ezt(0x52)),kdlCOH(0x63),'\u0035\u0052\u003f\u0022\u004b\u0039\u002f\u006b\u0078\u007a\u004e\u007b\u0076\u005d\u0042\u0052\u0078\u0038\u0053\u0024\u002c\u0042\u007a\u0074\u003d\u0054\u002c\u005b\u0037\u0071\u0057\u003d\u007c\u0040\u006c\u0064\u006b\u0064\u007a\u004a\u0029','\u0050\u0057\u007c\u0040\u0066\u0062\u0053\u0044\u003f',kdlCOH(0x64),'5R?"K9/kxzN{v]BRx8S$,Bzt=T,[7qW=|@ldW',kdlCOH(0x65),kdlCOH(0x66),kdlCOH(HaX5Ezt(0x95)),kdlCOH(0x68),kdlCOH(0x69),kdlCOH(HaX5Ezt(0x36)),kdlCOH(0x6b),kdlCOH(HaX5Ezt(0x9b)),kdlCOH(HaX5Ezt(0x37)),kdlCOH(HaX5Ezt(0x9c)),kdlCOH(0x6f),kdlCOH(HaX5Ezt(0x7e)),kdlCOH(0x70),kdlCOH(HaX5Ezt(0x31)),kdlCOH(0x64),kdlCOH(0x71),kdlCOH(0x72),kdlCOH(0x73),kdlCOH(0x4e),kdlCOH(0x74),kdlCOH(HaX5Ezt(0xa5)),kdlCOH(0x76),kdlCOH(HaX5Ezt(0xaa)),kdlCOH(HaX5Ezt(0x41)),kdlCOH(0x79),HaX5Ezt(0x33),kdlCOH(HaX5Ezt(0x32)),'.*YX|o>G&(!',kdlCOH(0x71),kdlCOH(0x7a),kdlCOH(HaX5Ezt(0xf4)),'|a)J',HaX5Ezt(0x33),kdlCOH(HaX5Ezt(0xab
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"])