jdpro/jd_dplh1205.js

12 lines
134 KiB
JavaScript
Raw Normal View History

2024-12-04 23:14:35 +00:00
/*
一次性手动执行
自行运行有水无水自测
第一个账号助力作者 其他依次助力CK1
注意第一个CK黑号会全部助力所填写的助力码
35 7 5 12 * jd_dplh1205.js
*/
const $ = new Env("大牌1205");
function sK8MgR(){}var flZpUx6=Object['defineProperty'],GFvAzx,jmHLrLC,xwmFY44,LOeK_g,f7n8_z,VSzRbF,jUFRxdg,E3_z8Y2,LOGuu7G,BdEliO,gEZjwrA,NqscTB,hASirM,oeYmmiI,CCLleax,dW8kpN,h1zfDo,X2g_Ai,Dek_Fw,FUXAL39,j13i0eP,vdElAs;function yNFf2t(sK8MgR){return GFvAzx[sK8MgR>0xf2?sK8MgR-0x3a:sK8MgR+0x3]}GFvAzx=UJZvTp0();function OhYLX5(sK8MgR,flZpUx6){return jmHLrLC(sK8MgR,'length',{value:flZpUx6,configurable:!0x0})}sK8MgR(jmHLrLC=Object.defineProperty,xwmFY44=ahKfEB((sK8MgR,flZpUx6)=>{return flZpUx6(sK8MgR())},0x2)(ad2tt0,h5INaK));var phVvX_O=[],rVuBKC7=['mF)|N"Y+',dVVa9zv(0x0),dVVa9zv(yNFf2t(0x14)),'g<Wz(]|H',dVVa9zv(0x2),dVVa9zv(0x3),dVVa9zv(yNFf2t(0x1c)),dVVa9zv(0x5),dVVa9zv(0x6),dVVa9zv(0x7),dVVa9zv(yNFf2t(0x2b)),dVVa9zv(0x9),dVVa9zv(0xa),dVVa9zv(yNFf2t(0x19)),dVVa9zv(0xc),dVVa9zv(yNFf2t(0x29)),dVVa9zv(0xe),dVVa9zv(0xf),dVVa9zv(yNFf2t(0x33)),dVVa9zv(yNFf2t(0x34)),dVVa9zv(yNFf2t(0x35)),dVVa9zv(yNFf2t(0x36)),dVVa9zv(0x14),dVVa9zv(0x15),dVVa9zv(0x16),dVVa9zv(0x17),dVVa9zv(0x18),dVVa9zv(0x19),dVVa9zv(0x1a),dVVa9zv(0x1b),dVVa9zv(0x1c),dVVa9zv(0x1d),dVVa9zv(0x1e),dVVa9zv(0x15),dVVa9zv(0x1f),dVVa9zv(0x20),dVVa9zv(0x21),dVVa9zv(0x22),dVVa9zv(0x23),dVVa9zv(0x24),dVVa9zv(0x25),dVVa9zv(0x26),dVVa9zv(0x27),dVVa9zv(0x28),dVVa9zv(0x29),dVVa9zv(0x2a),dVVa9zv(yNFf2t(0x46)),dVVa9zv(0x2c),dVVa9zv(0x2d),dVVa9zv(0x2e),dVVa9zv(yNFf2t(0x3b)),dVVa9zv(0x30),dVVa9zv(0x31),dVVa9zv(0x32),dVVa9zv(0x33),dVVa9zv(0x34),dVVa9zv(yNFf2t(0x15)),dVVa9zv(0x36),dVVa9zv(yNFf2t(-0x2)),dVVa9zv(yNFf2t(0x3c)),dVVa9zv(yNFf2t(0x3d)),dVVa9zv(0x39),dVVa9zv(0x3a),'i^T|^Acm~t{kO}P32"=NF6ULwW_1|OM1)(#gmn2',dVVa9zv(yNFf2t(0x3)),dVVa9zv(yNFf2t(0xcf)),dVVa9zv(0x3d),dVVa9zv(0x3e),dVVa9zv(0x3f),dVVa9zv(yNFf2t(0xeb)),dVVa9zv(0x41),dVVa9zv(yNFf2t(0xe7)),dVVa9zv(0x43),'r/j7O=|5',dVVa9zv(0x44),dVVa9zv(0x45),dVVa9zv(0x46),dVVa9zv(0x47),dVVa9zv(0x48),dVVa9zv(0x49),'.|$s!',dVVa9zv(0x4a),dVVa9zv(0x4b),dVVa9zv(yNFf2t(0x48)),dVVa9zv(0x4d),dVVa9zv(yNFf2t(0x49)),dVVa9zv(0x4f),dVVa9zv(0x3c),'XOV<|=LRy8]T[','|Y&?pKA',dVVa9zv(0x50),dVVa9zv(0x51),dVVa9zv(0x52),dVVa9zv(0x53),dVVa9zv(0x54),dVVa9zv(yNFf2t(0x4b)),dVVa9zv(0x56),dVVa9zv(0x57),dVVa9zv(yNFf2t(0x26)),dVVa9zv(0x16),dVVa9zv(0x59),dVVa9zv(0x16),'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v(0x6f),dVVa9zv(yNFf2t(-0x1)),dVVa9zv(0x85),dVVa9zv(0x86),dVVa9zv(yNFf2t(0x5)),dVVa9zv(0x16),dVVa9zv(0x88),dVVa9zv(0x89),dVVa9zv(0x8a),dVVa9zv(0x8b),dVVa9zv(0x8c),dVVa9zv(0x6e),dVVa9zv(0x8d),dVVa9zv(0x8e),dVVa9zv(0x8d),dVVa9zv(0x8e),dVVa9zv(yNFf2t(0x16)),dVVa9zv(0x16),dVVa9zv(0x8f),dVVa9zv(0x90),dVVa9zv(0x5f),dVVa9zv(0x91),dVVa9zv(yNFf2t(-0x2)),dVVa9zv(0x92),dVVa9zv(0x93),dVVa9zv(0x16),dVVa9zv(yNFf2t(0x66)),dVVa9zv(0x95),dVVa9zv(0x96),dVVa9zv(0x97),'QbI?)^|]pN&#!j}vjvr?"&3,ar!#lVt<Pzu9V2/&C*[x/57k;<5s8Q9Je*6f*^WpY~"i',dVVa9zv(yNFf2t(0x24)),dVVa9zv(yNFf2t(0x67)),dVVa9zv(0x9a),dVVa9zv(0x9b),dVVa9zv(yNFf2t(0x6d)),dVVa9zv(0x9d),dVVa9zv(0x6c),dVVa9zv(0x9e),dVVa9zv(yNFf2t(0x68)),dVVa9zv(yNFf2t(0x69)),dVVa9zv(yNFf2t(0x4f)),dVVa9zv(0xa2),dVVa9zv(yNFf2t(0x0)),'QbI?)^|]pN&#!j}vjvr?"&3,ar!#iiqkkHbL~)%:ozQK
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