mirror of https://github.com/KingRan/KR.git
13 lines
27 KiB
JavaScript
13 lines
27 KiB
JavaScript
|
/*
|
||
|
国安抽奖
|
||
|
cron:31 12 17-19 8 *
|
||
|
============Quantumultx===============
|
||
|
[task_local]
|
||
|
#国安抽奖
|
||
|
31 12 17-19 8 * jd_gacj.js, tag=国安抽奖, enabled=true
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('国安抽奖');
|
||
|
var version_='jsjiami.com.v7';const IIIII1=iii1II;function Iii11l(){const il1iIi=(function(){return[version_,'dYjpIsBjeuiKdaJAmHFiC.ThcwoPmuhX.dYvM7GI==','W4RcI8o+za3dPvNcV8k+ymkJ','ja/dIIaaW63cHLBcLmosFW','bmokW4amgSk0W4xcTmky','WP4NjCklW7S','grDeAHupkCkA','oIG4hgZcNmo2W5i','wqBdPcWN','WQ8UWPT/Aa','WOfYW5rvrq','WP7cJY1v','W5HDya','EbhdVcWJjmk1Fe0','W6blyIVcHW','W6hdU8kuiq','WOq9m8khW60kyb/cHW','WQebWP81WOC','WReMAqbTfwlcLSo6nMO','WQr5W4WkWQ9KWR4','m1K1W4RdM8oABmo7W6bAW7RdOMvEhc3dT8k+WO7cPsNdJLpcSSoycweRWRG6lCkhW6hdNmo8ASkMW5RdMMqItI4','zCk7WPxcV8oWWR5sW7OZWQGXCq','WPRdMCoPzmkViCksW6pdJ2a/WP7cVSkjW50IW4VcTmk7WQKyWPzjhSkvW4VdGSkBWPXQkeq0W7tdKSoLygmkW7NcUSonWPDdWQtcMbWfoCogpfLJmmk4xdrxxmoMW559WQC6ASklgmohWOHDWQlcScpdVCoTpxi6W6HpW6tdNCo0hYhdI23dS23cNmonWPBcIxebbSomdSkQW73dQv3dNKqPAw7dHmozzGZcL3/cJmoIWQlcTmkkWQv6BY/dH0JcLmolAmoWB3RcGbFdPtj9W54Wlmofi8oqWOLVW67dNM/dLCoDW4ddKqvfjh3cOCk4WP3cVbyJW5imW6dcRrzMWPtdN8kJo10OgSkAWOVdPCkPWPJcQ0yXW4iyW6TAW49jWOa','W6dcMmk8WRnyWPhcImosWOiFbbqwiSoAj8kvo2xcP0tcL1rnW43cSSouWRtdISojW6mkW699WPRdGmodwCkcsdddKCouW6VdUMCWBdniW79xWR14WPL5W5TTWP3dQu0kWRtcUCo6wGOUCCo1cv/dIrTivmkGESoXvCogFSo4pCkMtLtcICoBrx/dOMFcSa3dRSkUWPn0WRSpWQ3cJCkAlCk2f0q3mMVcV2BdQ8knwCopq8kmwrfMWQDqWQ4it8oca8oJW40xmsWPW5/cOmotFSoDW5iyF8khW5pdUYBcKe/cQgW','5Aw96lwbdq','Bmofv8oRwa','WRdcMCkpWOrU','WRuDguG','W6lcKIbq','WPVcQ8kKWPHY','kG7cH8k6WRPlW5NLV47LPiJJGPBKUz/KURJOTjJLJ6W','jCoMW6NdSCk5','cmk9cK9l','E8o2WO8','EuVcSh9xW7e','aZq6','W5LrW4HTyM9DAhu','WRxcHmoRhCor','aXbWsra','W6SwWR3cUColcdiCpxe5W7C','sCkUWOXp','W73cMJNdS8oi','W6BdKmoZyCkLmmkXW4G','W6/cHYddSCoX','nmoNxmk3ka','WPNcRsJcHMtdL8kDfG','nfDR','WRhcJCk/W5VdTge','W7feDd3cGG','gmoJW7y','kCkjySo4q8kVWO4xtmocWQWs','W7OyW5FcUq','W64ZW5/cIq0','W7vJW7KS','wqFdRSoA','m2/cRmkMsL/cNCkmWQddIsNcPmo0ECkioSoMWOyfW7ZdIaKjBSo3W6jSFxBdSmoQWOpdNeKmACkIWQ3cJSknhmk/utVcKGVdIKVcKLWWW7VcHI0YpK4qWRzLlCo8sXLDW4FdVqewW7xdGmohgSkD','W6JcVHLBW7O','W59rqqRcVa','W4z5DCoAWRrAms3cKGdcUmoHFW','WQetWOW','WRZcKCkNWRnEWOBcLCosWP4','W7RcMZdcMhuZW6egAJ8','cCkgjhrS','pGfmEtiaemkwmCk5sq','rSkNf2BdO8omW7ddMdq','WQjQjG','AJ7dN8oaoa','WRVcP8k9W4WqW5Hc'].concat((function(){return['n8oJrmkI','WOXxW6hdUSk1wc4+','W7JdU8kqma','WPxdImkTe3C','jtD5yda','rxf3raJdL8kXWP3dRa0','pvz6','qX3dTmoC','vv7cKCoKsa','f8k9keVdQSowW6e','W6FcLZ3cL3u9W7Gk','cCoGWOToWQihWRybWP1UhfBdMq','WPWaWO9PFq','5As66lwaWQi','W4DABGVcUW','WPPQjmkkW4GWW6NdPW','WRCteW','r8k9m1hdSq','WRhcGCkqW4Ks','o8oJsCk1aSkxoa','aIG6','tmoiWO3cP3q','eHBcLmkHWQbqWOlcICkRW6ZcKCoX','xCkvWPi','W6f7pL0zih3cHa','gSk2dKZdHwpcNc/dU0z+AuG','W4JcRaBdUCoD','l0VcSSkXyq','6k6S5yUs6zUo5OA15z6aWQiSWQZdIeZOViJLH6NMOi3KV53MLiVLH4lLRkRcMUw4L+ITPoMbNUI8PUIeQ+AFU+wmGUIpKowoMdVcVJiOWQFdQG','s8kGWOy','W43dGx4','WOqvWOLQAZmycgNcSSkbW5NcPCo3W4ldOqBdVfTH','ouHLWOldUMPxWQ/cHNv8lG','WRJcLCk0W7/dJq','WQRcTfK0','kuZcRSkWCa','W6JdQmowr8kv','rCoTxG','WOddIeW','W6tcRI0','WRnkW5HVeYldVSktW7m/W4VdHmooWPmCjZy','DvZcLCog','WRWghv3dUwf7amkRW6LoWRhcVchdHxCe','p8oPwCk0','WRbxW4RdP8kFxa','WRFcTSou','WQVcTSoaW4e','W4T5h8kydW','WOKBWQTQqa','44kF5O2k56Ed44gv6k6y5yA+6i2+5y6A5lUt5lMy6lsx5y2n5lQZWPtdTSodW75gsCo855I05O+P5lYy55s6WQNdJvPLvNhNMO3KUBJKUiZNRz7LIj3OJ6JLJ54','kgdcM0v+W7pcSW','tXVdS8otaMLL','puP+W4pdPqDsWQ/dJq','WO8mWQ0NWRK','WRhcJmkKWPfm','tK3dJSo7W54aWP7cQW','W71UW5mXWOK','p0iVW58','nuqIW5hdPSkblSkX','C8o8rrqPqNRcGmojW6GoWPnS','WONcRZzmWPC','fSo/W7xdHq','WRlcO8oOWOpcGNNLTlFLPB7MLPjbWQ1H','W7DbjmkTW4S2W7u','WOdcK28dW48','W6ldGxBdU8k2zMldHM8','faTrEra','sSk8WOy'].concat((function(){return['WPJcMmoPWPZcGG','zSowEmkZqmoLWQOCfSoiWQug','x8ojW7lcPt4','e3qlW5pdKG','W77cNZFcIa','W7hdI8o+WORcQLyvacNcRCol','WOmdWPD/E30','bY8PhLhdH8k0WPJcPgiRyNNdOCozWQimW6iNWROfjHZdTarOWPFdJdBcGqZcVNhdH8oMdtNdMe/cSwj+wq','WRBcTMdcVeVdMmkdxSkCzvldV8kLja','v8oxWOFcH1y','WQhcLSkIW5NdS2m','W7xcLJPvW4tdTSo1WOxcHSoQ','yfNcJgnw','WRyeWRSJWPy','oCoOxSk+b8kg','tmkQWPHz','nCo1CCk+bmkknW','WRXrW5b5Da','W67cKdTAW6i','W73dV8kujqBcMmkDjriHqG','zCoAsZpcPW','5yYG5lU85OU85AAU','rr3dUG','5lUd5lMh6lw75y6z','kavvEq','W6RdQ8kgWOFdUSkddW8Fya','WQ0hWOONWRS','W7PJW7O','WRhcR18WW77cJSkvWO3dKLdcJCo3DahdKCoijmk8W5JcP8kBiI/cSKzNWQNdM8kXWPW4WPhcVeXMW7RcRSoqx
|
||
|
// prettier-ignore
|
||
|
function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);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((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}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.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.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)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(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"])
|