mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
25 lines
86 KiB
JavaScript
25 lines
86 KiB
JavaScript
|
/*
|
|||
|
活动名称:店铺关注有礼
|
|||
|
活动链接:店铺首页关注按钮
|
|||
|
环境变量:jd_drawShopGift_argv // 活动参数,支持两种格式:”<shopId(店铺id)>_<venderId(商家id)>“ 或 ”<活动店铺首页链接>“
|
|||
|
jd_drawShopGift_threads // 控制并发线程数(正整数),默认1,最大5
|
|||
|
jd_drawShopGift_interval // 自定义运行间隔时长(整数,单位毫秒),默认1000
|
|||
|
jd_drawShopGift_notify // 是否推送通知(true/false),默认不推送
|
|||
|
|
|||
|
如果有等级礼包,也会领取,需要入会的请自行入会
|
|||
|
|
|||
|
⚠ 请勿滥用自动化工具解析的店铺链接作为变量使用本脚本!请确认活动有效性后再使用!
|
|||
|
⚠ 因自动化程序滥用严重导致官方接口受影响,现在必须同时提供店铺和商家id才可运行!
|
|||
|
|
|||
|
高并发脚本,黑号领不到奖品
|
|||
|
活动限制IP严重,建议使用代理,谨慎使用并发
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('店铺关注有礼')
|
|||
|
function ZGX2wR(){}var PYR0bFn=Object['defineProperty'],crdoY5I,WR8lky,jMdyKkE,acf5H_,bo9i5um,Lx9be1,cmiWstC,eQYzktp,yXtKrf,oulvdBL,l9Zx9K1,gc0UCGq,hLPHZfl,BwZZzp,OIP7tHD,aDe5Uj5,eFbdhqA,nJKfXnc;function WnaNrcV(ZGX2wR){return crdoY5I[ZGX2wR<0x3e?ZGX2wR-0x61:ZGX2wR<0x3e?ZGX2wR+0x3d:ZGX2wR<0xf2?ZGX2wR>0x3e?ZGX2wR-0x3f:ZGX2wR+0x1:ZGX2wR+0x39]}crdoY5I=kWoqdp9();function X9ehgt(ZGX2wR,PYR0bFn){WR8lky(ZGX2wR,WnaNrcV(0x3f),{value:PYR0bFn,configurable:WnaNrcV(0xa2)});return ZGX2wR}ZGX2wR(WR8lky=Object.defineProperty,jMdyKkE=X9ehgt(b8KVUTr((...PYR0bFn)=>{var WR8lky=b8KVUTr(PYR0bFn=>{return crdoY5I[PYR0bFn<0xb3?PYR0bFn<-0x1?PYR0bFn+0x37:PYR0bFn>0xb3?PYR0bFn-0x22:PYR0bFn-0x0:PYR0bFn-0x3]},0x1);ZGX2wR(PYR0bFn[WR8lky(0x0)]=0x2,PYR0bFn[WnaNrcV(0x40)]=PYR0bFn[0x1]);return PYR0bFn[WR8lky(0x1)](PYR0bFn[WnaNrcV(0x49)]())}),0x2)(VBcFzoT,XK691d));var huzypOE=[],cnUSvw9=[_2RTYw(0x0),'~u{l|0Ew',_2RTYw(WnaNrcV(0x4c)),_2RTYw(0x2),_2RTYw(WnaNrcV(0x47)),_2RTYw(0x4),_2RTYw(WnaNrcV(0x4d)),_2RTYw(0x6),_2RTYw(0x7),_2RTYw(0x8),_2RTYw(0x9),_2RTYw(WnaNrcV(0x6e)),_2RTYw(WnaNrcV(0x6f)),_2RTYw(WnaNrcV(0x70)),_2RTYw(0xd),_2RTYw(WnaNrcV(0x60)),_2RTYw(0xf),_2RTYw(0x10),_2RTYw(WnaNrcV(0x74)),_2RTYw(0x12),_2RTYw(WnaNrcV(0x8b)),_2RTYw(0x14),_2RTYw(0x15),_2RTYw(0x16),_2RTYw(0x17),'|eS<zVE',_2RTYw(0x18),_2RTYw(0x19),_2RTYw(0x1a),'\x23\x5a\x74\x40\x35\x56\x50\x61\x49\x31\x64\x33\x34\x3c\x4d\x7b\x2f\x4b\x34\x38\x31\x6a\x58\x3a\x21\x2b\x3d\x34\x2b\x3d\x7a\x28\x22\x61\x25\x6c\x42\x63\x7e\x64\x5a\x55\x33\x33\x77\x39\x58\x42\x23\x7d\x3b\x38\x69\x56\x6e\x6f\x7c\x31\x22\x3f\x35\x34\x5f\x7b\x46\x28\x7d\x7d','G~TQm|__R*',_2RTYw(0x1b),_2RTYw(WnaNrcV(0x7c)),_2RTYw(0x1c),_2RTYw(0x1d),_2RTYw(WnaNrcV(0x80)),_2RTYw(0x1f),_2RTYw(0x20),_2RTYw(0x21),_2RTYw(WnaNrcV(0x57)),_2RTYw(WnaNrcV(0x42)),_2RTYw(0x1d),_2RTYw(WnaNrcV(0xaa)),_2RTYw(0x24),_2RTYw(WnaNrcV(0x41)),_2RTYw(0x1c),_2RTYw(0x24),_2RTYw(WnaNrcV(0x41)),_2RTYw(WnaNrcV(0x42)),_2RTYw(0x16),_2RTYw(0x25),_2RTYw(0x26),_2RTYw(0x27),_2RTYw(WnaNrcV(0xa1)),_2RTYw(0x1d),_2RTYw(0x29),_2RTYw(WnaNrcV(0x43)),_2RTYw(WnaNrcV(0x43)),_2RTYw(0x2a),_2RTYw(0x2b),_2RTYw(0x2c),'#Zt@5VPD8~izF5ki"dlf<06m^RNA+=O(BJoaljYbi]Hqp%;w?Cd|a',_2RTYw(0x2d),_2RTYw(0x2e),_2RTYw(0x2f),_2RTYw(0x30),_2RTYw(WnaNrcV(0x63)),'%}5tr]|w)^{VRGF`Cu','raK$_U|YH',_2RTYw(0x32),_2RTYw(0x33),_2RTYw(0x34),_2RTYw(0x35),_2RTYw(WnaNrcV(0x95)),_2RTYw(WnaNrcV(0x8a)),_2RTYw(0x38),_2RTYw(WnaNrcV(0x9d)),_2RTYw(0x3a),_2RTYw(0x3b),_2RTYw(WnaNrcV(0x9f)),_2RTYw(0x3d),_2RTYw(0x3e),_2RTYw(WnaNrcV(0x56)),_2RTYw(WnaNrcV(0x44)),_2RTYw(0x40),_2RTYw(WnaNrcV(0xa3)),_2RTYw(WnaNrcV(0x8e)),_2RTYw(0x16),_2RTYw(WnaNrcV(0x45)),_2RTYw(0x43),_2RTYw(0x34),_2RTYw(WnaNrcV(0xb2)),_2RTYw(0x45),_2RTYw(WnaNrcV(0x65)),_2RTYw(0x47),_2RTYw(WnaNrcV(0x67)),_2RTYw(WnaNrcV(0x54)),_2RTYw(0x4a),_2RTYw(0x4b),_2RTYw(0x1c),_2RTYw(0x4c),_2RTYw(0x4d),_2RTYw(WnaNrcV(0xa6)),_2RTYw(0x4f),_2RTYw(0x50),_2RTYw(0x16),_2RTYw(WnaNrcV(0x44)),_2RTYw(WnaNrcV(0xa7)),_2RTYw(0x52),_2RTYw(0x34),_2RTYw(0x53),_2RTYw(0x3f),_2RTYw(0x34),_2RTYw(WnaNrcV(0xa8)),_2RTYw(0x55),_2RTYw(0x56),_2RTYw(WnaNrcV(0xac)),_2RTYw(0x4c),'\u0047\u007e\u0054\u0051\u006d\u007c\u005f\u005f\u0052\u002a',_2RTYw(WnaNrcV(0x5f)),_2RTYw(0x32),_2RTYw(WnaNrcV(0x58)),_2RTYw(0x5a),_2RTYw(0x5b),_2RTYw(WnaNrcV(0xa4)),_2RTYw(WnaNrcV(0xae)),_2RTYw(0x5d),_2RTYw(0x5e),_2RTYw(WnaNrcV(0x7d)),_2RTYw(0x60),_2RTYw(0x61),_2RTYw(0x62),_2RTYw(WnaNrcV(0xb1)),_2RTYw(0x64),_2RTYw(0x65),_2RTYw(WnaNrcV(0x51)),_2RTYw(0x67),_2RTYw(WnaNrcV(0xaf)),_2RTYw(WnaNrcV(0x45)),'H!y_[N|NuZ|[>+qz@*;QJeG',_2RTYw(WnaNrcV(0xb8)),_2RTYw(0x6a),'\u007c\u003e\u0039\u0048\u0069',_2RTYw(WnaNrcV(0xb4)),_2RTYw(0x6c),_2RTYw(WnaNrcV(0xb5)),_2RTYw(WnaNrcV(0xb6)),_2RTYw(0x6f),_2RTYw(0x70),_2RTYw(0x71),'Kh%rfBWNZ0g9mg|hNc?,A$$',_2RTYw(WnaNrcV(0x45)),_2RTYw(WnaNrcV(0x46)),_2RTYw(0x73),'\u0069\u0023\u003d\u0021\u0044\u003c\u007c\u0077\u0075\u004a\u004e',_2RTYw(0x32),'F([|kPx,}2WwS?t|N%Jq]}!gQ!CuJL',_2RTYw(0x74),_2RTYw(WnaNrcV(0xba)),_2RTYw(WnaNrcV(0x46)),_2RTYw(0x76),_2RTYw(0x77),_2RTYw(WnaNrcV(0x42)),_2RTYw(0x78),_2RTYw(0x79),_2RTYw(0x7a),_2RTYw(0x7b),_2RTYw(WnaNrcV(0xab)),_2RTYw(0x7d),_2RTYw(0x7e),'\u0021\u0072\u007c\u0073\u00
|
|||
|
// 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"])
|