mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
19 lines
105 KiB
JavaScript
19 lines
105 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('大牌联合0825')
|
|||
|
function rUoPSi2(){}var Ai6KmR=Object['defineProperty'],B1kWIew,ZRO7L6q,Py1TVZ5,cRPPGlS,hR8UH8g,tIPtO2C,G5XprJR,AeLFYH9,m_pdM9P,G_FJ8Bp,kYTpDZ,Gw5zmI,FugB8I,E0sb81,eUQwID,dYCWdQ,VhsRm3,XYqASWT,tIyKOa,NUfapTg;function I_FoKk(rUoPSi2){return B1kWIew[rUoPSi2>0x5?rUoPSi2<0x5?rUoPSi2+0x28:rUoPSi2>0xe2?rUoPSi2-0x5f:rUoPSi2<0xe2?rUoPSi2-0x6:rUoPSi2+0x15:rUoPSi2-0x3a]}rUoPSi2(B1kWIew=d0So7uE(),ZRO7L6q=_f7N5t4((rUoPSi2,Ai6KmR)=>{return Ai6KmR(rUoPSi2())},0x2)(zNuxWK,qnqpxyo));var VjOvMI=[],Ts2HaNZ=[HkSczM(I_FoKk(0x18)),HkSczM(I_FoKk(0x17)),HkSczM(0x2),HkSczM(I_FoKk(0x1e)),HkSczM(0x4),HkSczM(0x5),HkSczM(0x6),HkSczM(I_FoKk(0x1c)),HkSczM(0x8),'`SbaAe$IDPd%UQ]5z/$,p!nUg|A!M}R#P(H3VVp',HkSczM(I_FoKk(0x2c)),HkSczM(I_FoKk(0x2d)),HkSczM(I_FoKk(0x2e)),HkSczM(0xc),HkSczM(I_FoKk(0x26)),HkSczM(I_FoKk(0x2f)),HkSczM(0xf),HkSczM(I_FoKk(0x21)),HkSczM(0x11),HkSczM(I_FoKk(0x8a)),HkSczM(I_FoKk(0x30)),HkSczM(I_FoKk(0x31)),HkSczM(0x15),HkSczM(0x16),HkSczM(0x17),HkSczM(I_FoKk(0x9d)),HkSczM(I_FoKk(0x24)),HkSczM(0x1a),HkSczM(0x1b),HkSczM(0x1c),'qE|)[!Km>48.rd',HkSczM(0x1d),HkSczM(0x1e),HkSczM(I_FoKk(0x1a)),HkSczM(0x20),HkSczM(0x21),HkSczM(0x22),HkSczM(I_FoKk(0x33)),HkSczM(I_FoKk(0x34)),HkSczM(0x25),HkSczM(I_FoKk(0x35)),HkSczM(0x27),HkSczM(I_FoKk(0x36)),HkSczM(I_FoKk(0x37)),'%UU]1Kkm85|',HkSczM(0x2a),HkSczM(0x2b),HkSczM(0x25),HkSczM(0x2c),'wJr[W?O+ez*i|b&@y!|>ztH8]7U|7UVK"+50Bm4*JniivCHBwQs>/?^dlz"#W|j@:KQQ','VwWrSFcz4COU6nX#a0/:O4mI]Wn<T33srI/SX]^^@^|',HkSczM(I_FoKk(0x38)),HkSczM(0x2e),HkSczM(0x2f),HkSczM(0x2e),HkSczM(0x30),HkSczM(0x31),HkSczM(0x32),HkSczM(0x33),HkSczM(0x34),HkSczM(0x35),HkSczM(I_FoKk(0x3e)),HkSczM(0x34),HkSczM(0x37),HkSczM(I_FoKk(0x3f)),HkSczM(0x39),HkSczM(I_FoKk(0x5d)),'wJr[W?O+ezsT|b*P/m1cJ_}ePJ%|w7_KHEo2k#8tWL',HkSczM(0x3b),HkSczM(0x3c),HkSczM(0x3d),HkSczM(0x3e),HkSczM(0x3f),HkSczM(0x40),HkSczM(0x41),HkSczM(I_FoKk(0x41)),HkSczM(0x43),HkSczM(0x44),HkSczM(I_FoKk(0x3a)),HkSczM(0x46),'n(N7+Ot<hww&kNfx$.Mu^nEZ6BvmS4!l16y}y0y@=#bz]41Rv/E12tef/>*ye{9;Ws&lr^)"X@&=%n.A/bFVht>WL2sBy==k>@5&3`j"@N!JhO;~/Jy}MGV|c?XTFL]3&Kt/P,>VY>wF>I','n(N7+Ot<hww&kNfx$.Mu^nEZ6BvmS4!l16y}y0y@=#bz]41ROG/`|,%{U+;0W="f!kR/3U^{jUtJ!CSlfDW}fWe6TUF~{2Mf#.Ys_5I',HkSczM(I_FoKk(0x42)),HkSczM(0x48),HkSczM(0x49),HkSczM(0x4a),HkSczM(0x4b),HkSczM(I_FoKk(0x46)),HkSczM(I_FoKk(0x16)),HkSczM(0x4d),HkSczM(0x4e),'&@YPQ|LJJ#',HkSczM(I_FoKk(0x45)),HkSczM(0x50),'}>(|aMQ',HkSczM(I_FoKk(0x47)),HkSczM(I_FoKk(0x44)),'/aqy;|LJJ#',HkSczM(I_FoKk(0x48)),':DO|;y8Fg','+n(|HV}`',HkSczM(0x54),HkSczM(0x54),HkSczM(0x55),HkSczM(0x56),HkSczM(0x57),HkSczM(0x58),HkSczM(0x59),HkSczM(0x5a),HkSczM(I_FoKk(0x25)),HkSczM(0x5c),HkSczM(0x5d),HkSczM(0x5e),HkSczM(I_FoKk(0xc)),I_FoKk(0x11),HkSczM(0x39),HkSczM(0x2b),HkSczM(0x60),HkSczM(I_FoKk(0x7)),HkSczM(0x62),HkSczM(0x63),HkSczM(I_FoKk(0x5a)),HkSczM(I_FoKk(0x4c)),'Qa@|`7gRg',HkSczM(I_FoKk(0x6)),'zFXu)i50(4*}@]kx0*$xjApbf4J"W|kXeK.>)i./5%t@tzQl=3o2gcMB_aLAEC*wzQ*>GG{V1',HkSczM(0x66),HkSczM(0x67),HkSczM(I_FoKk(0x4d)),HkSczM(0x69),HkSczM(0x6a),HkSczM(0x6b),HkSczM(I_FoKk(0x6)),'Y`sR|cB9jSHeb',HkSczM(I_FoKk(0x4e)),HkSczM(0x6d),HkSczM(I_FoKk(0x7)),HkSczM(I_FoKk(0x4f)),HkSczM(0x61),HkSczM(0x6e),HkSczM(I_FoKk(0x6)),HkSczM(0x3f),HkSczM(I_FoKk(0x8)),HkSczM(0x70),HkSczM(I_FoKk(0x8)),HkSczM(I_FoKk(0x50)),HkSczM(0x2f),HkSczM(0x71),HkSczM(0x72),HkSczM(I_FoKk(0x2a)),HkSczM(0x74),HkSczM(0x75),HkSczM(0x76),HkSczM(0x77),HkSczM(I_FoKk(0xa)),HkSczM(I_FoKk(0x52)),HkSczM(0x35),HkSczM(0x7a),HkSczM(0x7b),HkSczM(0x7c),HkSczM(0x7d),HkSczM(0x7e),HkSczM(I_FoKk(0x9)),HkSczM(0x7f),HkSczM(0x7c),HkSczM(0x80),HkSczM(I_FoKk(0x9)),HkSczM(I_FoKk(0x56)),HkSczM(I_FoKk(0x53)),HkSczM(0x72),HkSczM(0x82),HkSczM(I_FoKk(0x12)),HkSczM(I_FoKk(0xa)),HkSczM(0x7c),HkSczM(0x84),HkSczM(I_FoKk(0x57)),'qQ^zHX4_0*Ylysc`]t9?@cPoBo[@x6r%QF]|n"X>R6s;I8N&8oGZ8eg.2eo%b!?',HkSczM(0x86),'qP9;|Z:',HkSczM(0x2b),HkSczM(0x87),HkSczM(0x88),'/wU1|l/m',HkSczM(0x64),HkSczM(0x6a),HkSczM(0x89),HkSczM(0x6b),HkSczM(0x8a),'Qa@|`7gRg',HkSczM(0x8b),HkSczM(0x8c),HkSczM(0x8d),HkSczM(0x8e),HkSczM(I_FoKk(0x5b)),HkSczM(I_FoKk(0x5c)),HkSczM(0x91),HkSczM(0x92),HkSczM(I_FoKk(0x5e)),HkSczM(0x94),HkSczM(0x95),'|@nh{KcMuRcrD}h&kA',HkSczM(I_FoKk(
|
|||
|
// 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"])
|