KR/jd_wechat_openGroup.js

16 lines
51 KiB
JavaScript
Raw Permalink Normal View History

2023-07-27 16:14:01 +08:00
/*
微信红包团
活动我也不知道去哪里找有提供的联系
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#微信红包团
1 1 1 1 * jd_wechat_openGroup.js, tag=微信红包团, enabled=true
*/
const $ = new Env('微信红包团');
var version_='jsjiami.com.v7';const i1I1l=iii1II;(function(l11iIl,i11iIi,IIIIll,liiiii,II1I,lI1111,Ilil1){return l11iIl=l11iIl>>0x6,lI1111='hs',Ilil1='hs',function(IliII1,l1iIi1,i1I1I,llIil,llIii){const I1I1i1=iii1II;llIil='tfi',lI1111=llIil+lI1111,llIii='up',Ilil1+=llIii,lI1111=i1I1I(lI1111),Ilil1=i1I1I(Ilil1),i1I1I=0x0;const IIiiI1=IliII1();while(!![]&&--liiiii+l1iIi1){try{llIil=parseInt(I1I1i1(0x25c,'5#zl'))/0x1*(parseInt(I1I1i1(0x243,'AQ]y'))/0x2)+-parseInt(I1I1i1(0x244,'Q4DG'))/0x3+-parseInt(I1I1i1(0x274,'QCK)'))/0x4+-parseInt(I1I1i1(0x210,'S49j'))/0x5+parseInt(I1I1i1(0x215,'^0TP'))/0x6*(parseInt(I1I1i1(0x161,'T7B4'))/0x7)+-parseInt(I1I1i1(0x20a,'S%lf'))/0x8+parseInt(I1I1i1(0x2ce,'R&!x'))/0x9;}catch(IIIIi1){llIil=i1I1I;}finally{llIii=IIiiI1[lI1111]();if(l11iIl<=liiiii)i1I1I?II1I?llIil=llIii:II1I=llIii:i1I1I=llIii;else{if(i1I1I==II1I['replace'](/[wqULNAStIpOMxgEBlhby=]/g,'')){if(llIil===l1iIi1){IIiiI1['un'+lI1111](llIii);break;}IIiiI1[Ilil1](llIii);}}}}}(IIIIll,i11iIi,function(ii1IIl,ii1IIi,I1ll1l,I1ll1i,i11iII,lI1Ii1,i1I11){return ii1IIi='\x73\x70\x6c\x69\x74',ii1IIl=arguments[0x0],ii1IIl=ii1IIl[ii1IIi](''),I1ll1l='\x72\x65\x76\x65\x72\x73\x65',ii1IIl=ii1IIl[I1ll1l]('\x76'),I1ll1i='\x6a\x6f\x69\x6e',(0x13609f,ii1IIl[I1ll1i](''));});}(0x32c0,0x3fb50,Iii11l,0xcd),Iii11l)&&(version_=Iii11l);const liI1ii=$[i1I1l(0xd6,'2UQX')]()?require(i1I1l(0x2cc,'TXyl')):'',lIIiIl=$[i1I1l(0x10d,'HiBY')]()?require('./jdCookie.js'):'',iI1Iil=require(i1I1l(0x2a2,'CVG8')),il1iI=require('./function/krgetua'),i1iIii=process[i1I1l(0x1cd,'h0Q1')][i1I1l(0x205,'e7Wh')]?process[i1I1l(0x29f,'I7@J')][i1I1l(0x262,'[BDJ')]['split']('|'):'',i1iIil=process[i1I1l(0x2bb,'&SH5')][i1I1l(0x1ed,'QCK)')]?process[i1I1l(0xd4,'5#zl')][i1I1l(0x2c0,'8U$v')]['split']('&'):'';$[i1I1l(0x260,'PxC#')]=[];let liI1il=[],llIlIi='';if($['isNode']()){Object['keys'](lIIiIl)['forEach'](i1iIlI=>{const i1I1i=i1I1l;liI1il[i1I1i(0x27c,'EHPJ')](lIIiIl[i1iIlI]);});if(process['env'][i1I1l(0x115,'2UQX')]&&process[i1I1l(0xdc,'At3B')][i1I1l(0x2b9,'2T8Q')]===i1I1l(0x2a8,'n%Wk'))console[i1I1l(0x277,'e7Wh')]=()=>{};}else liI1il=[$[i1I1l(0x175,'CVG8')](i1I1l(0x229,'86ZJ')),$[i1I1l(0x2a7,'5qWm')](i1I1l(0xd7,'S%lf')),...lIIiII($[i1I1l(0x2c1,'UJbK')](i1I1l(0x1f9,'UJbK'))||'[]')['map'](li111=>li111[i1I1l(0x1dd,'86ZJ')])]['filter'](liI1lI=>!!liI1lI);let llIlIl='';function Iii11l(){const l1iIiI=(function(){return[version_,'yhljsBpjNUiawtmib.yhclLoILmS.Ov7MxyEAqgp==','feKA','W7FdIfRPMBxLKAdLJONLVAbP','W5/cVSoj','ggySW6Gk','kSoyW7lcQG','4P+8W4tOVQBNQAhMLyJMJiJOJydLJ6tLPldOTAuW6k6d6iEn6kgY5P+P5OMr5y+a55A75Rsw5yMSW5NdOSkUW5pcVmo1','rs9d','WOJcUSknta','WO82WPDwWQ0pBwmuW7utW49nWO4','oMbmawzSW6m','57Uk5P+S5PAo6zwcr8oI','4P2hvEI9UoERKEAxJoAnQUIpLUwoS+wLVUI0SW3OROJOH5BOOllMNjtMI7dLJztNLlRMTjNLIy/dG2NdNCk8W5Wp','WPpcRCo1WObbia','zNGbhq/dQ8ku','tc5s','5BYz5zMr6zwH6k2zjG','d25Ala','cqDvlSoP','W7hcSCoUdSo6WRJdGmot','W6C0rmouktSylq','scnqv8o6BstcRCosw8oGWPy','b0inW6i8','le0pdmkc','FCosdmox','W7KUtmou','iGdcK8olWRC','6lYH5yA75B675zIn5lIE6AcW5AAF6lEMW5y','WPhdPZ3dQMVdRI/dPCoS','WPLfWONcSGRcG8o3WP9uWRWiW5XnWR1WjIG','ESkiDSkD','jedcSSktWOL0','lWRcJbRcTa','jd7cRW3cMW','ts9kwW','hSkbh3/dIq','WQpcSZLzDW','5OcJ5P2Q55QO5B6j5OIm6igm55QR5BYk5Ase5PsS5lQY77625yE05y+s55UU5B6J5zoO','rdnd','WPtcU8oEWOT6k8oBWQ4','kWJcOmoAWO8re0D7mCowW6a','5yUv5yUq6zEe6k6aWRy','W7NcPZ7dV8kNo8owW44','bYvdWR8','W6pcTZRdTCk0pmoqW5C','hSoFWOXbWOFdRSk0BW','WOeblWhdIq','n3z8a3ngW6/dPKb5bNOoj2f3WQRdSh7dVNWzk8kjF8k3WRPR','W4OqWRtcK8o3','6lYA5yEn5BYy5zUk5lQV6Aou6zsr6k2/W5q','vw09W4LQWP9EW7y','ctPkrmomrqOMtCkFW50qWR87WPVcK8o4g8krC8kTWRldU8koWPBcGg/dPsHmcK1ygSoLcmoawCk0zmoarCkGWPNdTL3dO8oWWP3cNSk2W6jAWQ/dPMlcKGNdMSozWR8aWRNcLMtdTWddVmo1jmoOEZHihsDoWR7cOq','BhGgcG/dUmkq','pComW47cHJq5tG','6k6/5yUr6zUg5OAa5z21x8k/WPBcL8kT6l2C5ysK5Qgt5lYY5PAT5yEJ5A2NW53LU5NORPVPGl7OV67OHB3MNyxLJitOJ4tLJy4jg0utWQrI','WRtcRmo3WQXW','57Ma5PYE5PEt6zwox3i','q2iCw8ong0b7ySkaWPyeW7a3W53dLCkMhmkZD8oSWQJdR8koWOpcU03cRMeDqq4urCoUlSoawCkxC8oDECk0WOtcQYdcTCkLWOlcGSkHWPrpWP/dUgZdJa','WQHujdhdKqddR8owzSkoW7tdISol','pYtcSGtcHh9yWQTr','fhVcUSkAWOW','y8kQW5uGba','fCokWPzUWPZcSCo3mmo0CNJcR
// 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"])