mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
20 lines
136 KiB
JavaScript
20 lines
136 KiB
JavaScript
|
/*
|
|||
|
活动名称:大牌联合(开卡)
|
|||
|
环境变量:
|
|||
|
jd_dplh_viewShop // 是否(true/false)做浏览任务,默认不做
|
|||
|
jd_dplh_addCart // 是否(true/false)做加购任务,默认不做
|
|||
|
jd_dplh_draw // 抽奖次数,变量暂时无效
|
|||
|
jd_dplh_blacklist // 黑名单 用&隔开 pin值
|
|||
|
jd_dplh_Notify // 是否通知(true/false),默认不通知
|
|||
|
jd_dplh_break // IP限制后继续执行(true/false)
|
|||
|
|
|||
|
cron "1 1 1 1 *" script-path=jd_dplh.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('大牌联合1201')
|
|||
|
function QUKRYX(){}var ZiISW4u=Object['defineProperty'],wQlh4X,FV6Fbhh,tDAUA9W,hYaZB_Y,Wy1YvRJ,pShT2G,L6qWXCp,VVU1nU,YcFT8Q2,_g47WB,PRvghhX,DpPmf4l,ekDur0,VSDrQ7,qBzcaio,l4XE3E,w6XgEVL,VDw5nz;function od0PTt(QUKRYX){return wQlh4X[QUKRYX<-0x45?QUKRYX+0x4a:QUKRYX>0x106?QUKRYX-0x4f:QUKRYX+0x44]}wQlh4X=Vs03Uah();function AkKESJC(QUKRYX,ZiISW4u){FV6Fbhh(QUKRYX,od0PTt(-0x44),{value:ZiISW4u,configurable:!0x0});return QUKRYX}QUKRYX(FV6Fbhh=Object.defineProperty,tDAUA9W=AkKESJC(OklM4p3((...ZiISW4u)=>{var FV6Fbhh=OklM4p3(ZiISW4u=>{return wQlh4X[ZiISW4u>0x182?ZiISW4u-0x63:ZiISW4u<0x182?ZiISW4u<0x37?ZiISW4u-0x48:ZiISW4u-0x38:ZiISW4u-0x1b]},0x1);QUKRYX(ZiISW4u[od0PTt(-0x44)]=FV6Fbhh(0x6a),ZiISW4u.nKe_Rad=ZiISW4u[od0PTt(-0x19)]);return ZiISW4u[0x1](ZiISW4u.nKe_Rad())}),0x2)(jC7cnj,Pzd0Mew));var fcGzk_=[],wxPxeU=[acZPFiz(0x0),acZPFiz(od0PTt(-0x17)),acZPFiz(0x2),acZPFiz(0x3),acZPFiz(0x4),acZPFiz(od0PTt(-0x1f)),acZPFiz(od0PTt(-0x23)),acZPFiz(0x7),acZPFiz(0x8),acZPFiz(0x9),acZPFiz(0xa),acZPFiz(0xb),acZPFiz(0xc),acZPFiz(od0PTt(-0xa)),acZPFiz(od0PTt(-0x21)),acZPFiz(od0PTt(-0x13)),acZPFiz(od0PTt(-0x20)),acZPFiz(0x11),acZPFiz(od0PTt(-0x22)),acZPFiz(0x13),acZPFiz(0x14),acZPFiz(0x15),acZPFiz(od0PTt(-0x1e)),acZPFiz(od0PTt(0x2)),'ni#s|?YjqW',acZPFiz(0x18),acZPFiz(0x19),acZPFiz(od0PTt(0x3)),acZPFiz(od0PTt(-0x1d)),acZPFiz(0x1c),acZPFiz(0x1d),acZPFiz(0x1e),acZPFiz(0x1f),acZPFiz(0x20),acZPFiz(od0PTt(-0x3)),acZPFiz(0x22),acZPFiz(od0PTt(0x4)),acZPFiz(0x24),acZPFiz(0x25),acZPFiz(od0PTt(0x7)),'uc|!aS05`Oo]+a8/!<,5`qx+I[sVFiSrLs^GI',acZPFiz(od0PTt(0x8)),acZPFiz(od0PTt(0xa9)),acZPFiz(od0PTt(0x9)),acZPFiz(od0PTt(-0x1b)),acZPFiz(od0PTt(0xa)),acZPFiz(0x2c),acZPFiz(od0PTt(0x20)),acZPFiz(od0PTt(-0x42)),acZPFiz(0x26),acZPFiz(od0PTt(-0x1a)),acZPFiz(0x30),'\x21\x37\x4a\x70\x50\x31\x56\x66\x67\x36\x40\x53\x2e\x5b\x51\x3b\x28\x3f\x2e\x46\x36\x58\x33\x25\x73\x2a\x30\x2e\x2a\x30\x4d\x2f\x32\x66\x5a\x7c\x5d\x63\x69\x40\x37\x38\x53\x53\x34\x5f\x33\x5d\x21\x4c\x41\x46\x64\x31\x57\x6b\x7b\x36\x32\x6d\x50\x2e\x65\x3b\x52\x2f\x4c\x4c','M!PJlhr6i_V0)8>mB|dRVicbsP8<:nnAJbdl>sWW;W.',acZPFiz(0x31),acZPFiz(0x32),acZPFiz(0x33),acZPFiz(od0PTt(-0x28)),acZPFiz(0x35),acZPFiz(0x36),'\x73\x2f\x4a\x59\x4b\x62\x29\x4f\x5a\x65\x75\x6f\x6a\x4c\x40\x33\x78\x50\x73\x36\x3a\x65\x24\x2e\x51\x36\x3e\x6d\x33\x70\x7e\x50\x2c\x3a\x62\x6b\x24\x78\x32\x58\x6d\x7a\x48\x66\x59\x4e\x68\x7c\x73\x4d\x3f\x6d\x46\x2c\x49\x6e\x69\x65\x62\x30\x34\x7b',acZPFiz(0x37),'@eTO|Ewwxn',acZPFiz(od0PTt(0xd)),acZPFiz(0x39),acZPFiz(0x3a),acZPFiz(0x3b),acZPFiz(od0PTt(-0x43)),acZPFiz(0x3c),'XBT[|?`xaZ*nV:@gp,=BL/">fm9<L]OaBfvl',acZPFiz(0x3d),acZPFiz(od0PTt(-0x43)),acZPFiz(od0PTt(0x3e)),'Bf|;S*Ec',acZPFiz(od0PTt(-0x24)),'Tlf|agR1',acZPFiz(od0PTt(0x8f)),acZPFiz(0x41),acZPFiz(0x42),acZPFiz(od0PTt(0xf)),acZPFiz(0x44),'Uk9lY.|7U',acZPFiz(0x45),acZPFiz(0x46),acZPFiz(0x47),'\x55\x7d\x73\x59\x36\x31\x3f\x79\x64\x69\x69\x7b\x3e\x73\x26\x3c\x7c\x58\x23\x51\x6f\x55\x45\x66\x50\x52\x61\x3b\x71\x2a\x37\x2f\x3a\x50\x6d\x54\x6d\x46\x6d\x22\x2e\x56\x77\x40\x76\x2a\x3a\x75\x61\x4b\x45\x3a\x33\x3f\x60\x26\x4b\x35\x2b\x6d\x60\x29\x3d\x39\x6c\x72\x7b\x2f\x28\x6f\x47\x42\x67\x22\x7b\x2e\x6e\x55\x58\x53\x4b\x77\x63\x44\x64\x3f\x35\x6c\x6a\x33\x72\x52\x6d\x2e\x2e\x3e\x35\x22\x43\x7b\x2c\x70\x57\x42\x22\x73\x37\x34\x64\x31\x39\x78\x4b\x34\x6d\x54\x23\x5a\x44\x5d\x48\x65\x67\x4e\x63\x6a\x76\x2c\x7b\x4c\x3f\x4b\x25\x38\x35\x44\x4a\x35\x69\x63\x35\x7e','9M1<jzng>GG^:1K(&N"ea9%.o3k_lq)8/o#r#f#F*t$Xsq/0z5yW|U}Q{j+fI*AK):0y={aQ,{nJ)[l8KvIrKIcow{6HQm"KtN;Y4`Z',acZPFiz(0x48),acZPFiz(od0PTt(-0x14)),acZPFiz(0x4a),acZPFiz(0x4b),acZPFiz(od0PTt(0xc)),'rjo|(b}Qc',acZPFiz(od0PTt(0xa6)),acZPFiz(od0PTt(-0x36)),acZPFiz(od0PTt(0x12)),acZPFiz(0x50),acZPFiz(od0PTt(0x13)),acZPFiz(0x52),acZPFiz(0x53),acZPFiz(0x54),acZPFiz(0x55),acZPFiz(0x56),acZPFiz(od0PTt(0x18)),acZPFiz(0x58),acZPFiz(0x59),acZPFiz(od0PTt(0xfd)),acZPFiz(od0PTt(-0x10)),']~hv|Sof',acZPFiz(0x5c),acZPFiz(0x5d),'\x6c\x48\x57\x7c\x5b\x74\x65\x31',acZPFiz(0x5e),acZPFiz(0x5f),acZPFiz(0x60),acZPFiz(0x61),acZPFiz(od0PTt(0x1b)),acZPFiz(od0PTt(0x1c)),acZPFiz(od0PTt(0x42)),acZPFiz(0x65),acZPFiz(od0PTt(0x1d)),acZP
|
|||
|
|
|||
|
// 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"])
|