faker3/jd_OpenCard_Force.js

17 lines
76 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称强制入会
活动链接https://shopmember.m.jd.com/shopcard/?venderId=<商家ID>
2024-08-28 11:13:58 +08:00
环境变量jd_opencard_force_venderId // 商家ID
2024-06-28 15:38:28 +08:00
jd_opencard_force_task_threads // 控制店铺并发线程数正整数默认1最大3
jd_opencard_force_account_threads // 控制账号并发线程数正整数默认1最大3
2024-08-28 11:13:58 +08:00
jd_opencard_force_account_interval // 自定义运行间隔时长整数单位毫秒默认1500
2024-06-28 15:38:28 +08:00
2024-08-28 11:13:58 +08:00
cron:1 1 1 1 *
2024-06-28 15:38:28 +08:00
*/
const $ = new Env('强制入会')
2024-08-28 11:13:58 +08:00
function T4wu9m(){}var BaMQHzs=Object['defineProperty'],VqTkRa,RDdomn,t6IawEO,o8eZxS,gIN9K4,tkz5HI,AsHFHB,Z6dLctp,_4iJFYX,baDWPFp,zFz1Vv,nJGDhvj,sbyU7V,rL7FYS,Z7gXyG,YV7hMN,K_Pelh,sZBCtbe,VgBAEh;function n5P5qcH(T4wu9m){return VqTkRa[T4wu9m<0x73?T4wu9m<-0x32?T4wu9m+0x1d:T4wu9m<-0x32?T4wu9m-0x4:T4wu9m+0x31:T4wu9m+0xf]}VqTkRa=Cli57o();function pH3w2iT(T4wu9m,BaMQHzs){return RDdomn.call(n5P5qcH(0xa),T4wu9m,n5P5qcH(-0x21),{value:BaMQHzs,configurable:!0x0})}T4wu9m(RDdomn=Object.defineProperty,t6IawEO=cggg6qG((T4wu9m,BaMQHzs)=>{return BaMQHzs(T4wu9m())},0x2)(dIaPxr9,plBD75));var OkRdytY=[],rD3N8Xn=[zKW7KW(0x0),zKW7KW(n5P5qcH(-0x2a)),zKW7KW(n5P5qcH(-0x18)),zKW7KW(n5P5qcH(-0x1c)),zKW7KW(0x4),zKW7KW(n5P5qcH(-0x1d)),zKW7KW(n5P5qcH(-0x24)),zKW7KW(0x7),zKW7KW(0x8),zKW7KW(0x9),zKW7KW(n5P5qcH(-0x3)),zKW7KW(0xb),zKW7KW(0xc),zKW7KW(0xd),zKW7KW(n5P5qcH(-0x11)),zKW7KW(0xf),zKW7KW(0x10),'|=:RC',zKW7KW(0x11),zKW7KW(0x12),zKW7KW(0x13),zKW7KW(0x14),zKW7KW(0x15),zKW7KW(0x16),zKW7KW(n5P5qcH(0x0)),zKW7KW(n5P5qcH(0x1)),zKW7KW(0x19),zKW7KW(0x1a),zKW7KW(0x1b),zKW7KW(0x17),zKW7KW(n5P5qcH(-0x30)),zKW7KW(n5P5qcH(-0x31)),zKW7KW(0x1e),zKW7KW(0x1f),zKW7KW(n5P5qcH(-0x31)),zKW7KW(0x20),zKW7KW(0x21),zKW7KW(n5P5qcH(-0x31)),zKW7KW(n5P5qcH(-0x19)),zKW7KW(0x23),'\x64\x37\x3c\x32\x40\x7c\x59\x40\x53\x65\x63\x59\x53\x52',zKW7KW(n5P5qcH(0x6)),zKW7KW(0x25),zKW7KW(0x26),zKW7KW(0x27),zKW7KW(n5P5qcH(-0x31)),zKW7KW(n5P5qcH(0x7)),zKW7KW(0x29),zKW7KW(0x2a),zKW7KW(n5P5qcH(0x11)),zKW7KW(n5P5qcH(0x8)),zKW7KW(n5P5qcH(-0x2e)),zKW7KW(0x2d),zKW7KW(0x2e),zKW7KW(0x2f),zKW7KW(n5P5qcH(0x15)),zKW7KW(0x31),zKW7KW(0x32),zKW7KW(0x1d),zKW7KW(0x33),zKW7KW(n5P5qcH(0x16)),zKW7KW(0x35),zKW7KW(0x36),zKW7KW(0x37),zKW7KW(n5P5qcH(0x18)),zKW7KW(0x39),zKW7KW(n5P5qcH(0x4f)),zKW7KW(0x3b),zKW7KW(0x3c),zKW7KW(n5P5qcH(0x5e)),zKW7KW(0x3e),'\u0048\u0044\u0061\u005d\u0021\u0043\u0059\u002c\u0056\u0070\u0034\u0048\u0057\u0077\u006a\u0050\u0052\u006d\u006b\u0043\u007b\u007c\u0047',zKW7KW(n5P5qcH(-0x25)),zKW7KW(n5P5qcH(-0x2)),zKW7KW(0x1d),zKW7KW(0x1d),zKW7KW(n5P5qcH(0x1d)),zKW7KW(0x42),zKW7KW(0x43),zKW7KW(0x44),'\x3d\x49\x7c\x7e\x59\x52\x64\x77\x61\x32\x45\x21\x2f\x4d\x3b\x2c\x65\x22\x71\x76\x79\x48\x51',zKW7KW(n5P5qcH(-0x2d)),zKW7KW(0x35),zKW7KW(0x45),zKW7KW(n5P5qcH(0x1e)),zKW7KW(n5P5qcH(0x21)),zKW7KW(n5P5qcH(0x1f)),zKW7KW(0x27),zKW7KW(0x49),zKW7KW(n5P5qcH(-0x20)),zKW7KW(0x4b),zKW7KW(0x4c),zKW7KW(0x4d),zKW7KW(n5P5qcH(-0x30)),zKW7KW(n5P5qcH(-0x31)),zKW7KW(n5P5qcH(0x2e)),zKW7KW(n5P5qcH(-0x31)),zKW7KW(n5P5qcH(-0x31)),zKW7KW(0x4f),zKW7KW(n5P5qcH(-0x31)),zKW7KW(n5P5qcH(-0x31)),zKW7KW(n5P5qcH(-0x31)),zKW7KW(n5P5qcH(-0x31)),zKW7KW(n5P5qcH(-0x2f)),zKW7KW(0x1d),zKW7KW(0x50),zKW7KW(0x51),zKW7KW(0x52),zKW7KW(0x53),'PTjO|d/',zKW7KW(0x54),zKW7KW(n5P5qcH(-0x23)),zKW7KW(0x56),zKW7KW(0x57),zKW7KW(0x44),zKW7KW(0x58),zKW7KW(0x59),zKW7KW(0x5a),zKW7KW(n5P5qcH(-0x13)),zKW7KW(n5P5qcH(0x1c)),'RRr9/a8T@e|',zKW7KW(0x5d),zKW7KW(0x5e),zKW7KW(0x5f),zKW7KW(n5P5qcH(0x34)),zKW7KW(0x61),zKW7KW(n5P5qcH(-0x1b)),zKW7KW(n5P5qcH(0x36)),zKW7KW(n5P5qcH(0x67)),zKW7KW(0x65),zKW7KW(0x66),zKW7KW(0x67),zKW7KW(n5P5qcH(0x3a)),zKW7KW(n5P5qcH(0x35)),zKW7KW(0x6a),zKW7KW(0x6b),zKW7KW(n5P5qcH(-0x2f)),zKW7KW(n5P5qcH(0x3c)),zKW7KW(n5P5qcH(0x19)),zKW7KW(0x6e),zKW7KW(0x6f),zKW7KW(n5P5qcH(0x3d)),zKW7KW(0x3e),zKW7KW(0x71),zKW7KW(0x72),zKW7KW(0x73),zKW7KW(n5P5qcH(0x3e)),zKW7KW(0x75),zKW7KW(n5P5qcH(0x47)),zKW7KW(n5P5qcH(0x3f)),zKW7KW(0x78),zKW7KW(n5P5qcH(-0xb)),zKW7KW(0x7a),zKW7KW(0x7b),zKW7KW(n5P5qcH(0x40)),zKW7KW(0x7d),zKW7KW(n5P5qcH(-0x5)),zKW7KW(0x7f),zKW7KW(n5P5qcH(-0x2b)),zKW7KW(0x81),zKW7KW(0x82),zKW7KW(0x83),zKW7KW(0x84),zKW7KW(0x85),zKW7KW(0x86),zKW7KW(n5P5qcH(-0xe)),zKW7KW(0x88),zKW7KW(n5P5qcH(0x4a)),zKW7KW(n5P5qcH(0x52)),zKW7KW(n5P5qcH(0x43)),zKW7KW(0x8c),zKW7KW(0x8d),zKW7KW(0x8e),zKW7KW(0x8f),zKW7KW(0x90),zKW7KW(0x91),zKW7KW(n5P5qcH(0x2)),zKW7KW(n5P5qcH(0x49)),zKW7KW(0x94),zKW7KW(0x95),zKW7KW(n5P5qcH(0x4)),zKW7KW(0x97),'[,|Ff5xi',zKW7KW(0x98),zKW7KW(0x99),zKW7KW(n5P5qcH(0x59)),zKW7KW(n5P5qcH(0x2c)),zKW7KW(0x9c),zKW7KW(0x9d),zKW7KW(n5P5qcH(-0x22)),zKW7KW(n5P5qcH(0x53)),zKW7KW(0x1d),zKW7KW(n5P5qcH(0x54)),zKW7KW(n5P5qcH(0xb)),zKW7KW(0xa1),zKW7KW(0xa2),zK
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"])