jdpro/jd_dplh0820.js

12 lines
153 KiB
JavaScript
Raw Normal View History

2024-08-20 03:11:07 +00:00
/*
一次性手动执行
自行运行有水无水自测
第一个账号助力作者 其他依次助力CK1
注意第一个CK黑号会全部助力所填写的助力码
40 11 20 8 * jd_dplh0820.js
*/
const $ = new Env("大牌0820");
var _0xodH='jsjiami.com.v7';const _0x11c9e2=_0x446b;(function(_0x18cea9,_0x56e48b,_0x574875,_0x16bb04,_0x355419,_0x18ab5b,_0x493407){return _0x18cea9=_0x18cea9>>0x7,_0x18ab5b='hs',_0x493407='hs',function(_0x1c6051,_0x13e49e,_0x53379e,_0x2e8636,_0x49ca54){const _0x4dd939=_0x446b;_0x2e8636='tfi',_0x18ab5b=_0x2e8636+_0x18ab5b,_0x49ca54='up',_0x493407+=_0x49ca54,_0x18ab5b=_0x53379e(_0x18ab5b),_0x493407=_0x53379e(_0x493407),_0x53379e=0x0;const _0x591c58=_0x1c6051();while(!![]&&--_0x16bb04+_0x13e49e){try{_0x2e8636=parseInt(_0x4dd939(0x435,'&Y8A'))/0x1*(-parseInt(_0x4dd939(0x42c,'&Y8A'))/0x2)+parseInt(_0x4dd939(0x6fc,'4Ll6'))/0x3+-parseInt(_0x4dd939(0x740,'dZNJ'))/0x4+parseInt(_0x4dd939(0x2d3,'*9yG'))/0x5+-parseInt(_0x4dd939(0x506,'whl%'))/0x6*(-parseInt(_0x4dd939(0x601,'(u5g'))/0x7)+parseInt(_0x4dd939(0x1c8,'(mhk'))/0x8+parseInt(_0x4dd939(0x4da,'%BLO'))/0x9;}catch(_0x2e532c){_0x2e8636=_0x53379e;}finally{_0x49ca54=_0x591c58[_0x18ab5b]();if(_0x18cea9<=_0x16bb04)_0x53379e?_0x355419?_0x2e8636=_0x49ca54:_0x355419=_0x49ca54:_0x53379e=_0x49ca54;else{if(_0x53379e==_0x355419['replace'](/[pfAutYeRWnKkygBLSMrIxTN=]/g,'')){if(_0x2e8636===_0x13e49e){_0x591c58['un'+_0x18ab5b](_0x49ca54);break;}_0x591c58[_0x493407](_0x49ca54);}}}}}(_0x574875,_0x56e48b,function(_0x593215,_0x593e22,_0x2010e1,_0x526a62,_0x4b45a7,_0x1c66f1,_0x5c3d89){return _0x593e22='\x73\x70\x6c\x69\x74',_0x593215=arguments[0x0],_0x593215=_0x593215[_0x593e22](''),_0x2010e1=`\x72\x65\x76\x65\x72\x73\x65`,_0x593215=_0x593215[_0x2010e1]('\x76'),_0x526a62=`\x6a\x6f\x69\x6e`,(0x17ef9d,_0x593215[_0x526a62](''));});}(0x6200,0xc9048,_0x3b42,0xc6),_0x3b42)&&(_0xodH=_0x11c9e2(0x778,'G@kW'));const _0x21a42f=$[_0x11c9e2(0x43a,'4Ll6')]()?require(_0x11c9e2(0x469,'9UDi')):'',_0x429967=$[_0x11c9e2(0x63b,'I]#y')]()?require(_0x11c9e2(0x44a,'WOQ(')):'',_0x179453=require(_0x11c9e2(0x7cd,'(v$(')),_0x395d0f=require(_0x11c9e2(0x663,'ecD#')),_0x1f651f=require(_0x11c9e2(0x300,'*9yG')),_0x4dee66=require(_0x11c9e2(0x75e,'whl%'));let _0x48151f=[],_0x510bc6='',_0x8b7f78='',_0x45d84c='',_0x42f72c='3';if(process[_0x11c9e2(0x204,'d]#6')][_0x11c9e2(0x161,'**3R')]){const _0x3cb3ce=require(_0x11c9e2(0x3ef,'SkNb'));$[_0x11c9e2(0x27b,'WOQ(')]=_0x3cb3ce[_0x11c9e2(0x5f5,'QmT0')]($[_0x11c9e2(0x546,'$#VM')][_0x11c9e2(0x6fe,'d]#6')]($)),$[_0x11c9e2(0x795,'[$97')]=_0x3cb3ce[_0x11c9e2(0x5c3,'dZNJ')]($[_0x11c9e2(0x659,'r&Dy')][_0x11c9e2(0x751,'r&Dy')]($));}if($[_0x11c9e2(0x6ae,'&Td[')]()){Object[_0x11c9e2(0x59c,'I]#y')](_0x21a42f)[_0x11c9e2(0x5b3,'X$n4')](_0x25c4a=>{const _0x499a97=_0x11c9e2;_0x48151f[_0x499a97(0x23f,'r&Dy')](_0x21a42f[_0x25c4a]);});if(process[_0x11c9e2(0x72b,'X$n4')][_0x11c9e2(0x77b,'dZNJ')]&&process[_0x11c9e2(0x5e0,'KMzz')][_0x11c9e2(0x830,'$LSZ')]===_0x11c9e2(0x5e6,'(u5g'))console[_0x11c9e2(0x413,'vn&h')]=()=>{};}else _0x48151f=[$[_0x11c9e2(0x4c2,'$#VM')](_0x11c9e2(0x428,'OQqj')),$[_0x11c9e2(0x318,'(mhk')](_0x11c9e2(0x473,'9UDi')),...jsonfomat($[_0x11c9e2(0x421,'zx]K')](_0x11c9e2(0x6b0,'E94('))||'[]')[_0x11c9e2(0x759,'whl%')](_0x2e695c=>_0x2e695c[_0x11c9e2(0x2a5,'$xvV')])][_0x11c9e2(0x33e,'&Y8A')](_0x2552af=>!!_0x2552af);let _0x6a82e1=process[_0x11c9e2(0x1bb,'ecD#')][_0x11c9e2(0x119,'dZNJ')]||_0x11c9e2(0x513,'Oq%A'),_0x5a5e16=process[_0x11c9e2(0x832,'Oq%A')][_0x11c9e2(0x79f,'(mhk')]||_0x11c9e2(0x19f,'JoT8'),_0x38a3b4=_0x11c9e2(0x516,'4Ll6');$[_0x11c9e2(0x507,'yE*$')]=_0x11c9e2(0x799,'8fw@'),$[_0x11c9e2(0x464,'**3R')]=$[_0x11c9e2(0x271,'(u5g')][_0x11c9e2(0x77e,'$LSZ')](/oC[0-9a-z]+/)[0x0],$[_0x11c9e2(0x29a,'OQqj')]=$[_0x11c9e2(0x2ce,'()5W')][_0x11c9e2(0x3ed,'whl%')](/actId=([0-9a-f]+_\d+)/)[0x1],$[_0x11c9e2(0x5c6,'$xvV')]=_0x11c9e2(0x5ab,'%BLO'),$[_0x11c9e2(0x10e,'U1]d')]=_0x11c9e2(0x695,'Gdep'),$[_0x11c9e2(0x306,'**3R')]=![];let _0x1d0246=[_0x11c9e2(0x2c7,'%BLO')];$[_0x11c9e2(0x626,'JoT8')]=_0x1d0246[_0x139a56(0x0,_0x1d0246[_0x11c9e2(0x3d6,'%BLO')])],$[_0x11c9e2(0x7a3,'r&Dy')]=process[_0x11c9e2(0x136,'whl%')][_0x11c9e2(0x1e5,'()5W')]||'',$[_0x11c9e2(0x71d,'&Td[')]=![],!(async()=>{const _0x354db7=_0x11c9e2,_0x2b062b={'OMBhV':function(_0x56a596,_0x3e3ead){return _0x56a596!=_0x3e3ead;},'mMBlB':_0x354db7
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