forked from mylovedonotcry/bienaoccc_hym
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ym_qiehuanghuzhu.js
30 lines (27 loc) · 46.9 KB
/
ym_qiehuanghuzhu.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
作者:临渊
日期:6-12
小程序:统一快乐星球
入口:活动->种番茄
功能:互助
抓包:api.xiaoyisz.com/qiehuang/ga/public/api/login 这个登录包里 body 部分的 全部
变量:tyhz='body@xxxx ' 多个账号用 @ 或者 换行 分割
定时两个小时一次
cron: 5 0/2 * * *
6-14 更新了AU获取方式,理论上不会过期了
6-18 更新了收取植物、种新的植物和推送加上昵称,方便辨认(可能)
6-22 修复了上报挑战失败、洒阳光失败,更新了种植进度(免得老有人说脚本坏了)
6-23 更新了助力、助力洒阳光
6-25 更新了冒险助力
6-26 修复了冒险助力的小bug,建议更改定时两个小时一次
8-11 更新了sign
*/
const $ = new Env('统一茄皇互助');
const notify = $.isNode() ? require('./sendNotify') : '';
const {log} = console;
const Notify = 1; //0为关闭通知,1为打开通知,默认为1
const debug = 0; //0为关闭调试,1为打开调试,默认为0
const help = 1; //0为关闭互助,1为打开互助,默认为0
//////////////////////
const _0x25fe=['http://api.xiaoyisz.com/qiehuang/ga/user/adventure/help?adventureId=','getTimezoneOffset','\x0a\x0a【debug】===============这是\x20获取植物详情\x20返回data==============','\x0a【debug】===============\x20这是\x20上报冒险\x20请求\x20url\x20===============','post','info','data','\x0a【debug】===============\x20这是\x20获取植物详情\x20请求\x20url\x20===============','[助力第','log','sendNotify','test','AU错误,可能是获取失败,请更换到环境变量或配置文件重试','http://api.xiaoyisz.com/qiehuang/ga/user/task/report?taskType=','\x20\x20\x0a————《','读取文件失败!','stringify','】:未填写变量\x20tyhz','get','个账号结果]','api.xiaoyisz.com','needSunshineNum','\x0aAU错误,可能是获取失败,请更换到环境变量或配置文件重试','debug','type','获取AU成功','冒险收取成功,获得:','indexOf','finally','\x0a【debug】===============\x20这是\x20开始冒险\x20请求\x20url\x20===============','tyau=\x22','http://api.xiaoyisz.com/qiehuang/ga/plant/info?userId=-1×tamp=','Mozilla/5.0\x20(Linux;\x20Android\x2010;\x20MI\x208\x20Build/QKQ1.190828.002;\x20wv)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Version/4.0\x20Chrome/86.0.4240.99\x20XWEB/3235\x20MMWEBSDK/20220204\x20Mobile\x20Safari/537.36\x20MMWEBID/6242\x20MicroMessenger/8.0.20.2080(0x28001435)\x20Process/appbrand0\x20WeChat/arm64\x20Weixin\x20NetType/WIFI\x20Language/zh_CN\x20ABI/arm64\x20miniProgram/wx532ecb3bdaaf92f9','endTime','\x0a去助力[','name','./sendNotify','done','random','获取信息失败,原因是:','adventureId','constructor','author','助力洒阳光失败,今日已达上限','冒险开始成功','\x0a\x20【','开花期','forEach','taskId','wait','http://api.xiaoyisz.com/qiehuang/ga/plant/giveSunshine?plantId=','push','\x0a【debug】===============\x20这是\x20互助冒险\x20请求\x20url\x20===============','距离冒险结束还有:','\x0a=========\x20开始【第\x20','http://api.xiaoyisz.com/qiehuang/ga/user/adventure/drawPrize?adventureId=','http://api.xiaoyisz.com/qiehuang/ga/user/info?userId=-1×tamp=','charCodeAt','toUpperCase',']番茄余额为:','助力洒阳光失败,原因是:','writeFile','compile','plantId','秒,大于十分钟,不进行等待','\x20\x0a=============================================\x0a','exception','去助力冒险失败,原因是:','^([^\x20]+(\x20+[^\x20]+)+)+[^\x20]}','getdata','apply','http://api.xiaoyisz.com/qiehuang/ga/user/task/list?timestamp=','{}.constructor(\x22return\x20this\x22)(\x20)','冒险已收取','&nonce=','&attachId=','tyhz','\x0a助力洒阳光成功','length','table','助力失败,原因是:','toFixed','console','\x0a去助力冒险成功','utf8','去助力冒险成功',']成功','code','parse','msg','message','助力失败,该用户被助力次数已达上限','结果期','\x0a【debug】===============\x20这是\x20获取信息\x20请求\x20url\x20===============','num','查询上一次冒险失败,原因是:','\x0a\x0a=============================================\x20\x20\x20\x20\x0a脚本执行\x20-\x20北京时间(UTC+8):','\x0a\x0a【debug】===============这是\x20互助冒险\x20返回data==============','application/json','toLocaleString','\x20个账号】=========\x0a','\x0a助力失败,该用户被助力次数已达上限','https://v1.jinrishici.com/all.json','\x0a\x0a【debug】===============这是\x20查询冒险\x20返回data==============','【debug】\x20这是你的第\x20','return\x20(function()\x20','\x0a【debug】===============\x20这是\x20互助洒阳光\x20请求\x20url\x20===============','查询成功,账号[','split','return\x20/\x22\x20+\x20this\x20+\x20\x22/','发育期','fromCharCode','error','http://api.xiaoyisz.com/qiehuang/ga/user/adventure/start?timestamp=','readFile','距离冒险结束小于十分钟,等待','\x0a去助力冒险失败','stage','warn','env','当前无可收取的冒险','substr','/ql/data/config/config.sh','trace','round','infos','\x0a\x0a【debug】===============这是\x20获取任务\x20返回data==============','isNode','个账号去助力结果】','【开始冒险】','\x0a\x0a【debug】===============这是\x20互助洒阳光\x20返回data==============','\x0a===================\x20共找到\x20','gaGiftPackageVo','\x0a助力洒阳光失败,原因是:','&signature=','\x0a\x0a【debug】===============这是\x20上报冒险\x20返回data==============','replace',',进度:','×tamp=','http://api.xiaoyisz.com/qiehuang/ga/public/api/login','\x0a【debug】===============\x20这是\x20获取AU\x20请求\x20url\x20===============','\x0a[助力第','tomatoNum','charAt','\x20个账号数组:\x0a\x20','秒后收取冒险奖励','\x0a\x0a【debug】===============这是\x20互助\x20返回data==============','\x0a【debug】===============\x20这是\x20查询冒险\x20请求\x20url\x20===============','&taskId=','nickName','QWERTYUIOPASDFGHJKLZXCVBNM1234567890','status','\x0a【第','【debug】\x20这是你的全部账号数组:\x0a\x20'];(function(_0x137498,_0x25fed3){const _0x44ee74=function(_0x2feddb){while(--_0x2feddb){_0x137498['push'](_0x137498['shift']());}};const _0x7ef363=function(){const _0x17e7d5={'data':{'key':'cookie','value':'timeout'},'setCookie':function(_0x37273e,_0x3f32de,_0x775861,_0xae7bb5){_0xae7bb5=_0xae7bb5||{};let _0x218bc7=_0x3f32de+'='+_0x775861;let _0x2d62c9=0x0;for(let _0x35b6e5=0x0,_0x112ad0=_0x37273e['length'];_0x35b6e5<_0x112ad0;_0x35b6e5++){const _0x2f3b41=_0x37273e[_0x35b6e5];_0x218bc7+=';\x20'+_0x2f3b41;const _0x5a88b=_0x37273e[_0x2f3b41];_0x37273e['push'](_0x5a88b);_0x112ad0=_0x37273e['length'];if(_0x5a88b!==!![]){_0x218bc7+='='+_0x5a88b;}}_0xae7bb5['cookie']=_0x218bc7;},'removeCookie':function(){return'dev';},'getCookie':function(_0x4150a6,_0x29d8cf){_0x4150a6=_0x4150a6||function(_0x23cd4e){return _0x23cd4e;};const _0x10cee6=_0x4150a6(new RegExp('(?:^|;\x20)'+_0x29d8cf['replace'](/([.$?*|{}()[]\/+^])/g,'$1')+'=([^;]*)'));const _0xbb853=function(_0x2e64c5,_0x37f904){_0x2e64c5(++_0x37f904);};_0xbb853(_0x44ee74,_0x25fed3);return _0x10cee6?decodeURIComponent(_0x10cee6[0x1]):undefined;}};const _0x32e884=function(){const _0x59552d=new RegExp('\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*[\x27|\x22].+[\x27|\x22];?\x20*}');return _0x59552d['test'](_0x17e7d5['removeCookie']['toString']());};_0x17e7d5['updateCookie']=_0x32e884;let _0x514769='';const _0x4ab055=_0x17e7d5['updateCookie']();if(!_0x4ab055){_0x17e7d5['setCookie'](['*'],'counter',0x1);}else if(_0x4ab055){_0x514769=_0x17e7d5['getCookie'](null,'counter');}else{_0x17e7d5['removeCookie']();}};_0x7ef363();}(_0x25fe,0xb5));const _0x44ee=function(_0x137498,_0x25fed3){_0x137498=_0x137498-0x0;let _0x44ee74=_0x25fe[_0x137498];return _0x44ee74;};const _0x37273e=function(){let _0x2d85c4=!![];return function(_0x22604c,_0x49c534){const _0x2943ee=_0x2d85c4?function(){if(_0x49c534){const _0x503c67=_0x49c534[_0x44ee('0x2b')](_0x22604c,arguments);_0x49c534=null;return _0x503c67;}}:function(){};_0x2d85c4=![];return _0x2943ee;};}();const _0x4ab055=_0x37273e(this,function(){const _0x580161=function(){const _0x5f2596=_0x580161[_0x44ee('0xe')](_0x44ee('0x52'))()[_0x44ee('0x23')](_0x44ee('0x29'));return!_0x5f2596[_0x44ee('0x8a')](_0x4ab055);};return _0x580161();});_0x4ab055();const _0x17e7d5=function(){let _0x189f45=!![];return function(_0x5184ea,_0x3f7ba3){const _0x1df379=_0x189f45?function(){if(_0x3f7ba3){const _0x37da53=_0x3f7ba3[_0x44ee('0x2b')](_0x5184ea,arguments);_0x3f7ba3=null;return _0x37da53;}}:function(){};_0x189f45=![];return _0x1df379;};}();const _0x2feddb=_0x17e7d5(this,function(){const _0x354759=function(){};let _0x466920;try{const _0x58b540=Function(_0x44ee('0x4e')+_0x44ee('0x2d')+');');_0x466920=_0x58b540();}catch(_0x501cf2){_0x466920=window;}if(!_0x466920[_0x44ee('0x37')]){_0x466920[_0x44ee('0x37')]=function(_0x518042){const _0x399e7f={};_0x399e7f[_0x44ee('0x88')]=_0x518042;_0x399e7f[_0x44ee('0x5b')]=_0x518042;_0x399e7f[_0x44ee('0x96')]=_0x518042;_0x399e7f[_0x44ee('0x84')]=_0x518042;_0x399e7f[_0x44ee('0x55')]=_0x518042;_0x399e7f['exception']=_0x518042;_0x399e7f[_0x44ee('0x34')]=_0x518042;_0x399e7f[_0x44ee('0x60')]=_0x518042;return _0x399e7f;}(_0x354759);}else{_0x466920[_0x44ee('0x37')]['log']=_0x354759;_0x466920[_0x44ee('0x37')][_0x44ee('0x5b')]=_0x354759;_0x466920[_0x44ee('0x37')]['debug']=_0x354759;_0x466920[_0x44ee('0x37')][_0x44ee('0x84')]=_0x354759;_0x466920[_0x44ee('0x37')][_0x44ee('0x55')]=_0x354759;_0x466920['console'][_0x44ee('0x27')]=_0x354759;_0x466920['console']['table']=_0x354759;_0x466920[_0x44ee('0x37')][_0x44ee('0x60')]=_0x354759;}});_0x2feddb();let tyau='';let tyhz=($[_0x44ee('0x64')]()?process[_0x44ee('0x5c')][_0x44ee('0x31')]:$[_0x44ee('0x2a')](_0x44ee('0x31')))||'';let tyhzArr=[];let newAuArr=[];let tyPlantId='';let plantIdArr=[];let auback=0x0;let data='';let msg='';let taskType=0x0;let taskTypeArr=[];let taskId='';let taskIdArr=[];let challengeId='';let adventureId='';let name='';let id='';let idArr=[];let progress=0x0;let plantStage=0x0;let plantStatus='';let helpTaskId='';let helpTaskIdArr=[];let giveSunshineBack=0x0;let helpAdventureIdArr=[];let doHelpAdventureBack=0x0;let timestamp='';let nonce='';let signature='';!(async()=>{if(!await Envs())return;else{log(_0x44ee('0x45')+new Date(new Date()['getTime']()+new Date()[_0x44ee('0x80')]()*0x3c*0x3e8+0x8*0x3c*0x3c*0x3e8)[_0x44ee('0x48')]()+_0x44ee('0x26'));await poem();log(_0x44ee('0x68')+tyhzArr[_0x44ee('0x33')]+'\x20个账号\x20===================');if(debug){log(_0x44ee('0x7e')+tyhzArr);}for(let _0x4acad9=0x0;_0x4acad9<tyhzArr[_0x44ee('0x33')];_0x4acad9++){tyhz=tyhzArr[_0x4acad9];let _0x5f3251=_0x4acad9+0x1;log(_0x44ee('0x1b')+_0x5f3251+_0x44ee('0x49'));if(debug){log(_0x44ee('0x4d')+_0x5f3251+_0x44ee('0x75')+tyhz);}log('【开始获取AU】');await refreshAu();await $[_0x44ee('0x16')](0x2*0x3e8);await queryAdventure();await $['wait'](0xa*0x3e8);await getTask();await $[_0x44ee('0x16')](0x2*0x3e8);await getPlant(_0x4acad9);await $[_0x44ee('0x16')](0x2*0x3e8);await getUserInfo();await $['wait'](0x2*0x3e8);newAuArr[_0x4acad9]=tyau;helpTaskIdArr[_0x4acad9]=helpTaskId;idArr[_0x4acad9]=id;plantIdArr[_0x4acad9]=tyPlantId;helpAdventureIdArr[_0x4acad9]=adventureId;}if(help){log('【开始互助】');for(let _0x5d3cae=0x0;_0x5d3cae<tyhzArr[_0x44ee('0x33')];_0x5d3cae++){msg+=_0x44ee('0x7d')+(_0x5d3cae+0x1)+_0x44ee('0x65');log('【第'+(_0x5d3cae+0x1)+_0x44ee('0x65'));for(num2=0x0;num2<tyhzArr[_0x44ee('0x33')];num2++){if(_0x5d3cae!=num2){msg+=_0x44ee('0x72')+(num2+0x1)+_0x44ee('0x92');log(_0x44ee('0x87')+(num2+0x1)+_0x44ee('0x92'));await doHelp(_0x5d3cae,num2);await $[_0x44ee('0x16')](0x2*0x3e8);await doHelpGiveSunshine(_0x5d3cae,num2);await $['wait'](0x2*0x3e8);await doHelpAdventure(_0x5d3cae,num2);await $[_0x44ee('0x16')](0x2*0x3e8);}}log('');msg+='\x0a';}for(let _0x1ab0bb=0x0;_0x1ab0bb<tyhzArr[_0x44ee('0x33')];_0x1ab0bb++){log(_0x44ee('0x66'));await startAdventure(_0x1ab0bb);await $[_0x44ee('0x16')](0x2*0x3e8);}}await SendMsg(msg);}})()['catch'](_0x3c5d4c=>log(_0x3c5d4c))[_0x44ee('0x1')](()=>$[_0x44ee('0xa')]());function refreshAu(_0x4e14ef){let _0x3cffca={'url':_0x44ee('0x70'),'headers':{'Host':'api.xiaoyisz.com','user-agent':'Mozilla/5.0\x20(Linux;\x20Android\x2010;\x20MI\x208\x20Build/QKQ1.190828.002;\x20wv)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Version/4.0\x20Chrome/86.0.4240.99\x20XWEB/3235\x20MMWEBSDK/20220204\x20Mobile\x20Safari/537.36\x20MMWEBID/6242\x20MicroMessenger/8.0.20.2080(0x28001435)\x20Process/appbrand0\x20WeChat/arm64\x20Weixin\x20NetType/WIFI\x20Language/zh_CN\x20ABI/arm64\x20miniProgram/wx532ecb3bdaaf92f9','Content-Type':_0x44ee('0x47')},'body':''+tyhz};return new Promise(_0x5db014=>{if(debug){log(_0x44ee('0x71'));log(JSON[_0x44ee('0x8f')](_0x3cffca));}$[_0x44ee('0x83')](_0x3cffca,async(_0x33a20b,_0x4e31e6,_0x20219c)=>{try{if(debug){log('\x0a\x0a【debug】===============这是\x20获取AU\x20返回data==============');log(_0x20219c);}let _0x4ab127=JSON['parse'](_0x20219c);if(_0x4ab127[_0x44ee('0x3c')]==0x0){log(_0x44ee('0x98'));tyau=_0x4ab127[_0x44ee('0x85')];}else if(_0x4ab127[_0x44ee('0x3c')]==0x1f4){log('获取AU失败,请检查你的变量是否正确,如正确更换到环境变量或者配置文件重试');auback=0x1;}else{log('获取AU失败,原因是:'+_0x4ab127[_0x44ee('0x3f')]);}}catch(_0x1a8a9a){log(_0x1a8a9a);}finally{_0x5db014();}});});}function getTask(_0xb78e10=0x2*0x3e8){timestamp=timestampMs();nonce=randomString(0x10);signature=getSign(nonce,timestamp);let _0x4aff6b={'url':_0x44ee('0x2c')+timestamp+_0x44ee('0x2f')+nonce+_0x44ee('0x6b')+signature,'headers':{'Host':_0x44ee('0x93'),'authorization':''+tyau,'user-agent':_0x44ee('0x5'),'content-type':_0x44ee('0x47')}};return new Promise(_0x3f6b6f=>{if(debug){log('\x0a【debug】===============\x20这是\x20获取任务\x20请求\x20url\x20===============');log(JSON[_0x44ee('0x8f')](_0x4aff6b));}$[_0x44ee('0x91')](_0x4aff6b,async(_0x41a924,_0x3d71d0,_0x5941a9)=>{try{if(debug){log(_0x44ee('0x63'));log(_0x5941a9);}let _0x23161c=JSON[_0x44ee('0x3d')](_0x5941a9);let _0x16086c=eval(_0x23161c);if(_0x23161c[_0x44ee('0x3c')]==0x385||_0x23161c['code']==0x386||_0x23161c[_0x44ee('0x3c')]==0x387){auback=0x1;log(_0x44ee('0x8b'));msg+=_0x44ee('0x95');}if(auback!=0x1&&_0x23161c['code']==0x0){for(let _0xef142b=0x0;_0xef142b<0xa;_0xef142b++){if(_0xef142b==0x0){helpTaskId=_0x16086c[_0x44ee('0x85')][_0xef142b][_0x44ee('0x15')];}taskType=_0x16086c[_0x44ee('0x85')][_0xef142b]['taskType'];taskTypeArr[_0xef142b]=taskType;taskId=_0x16086c[_0x44ee('0x85')][_0xef142b][_0x44ee('0x15')];taskIdArr[_0xef142b]=taskId;}}}catch(_0x31f957){log(_0x31f957);}finally{_0x3f6b6f();}},_0xb78e10);});}function getPlant(_0x3aa1c3){timestamp=timestampMs();nonce=randomString(0x10);signature=getSign(nonce,timestamp);let _0x509d65={'url':_0x44ee('0x4')+timestamp+'&nonce='+nonce+_0x44ee('0x6b')+signature,'headers':{'Host':'api.xiaoyisz.com','authorization':''+tyau,'user-agent':_0x44ee('0x5'),'content-type':_0x44ee('0x47')}};return new Promise(_0x35c888=>{if(debug){log(_0x44ee('0x86'));log(JSON[_0x44ee('0x8f')](_0x509d65));}$['get'](_0x509d65,async(_0x30def1,_0x3f7c2f,_0x5d43c3)=>{try{if(debug){log(_0x44ee('0x81'));log(_0x5d43c3);}let _0x2effc9=JSON[_0x44ee('0x3d')](_0x5d43c3);let _0xc3a487=eval(_0x2effc9);if(_0x2effc9[_0x44ee('0x3c')]==0x0){tyPlantId=_0x2effc9[_0x44ee('0x85')][_0x44ee('0x24')];progress=+_0x2effc9[_0x44ee('0x85')]['currentSunshineNum']/_0x2effc9[_0x44ee('0x85')][_0x44ee('0x94')];progress=progress*0x64;progress=progress[_0x44ee('0x36')](0x2);plantStage=+_0x2effc9[_0x44ee('0x85')][_0x44ee('0x5a')];}else log('获取植物详情失败');}catch(_0x36198c){log(_0x36198c);}finally{_0x35c888();}});});}function getTomato(_0x19ae45=0x2*0x3e8){timestamp=timestampMs();nonce=randomString(0x10);signature=getSign(nonce,timestamp);let _0x409c43={'url':_0x44ee('0x1d')+timestamp+_0x44ee('0x2f')+nonce+_0x44ee('0x6b')+signature,'headers':{'Host':'api.xiaoyisz.com','authorization':''+tyau,'user-agent':_0x44ee('0x5'),'Content-Type':_0x44ee('0x47')}};return new Promise(_0xab7e5e=>{if(debug){log('\x0a【debug】===============\x20这是\x20查询番茄余额\x20请求\x20url\x20===============');log(JSON[_0x44ee('0x8f')](_0x409c43));}$[_0x44ee('0x91')](_0x409c43,async(_0x3ebe2d,_0x350b1e,_0x3be8f7)=>{try{if(debug){log('\x0a\x0a【debug】===============这是\x20查询番茄余额\x20返回data==============');log(_0x3be8f7);}let _0xf1cbcc=JSON[_0x44ee('0x3d')](_0x3be8f7);let _0x385280=eval(_0xf1cbcc[_0x44ee('0x85')]);if(_0xf1cbcc[_0x44ee('0x3c')]==0x0){if(plantStage==0x0){plantStatus=_0x44ee('0x53');}else if(plantStage==0x1){plantStatus='幼苗期';}else if(plantStage==0x2){plantStatus=_0x44ee('0x13');}else if(plantStage==0x3){plantStatus=_0x44ee('0x41');}log(_0x44ee('0x50')+name+_0x44ee('0x20')+_0x385280[_0x44ee('0x73')]+',植物状态为:'+plantStatus+_0x44ee('0x6e')+progress+'%');}}catch(_0x826d00){log(_0x826d00);}finally{_0xab7e5e();}},_0x19ae45);});}function getUserInfo(_0x1b535f=0x2*0x3e8){timestamp=timestampMs();nonce=randomString(0x10);signature=getSign(nonce,timestamp);let _0x58273f={'url':_0x44ee('0x1d')+timestamp+_0x44ee('0x2f')+nonce+_0x44ee('0x6b')+signature,'headers':{'Host':_0x44ee('0x93'),'authorization':''+tyau,'user-agent':_0x44ee('0x5'),'Content-Type':_0x44ee('0x47')}};return new Promise(_0x354d83=>{if(debug){log(_0x44ee('0x42'));log(JSON['stringify'](_0x58273f));}$[_0x44ee('0x91')](_0x58273f,async(_0x4eb30e,_0x49933c,_0x513334)=>{try{if(debug){log('\x0a\x0a【debug】===============这是\x20获取信息\x20返回data==============');log(_0x513334);}let _0x415fe7=JSON[_0x44ee('0x3d')](_0x513334);let _0x1ac953=eval(_0x415fe7[_0x44ee('0x85')]);if(_0x415fe7[_0x44ee('0x3c')]==0x0){name=_0x1ac953[_0x44ee('0x7a')];id=_0x1ac953['id'];await $['wait'](0x2*0x3e8);getTomato();}else log(_0x44ee('0xc')+_0x415fe7[_0x44ee('0x3f')]);}catch(_0x540264){log(_0x540264);}finally{_0x354d83();}},_0x1b535f);});}function doHelp(_0x539a50,_0x18aef7){timestamp=timestampMs();nonce=randomString(0x10);signature=getSign(nonce,timestamp);let _0x2e035d={'url':_0x44ee('0x8c')+taskTypeArr[0x0]+_0x44ee('0x30')+idArr[_0x18aef7]+_0x44ee('0x79')+helpTaskIdArr[_0x539a50]+'×tamp='+timestamp+_0x44ee('0x2f')+nonce+'&signature='+signature,'headers':{'Host':_0x44ee('0x93'),'authorization':''+newAuArr[_0x539a50],'user-agent':_0x44ee('0x5'),'content-type':_0x44ee('0x47')}};return new Promise(_0x3a043f=>{if(debug){log('\x0a【debug】===============\x20这是\x20互助\x20请求\x20url\x20===============');log(JSON[_0x44ee('0x8f')](_0x2e035d));}$['get'](_0x2e035d,async(_0xd12862,_0x873103,_0x339c49)=>{try{if(debug){log(_0x44ee('0x77'));log(_0x339c49);}let _0x5504e6=JSON['parse'](_0x339c49);if(_0x5504e6[_0x44ee('0x85')][_0x44ee('0x7c')]==0x1){log('去助力['+_0x5504e6['data'][_0x44ee('0x7a')]+_0x44ee('0x3b'));msg+=_0x44ee('0x7')+_0x5504e6[_0x44ee('0x85')][_0x44ee('0x7a')]+']成功';}else if(_0x5504e6[_0x44ee('0x85')][_0x44ee('0x7c')]==0x3){log('助力失败,可能是已助力过');msg+='\x0a助力失败,可能是已助力过';}else if(_0x5504e6[_0x44ee('0x85')]['status']==0x2){log(_0x44ee('0x40'));msg+=_0x44ee('0x4a');}else{log(_0x44ee('0x35')+_0x5504e6[_0x44ee('0x3f')]);msg+='\x0a助力失败,原因是:'+_0x5504e6['message'];}}catch(_0x24e40c){log(_0x24e40c);}finally{_0x3a043f();}});});}function doHelpGiveSunshine(_0x29f0b3,_0x5b0e11){timestamp=timestampMs();nonce=randomString(0x10);signature=getSign(nonce,timestamp);let _0x5d47d9={'url':_0x44ee('0x17')+plantIdArr[_0x5b0e11]+_0x44ee('0x6f')+timestamp+_0x44ee('0x2f')+nonce+_0x44ee('0x6b')+signature,'headers':{'Host':'api.xiaoyisz.com','authorization':''+newAuArr[_0x29f0b3],'user-agent':_0x44ee('0x5'),'content-type':_0x44ee('0x47')}};return new Promise(_0x368ecb=>{if(debug){log(_0x44ee('0x4f'));log(JSON[_0x44ee('0x8f')](_0x5d47d9));}$[_0x44ee('0x91')](_0x5d47d9,async(_0x5d58c1,_0x48ed6c,_0xa779fc)=>{try{if(debug){log(_0x44ee('0x67'));log(_0xa779fc);}let _0x3673d8=JSON['parse'](_0xa779fc);if(_0x3673d8[_0x44ee('0x3c')]==0x0){log('助力洒阳光成功');msg+=_0x44ee('0x32');}else if(_0x3673d8[_0x44ee('0x3c')]==0x3e8){log(_0x44ee('0x10'));msg+='\x0a助力洒阳光失败,今日已达上限';}else{log(_0x44ee('0x21')+_0x3673d8[_0x44ee('0x3f')]);msg+=_0x44ee('0x6a')+_0x3673d8['message'];}}catch(_0x8e8992){log(_0x8e8992);}finally{_0x368ecb();}});});}function doHelpAdventure(_0x4c0021,_0x206499){timestamp=timestampMs();nonce=randomString(0x10);signature=getSign(nonce,timestamp);let _0x204ec9={'url':_0x44ee('0x7f')+helpAdventureIdArr[_0x206499]+_0x44ee('0x6f')+timestamp+_0x44ee('0x2f')+nonce+_0x44ee('0x6b')+signature,'headers':{'Host':_0x44ee('0x93'),'authorization':''+newAuArr[_0x4c0021],'user-agent':_0x44ee('0x5'),'content-type':'application/json'}};return new Promise(_0x2e2d37=>{if(debug){log(_0x44ee('0x19'));log(JSON['stringify'](_0x204ec9));}$[_0x44ee('0x91')](_0x204ec9,async(_0x2d185f,_0x35cc12,_0x1bf693)=>{try{if(debug){log(_0x44ee('0x46'));log(_0x1bf693);}let _0x1ff2dd=eval('('+_0x1bf693+')');let _0x5e8cbf=_0x1ff2dd['data'];if(_0x1ff2dd[_0x44ee('0x3c')]==0x0){log(_0x44ee('0x3a'));msg+=_0x44ee('0x38');}else if(_0x1ff2dd['code']==0x3e8){log('去助力冒险失败');msg+=_0x44ee('0x59');}else{log(_0x44ee('0x28')+_0x1ff2dd[_0x44ee('0x3f')]);msg+='\x0a去助力冒险失败,原因是:'+_0x1ff2dd[_0x44ee('0x3f')];}}catch(_0x30cb21){log(_0x30cb21);}finally{_0x2e2d37();}});});}function queryAdventure(_0x4db780=0x2*0x3e8){timestamp=timestampMs();nonce=randomString(0x10);signature=getSign(nonce,timestamp);let _0x56f3af={'url':'http://api.xiaoyisz.com/qiehuang/ga/user/adventure/info?userId=-1&type=2×tamp='+timestamp+_0x44ee('0x2f')+nonce+_0x44ee('0x6b')+signature,'headers':{'Host':_0x44ee('0x93'),'authorization':''+tyau,'user-agent':_0x44ee('0x5'),'content-type':_0x44ee('0x47')}};return new Promise(_0x5ae86e=>{if(debug){log(_0x44ee('0x78'));log(JSON[_0x44ee('0x8f')](_0x56f3af));}$[_0x44ee('0x91')](_0x56f3af,async(_0x2d7241,_0x25a474,_0x51ca32)=>{try{if(debug){log(_0x44ee('0x4c'));log(_0x51ca32);}let _0x6c6233=JSON['parse'](_0x51ca32);if(_0x6c6233[_0x44ee('0x3c')]==0x388){refreshAu();}if(_0x6c6233[_0x44ee('0x3c')]==0x0){adventureId=_0x6c6233[_0x44ee('0x85')][_0x44ee('0xd')];if(_0x6c6233['data']['endTime']!=null&×tampS()>=_0x6c6233[_0x44ee('0x85')][_0x44ee('0x6')]){await $[_0x44ee('0x16')](0x7d0);reportAdventure();}else if(_0x6c6233[_0x44ee('0x85')][_0x44ee('0x6')]!=null&×tampS()<_0x6c6233[_0x44ee('0x85')]['endTime']){let _0x35600c=+_0x6c6233[_0x44ee('0x85')][_0x44ee('0x6')]-timestampS();if(_0x35600c<=0x258){log(_0x44ee('0x58')+_0x35600c+_0x44ee('0x76'));await $[_0x44ee('0x16')](_0x35600c*0x3e8);reportAdventure();}else log(_0x44ee('0x1a')+parseInt(_0x35600c/0xe10)+'小时'+parseInt(_0x35600c%0xe10/0x3c)+'分钟'+parseInt(_0x35600c%0x3c)+_0x44ee('0x25'));}}else log(_0x44ee('0x44')+_0x6c6233['message']);}catch(_0x58a9b9){log(_0x58a9b9);}finally{_0x5ae86e();}},_0x4db780);});}function reportAdventure(_0x4e078a=0x2*0x3e8){timestamp=timestampMs();nonce=randomString(0x10);signature=getSign(nonce,timestamp);let _0xbf37bb={'url':_0x44ee('0x1c')+adventureId+'×tamp='+timestamp+_0x44ee('0x2f')+nonce+_0x44ee('0x6b')+signature,'headers':{'Host':_0x44ee('0x93'),'authorization':''+tyau,'user-agent':_0x44ee('0x5'),'Content-Type':_0x44ee('0x47')}};return new Promise(_0x71039d=>{if(debug){log(_0x44ee('0x82'));log(JSON['stringify'](_0xbf37bb));}$['get'](_0xbf37bb,async(_0x30c993,_0x1452c8,_0xa63271)=>{try{if(debug){log(_0x44ee('0x6c'));log(_0xa63271);}let _0x4bbd2e=JSON[_0x44ee('0x3d')](_0xa63271);let _0x534010=eval(_0x4bbd2e[_0x44ee('0x85')][_0x44ee('0x69')]);let _0x3f26b4='';if(_0x4bbd2e[_0x44ee('0x3c')]==0x388){refreshAu();}if(_0x4bbd2e[_0x44ee('0x3c')]==0x0){if(_0x534010[_0x44ee('0x62')][0x0][_0x44ee('0x97')]==0x1){_0x3f26b4='番茄';}else if(_0x534010['infos'][0x0][_0x44ee('0x97')]==0x2){_0x3f26b4='阳光';}log(_0x44ee('0x99')+_0x534010[_0x44ee('0x62')][0x0][_0x44ee('0x43')]+_0x3f26b4);await $[_0x44ee('0x16')](0xbb8);queryAdventure();}else if(_0x4bbd2e[_0x44ee('0x3c')]==0x1f4){log(_0x44ee('0x5d'));}else if(_0x4bbd2e[_0x44ee('0x3c')]==0x3e8){log(_0x44ee('0x2e'));}else log('冒险未到时间');}catch(_0x18fe8f){log(_0x18fe8f);}finally{_0x71039d();}},_0x4e078a);});}function startAdventure(_0x34d6ed){timestamp=timestampMs();nonce=randomString(0x10);signature=getSign(nonce,timestamp);let _0x36f0cd={'url':_0x44ee('0x56')+timestamp+_0x44ee('0x2f')+nonce+_0x44ee('0x6b')+signature,'headers':{'Host':_0x44ee('0x93'),'authorization':''+newAuArr[_0x34d6ed],'user-agent':_0x44ee('0x5'),'content-type':_0x44ee('0x47')}};return new Promise(_0xfeb485=>{if(debug){log(_0x44ee('0x2'));log(JSON[_0x44ee('0x8f')](_0x36f0cd));}$[_0x44ee('0x91')](_0x36f0cd,async(_0x2402a7,_0x296c51,_0x3ad0a5)=>{try{if(debug){log('\x0a\x0a【debug】===============这是\x20开始冒险\x20返回data==============');log(_0x3ad0a5);}let _0x8f89d0=JSON['parse'](_0x3ad0a5);if(_0x8f89d0[_0x44ee('0x3c')]==0x388){refreshAu();}if(_0x8f89d0[_0x44ee('0x3c')]==0x0){log(_0x44ee('0x11'));}else if(_0x8f89d0[_0x44ee('0x3c')]==0x3e8){log('当前已有冒险,不能进行下一次冒险');}else log(''+_0x8f89d0['message']);}catch(_0x20f15d){log(_0x20f15d);}finally{_0xfeb485();}});});}async function Envs(){if(tyhz){if(tyhz['indexOf']('@')!=-0x1){tyhz['split']('@')[_0x44ee('0x14')](_0x9da7ac=>{tyhzArr[_0x44ee('0x18')](_0x9da7ac);});}else if(tyhz[_0x44ee('0x0')]('\x0a')!=-0x1){tyhz[_0x44ee('0x51')]('\x0a')[_0x44ee('0x14')](_0x5dccbd=>{tyhzArr[_0x44ee('0x18')](_0x5dccbd);});}else{tyhzArr['push'](tyhz);}}else{log(_0x44ee('0x12')+$[_0x44ee('0x8')]+_0x44ee('0x90'));return;}return!![];}async function SendMsg(_0x38f9bf){if(!_0x38f9bf)return;if(Notify>0x0){if($[_0x44ee('0x64')]()){var _0x4e7431=require(_0x44ee('0x9'));await _0x4e7431[_0x44ee('0x89')]($[_0x44ee('0x8')],_0x38f9bf);}else{$[_0x44ee('0x3e')](_0x38f9bf);}}else{log(_0x38f9bf);}}function randomString(_0x744267){_0x744267=_0x744267||0x20;var _0xbfde04=_0x44ee('0x7b'),_0x1fcb78=_0xbfde04[_0x44ee('0x33')],_0x56deb0='';for(i=0x0;i<_0x744267;i++)_0x56deb0+=_0xbfde04[_0x44ee('0x74')](Math['floor'](Math[_0x44ee('0xb')]()*_0x1fcb78));return _0x56deb0;}function randomInt(_0x2b0f8b,_0x39411f){return Math[_0x44ee('0x61')](Math[_0x44ee('0xb')]()*(_0x39411f-_0x2b0f8b)+_0x2b0f8b);}function timestampMs(){return new Date()['getTime']();}function timestampS(){return Date[_0x44ee('0x3d')](new Date())/0x3e8;}function poem(_0x28d24a=0x3*0x3e8){return new Promise(_0x21443f=>{let _0x2fdaf8={'url':_0x44ee('0x4b')};$[_0x44ee('0x91')](_0x2fdaf8,async(_0xbf7121,_0x4bd125,_0x3ff212)=>{try{_0x3ff212=JSON[_0x44ee('0x3d')](_0x3ff212);log(_0x3ff212['content']+_0x44ee('0x8d')+_0x3ff212['origin']+'》'+_0x3ff212[_0x44ee('0xf')]);}catch(_0x44b00a){log(_0x44b00a,_0x4bd125);}finally{_0x21443f();}},_0x28d24a);});}function modify(){fs[_0x44ee('0x57')](_0x44ee('0x5f'),'utf8',function(_0x4c01e4,_0x3364e2){if(_0x4c01e4){return log(_0x44ee('0x8e')+_0x4c01e4);}else{var _0x5c64be=_0x3364e2[_0x44ee('0x6d')](/tyau="[\w-\s/+@]{0,1000}"/g,_0x44ee('0x3')+newAuArr[0x0]+'@'+newAuArr[0x1]+'@'+newAuArr[0x2]+'\x22');fs[_0x44ee('0x22')](_0x44ee('0x5f'),_0x5c64be,_0x44ee('0x39'),function(_0x28cd5d){if(_0x28cd5d){return log(_0x28cd5d);}});}});}function getSign(_0x3d645f,_0x58dee2){let _0x5d580f='clientKey=IfWu0xwXlWgqkIC7DWn20qpo6a30hXX6&clientSecret=A4rHhUJfMjw2I5CODh5g40Ja1d3Yk1CH&nonce=';let _0x14e4ac=_0x5d580f+nonce+_0x44ee('0x6f')+_0x58dee2;return md5(_0x14e4ac);}function md5(_0x263aee){function _0x53c971(_0x513da5,_0x537faf){return _0x513da5<<_0x537faf|_0x513da5>>>0x20-_0x537faf;}function _0x559c93(_0xb9347a,_0x363452){var _0x3ed4ca,_0x90ee5b,_0x408798,_0xd3a30,_0x4f0d9d;_0x408798=_0xb9347a&0x80000000;_0xd3a30=_0x363452&0x80000000;_0x3ed4ca=_0xb9347a&0x40000000;_0x90ee5b=_0x363452&0x40000000;_0x4f0d9d=(_0xb9347a&0x3fffffff)+(_0x363452&0x3fffffff);if(_0x3ed4ca&_0x90ee5b){return _0x4f0d9d^0x80000000^_0x408798^_0xd3a30;}if(_0x3ed4ca|_0x90ee5b){if(_0x4f0d9d&0x40000000){return _0x4f0d9d^0xc0000000^_0x408798^_0xd3a30;}else{return _0x4f0d9d^0x40000000^_0x408798^_0xd3a30;}}else{return _0x4f0d9d^_0x408798^_0xd3a30;}}function _0x49bd46(_0x160361,_0x36dac0,_0x3abad5){return _0x160361&_0x36dac0|~_0x160361&_0x3abad5;}function _0x44e6aa(_0x5a051e,_0x3d9f65,_0x540dd4){return _0x5a051e&_0x540dd4|_0x3d9f65&~_0x540dd4;}function _0x57bdac(_0x1b0e6e,_0x5e1f10,_0x4d2538){return _0x1b0e6e^_0x5e1f10^_0x4d2538;}function _0x5349a2(_0x2d7a49,_0x47fd87,_0x5dcc9f){return _0x47fd87^(_0x2d7a49|~_0x5dcc9f);}function _0x4596cc(_0x593aa8,_0x1a3496,_0x15ffe8,_0x3a5e5c,_0x4e44e7,_0x24aac7,_0x5d24a6){_0x593aa8=_0x559c93(_0x593aa8,_0x559c93(_0x559c93(_0x49bd46(_0x1a3496,_0x15ffe8,_0x3a5e5c),_0x4e44e7),_0x5d24a6));return _0x559c93(_0x53c971(_0x593aa8,_0x24aac7),_0x1a3496);}function _0x9411a8(_0x400e45,_0x1823d2,_0x2e89e3,_0xa44d5,_0x472689,_0x37ed3c,_0x449f99){_0x400e45=_0x559c93(_0x400e45,_0x559c93(_0x559c93(_0x44e6aa(_0x1823d2,_0x2e89e3,_0xa44d5),_0x472689),_0x449f99));return _0x559c93(_0x53c971(_0x400e45,_0x37ed3c),_0x1823d2);}function _0x230cc3(_0x55479f,_0x4b4f66,_0x5ac659,_0x39efb8,_0x4f1a2a,_0x398d3d,_0x1dbd18){_0x55479f=_0x559c93(_0x55479f,_0x559c93(_0x559c93(_0x57bdac(_0x4b4f66,_0x5ac659,_0x39efb8),_0x4f1a2a),_0x1dbd18));return _0x559c93(_0x53c971(_0x55479f,_0x398d3d),_0x4b4f66);}function _0x120d3f(_0x5e772f,_0x19b175,_0x21fb3f,_0x1e6f79,_0x1862ee,_0x5300f7,_0x321236){_0x5e772f=_0x559c93(_0x5e772f,_0x559c93(_0x559c93(_0x5349a2(_0x19b175,_0x21fb3f,_0x1e6f79),_0x1862ee),_0x321236));return _0x559c93(_0x53c971(_0x5e772f,_0x5300f7),_0x19b175);}function _0x44465f(_0x3d05a4){var _0x436422;var _0x42044f=_0x3d05a4[_0x44ee('0x33')];var _0x249f49=_0x42044f+0x8;var _0x2d12e8=(_0x249f49-_0x249f49%0x40)/0x40;var _0x2baa42=(_0x2d12e8+0x1)*0x10;var _0xe5f1e=Array(_0x2baa42-0x1);var _0xf9b254=0x0;var _0x54a6a6=0x0;while(_0x54a6a6<_0x42044f){_0x436422=(_0x54a6a6-_0x54a6a6%0x4)/0x4;_0xf9b254=_0x54a6a6%0x4*0x8;_0xe5f1e[_0x436422]=_0xe5f1e[_0x436422]|_0x3d05a4[_0x44ee('0x1e')](_0x54a6a6)<<_0xf9b254;_0x54a6a6++;}_0x436422=(_0x54a6a6-_0x54a6a6%0x4)/0x4;_0xf9b254=_0x54a6a6%0x4*0x8;_0xe5f1e[_0x436422]=_0xe5f1e[_0x436422]|0x80<<_0xf9b254;_0xe5f1e[_0x2baa42-0x2]=_0x42044f<<0x3;_0xe5f1e[_0x2baa42-0x1]=_0x42044f>>>0x1d;return _0xe5f1e;}function _0x4e5a81(_0x17b28e){var _0x4a687c='',_0x99b0a5='',_0x3ca53c,_0x4ed6e5;for(_0x4ed6e5=0x0;_0x4ed6e5<=0x3;_0x4ed6e5++){_0x3ca53c=_0x17b28e>>>_0x4ed6e5*0x8&0xff;_0x99b0a5='0'+_0x3ca53c['toString'](0x10);_0x4a687c=_0x4a687c+_0x99b0a5[_0x44ee('0x5e')](_0x99b0a5[_0x44ee('0x33')]-0x2,0x2);}return _0x4a687c;}function _0x38ddab(_0x28a88e){_0x28a88e=_0x28a88e[_0x44ee('0x6d')](/\r\n/g,'\x0a');var _0x9ec39='';for(var _0x38e508=0x0;_0x38e508<_0x28a88e[_0x44ee('0x33')];_0x38e508++){var _0x488e7d=_0x28a88e[_0x44ee('0x1e')](_0x38e508);if(_0x488e7d<0x80){_0x9ec39+=String[_0x44ee('0x54')](_0x488e7d);}else if(_0x488e7d>0x7f&&_0x488e7d<0x800){_0x9ec39+=String[_0x44ee('0x54')](_0x488e7d>>0x6|0xc0);_0x9ec39+=String[_0x44ee('0x54')](_0x488e7d&0x3f|0x80);}else{_0x9ec39+=String['fromCharCode'](_0x488e7d>>0xc|0xe0);_0x9ec39+=String[_0x44ee('0x54')](_0x488e7d>>0x6&0x3f|0x80);_0x9ec39+=String[_0x44ee('0x54')](_0x488e7d&0x3f|0x80);}}return _0x9ec39;}var _0x2f32be=Array();var _0x2b76c3,_0x492302,_0x25952b,_0x477bb4,_0x1b2d48,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345;var _0x1f23b1=0x7,_0x44fb40=0xc,_0xa9194b=0x11,_0x381114=0x16;var _0x5d1ba6=0x5,_0x25cf93=0x9,_0x23d8d8=0xe,_0x464aa0=0x14;var _0x2f3703=0x4,_0xb7e217=0xb,_0x4f467d=0x10,_0x89abc7=0x17;var _0x158f8a=0x6,_0x13a269=0xa,_0x2a48cd=0xf,_0x3e3a6e=0x15;_0x263aee=_0x38ddab(_0x263aee);_0x2f32be=_0x44465f(_0x263aee);_0x7db84c=0x67452301;_0x351d1c=0xefcdab89;_0x40c8a8=0x98badcfe;_0x2d5345=0x10325476;for(_0x2b76c3=0x0;_0x2b76c3<_0x2f32be[_0x44ee('0x33')];_0x2b76c3+=0x10){_0x492302=_0x7db84c;_0x25952b=_0x351d1c;_0x477bb4=_0x40c8a8;_0x1b2d48=_0x2d5345;_0x7db84c=_0x4596cc(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x0],_0x1f23b1,0xd76aa478);_0x2d5345=_0x4596cc(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0x1],_0x44fb40,0xe8c7b756);_0x40c8a8=_0x4596cc(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0x2],_0xa9194b,0x242070db);_0x351d1c=_0x4596cc(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0x3],_0x381114,0xc1bdceee);_0x7db84c=_0x4596cc(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x4],_0x1f23b1,0xf57c0faf);_0x2d5345=_0x4596cc(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0x5],_0x44fb40,0x4787c62a);_0x40c8a8=_0x4596cc(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0x6],_0xa9194b,0xa8304613);_0x351d1c=_0x4596cc(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0x7],_0x381114,0xfd469501);_0x7db84c=_0x4596cc(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x8],_0x1f23b1,0x698098d8);_0x2d5345=_0x4596cc(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0x9],_0x44fb40,0x8b44f7af);_0x40c8a8=_0x4596cc(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0xa],_0xa9194b,0xffff5bb1);_0x351d1c=_0x4596cc(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0xb],_0x381114,0x895cd7be);_0x7db84c=_0x4596cc(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0xc],_0x1f23b1,0x6b901122);_0x2d5345=_0x4596cc(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0xd],_0x44fb40,0xfd987193);_0x40c8a8=_0x4596cc(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0xe],_0xa9194b,0xa679438e);_0x351d1c=_0x4596cc(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0xf],_0x381114,0x49b40821);_0x7db84c=_0x9411a8(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x1],_0x5d1ba6,0xf61e2562);_0x2d5345=_0x9411a8(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0x6],_0x25cf93,0xc040b340);_0x40c8a8=_0x9411a8(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0xb],_0x23d8d8,0x265e5a51);_0x351d1c=_0x9411a8(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0x0],_0x464aa0,0xe9b6c7aa);_0x7db84c=_0x9411a8(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x5],_0x5d1ba6,0xd62f105d);_0x2d5345=_0x9411a8(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0xa],_0x25cf93,0x2441453);_0x40c8a8=_0x9411a8(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0xf],_0x23d8d8,0xd8a1e681);_0x351d1c=_0x9411a8(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0x4],_0x464aa0,0xe7d3fbc8);_0x7db84c=_0x9411a8(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x9],_0x5d1ba6,0x21e1cde6);_0x2d5345=_0x9411a8(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0xe],_0x25cf93,0xc33707d6);_0x40c8a8=_0x9411a8(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0x3],_0x23d8d8,0xf4d50d87);_0x351d1c=_0x9411a8(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0x8],_0x464aa0,0x455a14ed);_0x7db84c=_0x9411a8(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0xd],_0x5d1ba6,0xa9e3e905);_0x2d5345=_0x9411a8(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0x2],_0x25cf93,0xfcefa3f8);_0x40c8a8=_0x9411a8(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0x7],_0x23d8d8,0x676f02d9);_0x351d1c=_0x9411a8(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0xc],_0x464aa0,0x8d2a4c8a);_0x7db84c=_0x230cc3(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x5],_0x2f3703,0xfffa3942);_0x2d5345=_0x230cc3(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0x8],_0xb7e217,0x8771f681);_0x40c8a8=_0x230cc3(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0xb],_0x4f467d,0x6d9d6122);_0x351d1c=_0x230cc3(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0xe],_0x89abc7,0xfde5380c);_0x7db84c=_0x230cc3(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x1],_0x2f3703,0xa4beea44);_0x2d5345=_0x230cc3(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0x4],_0xb7e217,0x4bdecfa9);_0x40c8a8=_0x230cc3(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0x7],_0x4f467d,0xf6bb4b60);_0x351d1c=_0x230cc3(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0xa],_0x89abc7,0xbebfbc70);_0x7db84c=_0x230cc3(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0xd],_0x2f3703,0x289b7ec6);_0x2d5345=_0x230cc3(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0x0],_0xb7e217,0xeaa127fa);_0x40c8a8=_0x230cc3(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0x3],_0x4f467d,0xd4ef3085);_0x351d1c=_0x230cc3(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0x6],_0x89abc7,0x4881d05);_0x7db84c=_0x230cc3(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x9],_0x2f3703,0xd9d4d039);_0x2d5345=_0x230cc3(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0xc],_0xb7e217,0xe6db99e5);_0x40c8a8=_0x230cc3(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0xf],_0x4f467d,0x1fa27cf8);_0x351d1c=_0x230cc3(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0x2],_0x89abc7,0xc4ac5665);_0x7db84c=_0x120d3f(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x0],_0x158f8a,0xf4292244);_0x2d5345=_0x120d3f(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0x7],_0x13a269,0x432aff97);_0x40c8a8=_0x120d3f(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0xe],_0x2a48cd,0xab9423a7);_0x351d1c=_0x120d3f(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0x5],_0x3e3a6e,0xfc93a039);_0x7db84c=_0x120d3f(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0xc],_0x158f8a,0x655b59c3);_0x2d5345=_0x120d3f(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0x3],_0x13a269,0x8f0ccc92);_0x40c8a8=_0x120d3f(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0xa],_0x2a48cd,0xffeff47d);_0x351d1c=_0x120d3f(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0x1],_0x3e3a6e,0x85845dd1);_0x7db84c=_0x120d3f(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x8],_0x158f8a,0x6fa87e4f);_0x2d5345=_0x120d3f(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0xf],_0x13a269,0xfe2ce6e0);_0x40c8a8=_0x120d3f(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0x6],_0x2a48cd,0xa3014314);_0x351d1c=_0x120d3f(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0xd],_0x3e3a6e,0x4e0811a1);_0x7db84c=_0x120d3f(_0x7db84c,_0x351d1c,_0x40c8a8,_0x2d5345,_0x2f32be[_0x2b76c3+0x4],_0x158f8a,0xf7537e82);_0x2d5345=_0x120d3f(_0x2d5345,_0x7db84c,_0x351d1c,_0x40c8a8,_0x2f32be[_0x2b76c3+0xb],_0x13a269,0xbd3af235);_0x40c8a8=_0x120d3f(_0x40c8a8,_0x2d5345,_0x7db84c,_0x351d1c,_0x2f32be[_0x2b76c3+0x2],_0x2a48cd,0x2ad7d2bb);_0x351d1c=_0x120d3f(_0x351d1c,_0x40c8a8,_0x2d5345,_0x7db84c,_0x2f32be[_0x2b76c3+0x9],_0x3e3a6e,0xeb86d391);_0x7db84c=_0x559c93(_0x7db84c,_0x492302);_0x351d1c=_0x559c93(_0x351d1c,_0x25952b);_0x40c8a8=_0x559c93(_0x40c8a8,_0x477bb4);_0x2d5345=_0x559c93(_0x2d5345,_0x1b2d48);}return(_0x4e5a81(_0x7db84c)+_0x4e5a81(_0x351d1c)+_0x4e5a81(_0x40c8a8)+_0x4e5a81(_0x2d5345))[_0x44ee('0x1f')]();}
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"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) }