faker3/jd_dplh0913.js

19 lines
145 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('大牌联合0913')
function YE6303(){}var qEYIqVd=Object['defineProperty'],e8Kai0w,VvViUi,pesYSMG,QjXZdN,Kobdm2,nheYdp,FKZqBl,Vl8Sas,nLAAXNY,ZwQ_YL,jsWJlKM,QaHP2F,qN5EIlZ,FUS6eIC,Yj8sl_P,xq7ST1,pOlDXrc,hfx1BMA,zpBC45R,sceEe94,qSIBnYW,lL1PCh;function Mftxp5O(YE6303){return e8Kai0w[YE6303>0x143?YE6303-0x38:YE6303<-0x38?YE6303-0x22:YE6303+0x37]}e8Kai0w=y6PG_HK();function FHp3SFc(YE6303,qEYIqVd){VvViUi(YE6303,'length',{value:qEYIqVd,configurable:Mftxp5O(0x60)});return YE6303}YE6303(VvViUi=Object.defineProperty,pesYSMG=Y1MHpV((YE6303,qEYIqVd)=>{return qEYIqVd(YE6303())},0x2)(ISjzAD,VWK79v));var GRAc4YR=[],qddkle=[rfZGrh(Mftxp5O(-0x1a)),'u&|p29{M',rfZGrh(0x1),rfZGrh(0x2),rfZGrh(Mftxp5O(-0x1c)),rfZGrh(Mftxp5O(-0x1b)),'bbikvyxc6K`[SZ7W0|',rfZGrh(Mftxp5O(-0x19)),rfZGrh(0x6),rfZGrh(0x7),rfZGrh(Mftxp5O(0x5)),rfZGrh(0x9),rfZGrh(0xa),rfZGrh(Mftxp5O(0x15)),rfZGrh(0xc),rfZGrh(0xd),rfZGrh(Mftxp5O(0x1b)),rfZGrh(Mftxp5O(-0x13)),'DjdIF@dehQ2,^Q|%0|',rfZGrh(0x10),rfZGrh(Mftxp5O(0x22)),rfZGrh(Mftxp5O(0x14)),rfZGrh(Mftxp5O(-0x16)),rfZGrh(0x14),rfZGrh(0x15),rfZGrh(Mftxp5O(0x25)),rfZGrh(Mftxp5O(-0x9)),rfZGrh(Mftxp5O(0x92)),rfZGrh(0x19),rfZGrh(0x1a),rfZGrh(Mftxp5O(-0x7)),rfZGrh(Mftxp5O(0x54)),rfZGrh(Mftxp5O(0xc5)),rfZGrh(0x1e),rfZGrh(Mftxp5O(-0x14)),rfZGrh(0x20),rfZGrh(Mftxp5O(-0xb)),'|FtO',rfZGrh(0x22),rfZGrh(0x23),rfZGrh(0x24),rfZGrh(Mftxp5O(0x28)),rfZGrh(0x26),rfZGrh(0x27),rfZGrh(0x28),rfZGrh(0x29),'u2"f+"|S<',rfZGrh(0x2a),rfZGrh(Mftxp5O(-0xa)),rfZGrh(Mftxp5O(0x29)),rfZGrh(0x2d),rfZGrh(Mftxp5O(-0x35)),rfZGrh(Mftxp5O(0x2a)),rfZGrh(0x30),'(a@%c|YF',rfZGrh(0x31),rfZGrh(0x32),rfZGrh(0x33),'\u007a\u007d\u0060\u0064\u0074\u0060\u003d\u006b\u002c\u005b\u0028\u0071\u0054\u0049\u002f\u0047\u003f\u0064\u0057\u0078\u0076\u0061\u007c',rfZGrh(0x34),rfZGrh(Mftxp5O(0x117)),'(h[*yUy%"l1RO1"G=,HSsb|','u_;6Nsdmfm9.|',rfZGrh(Mftxp5O(0xd)),rfZGrh(Mftxp5O(0x2c)),rfZGrh(0x38),rfZGrh(0x39),'>Q:%D/rI,WKlj62AZG>^|W8&m^(qA7`G3|/S8Z;sqhzV%"]R>b[q~3$x4W/@U{',rfZGrh(Mftxp5O(0x136)),rfZGrh(Mftxp5O(0x131)),rfZGrh(0x3c),rfZGrh(0x3d),rfZGrh(0x3e),rfZGrh(0x3f),rfZGrh(0x40),rfZGrh(0x41),rfZGrh(Mftxp5O(0x135)),rfZGrh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),rfZGrh(0x73),rfZGrh(Mftxp5O(0x2)),rfZGrh(Mftxp5O(-0x36)),rfZGrh(0x66),rfZGrh(Mftxp5O(0x48)),rfZGrh(Mftxp5O(-0x35)),rfZGrh(0x76),rfZGrh(0x62),rfZGrh(Mftxp5O(-0x34)),rfZGrh(0x78),rfZGrh(Mftxp5O(-0x32)),rfZGrh(0x79),')f>~h_R|<Q^(r4Kb',rfZGrh(Mftxp5O(-0x33)),rfZGrh(0x2e),')8EDQ`aKAWX*9N=vKXxv0|{ygW5];w=E%G@4Q`@?a[!9!)bot2$S1TBYUZn|j#Xq)bX4hhspI',rfZGrh(0x7b),rfZGrh(0x7c),'_/Q^Xk$|','DpPI/}R|',rfZGrh(0x7d),rfZGrh(0x7e),rfZGrh(0x7f),rfZGrh(0x80),rfZGrh(0x81),'iO+Nn*"=^,(f|',rfZGrh(Mftxp5O(0x51)),rfZGrh(Mftxp5O(-0x11)),'\x7c\x74\x32\x53\x6d\x43\x5b\x7d\x3f',rfZGrh(Mftxp5O(-0x34)),'|t2SmC[}?',rfZGrh(0x77),rfZGrh(0x2e),'2W*N@G>te$cr|','!L|fp',rfZGrh(0x84),'\u0021\u004c\u007c\u0066\u0070',rfZGrh(0x85),rfZGrh(0x86),rfZGrh(0x85),rfZGrh(Mftxp5O(0x58)),rfZGrh(0x88),rfZGrh(Mftxp5O(0x5a)),rfZGrh(Mftxp5O(0xf)),rfZGrh(Mftxp5O(0x5b)),rfZGrh(0x8c),rfZGrh(Mftxp5O(0x5c)),rfZGrh(0x4d),rfZGrh(0x8e),rfZGrh(Mftxp5O(0xc)),rfZ
// 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"])