faker3/jd_dplh0908.js

19 lines
147 KiB
JavaScript
Raw Normal View History

2024-09-08 13:47:07 +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('大牌联合0908')
function FB8tDf(){}var ui5Bz5A=Object['defineProperty'],JJNhNsG,TtKFtFo,KvuVvZ,NBIhn3,OSUgsW,c9RYy9q,VwTSz7s,tjTL5T,iTBPxd,eHC568n,Xvyliag,eS2WT5,Vlmcwb,YEJdwAE,KE8OpY5,iu68i_9,MXI6ksO,iwnycp,vaXB3M,gi0qd7,zAl7aLJ,DOdig7_,yNtYMC,FcUfizd,rDUDGJK,JYpOLV,Z9esglf;function ZsETjfX(FB8tDf){return JJNhNsG[FB8tDf>0x4?FB8tDf<0x178?FB8tDf-0x5:FB8tDf-0x57:FB8tDf+0x2c]}JJNhNsG=xKSt5Q();function XQvw03g(FB8tDf,ui5Bz5A){TtKFtFo(FB8tDf,ZsETjfX(0x34),{value:ui5Bz5A,configurable:ZsETjfX(0xa0)});return FB8tDf}FB8tDf(TtKFtFo=Object.defineProperty,KvuVvZ=znmgmY((FB8tDf,ui5Bz5A)=>{return ui5Bz5A(FB8tDf())},0x2)(ouQNB9G,kMN5YiT));var NBEP2f5=[],tpkHrjH=[Vdu2_A(0x0),Vdu2_A(ZsETjfX(0x2b)),Vdu2_A(ZsETjfX(0x2e)),Vdu2_A(0x3),Vdu2_A(ZsETjfX(0x28)),'\u0056\u0073\u007c\u0033',Vdu2_A(ZsETjfX(0x25)),Vdu2_A(0x6),'\x39\x4a\x5d\x74\x75\x35\x54\x44\x41\x48\x4d\x2e\x34\x3c\x31\x63\x44\x4a\x46\x45\x67\x38\x25\x4d\x75\x41\x7c\x70\x74\x35\x3c\x32\x7e\x30\x62\x36\x66\x32\x23\x5a',Vdu2_A(0x7),Vdu2_A(0x8),Vdu2_A(0x9),Vdu2_A(0xa),Vdu2_A(0xb),Vdu2_A(0xc),Vdu2_A(ZsETjfX(0x79)),Vdu2_A(ZsETjfX(0x44)),Vdu2_A(ZsETjfX(0x32)),Vdu2_A(ZsETjfX(0x39)),Vdu2_A(ZsETjfX(0x59)),Vdu2_A(ZsETjfX(0xbf)),'T%>$0pB|s$',Vdu2_A(0x13),Vdu2_A(ZsETjfX(0xf2)),Vdu2_A(ZsETjfX(0x38)),Vdu2_A(ZsETjfX(0x27)),Vdu2_A(ZsETjfX(0x53)),Vdu2_A(ZsETjfX(0x5c)),Vdu2_A(ZsETjfX(0x5d)),Vdu2_A(0x1a),Vdu2_A(0x1b),Vdu2_A(ZsETjfX(0x5e)),Vdu2_A(0x1d),Vdu2_A(0x1e),'\x6b\x2c\x61\x7c\x24\x2e\x36\x2a\x7d\x24','+UIhk.|js$',Vdu2_A(ZsETjfX(0x30)),Vdu2_A(ZsETjfX(0x63)),Vdu2_A(0x21),Vdu2_A(ZsETjfX(0xd)),Vdu2_A(ZsETjfX(0x5)),Vdu2_A(0x24),Vdu2_A(ZsETjfX(0x5f)),Vdu2_A(0x26),'\x31\x25\x79\x74\x5f\x26\x79\x44\x21\x24\x3e\x48\x2a\x31\x38\x7c\x4c\x36\x71\x33\x59',Vdu2_A(ZsETjfX(0x61)),'\u0051\u0065\u0039\u0060\u0049\u003a\u0069\u006b\u004e\u0048\u003a\u0021\u007c\u005f',Vdu2_A(ZsETjfX(0x7)),Vdu2_A(ZsETjfX(0x5)),Vdu2_A(0x29),'\u0073\u0070\u0030\u007e\u0029\u0049\u004a\u0045\u007b\u0047\u0065\u002f\u005d\u004f\u0077\u004a\u007c\u0051',']"3m#po}5PIwz`yJ;.zhPN@D^~ez~e|g8}cR[MsI"=ww9H@[]U2h7pr_FP8,#z/J?gUU',Vdu2_A(0x2a),'UUt<||`e+z)',Vdu2_A(ZsETjfX(0x37)),'\x69\x68\x2c\x4a\x47\x7e\x64\x40\x7c\x72','\u0065\u0071\u0058\u0026\u0054\u0045\u002b\u007c\u004e\u006e\u0059\u002f\u0051',Vdu2_A(0x2c),Vdu2_A(0x2d),Vdu2_A(0x2e),Vdu2_A(0x2f),Vdu2_A(ZsETjfX(0x6a)),Vdu2_A(0x31),Vdu2_A(0x32),'AdK#t$3|{G6bWC',Vdu2_A(0x33),'L@EX|ND',Vdu2_A(0x34),Vdu2_A(0x35),'\u0041\u0064\u004b\u0023\u0074\u0024\u0033\u007c\u007b\u0047\u006b\u005b\u0051','cUb^|khM3,_D+GdsQe*',Vdu2_A(ZsETjfX(0x6b)),Vdu2_A(ZsETjfX(0x14)),Vdu2_A(0x38),Vdu2_A(ZsETjfX(0x8b)),Vdu2_A(ZsETjfX(0x1a)),Vdu2_A(0x3b),Vdu2_A(ZsETjfX(0x95)),Vdu2_A(0x3d),Vdu2_A(ZsETjfX(0x36)),'\u005d\u0050\u005a\u0065\u0038\u0033\u007c\u0078',Vdu2_A(ZsETjfX(0x31)),Vdu2_A(0x40),Vdu2_A(ZsETjfX(0x66)),Vdu2_A(0x42),Vdu2_A(ZsETjfX(0x6f)),Vdu2_A(ZsETjfX(0x11)),Vdu2_A(0x45),Vdu2_A(ZsETjfX(0x70)),Vdu2_A(ZsETjfX(0x48)),Vdu2_A(0x48),Vdu2_A(0x49),Vdu2_A(0x4a),Vdu2_A(0x4b),'\u004f\u0022\u007d\u0023\u0033\u0062\u0043\u0030\u0074\u007c\u007c\u002b\u0063\u007d\u0040\u0054\u005a\u0069\u0028\u004c\u007b\u004f\u004a\u0065\u0058\u0021\u006e\u003d\u003f\u0047\u0031\u005d\u0070\u0058\u0041\u0032\u0041\u0061\u0041\u0035\u0049\u004d\u0057\u0039\u0050\u0047\u0070\u0073\u006e\u0068\u004a\u0070\u002c\u0043\u006c\u0040\u0068\u003b\u0076\u0041\u006c\u0075\u005e\u0026\u006f\u0072\u002b\u005d\u004e\u007b\u0071\u0064\u003a\u0035\u002b\u0049\u0056\u004f\u0069\u007a\u0068\u0057\u0051\u0036\u0074\u0043\u003b\u006f\u0025\u002c\u0072\u0021\u0041\u0049\u0049\u0063\u003b\u0035\u006d\u002b\u0060\u002a\u0079\u0064\u0035\u007d\u0031\u003c\u0074\u0062\u0026\u006a\u0068\u003c\u0041\u0032\u0028\u005b\u0036\u002e\u002f\u0038\u003a\u0077\u0051\u0025\u0050\u0060\u002b\u0024\u0043\u0068\u006b\u0066\u003b\u0036\u0067\u003b\u007c\u0051\u003b\u0055','O"}#3bC0t||+c}@TZi(L{OJeX!n=?G1]pXA2AaA5IMW9PGpsb[h*.fVuH3&aoId@1csh`H{uyHC<1x?]@)o2@olXwHQju,(@MigrBmU',Vdu2_A(0x4c),Vdu2_A(ZsETjfX(0x4d)),Vdu2_A(0x4e),Vdu2_A(ZsETjfX(0x115)),Vdu2_A(0x50),Vdu2_A(0x51),Vdu2_A(ZsETjfX(0x67)),Vdu2_A(ZsETjfX(0x12e)),Vdu2_A(0x53),Vdu2_A(ZsETjfX(0x72)),Vdu2_A(0x55),Vdu2_A(ZsETjfX(0x73)),Vdu2_A(0x
// 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"])