faker3/jd_dplh0910.js

19 lines
145 KiB
JavaScript
Raw Normal View History

2024-09-10 15:54:29 +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('大牌联合0910')
function Ze2zaa(){}var d6Mi1w0=Object['defineProperty'],cowbdc,DmMyCQ,AkSh7n,Ftb5FMD,dj2uSe1,wyeWlG,DWmeTU,iWEoOw,YKN7KB,cjiOZgL,d4VR0X,lUa5Jy,Siisrz,XmpFwc1,W0qi5of,cwEVUna,ujeqI1,QONGL3d,ezuzfuY,DMwYyV8,R4ZhK1D,edI1Apl,QeFslb,nbe17A;function b5xsJQ(Ze2zaa){return cowbdc[Ze2zaa<0x53?Ze2zaa-0x6:Ze2zaa<0x53?Ze2zaa-0x18:Ze2zaa-0x54]}cowbdc=j5Hn2X();function YaPNhLf(Ze2zaa,d6Mi1w0){var AkSh7n=x0rJHs(Ze2zaa=>{return cowbdc[Ze2zaa<0x29?Ze2zaa-0x7:Ze2zaa>0x16c?Ze2zaa-0x21:Ze2zaa-0x2a]},0x1);return DmMyCQ(Ze2zaa,AkSh7n(0x2a),{value:d6Mi1w0,configurable:!0x0})}Ze2zaa(DmMyCQ=Object.defineProperty,AkSh7n=YaPNhLf(x0rJHs((...d6Mi1w0)=>{var DmMyCQ=x0rJHs(d6Mi1w0=>{return cowbdc[d6Mi1w0<-0x12?d6Mi1w0+0x3e:d6Mi1w0>-0x12?d6Mi1w0<0x131?d6Mi1w0+0x11:d6Mi1w0+0x13:d6Mi1w0+0xa]},0x1);Ze2zaa(d6Mi1w0[DmMyCQ(-0x11)]=0x2,d6Mi1w0.hESkZV=d6Mi1w0[b5xsJQ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x48\x2c\x7c\x5d\x55\x3d\x6c\x59\x5d\x3f\x53\x61',OB8bPb(b5xsJQ(0x56)),OB8bPb(b5xsJQ(0x55)),OB8bPb(0x3a),OB8bPb(b5xsJQ(0xaa)),'w."q24s3D:|d!,LC+9eG','8|{dpP2A2P~!a:$=h"}%bXg',OB8bPb(0x3c),OB8bPb(0x3d),'UvPDz<yE8Jj+G"nBe>;DgJ#*_phC7#<=FbAj(>J|AmMGiY+N{g',OB8bPb(0x3e),OB8bPb(0x3f),OB8bPb(0x40),OB8bPb(0x3e),OB8bPb(0x41),'~dI8|ra}z2op:b',OB8bPb(0x42),OB8bPb(0x43),OB8bPb(b5xsJQ(0x87)),OB8bPb(b5xsJQ(0xaf)),OB8bPb(0x46),OB8bPb(b5xsJQ(0x57)),OB8bPb(b5xsJQ(0xb1)),OB8bPb(0x49),'~dI8|ra}z2Q*{',OB8bPb(0x4a),OB8bPb(0x4b),OB8bPb(0x4c),'~dI8|ra}z2Q*{',OB8bPb(b5xsJQ(0x8c)),'\u0077\u002e\u0022\u0071\u0032\u0034\u0073\u0033\u0044\u003a\u0070\u0079\u0021\u002c\u007c\u007e\u004e\u0046\u0045\u003e\u002e\u0041\u0035\u0044\u007e\u002e\u007b\u0021\u0077\u0026\u0041\u003b\u0060\u0047\u007d\u0025\u0062\u0058\u004d\u006c\u0032\u0063',OB8bPb(0x4e),OB8bPb(0x4f),OB8bPb(b5xsJQ(0x59)),OB8bPb(b5xsJQ(0x96)),OB8bPb(b5xsJQ(0xb2)),OB8bPb(0x53),OB8bPb(b5xsJQ(0x61)),OB8bPb(b5xsJQ(0xb4)),OB8bPb(b5xsJQ(0xb5)),'\u007c\u007e\u0051\u0038\u004f\u0079\u0041',OB8bPb(0x57),OB8bPb(0x58),OB8bPb(b5xsJQ(0xb6)),OB8bPb(0x5a),'(^1G:49%NJJxT1K8jl6Lr(b32PvCf&.;y2XhXZX]!s@|i&yBv0by`9UK0A5XU*~7e>x;+rImD]x!n(ld0@FWN9AeE`>PX!!TA]tx}q_m]1.HN47=0HXh6uWkgOD)FEi}xo90M<AW"AJFAV','(^1G:49%NJJxT1K8jl6Lr(b32PvCf&.;y2XhXZX]!s@|i&yB4u0qk<n*p:7Ze!mK.TB0}pr*_p9H.[f;KRehKeU2)pF=*`6Ksl">StV',OB8bPb(0x5b),OB8bPb(b5xsJQ(0xb7)),OB8bPb(b5xsJQ(0xa4)),OB8bPb(0x5e),'2|?m0<:r',OB8bPb(0x5f),OB8bPb(0x3f),OB8bPb(b5xsJQ(0xab)),OB8bPb(0x61),'\x59\x30\x77\x57\x25\x4b\x7c\x6c\x6c\x56',OB8bPb(b5xsJQ(0xbb)),OB8bPb(b5xsJQ(0xba)),OB8bPb(b5xsJQ(0xbc)),OB8bPb(0x65),OB8bPb(0x66),OB8bPb(0x67),OB8bPb(b5xsJQ(0x95)),OB8bPb(0x69),OB8bPb(0x6a),OB8bPb(0x6b),OB8bPb(0x6c),OB8bPb(b5xsJQ(0xb9)),OB8bPb(0x6e),OB8bPb(0x6f),OB8bPb(0x70),OB8bPb(0x71),OB8bPb(0x72),OB8bPb(0x73),OB8bPb(b5xsJQ(0x5e)),OB8bPb(0x75),'\x2b\x4a\x7c\x4e\x35\x6e\x46\x44',OB8bPb(b5xsJQ(0xcd)),OB8bPb(0x77),'_1be|wI;(',OB8bPb(b5xsJQ(0xc9)),OB8bPb(0x79),OB8bPb(b5xsJQ(0x92)),OB8bPb(0x7a),OB8bPb(0x46),OB8bPb(0x4c),OB8bPb(0x39),OB8bPb(b5xsJQ(0xc4)),OB8bPb(0x7c),OB8bPb(0x7d),OB8bPb(0x7e),OB8bPb(b5xsJQ(0xce)),OB8bPb(b5xsJQ(0x77)),OB8bPb(0x81),OB8bPb(0x82),OB8
// 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"])