jdpro/jd_dplh0815.js

12 lines
150 KiB
JavaScript
Raw Normal View History

2024-08-14 22:57:07 +00:00
/*
一次性手动执行
自行运行有水无水自测
第一个账号助力作者 其他依次助力CK1
注意第一个CK黑号会全部助力所填写的助力码
35 7 15 8 * jd_dplh0815.js
*/
const $ = new Env("大牌0815");
var _0xodr='jsjiami.com.v7';const _0x320605=_0x354e;(function(_0x3d3813,_0x14800e,_0x3bbfda,_0x171161,_0x7bbcd4,_0x2f3653,_0x19103f){return _0x3d3813=_0x3d3813>>0x6,_0x2f3653='hs',_0x19103f='hs',function(_0x140047,_0x165c25,_0x449ebb,_0x53ee68,_0x54938c){const _0x5eb02b=_0x354e;_0x53ee68='tfi',_0x2f3653=_0x53ee68+_0x2f3653,_0x54938c='up',_0x19103f+=_0x54938c,_0x2f3653=_0x449ebb(_0x2f3653),_0x19103f=_0x449ebb(_0x19103f),_0x449ebb=0x0;const _0x652262=_0x140047();while(!![]&&--_0x171161+_0x165c25){try{_0x53ee68=parseInt(_0x5eb02b(0x222,'vw@H'))/0x1+parseInt(_0x5eb02b(0x1c4,')[8o'))/0x2*(parseInt(_0x5eb02b(0x4a0,'%ZcI'))/0x3)+parseInt(_0x5eb02b(0x377,'[AaA'))/0x4+parseInt(_0x5eb02b(0x71c,'[AaA'))/0x5+parseInt(_0x5eb02b(0x6bb,'bp#B'))/0x6*(parseInt(_0x5eb02b(0x3db,'XX*5'))/0x7)+-parseInt(_0x5eb02b(0x89b,'!j*U'))/0x8+parseInt(_0x5eb02b(0x2bb,'*BGF'))/0x9*(-parseInt(_0x5eb02b(0x7d1,')[8o'))/0xa);}catch(_0x14310c){_0x53ee68=_0x449ebb;}finally{_0x54938c=_0x652262[_0x2f3653]();if(_0x3d3813<=_0x171161)_0x449ebb?_0x7bbcd4?_0x53ee68=_0x54938c:_0x7bbcd4=_0x54938c:_0x449ebb=_0x54938c;else{if(_0x449ebb==_0x7bbcd4['replace'](/[XSbJFKBIkdxLrqYNuU=]/g,'')){if(_0x53ee68===_0x165c25){_0x652262['un'+_0x2f3653](_0x54938c);break;}_0x652262[_0x19103f](_0x54938c);}}}}}(_0x3bbfda,_0x14800e,function(_0x2c3b06,_0x2887cb,_0xfe5989,_0x2df250,_0x57e316,_0x486643,_0x18f52d){return _0x2887cb='\x73\x70\x6c\x69\x74',_0x2c3b06=arguments[0x0],_0x2c3b06=_0x2c3b06[_0x2887cb](''),_0xfe5989=`\x72\x65\x76\x65\x72\x73\x65`,_0x2c3b06=_0x2c3b06[_0xfe5989]('\x76'),_0x2df250=`\x6a\x6f\x69\x6e`,(0x17e2bf,_0x2c3b06[_0x2df250](''));});}(0x30c0,0xef8f5,_0xb795,0xc5),_0xb795)&&(_0xodr=_0xb795);const _0x506ad1=$[_0x320605(0x221,'BvsV')]()?require(_0x320605(0x30a,'QKIY')):'',_0xe0b1cd=$[_0x320605(0x6b4,'Vy]]')]()?require(_0x320605(0x411,'X3tq')):'',_0x28f3c7=require(_0x320605(0x326,'dVss')),_0x5909bd=require(_0x320605(0x690,'Ig*P')),_0x3e00ce=require(_0x320605(0x694,'WB)@')),_0x15f689=require(_0x320605(0x347,'!j*U'));let _0x32d7e1=[],_0x3e9609='',_0x25b1fd='',_0xe08280='',_0x236b13='3';if(process[_0x320605(0x32a,'qR9]')][_0x320605(0x85a,'6lBk')]){const _0x58554e=require(_0x320605(0x3bf,'A%vd'));$[_0x320605(0x625,'d89F')]=_0x58554e[_0x320605(0x284,']*d@')]($[_0x320605(0x541,']*d@')][_0x320605(0x5d4,'#^MN')]($)),$[_0x320605(0x412,'@05m')]=_0x58554e[_0x320605(0x1ea,'*BGF')]($[_0x320605(0x4e4,'%O)o')][_0x320605(0x3a1,'6(m2')]($));}if($[_0x320605(0x562,'5bb7')]()){Object[_0x320605(0x36b,'L5Qn')](_0x506ad1)[_0x320605(0x6c7,'Zt)c')](_0x8b3d6=>{const _0xcec00e=_0x320605;_0x32d7e1[_0xcec00e(0x1a2,'rgru')](_0x506ad1[_0x8b3d6]);});if(process[_0x320605(0x8d3,'&kG$')][_0x320605(0x2b2,'*yN3')]&&process[_0x320605(0x786,'6lBk')][_0x320605(0x7d2,'rgru')]===_0x320605(0x504,'*yN3'))console[_0x320605(0x373,'@05m')]=()=>{};}else _0x32d7e1=[$[_0x320605(0x2c6,'vw@H')](_0x320605(0x4bc,'Vl$9')),$[_0x320605(0x627,'Vl$9')](_0x320605(0x4c6,'WB)@')),...jsonfomat($[_0x320605(0x6d6,'Dkmv')](_0x320605(0x892,'WB)@'))||'[]')[_0x320605(0x733,'Dkmv')](_0x55ef8f=>_0x55ef8f[_0x320605(0x4b9,'%ZcI')])][_0x320605(0x4b2,'f7hs')](_0x459676=>!!_0x459676);let _0x3d05a9=process[_0x320605(0x2e8,'Hw39')][_0x320605(0x6cb,'m#ij')]||_0x320605(0x1f2,'5bb7'),_0x59a621=process[_0x320605(0x8a1,'hfCU')][_0x320605(0x217,'qR9]')]||_0x320605(0x408,'m#ij'),_0x5badce=_0x320605(0x420,'bp#B');$[_0x320605(0x53a,']*d@')]=_0x320605(0x701,'rgru'),$[_0x320605(0x36a,'rgru')]=$[_0x320605(0x3af,'E109')][_0x320605(0x8ca,'XX*5')](/oC[0-9a-z]+/)[0x0],$[_0x320605(0x3e6,'E109')]=$[_0x320605(0x5cd,'hfCU')][_0x320605(0x247,'d89F')](/actId=([0-9a-f]+_\d+)/)[0x1],$[_0x320605(0x4c7,'qR9]')]=_0x320605(0x31a,'rgru'),$[_0x320605(0x3fe,'*yN3')]=_0x320605(0x62a,'dVss'),$[_0x320605(0x426,'rgru')]=![];let _0x42dec0=[_0x320605(0x8ad,'QKIY')];$[_0x320605(0x2fa,'QUJw')]=_0x42dec0[_0x520f2d(0x0,_0x42dec0[_0x320605(0x586,']*d@')])],$[_0x320605(0x864,'Nkfu')]=process[_0x320605(0x8d3,'&kG$')][_0x320605(0x83d,'d89F')]||'',$[_0x320605(0x558,'Zt)c')]=![],!(async()=>{const _0x4ba165=_0x320605,_0x2a0ce5={'oCoMA':function(_0x27ba59){return _0x27ba59();},'omJmk':function(_0
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