jdpro/jd_dplh1020.js

12 lines
149 KiB
JavaScript
Raw Normal View History

2024-10-20 06:59:20 +00:00
/*
一次性手动执行
自行运行有水无水自测
第一个账号助力作者 其他依次助力CK1
注意第一个CK黑号会全部助力所填写的助力码
0 0 20 10 * jd_dplh1020.js
*/
const $ = new Env("大牌1020");
function nNwBxb(){}var h1eU2Dd=Object['defineProperty'],ss3ywrn,MHPAli,nVaynWE,amRLhRw,s1mARv8,Y1fERZv,nSbN95,LWeqFW,KdMHZm,fNdbOi,cS87INf,SLVjYq,REIFaYS,Uy575qL,ClaG0Ce,Y0yeD1,eqQXwF,kgS3iA4,XEK3Vfi,dBMzwh2,nElfaC,AsHd2C8,Dzvl5Di,G9Zj1MS;function dhxqoa(nNwBxb){return ss3ywrn[nNwBxb>0x1a6?nNwBxb+0x44:nNwBxb-0x36]}ss3ywrn=FWrXm7();function RehDyD(nNwBxb,h1eU2Dd){return MHPAli(nNwBxb,'length',{value:h1eU2Dd,configurable:dhxqoa(0xb8)})}nNwBxb(MHPAli=Object.defineProperty,nVaynWE=RehDyD(EYBMsi((...h1eU2Dd)=>{nNwBxb(h1eU2Dd[dhxqoa(0x6a)]=dhxqoa(0x81),h1eU2Dd[dhxqoa(0x36)]=-0x3d);if(h1eU2Dd[dhxqoa(0x36)]>dhxqoa(0x75)){return h1eU2Dd[h1eU2Dd.KuLCptK+0x115]}else{var MHPAli=EYBMsi(h1eU2Dd=>{return ss3ywrn[h1eU2Dd<0x180?h1eU2Dd<0x180?h1eU2Dd-0x10:h1eU2Dd+0x33:h1eU2Dd+0x48]},0x1);return h1eU2Dd[0x1](h1eU2Dd[MHPAli(0x39)]())}}),0x2)(v1WE8Y7,rS5s70S));var hQRBUUj=[],JlPxSyg=[VUfrtv(0x0),VUfrtv(dhxqoa(0x6f)),VUfrtv(0x2),VUfrtv(dhxqoa(0x65)),VUfrtv(dhxqoa(0x6b)),VUfrtv(0x5),'uBD<|V0l',VUfrtv(dhxqoa(0x62)),VUfrtv(0x7),VUfrtv(dhxqoa(0x9f)),VUfrtv(dhxqoa(0x78)),VUfrtv(dhxqoa(0x7a)),VUfrtv(dhxqoa(0x99)),VUfrtv(dhxqoa(0x69)),'|;c^',VUfrtv(dhxqoa(0x73)),VUfrtv(dhxqoa(0x5b)),VUfrtv(dhxqoa(0x63)),VUfrtv(0x10),VUfrtv(0x11),VUfrtv(0x12),VUfrtv(dhxqoa(0x7e)),VUfrtv(0x14),VUfrtv(dhxqoa(0x80)),VUfrtv(0x16),VUfrtv(0x17),VUfrtv(dhxqoa(0x37)),'(H]^|oz2Z',VUfrtv(0x19),VUfrtv(dhxqoa(0xa5)),VUfrtv(dhxqoa(0x89)),VUfrtv(dhxqoa(0x45)),VUfrtv(dhxqoa(0x4c)),VUfrtv(dhxqoa(0x3d)),'7|?Zuxhu',VUfrtv(0x1f),VUfrtv(dhxqoa(0x87)),'7|?ZuxxuD[Bl*I58',VUfrtv(0x20),'c1]^D`$GL234+V=W|;wUV71T|FM.L6M;_@x2A:9IHMB"ml',VUfrtv(0x21),'c1]^D`$GL234+V=W|;wUV71T|FM.L6M;_@x2e',VUfrtv(dhxqoa(0x154)),'M|8eea?8[yA"SItzi+!0K*K3>y6q5}n;O[ReI',VUfrtv(dhxqoa(0x66)),VUfrtv(dhxqoa(0x74)),VUfrtv(0x25),VUfrtv(0x26),VUfrtv(0x27),VUfrtv(dhxqoa(0x8b)),VUfrtv(0x29),',|VL!;S;B2',VUfrtv(0x2a),'#S|90TFh+g>%h6kzEUM9',VUfrtv(dhxqoa(0x86)),VUfrtv(0x2c),VUfrtv(dhxqoa(0x67)),VUfrtv(0x2e),VUfrtv(dhxqoa(0x77)),VUfrtv(0x2f),VUfrtv(dhxqoa(0x8d)),'7|?Zuxi;`[*',VUfrtv(0x31),VUfrtv(dhxqoa(0x37)),'X|ZB<<v*U)(UCY!',VUfrtv(0x32),VUfrtv(dhxqoa(0x68)),VUfrtv(0x34),VUfrtv(0x35),VUfrtv(dhxqoa(0x14d)),VUfrtv(dhxqoa(0x165)),VUfrtv(0x38),VUfrtv(0x39),VUfrtv(dhxqoa(0x8f)),'VD5|$1xTpu^(s!L]^+,oD}(4C6m',VUfrtv(0x3b),VUfrtv(0x3c),VUfrtv(0x3d),VUfrtv(dhxqoa(0xd2)),VUfrtv(0x3f),'!/~sB@D1L;Eu:fw0|5?[}heLJ=X1STo{I"O',VUfrtv(0x40),VUfrtv(dhxqoa(0x90)),VUfrtv(dhxqoa(0x196)),VUfrtv(dhxqoa(0x91)),VUfrtv(0x44),VUfrtv(0x45),VUfrtv(0x46),VUfrtv(0x47),VUfrtv(dhxqoa(0x40)),VUfrtv(0x39),VUfrtv(0x49),VUfrtv(0x4a),VUfrtv(0x4b),VUfrtv(0x4c),VUfrtv(0x4d),VUfrtv(0x4e),VUfrtv(0x4f),'|;T29is&Z',VUfrtv(dhxqoa(0x98)),VUfrtv(dhxqoa(0x11b)),VUfrtv(0x52),VUfrtv(dhxqoa(0x3c)),VUfrtv(0x54),'(p5`@[UbU6(DTnZf:L1"$IvJY?~Ij4mdhkGQf1i*aA3N7&pdpnP[fAaJKH8/GEcv=|',VUfrtv(dhxqoa(0x37)),VUfrtv(0x55),VUfrtv(0x56),dhxqoa(0x39),'cv|^',VUfrtv(0x57),'y|zA0',VUfrtv(dhxqoa(0x41)),VUfrtv(dhxqoa(0x37)),VUfrtv(0x59),VUfrtv(dhxqoa(0x9d)),VUfrtv(dhxqoa(0x37)),VUfrtv(dhxqoa(0x70)),VUfrtv(0x5c),VUfrtv(dhxqoa(0x19a)),VUfrtv(dhxqoa(0x38)),VUfrtv(0x5f),VUfrtv(dhxqoa(0x37)),VUfrtv(dhxqoa(0x14b)),VUfrtv(dhxqoa(0xbb)),VUfrtv(0x62),VUfrtv(0x63),VUfrtv(0x64),VUfrtv(dhxqoa(0xa2)),VUfrtv(0x66),VUfrtv(0x67),VUfrtv(0x68),VUfrtv(0x69),VUfrtv(0x6a),'|N*s"7y<',VUfrtv(dhxqoa(0xae)),VUfrtv(dhxqoa(0xcf)),VUfrtv(0x6d),'#dS~jg$ri{/br047+DOe>;T,9FRd^hLD#zj>Q4E}|GGzxs;bM?$q]aH+/T?*qLiYF;ee#U,T<{Urw/vbE!K7*JDq;G[k`)EywkJB',VUfrtv(dhxqoa(0xaf)),VUfrtv(dhxqoa(0xb0)),VUfrtv(0x70),VUfrtv(dhxqoa(0xb1)),'|Q>j{fn@"+F*98C?W$.',VUfrtv(0x72),VUfrtv(0x73),VUfrtv(dhxqoa(0xdb)),VUfrtv(0x75),VUfrtv(dhxqoa(0x38)),dhxqoa(0x39),VUfrtv(0x18),VUfrtv(dhxqoa(0x42)),'mR>s#V/?s(,|a.',VUfrtv(0x77),VUfrtv(dhxqoa(0x3a)),VUfrtv(0x69),VUfrtv(0x44),VUfrtv(0x18),VUfrtv(0x78),'7|?ZuxG3u1#u+E',VUfrtv(0x57),VUfrtv(0x79),dhxqoa(0x39),'mR>s#V/?s(,|a.',VUfrtv(dhxqoa(0xb6)),VUfrtv(dhxqoa(0x3a)),VUfrtv(0x69),VUfrtv(dhxqoa(0x57)),'X|Or;9%/&=5MFYD',VUfrtv(0x7b),VUfrtv(0x57),VUfrtv(0x69),VUfrtv(0x44),VUfrtv(dhxqoa(0xb7)),dhxqoa(0x39),VUfrtv(0x7d),'q"#@w|M/K',VUfrtv(0x7e),VUfrtv(0x61),VUfrtv(0x7f),VUfrtv(0x80),VUfrtv(dhxqoa(0xb9)),VUfrtv
function Env(o,t){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((r,i)=>{s.call(this,t,(t,e,s)=>{t?i(t):r(e)})})}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.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))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(r=>{this.get({url:t},(t,e,s)=>r(s))})}runScript(a,o){return new Promise(r=>{let t=this.getdata("@chavy_boxjs_userCfgs.httpapi");t=t&&t.replace(/\n/g,"").trim();var e=(e=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"))?+e:20,[s,i]=(e=o&&o.timeout?o.timeout:e,t.split("@"));this.post({url:`http://${i}/v1/scripting/evaluate`,body:{script_text:a,mock_type:"cron",timeout:e},headers:{"X-Key":s,Accept:"*/*"},timeout:e},(t,e,s)=>r(s))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};this.fs=this.fs||require("fs"),this.path=this.path||require("path");var t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),r=!s&&this.fs.existsSync(e);if(!s&&!r)return{};r=s?t:e;try{return JSON.parse(this.fs.readFileSync(r))}catch(t){return{}}}writedata(){var t,e,s,r,i;this.isNode()&&(this.fs=this.fs||require("fs"),this.path=this.path||require("path"),t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),r=!(s=this.fs.existsSync(t))&&this.fs.existsSync(e),i=JSON.stringify(this.data),!s&&r?this.fs.writeFileSync(e,i):this.fs.writeFileSync(t,i))}lodash_get(t,e,s){let r=t;for(const t of e.replace(/\[(\d+)\]/g,".$1").split("."))if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,r,e){return Object(t)===t&&((r=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g)||[]).slice(0,-1).reduce((t,e,s)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(r[s+1])>>0==+r[s+1]?[]:{},t)[r[r.length-1]]=e),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){var[,s,r]=/^@(.*?)\.(.*?)$/.exec(t);if(s=s?this.getval(s):"")try{const t=JSON.parse(s);e=t?this.lodash_get(t,r,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){var[,r,i]=/^@(.*?)\.(.*?)$/.exec(e),a=this.getval(r),a=r?"null"===a?null:a||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,i,t),s=this.setval(JSON.stringify(e),r)}catch(e){this.lodash_set(a={},i,t),s=this.setval(JSON.stringify(a),r)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueF