faker3/jd_dplh0915.js

19 lines
146 KiB
JavaScript
Raw Normal View History

2024-09-15 04:05:38 +08:00
/*
活动名称大牌联合开卡
环境变量
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('大牌联合0915')
function fdm2LY(){}var GqCSWDF=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],fNyACo,gId4JU6,hlLwfn7,wmdUmcb,nU2_8L,FCiHs2,QS7cVC,KG89gWO,NErQYp,a4XK_b5,ndQrpio,BInU7M,fGAynWc,yqZ4mFg,y90a9U5,AHJ2vg,KutOYzI,Tue0hto,gOWPNs,LnbPzL2,F8U8zU,TWisA4,IM6iYmZ;function mPOwv8(fdm2LY){return fNyACo[fdm2LY<0x38?fdm2LY+0x27:fdm2LY>0x38?fdm2LY-0x39:fdm2LY-0x33]}fNyACo=xrOdNsV();function ApeBBGd(fdm2LY,GqCSWDF){var hlLwfn7=MGsNHgE(fdm2LY=>{return fNyACo[fdm2LY<0x2e?fdm2LY+0x41:fdm2LY-0x2f]},0x1);return gId4JU6.call(mPOwv8(0x14a),fdm2LY,hlLwfn7(0x2f),{value:GqCSWDF,configurable:!0x0})}fdm2LY(gId4JU6=Object.defineProperty,hlLwfn7=ApeBBGd(MGsNHgE((...GqCSWDF)=>{var gId4JU6=MGsNHgE(GqCSWDF=>{return fNyACo[GqCSWDF>0x182?GqCSWDF-0x51:GqCSWDF-0x18]},0x1);fdm2LY(GqCSWDF[gId4JU6(0x18)]=gId4JU6(0x4b),GqCSWDF[0x90]=mPOwv8(0x3d));if(GqCSWDF[GqCSWDF[0x90]-(GqCSWDF[mPOwv8(0x3a)]-0x90)]>0xd9){return GqCSWDF[-0xaf]}else{var hlLwfn7=MGsNHgE(GqCSWDF=>{return fNyACo[GqCSWDF<0x132?GqCSWDF>0x132?GqCSWDF-0x31:GqCSWDF>0x132?GqCSWDF+0x25:GqCSWDF+0x38:GqCSWDF-0x9]},0x1);return GqCSWDF[GqCSWDF[hlLwfn7(-0x37)]-gId4JU6(0x1b)](GqCSWDF[GqCSWDF[0x90]-0x78]())}}),0x2)(eoBTMN,EEtLos2));var aTsPQS=[],XKySkyl=[wzuGEn_(mPOwv8(0x5a)),wzuGEn_(mPOwv8(0x63)),wzuGEn_(0x2),wzuGEn_(mPOwv8(0x69)),wzuGEn_(0x4),wzuGEn_(mPOwv8(0x68)),wzuGEn_(mPOwv8(0x5f)),wzuGEn_(mPOwv8(0x7c)),wzuGEn_(0x8),wzuGEn_(mPOwv8(0x65)),wzuGEn_(mPOwv8(0x9f)),':|V@L,HZ`}{l=uK]__7@COK6PpdSL&HR?d2ad(_L',wzuGEn_(0xb),wzuGEn_(0xc),'\u0025\u007c\u0054\u0074\u0039',wzuGEn_(0xd),wzuGEn_(mPOwv8(0x76)),'O6c{[*c^rD_j_O](^f|',wzuGEn_(0xf),wzuGEn_(mPOwv8(0x66)),wzuGEn_(0x11),wzuGEn_(0x12),wzuGEn_(mPOwv8(0x64)),wzuGEn_(0x14),wzuGEn_(0x15),wzuGEn_(0x16),wzuGEn_(0x17),wzuGEn_(0x18),wzuGEn_(0x19),wzuGEn_(mPOwv8(0x11d)),wzuGEn_(0x1b),wzuGEn_(0x1c),wzuGEn_(mPOwv8(0x90)),wzuGEn_(mPOwv8(0xdf)),wzuGEn_(0x1f),wzuGEn_(0x20),'\u002f\u0057\u0029\u002b\u0024\u002c\u0061\u007c\u0048\u0024',wzuGEn_(0x21),wzuGEn_(0x22),wzuGEn_(mPOwv8(0x128)),wzuGEn_(mPOwv8(0x91)),wzuGEn_(0x25),wzuGEn_(mPOwv8(0x3b)),wzuGEn_(0x27),wzuGEn_(0x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x/&Cew;URlZbeKv%mG1>]=+Oy&$kC`TKKayb3eihdlbAQP+S/|1PTEfL=N.tZ[]$(ieDO1X6y=Wy)]y@','gS}uOLf]|""j`}KkMqP(BgXHIbZd:enh>Ii$i3iD1AT!We>GL@5Jtav6&O/3z1,Kn`G5=&B6;&f^n~:hKyz$Kz.I7&w<6%PKAq+Fo8p',wzuGEn_(0x56),wzuGEn_(0x57),wzuGEn_(mPOwv8(0x75)),wzuGEn_(mPOwv8(0xb5)),wzuGEn_(0x5a),wzuGEn_(0x5b),wzuGEn_(0x5c),wzuGEn_(0x5d),wzuGEn_(mPOwv8(0xbb)),wzuGEn_(0x5f),wzuGEn_(mPOwv8(0xb9)),wzuGEn_(mPOwv8(0xba)),wzuGEn_(0x62),wzuGEn_(0x63),'X{s4|E#Ng',wzuGEn_(0x64),'|,BV51Qnni','|,BV51uw',wzuGEn_(0x65),wzuGEn_(0x66),'\u0026\u0035\u0031\u006e\u004e\u0056\u003a\u0070\u007c',wzuGEn_(0x67),wzuGEn_(mPOwv8(0x199)),wzuGEn_(0x69),wzuGEn_(mPOwv8(0xa7)),wzuGEn_(0x6b),wzuGEn_(mPOwv8(0xb2)),wzuGEn_(0x6d),'%|<z+F`',wzuGEn_(0x6e),wzuGEn_(0x6f),wzuGEn_(0x70),wzuGEn_(0x71),wzuGEn_(mPOwv8(0xb7)),wzuGEn_(0x73),wzuGEn_(0x74),wzuGEn_(0x75),wzuGEn_(mPOwv8(0xac)),mPOwv8(0x4f),wzuGEn_(0x30),'UByO$J5|FQ{DL',wzuGEn_(
// 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"])