jdpro/jd_opencard1209.js

7 lines
91 KiB
JavaScript
Raw Normal View History

2024-12-09 15:08:34 +00:00
/*
0 0 9 12 * jd_opencard1209.js
*/
const $ = new Env('12.9-12.16 潮冬特惠 尽显实惠');
var _0xodU='jsjiami.com.v7';const _0x541008=_0x379c;(function(_0x319949,_0x132dee,_0x544d13,_0x28cbe4,_0x2c2e5c,_0x1af77b,_0x5371ab){return _0x319949=_0x319949>>0x5,_0x1af77b='hs',_0x5371ab='hs',function(_0x2e0914,_0x4f0b3b,_0x43b105,_0x328a83,_0x3e943a){const _0x4138e2=_0x379c;_0x328a83='tfi',_0x1af77b=_0x328a83+_0x1af77b,_0x3e943a='up',_0x5371ab+=_0x3e943a,_0x1af77b=_0x43b105(_0x1af77b),_0x5371ab=_0x43b105(_0x5371ab),_0x43b105=0x0;const _0x572b6a=_0x2e0914();while(!![]&&--_0x28cbe4+_0x4f0b3b){try{_0x328a83=parseInt(_0x4138e2(0x323,'xxVl'))/0x1+parseInt(_0x4138e2(0x217,'$W!V'))/0x2*(-parseInt(_0x4138e2(0x3b0,'JUie'))/0x3)+parseInt(_0x4138e2(0x37b,'$B2T'))/0x4+-parseInt(_0x4138e2(0x2c3,'a6Z1'))/0x5*(-parseInt(_0x4138e2(0x160,'TekA'))/0x6)+-parseInt(_0x4138e2(0xb3,'(VQM'))/0x7*(-parseInt(_0x4138e2(0x198,'Ok8p'))/0x8)+-parseInt(_0x4138e2(0x347,'tB0o'))/0x9*(parseInt(_0x4138e2(0x124,'JUie'))/0xa)+parseInt(_0x4138e2(0x3d4,']5yP'))/0xb*(-parseInt(_0x4138e2(0x3f0,'JUie'))/0xc);}catch(_0x22291e){_0x328a83=_0x43b105;}finally{_0x3e943a=_0x572b6a[_0x1af77b]();if(_0x319949<=_0x28cbe4)_0x43b105?_0x2c2e5c?_0x328a83=_0x3e943a:_0x2c2e5c=_0x3e943a:_0x43b105=_0x3e943a;else{if(_0x43b105==_0x2c2e5c['replace'](/[WYhXRwbJPyQSnrGNpUK=]/g,'')){if(_0x328a83===_0x4f0b3b){_0x572b6a['un'+_0x1af77b](_0x3e943a);break;}_0x572b6a[_0x5371ab](_0x3e943a);}}}}}(_0x544d13,_0x132dee,function(_0x386e42,_0x24fad7,_0x39fa0a,_0x2661eb,_0x349758,_0x344250,_0x2c44d9){return _0x24fad7='\x73\x70\x6c\x69\x74',_0x386e42=arguments[0x0],_0x386e42=_0x386e42[_0x24fad7](''),_0x39fa0a=`\x72\x65\x76\x65\x72\x73\x65`,_0x386e42=_0x386e42[_0x39fa0a]('\x76'),_0x2661eb=`\x6a\x6f\x69\x6e`,(0x18f788,_0x386e42[_0x2661eb](''));});}(0x1780,0x4d0b7,_0x5b7f,0xbe),_0x5b7f)&&(_0xodU=_0x541008(0x1df,'5f6$'));const _0x539e94=$[_0x541008(0x31f,'8qKW')]()?require(_0x541008(0xd6,'oc)T')):'',_0x4a71c6=$[_0x541008(0x3a8,'G#1A')]()?require('./sendNotify'):'',_0x5bcb2b=require(_0x541008(0x148,'(VQM')),_0x496063=require(_0x541008(0x353,'5f6$')),_0x2e014e=require(_0x541008(0x38e,'ohXt'));if(process[_0x541008(0x249,'AoQs')]['DY_PROXY'])try{require('https-proxy-agent'),ccc=require(_0x541008(0x136,'*nYv')),$[_0x541008(0x361,'G#1A')]=ccc[_0x541008(0x140,'dcXv')]($[_0x541008(0x426,'$^6C')][_0x541008(0x207,'oc)T')]($)),$[_0x541008(0x1a8,'ZXY5')]=ccc[_0x541008(0x1a2,'1j*x')]($[_0x541008(0x39e,'&^oQ')][_0x541008(0x3ab,'pcO$')]($));}catch{$['log'](_0x541008(0x3a7,'HW]i')),$['dget']=$[_0x541008(0x337,'0J[9')],$[_0x541008(0x365,'Ok8p')]=$[_0x541008(0x3dd,'ZXY5')];}else $[_0x541008(0x102,'o51D')]=$[_0x541008(0xfa,'$B2T')],$[_0x541008(0x21c,'jJ#2')]=$[_0x541008(0x3ea,'TekA')];let _0x494e55=[],_0x18d5df='',_0x263a8e='',_0x49e1eb='',_0x1f62b0={},_0x559a10=0x0,_0x290791=/^-?\d+(\.\d+)?$/[_0x541008(0xb2,'pcO$')](process[_0x541008(0x345,'DvxB')]['opencard_draw'])?process['env']['opencard_draw']:'';;let _0x67b10b=process['env'][_0x541008(0xdb,'RO6z')]||'',_0x22c4b3=process['env'][_0x541008(0x2f9,'*0Js')+(__filename[_0x541008(0x3b7,'o51D')](/(\d+\w?).js/)?__filename['match'](/(\d+\w?).js/)[0x1]:'')+_0x541008(0x20d,'RO6z')]||'',_0x5b28fd=process[_0x541008(0x2a6,'oc)T')]['opencard_bshop']?process[_0x541008(0x2a6,'oc)T')]['opencard_bshop']:'',_0x3b65e9=process[_0x541008(0x364,']5yP')][_0x541008(0x236,'d@Ir')]?process[_0x541008(0x1f6,'JUie')][_0x541008(0x99,'o51D')]:'',_0x5f2ca1=_0x541008(0x311,'xsuJ'),_0x6c6d16=0x64,_0x154923=_0x541008(0x161,'Gmox');function _0x5b7f(){const _0x5b9970=(function(){return[...[_0xodU,'rNjNyhsypjUiWJanmib.YPcRQorSmG.vwKr7pGXy==','q185WQybWRubWQuz','fGNdHSo/wNBdHeVdV8k6WQFcKSkrWOVcJSkMkmoDsmkUWPGSWOhdICoaq8k8CSkSgg3cHa','W7yXimkrW5u','6iYI5y2kc8kHxUwNUoI3Uq','6i245y+EfZVdOowNUEI1SG','WPxcMCo5WQG','Bx3cTSoFW4WmWOBdVSkvW7TfBrJcRq','WRVcNKq','WODkkCoOW50','WO3dVvtdOmoiFNpdGs5Zir0tr8kcW44hW5tdM01/wSoQg8kirSoMW7hdJZz0Cxycrq','ysNdPqu','WPdcL8kPW77cJwSTcIFdRxm','A8oqWR9YWPu','W7G9lqldL8kDnCkq','cfZcJY3cLa','WQD6g14Vlq','sSokW4dcSSkZ','uLaPWQi','WQn6mG','W4tcO0dcKCkYy33dRhnoshC','F8ooW4rSWRT9','WQ4NWQldQSozW53dJY4vW44','lav6WRBcUCkt','D1iYWPOs','baZcRSkYuebzw8oKW5q','W4pcGa8','s8oMWR/dJW','WQ4NWQldU
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