-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathYGD.js
59 lines (52 loc) · 27.6 KB
/
YGD.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* https://www.ygd.world/register?c=0CHCFW
* cron:15 15 * * *
* const $ = new Env('YGD签到');
* ========= 青龙--配置文件 ===========
* # YGD
* export ygdCookie='账号&密码'
* 多账号分隔符
* 将utils.js放到与脚本同目录下
* ====================================
* 每日签到薅USDT
*/
var version_='jsjiami.com.v7';const _0x20c7b7=_0x2fbe;(function(_0x5ad4e6,_0x51d7b3,_0x3e1e19,_0x245fa7,_0x19ce2c,_0x288948,_0xb12532){return _0x5ad4e6=_0x5ad4e6>>0x8,_0x288948='hs',_0xb12532='hs',function(_0x7e7a46,_0x5af838,_0x139598,_0x554996,_0x14bfbc){const _0x17087c=_0x2fbe;_0x554996='tfi',_0x288948=_0x554996+_0x288948,_0x14bfbc='up',_0xb12532+=_0x14bfbc,_0x288948=_0x139598(_0x288948),_0xb12532=_0x139598(_0xb12532),_0x139598=0x0;const _0x5da885=_0x7e7a46();while(!![]&&--_0x245fa7+_0x5af838){try{_0x554996=-parseInt(_0x17087c(0x10d,'T(@W'))/0x1*(parseInt(_0x17087c(0x177,'!&Ee'))/0x2)+-parseInt(_0x17087c(0x136,'Za^8'))/0x3*(-parseInt(_0x17087c(0x199,'c@g4'))/0x4)+-parseInt(_0x17087c(0x129,'4#Y7'))/0x5*(-parseInt(_0x17087c(0x18a,'jxqG'))/0x6)+parseInt(_0x17087c(0x19f,'JKoh'))/0x7*(parseInt(_0x17087c(0x126,'ie%S'))/0x8)+parseInt(_0x17087c(0x164,'Qt46'))/0x9+-parseInt(_0x17087c(0x11f,'spiZ'))/0xa+-parseInt(_0x17087c(0x116,'KXYy'))/0xb*(-parseInt(_0x17087c(0x13e,')i6Q'))/0xc);}catch(_0x516e67){_0x554996=_0x139598;}finally{_0x14bfbc=_0x5da885[_0x288948]();if(_0x5ad4e6<=_0x245fa7)_0x139598?_0x19ce2c?_0x554996=_0x14bfbc:_0x19ce2c=_0x14bfbc:_0x139598=_0x14bfbc;else{if(_0x139598==_0x19ce2c['replace'](/[nFuXMHdEqfUDBpOLwKCV=]/g,'')){if(_0x554996===_0x5af838){_0x5da885['un'+_0x288948](_0x14bfbc);break;}_0x5da885[_0xb12532](_0x14bfbc);}}}}}(_0x3e1e19,_0x51d7b3,function(_0x4befb0,_0x139ee6,_0x2ba026,_0x4ee81c,_0x3eda5c,_0x55bc6e,_0x3c93db){return _0x139ee6='\x73\x70\x6c\x69\x74',_0x4befb0=arguments[0x0],_0x4befb0=_0x4befb0[_0x139ee6](''),_0x2ba026='\x72\x65\x76\x65\x72\x73\x65',_0x4befb0=_0x4befb0[_0x2ba026]('\x76'),_0x4ee81c='\x6a\x6f\x69\x6e',(0x136fd8,_0x4befb0[_0x4ee81c](''));});}(0xca00,0x7f07d,_0x50a4,0xcc),_0x50a4)&&(version_=_0x50a4);const $=new Env(_0x20c7b7(0x190,'WgVb')),ckName=_0x20c7b7(0x113,'jxqG');function _0x50a4(){const _0x2d6436=(function(){return[version_,'UjsMDjqViwnamdipB.HOcXomLL.Dvu7qFBpKCfEf==','WP9HWO12W4W','q8kCc8obvfxdHG','DmkmW6VcKHuaqmkhqq','WRJcSbXSvG','sJxcSW','W5botfO','tWn+W69m','W6TBhmkVxCkprXOw','W611WPtcIgm','ohJdHr/cTG','w282yxNdS8ogWRZcOG','EbxcOSorqG','W5biWOhcRcC','us1wW5LTWQVdJKNcKW','txpdIfPy','mvnZWQL/','W7RdGMJdI0hdSMCgxHhcSCk5WOu','W49IWQxcQW','WONcPZvbwW','6lwv5y6eW7a','WPNINARdHEwNUoI1UUs9G+AdJXRcREIVSEwJQUwgIUs+OUIaUoMbR+IVGEEHGE+/Na','W77dNCoa','awrOWQjv','6lso5y69Aq','W7BdI8oUiadcNWb1W5dcKCopW5HR','c8oxg8k1z8kSWP05pSoDmt9v','gXe9W6GJ','gH3dJ8oIta','W4JcNd03','EIf/smozjmksCtrzW6C9W6JdU8o1W7FcNSkJr8of55Ei5OQv5l6f5OklBJRdGGeVp1XrW41Jk8kfW7z3WONcQ8oVW714W4W','BINcN8kFBG','WRmdtSkBya','W7tdJ8oViGddV3vaW7/cVmoK','DcBdPG','WQdcLGFdGCkL','qdD1pMBdISocWO/cLtZdIW','6lsN5y2RW7G','W59keaO7','o1xdLmodpsS','jCoVqbtdTfLTWOi','a3FdQ8o2aa','kNGojmkW','Avi2x0u','seO6nNJcQcy','W7hdNwNMRBtOVAhNLRFMIOdcJqtNMPdPMPhMIzpLI6/VV4m','qcvbW64','WOvSgCkg','W69UWRZcIXi','W4tcOCkuD8o9W5tcGa','fmo/WPVcRXe'].concat((function(){return['umonW6FcJ8kGWOpcGmkdWPW6amo0r8kAjt05','rJxcOCk+Fa','6lA/5yYzW6m','WQNcLIVdS8k+','W4VcMd0YW47dQ8ow','BK0Xu18','fs/dNxLwW73cV8k2','cCo2WR/cLYK','6lwJ5y+lqW','oKNdQCoynY8kEW','As1joG','tSkLoY7dNrhcLq','W7/cUCo0vbe','W5PCeW0','y1ZcHa','W4DSWRy','5Q6a6l+r55sM5OUO77+G5O+S56ECt+E7HUE5QCoHWPDqcgrE','W45WAq','rLVdMLHo','bokCVWNLPyROTOdKVB7MGkFdQrBORzVLO6tLHi3KV7pOGlZPG5BORypNOi7VVz0','WRtcLYlcIrhcTZadFq/cOCkYWPy0W40b','xmkEFCoXiW','qK3dNvvp','WQ/dO8kB55sS5OQT5P6Q6k6iW7tdToAcI+I3Jos6KSobCstcLLxcRE+9Vq','W4KXWQ/NLR/MI4dMNBtORB9ZWRZMG4lOTPBKUR5RWR0hW59vdE+8Ha','W5BcKt8fW50','W610W7ZdO8ksW6pdUsJdPCkMWRT3imkhoCo+','kf/dTCoopa','r3pdLwbuW7/cGmkqwbxcHwLUW6fBWPO','pbyGW6ax','W7bWW7VdTG','WQ0qW6LvW7C','WO8vW5pdUgJcKSkqqSoVzCojs8ku','W4nqWPa/lW','gw8mgSkaFa','W7RdUeO+atTtfSoPWOldHq','W6XNWPmpia','ggG2bCkxi8kayW','6lwL5y+0vG','tSkszSojoq','m1TqWR5D','fwiQ','zH4Il8kl','Ed9ykCoTW43dPmoeWRm','r0pcKSk2bSkxWPpdUSkkDmopWP7dMa','FsHYl8ow','tr1FeSorW7O6','vCklxSoWpSo9W4a+','W7xcGCoF','me99WR5ooqOvbSke','hImT55E+5OIh5P+b6kYwsEwNSEI0OK/INytdMos6QEwqK2G','6lEP5y6/vW'].concat((function(){return['WRBcS8oUu8oo','ytvHl8oP','WRtcUCkms8oh','WPhcICkUE0O','W6bWWPuthq','W4TXASk6WOi','qcvbW65SWQxdIeu','EJTkDColW5NdQCknWQPqW6NcO8oq','h2hdSv/cPrSLW77dJc7dJd9e','yGVcQSoDtG','tdtcOCk+','WQJdNSkblK7dVGH+WQWJW5e','W5Xas0/cUSo5WOPA','bfhdLSkyla','WQRcLmkKzvZdJf1k','sILj','rY5LnmoC','cLXCd8omW7m7','BbdcTmkXCW','zq3cJmkVFa','W4jTWRxcR3y','s8kLlG','l8ouWQNcLa','WR89FWG','e3mMea','yd9A','W7D+W6VdSG','WP/dM8o3562V5yIc5O2956skfEwMUEI3SCkG4P++gEs4UEwtHSoy','WOJcHCktumo5','gH3dNCoUqmoaW5e','gNOgW5TPWRhdN2RcUW','lfj8WQLP','6lws5y+5hq','khBdICkljq','W7hdNwNMJOBNPPxcPEE5KoE5MGRdHCo5BvddONu','n8oVlUETG+wiKoApKEEMOSouCW','u2GF','qKxcNCowCCokW6VdHCkG','ECkZpY7dPW/dMNiRW6W','aSkGFuK','omk2pmo/xvpcJW','W5GPW5FNLylMIA/MNixORyldJdFMM6ZMLkhML4hNMztVVlG','lY8JlmolW5xdNdTfW5lcM8kYW5NdUSkqDSku','ieCZsXK','W5zsfbG','WOWkvL5PWOtcJg58W4/dUmo1','WPr+cmkvW4ddHWldHCoPWPZdSWy','BNVdVwvR','awmbF8k0W5SUkapcJu4'];}()));}()));}());_0x50a4=function(){return _0x2d6436;};return _0x50a4();};let utils=require(_0x20c7b7(0x17d,'D)VL'));function _0x2fbe(_0x86a1e5,_0x500689){const _0x50a4af=_0x50a4();return _0x2fbe=function(_0x2fbe75,_0x71c6fa){_0x2fbe75=_0x2fbe75-0x109;let _0x34fa74=_0x50a4af[_0x2fbe75];if(_0x2fbe['sumWoQ']===undefined){var _0x48aea3=function(_0x408fb1){const _0xb360f3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b020b='',_0x4ca6a4='';for(let _0x190ee4=0x0,_0x4adba2,_0x3559da,_0x51c82f=0x0;_0x3559da=_0x408fb1['charAt'](_0x51c82f++);~_0x3559da&&(_0x4adba2=_0x190ee4%0x4?_0x4adba2*0x40+_0x3559da:_0x3559da,_0x190ee4++%0x4)?_0x3b020b+=String['fromCharCode'](0xff&_0x4adba2>>(-0x2*_0x190ee4&0x6)):0x0){_0x3559da=_0xb360f3['indexOf'](_0x3559da);}for(let _0x4416b1=0x0,_0x547605=_0x3b020b['length'];_0x4416b1<_0x547605;_0x4416b1++){_0x4ca6a4+='%'+('00'+_0x3b020b['charCodeAt'](_0x4416b1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4ca6a4);};const _0x4f5ce8=function(_0x3a6fc6,_0x1bd5b1){let _0xf8b67a=[],_0x40d16a=0x0,_0x444198,_0x243eb8='';_0x3a6fc6=_0x48aea3(_0x3a6fc6);let _0x3b3659;for(_0x3b3659=0x0;_0x3b3659<0x100;_0x3b3659++){_0xf8b67a[_0x3b3659]=_0x3b3659;}for(_0x3b3659=0x0;_0x3b3659<0x100;_0x3b3659++){_0x40d16a=(_0x40d16a+_0xf8b67a[_0x3b3659]+_0x1bd5b1['charCodeAt'](_0x3b3659%_0x1bd5b1['length']))%0x100,_0x444198=_0xf8b67a[_0x3b3659],_0xf8b67a[_0x3b3659]=_0xf8b67a[_0x40d16a],_0xf8b67a[_0x40d16a]=_0x444198;}_0x3b3659=0x0,_0x40d16a=0x0;for(let _0x10d88c=0x0;_0x10d88c<_0x3a6fc6['length'];_0x10d88c++){_0x3b3659=(_0x3b3659+0x1)%0x100,_0x40d16a=(_0x40d16a+_0xf8b67a[_0x3b3659])%0x100,_0x444198=_0xf8b67a[_0x3b3659],_0xf8b67a[_0x3b3659]=_0xf8b67a[_0x40d16a],_0xf8b67a[_0x40d16a]=_0x444198,_0x243eb8+=String['fromCharCode'](_0x3a6fc6['charCodeAt'](_0x10d88c)^_0xf8b67a[(_0xf8b67a[_0x3b3659]+_0xf8b67a[_0x40d16a])%0x100]);}return _0x243eb8;};_0x2fbe['fqaITs']=_0x4f5ce8,_0x86a1e5=arguments,_0x2fbe['sumWoQ']=!![];}const _0x5303a6=_0x50a4af[0x0],_0xb81b26=_0x2fbe75+_0x5303a6,_0x2e55ee=_0x86a1e5[_0xb81b26];return!_0x2e55ee?(_0x2fbe['GlYwVH']===undefined&&(_0x2fbe['GlYwVH']=!![]),_0x34fa74=_0x2fbe['fqaITs'](_0x34fa74,_0x71c6fa),_0x86a1e5[_0xb81b26]=_0x34fa74):_0x34fa74=_0x2e55ee,_0x34fa74;},_0x2fbe(_0x86a1e5,_0x500689);}const notify=$[_0x20c7b7(0x15a,'@I9!')]()?require('./sendNotify'):'',Notify=0x1;let debug=0x0,envSplitor=['\x0a'],ck=msg='',host,hostname,userCookie=($[_0x20c7b7(0x12c,'&l)P')]()?process[_0x20c7b7(0x10a,'nBjo')][ckName]:$[_0x20c7b7(0x13c,'z%t[')](ckName))||'',userList=[],userIdx=0x0,userCount=0x0;var token,id;async function start(){const _0x40f25e=_0x20c7b7,_0x2d5acf={'GjGZi':_0x40f25e(0x123,'@I9!'),'TIuCO':function(_0x52d3b6,_0x3f4d85){return _0x52d3b6(_0x3f4d85);},'IFwXX':function(_0xe110fe,_0x30a6f6){return _0xe110fe!=_0x30a6f6;},'NZnUs':function(_0x9000d8,_0x525066){return _0x9000d8!==_0x525066;},'vqedg':_0x40f25e(0x17c,'M(F)'),'tXzje':function(_0x3c5bc4,_0x2ad0e4){return _0x3c5bc4(_0x2ad0e4);}};console[_0x40f25e(0x168,'!&Ee')](_0x2d5acf[_0x40f25e(0x13b,')0Mf')]),taskall=[];for(let _0x27182b of userList){taskall['push'](await _0x27182b[_0x40f25e(0x192,'x2n2')]('登录')),await _0x2d5acf[_0x40f25e(0x197,'4#Y7')](wait,0x1),taskall['push'](await _0x27182b['user_inviter']('邀请')),_0x2d5acf[_0x40f25e(0x18d,'*FaA')](id,0xc9e)?_0x2d5acf['TIuCO'](DoubleLog,_0x40f25e(0x11a,'v3LG')):_0x2d5acf['NZnUs']('JbXon',_0x2d5acf[_0x40f25e(0x109,'!c[N')])?_0x2d645e[_0x40f25e(0x127,'XhiF')](_0x1045ee):(_0x2d5acf['tXzje'](DoubleLog,_0x40f25e(0x148,'eekn')),taskall[_0x40f25e(0x183,'cq*Y')](await _0x27182b['user_sign']('签到')),taskall['push'](await _0x27182b['user_wallets']('查询')));}await Promise[_0x40f25e(0x161,'4#Y7')](taskall);}class UserInfo{constructor(_0x223452){const _0x9c61a9=_0x20c7b7,_0x341a82={'txkqC':_0x9c61a9(0x174,'DlLZ'),'JVItx':_0x9c61a9(0x15d,'@I9!')};this['index']=++userIdx,this['ck']=_0x223452[_0x9c61a9(0x175,'YSYv')]('&'),this[_0x9c61a9(0x182,'JKoh')]=_0x341a82['txkqC'],this[_0x9c61a9(0x12d,'t[Pc')]=_0x341a82[_0x9c61a9(0x17f,'nBjo')]+this['host'];}async[_0x20c7b7(0x169,'n9fI')](_0x532917){const _0x2e0a3a=_0x20c7b7,_0x1f3d0d={'cgMPe':_0x2e0a3a(0x173,'M(F)'),'ceRCR':function(_0x3cf9d9,_0xe5286d){return _0x3cf9d9+_0xe5286d;},'Njkhr':function(_0x2708ca,_0x21e2e6){return _0x2708ca!==_0x21e2e6;},'GfLIj':_0x2e0a3a(0x14a,')i6Q'),'vgHrL':_0x2e0a3a(0x124,'nBjo'),'daRGi':'Post','QQqZY':function(_0x4d00d8,_0x5caac1,_0xa80f6a){return _0x4d00d8(_0x5caac1,_0xa80f6a);},'HsdWt':function(_0x2f4802,_0x14d5b2){return _0x2f4802!==_0x14d5b2;},'FYgUw':'viygh','oIkEg':_0x2e0a3a(0x12f,'@I9!'),'TOOro':function(_0x2df874,_0x18561d){return _0x2df874(_0x18561d);},'woVIc':function(_0x450624,_0x46ea1e){return _0x450624===_0x46ea1e;},'JfQZK':'cXsbD'};try{if(_0x1f3d0d[_0x2e0a3a(0x128,')0Mf')](_0x1f3d0d[_0x2e0a3a(0x118,'!c[N')],_0x1f3d0d[_0x2e0a3a(0x160,'n9fI')])){let _0x1ba8f4={'method':_0x1f3d0d[_0x2e0a3a(0x19d,'HS3L')],'url':this[_0x2e0a3a(0x172,'jxqG')]+'/api/user/login','headers':{'Host':this[_0x2e0a3a(0x133,'jxqG')]},'formData':{'password':''+this['ck'][0x1],'email':''+this['ck'][0x0]}},_0x2c491f=await _0x1f3d0d[_0x2e0a3a(0x12e,'&l)P')](httpRequest,_0x1ba8f4,_0x532917);_0x2c491f[_0x2e0a3a(0x184,'@I9!')]==0x0?_0x1f3d0d['HsdWt'](_0x1f3d0d[_0x2e0a3a(0x159,'U)o1')],_0x1f3d0d['oIkEg'])?(_0x1f3d0d['TOOro'](DoubleLog,_0x2e0a3a(0x119,'Qt46')+this[_0x2e0a3a(0x171,'eekn')]+_0x2e0a3a(0x132,'z%t[')),token=_0x2c491f['data'][_0x2e0a3a(0x130,'Jep7')]):(_0x4416b1('账号['+this['index']+']\x20\x20欢迎用户:\x20登陆成功!'),_0x547605=_0x3a6fc6[_0x2e0a3a(0x10b,'NpXs')][_0x2e0a3a(0x115,'n9fI')]):_0x1f3d0d['TOOro'](DoubleLog,_0x2e0a3a(0x18c,'4#Y7')+this[_0x2e0a3a(0x180,'3vn(')]+']\x20\x20用户查询:失败\x20❌\x20了呢,原因未知!');}else _0x408fb1(_0x2e0a3a(0x14b,'D)VL'));}catch(_0x3384ac){_0x1f3d0d['woVIc'](_0x1f3d0d[_0x2e0a3a(0x19b,')i6Q')],_0x2e0a3a(0x144,'!&Ee'))?(this[_0x2e0a3a(0x155,'P2rD')]=++_0x4ca6a4,this['ck']=_0x190ee4[_0x2e0a3a(0x13d,'Jep7')]('&'),this[_0x2e0a3a(0x193,'p$em')]=_0x1f3d0d['cgMPe'],this[_0x2e0a3a(0x17a,'ie%S')]=_0x1f3d0d['ceRCR']('https://',this['host'])):console[_0x2e0a3a(0x147,'3vn(')](_0x3384ac);}}async['user_inviter'](_0x11dcc4){const _0x170353=_0x20c7b7,_0x1feb8b={'WpiKA':function(_0x21f8e5,_0x1ce217){return _0x21f8e5(_0x1ce217);},'BHUoa':function(_0x5508f6,_0xb4f3){return _0x5508f6+_0xb4f3;},'jIfix':function(_0x44695e,_0x34c4f7){return _0x44695e==_0x34c4f7;},'awwfg':function(_0x10d98c,_0xfe7453){return _0x10d98c===_0xfe7453;},'ukQkh':'kIlqq','gILuN':function(_0x24a573,_0x4ab3f4){return _0x24a573(_0x4ab3f4);},'WTBqH':function(_0x1d2cd1,_0x12b726){return _0x1d2cd1!==_0x12b726;},'tiyjt':_0x170353(0x16c,'D(OH'),'SDAOt':_0x170353(0x17e,'nBjo')};try{let _0x27e416={'method':_0x170353(0x181,'x2n2'),'url':this[_0x170353(0x141,'&l)P')]+_0x170353(0x110,'4#Y7'),'headers':{'Authorization':_0x1feb8b['BHUoa'](_0x170353(0x19e,'yoUT'),token)}},_0x17b8c4=await httpRequest(_0x27e416,_0x11dcc4);_0x1feb8b['jIfix'](_0x17b8c4[_0x170353(0x176,'nBjo')],0x0)?id=_0x17b8c4[_0x170353(0x156,'&VKX')][_0x170353(0x166,'D)VL')]['id']:_0x1feb8b[_0x170353(0x12b,'c@g4')](_0x1feb8b[_0x170353(0x188,'Za^8')],_0x170353(0x153,'&l)P'))?(_0x1feb8b['WpiKA'](_0x2727ef,_0x170353(0x16b,'cq*Y')+this['index']+_0x170353(0x14f,'D(OH')+_0x4aad6f['data']['total_amount']+'≈'+_0x1a44f1['data']['cny_total_amount']),_0x1feb8b['WpiKA'](_0x1166fa,_0x170353(0x140,'n9fI')+this[_0x170353(0x139,'nBjo')]+']\x20\x20用户查询:\x20昨日收益:'+_0x1bab39[_0x170353(0x117,'3vn(')][_0x170353(0x14c,'KXYy')])):_0x1feb8b[_0x170353(0x10c,'jxqG')](DoubleLog,_0x170353(0x12a,'HC9f')+this[_0x170353(0x125,'T(@W')]+_0x170353(0x18e,'z%t['));}catch(_0x260ca4){_0x1feb8b['WTBqH'](_0x1feb8b['tiyjt'],_0x1feb8b[_0x170353(0x137,'JKoh')])?console['log'](_0x260ca4):_0x243eb8[_0x170353(0x149,'eekn')](_0x3b3659);}}async[_0x20c7b7(0x163,'M(F)')](_0x23e076){const _0x3d569f=_0x20c7b7,_0x2b6cc6={'QiXbA':function(_0x423596,_0x4ffe08){return _0x423596(_0x4ffe08);},'fqWaq':function(_0x193eee,_0x4d29cd){return _0x193eee+_0x4d29cd;},'zlvSr':_0x3d569f(0x131,'WgVb'),'ejMsl':function(_0x426455,_0x1f2bb6,_0x21812a){return _0x426455(_0x1f2bb6,_0x21812a);},'Tgjhi':function(_0x188150,_0x3939f6){return _0x188150==_0x3939f6;},'DXpnD':_0x3d569f(0x120,'P2rD'),'NMewL':_0x3d569f(0x165,'M(F)'),'VHYBM':function(_0x289531,_0x11724f){return _0x289531(_0x11724f);}};try{let _0x197a4c={'method':_0x3d569f(0x17b,'M(F)'),'url':this[_0x3d569f(0x178,'NpXs')]+_0x3d569f(0x138,')xhA'),'headers':{'Host':this[_0x3d569f(0x198,'c@g4')],'Authorization':_0x2b6cc6['fqWaq'](_0x2b6cc6[_0x3d569f(0x151,'z%t[')],token)}},_0x132460=await _0x2b6cc6['ejMsl'](httpRequest,_0x197a4c,_0x23e076);_0x2b6cc6['Tgjhi'](_0x132460['code'],0x0)?_0x2b6cc6[_0x3d569f(0x11c,'n9fI')]!==_0x2b6cc6[_0x3d569f(0x13f,'JKoh')]?DoubleLog(_0x3d569f(0x119,'Qt46')+this[_0x3d569f(0x112,'v3LG')]+']\x20\x20签到提示:\x20'+_0x132460['msg']):_0x2b6cc6['QiXbA'](_0x756ca,_0x3d569f(0x11d,'jxqG')+this[_0x3d569f(0x111,'YSYv')]+_0x3d569f(0x18f,'p$em')+_0x7060ed['msg']):_0x2b6cc6[_0x3d569f(0x135,'v3LG')](DoubleLog,'账号['+this[_0x3d569f(0x114,')i6Q')]+_0x3d569f(0x187,'ie%S')+_0x132460['msg']);}catch(_0x44b4cd){console[_0x3d569f(0x127,'XhiF')](_0x44b4cd);}}async[_0x20c7b7(0x19a,'@anb')](_0xb09433){const _0x521aa7=_0x20c7b7,_0xf46b33={'Sryjx':'Get','WJamo':function(_0x2a246a,_0x77b3ec){return _0x2a246a+_0x77b3ec;},'jXPFN':_0x521aa7(0x143,'x2n2'),'PnCnj':function(_0x43990e,_0x5ddd75,_0x19ea8e){return _0x43990e(_0x5ddd75,_0x19ea8e);},'IWNpV':function(_0x161d3c,_0xb3227e){return _0x161d3c==_0xb3227e;},'YIVdM':function(_0x3c297c,_0x33ca94){return _0x3c297c===_0x33ca94;},'svKMi':_0x521aa7(0x14d,'spiZ'),'QfYhk':_0x521aa7(0x10e,'3vn('),'eybyE':function(_0x1aa62b,_0x53e3b2){return _0x1aa62b(_0x53e3b2);},'CGoZb':function(_0xc53bf0,_0x3abbc3){return _0xc53bf0!==_0x3abbc3;},'eahKQ':function(_0x248c5a,_0x222377){return _0x248c5a(_0x222377);}};try{let _0xc92ea5={'method':_0xf46b33[_0x521aa7(0x16f,'ie%S')],'url':this[_0x521aa7(0x167,'spiZ')]+_0x521aa7(0x196,'ndJt'),'headers':{'Host':this['host'],'Authorization':_0xf46b33[_0x521aa7(0x157,'huEW')](_0xf46b33['jXPFN'],token)}},_0x475e79=await _0xf46b33[_0x521aa7(0x10f,'DlLZ')](httpRequest,_0xc92ea5,_0xb09433);_0xf46b33[_0x521aa7(0x16e,'Za^8')](_0x475e79[_0x521aa7(0x186,'&VKX')],0x0)?_0xf46b33['YIVdM'](_0xf46b33[_0x521aa7(0x15f,'spiZ')],_0xf46b33[_0x521aa7(0x16d,'^UF&')])?_0x69c17[_0x521aa7(0x146,'3$Zb')](_0x56d6be):(_0xf46b33[_0x521aa7(0x170,'U)o1')](DoubleLog,_0x521aa7(0x13a,'!&Ee')+this[_0x521aa7(0x121,'Qt46')]+_0x521aa7(0x150,'&VKX')+_0x475e79[_0x521aa7(0x122,'z%t[')]['total_amount']+'≈'+_0x475e79[_0x521aa7(0x142,'M(F)')][_0x521aa7(0x154,')i6Q')]),DoubleLog('账号['+this[_0x521aa7(0x18b,'n9fI')]+_0x521aa7(0x195,'U)o1')+_0x475e79[_0x521aa7(0x134,'@anb')][_0x521aa7(0x152,'&VKX')])):_0xf46b33['CGoZb'](_0x521aa7(0x14e,')i6Q'),_0x521aa7(0x162,'ndJt'))?_0x4836ab=_0x3a9351[_0x521aa7(0x145,'c@g4')][_0x521aa7(0x189,'Qt46')]['id']:_0xf46b33[_0x521aa7(0x179,'*FaA')](DoubleLog,_0x521aa7(0x15e,'Sl#f')+this[_0x521aa7(0x15c,'U)o1')]+_0x521aa7(0x16a,'Sl#f')+_0x475e79[_0x521aa7(0x185,'M(F)')]);}catch(_0x5cd9df){console[_0x521aa7(0x11b,'J8L@')](_0x5cd9df);}}}var version_ = 'jsjiami.com.v7';
!(async () => {
if (!(await checkEnv())) return;
if (userList.length > 0) {
await start();
}
await SendMsg(msg);
})()
.catch((e) => console.log(e))
.finally(() => $.done());
// #region ******************************************************** 固定代码 ********************************************************
// 变量检查与处理
async function checkEnv() {
if (userCookie) {
// console.log(userCookie);
let e = envSplitor[0];
for (let o of envSplitor)
if (userCookie.indexOf(o) > -1) {
e = o;
break;
}
for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n));
userCount = userList.length;
} else {
console.log("未找到CK");
return;
}
return console.log(`================ 共找到${userCount}个账号 ================`), true;//true == !0
}
// =========================================== 不懂不要动 =========================================================
// 网络请求 (get, post等)
async function httpRequest(options, name) { var request = require("request"); return new Promise((resolve) => { if (!name) { let tmp = arguments.callee.toString(); let re = /function\s*(\w*)/i; let matches = re.exec(tmp); name = matches[1] } if (debug) { console.log(`\n【debug】===============这是${name}请求信息===============`); console.log(options) } request(options, function (error, response) { if (error) throw new Error(error); let data = response.body; try { if (debug) { console.log(`\n\n【debug】===============这是${name}返回数据==============`); console.log(data) } if (typeof data == "string") { if (isJsonString(data)) { let result = JSON.parse(data); if (debug) { console.log(`\n【debug】=============这是${name}json解析后数据============`); console.log(result) } resolve(result) } else { let result = data; resolve(result) } function isJsonString(str) { if (typeof str == "string") { try { if (typeof JSON.parse(str) == "object") { return true } } catch (e) { return false } } return false } } else { let result = data; resolve(result) } } catch (e) { console.log(error, response); console.log(`\n ${name}失败了!请稍后尝试!!`) } finally { resolve() } }) }) }
// 等待 X 秒
function wait(n) { return new Promise(function (resolve) { setTimeout(resolve, n * 1000) }) }
// 双平台log输出
function DoubleLog(data) { if ($.isNode()) { if (data) { console.log(`${data}`); msg += `${data}` } } else { console.log(`${data}`); msg += `${data}` } }
// 发送消息
async function SendMsg(message) { if (!message) return; if (Notify > 0) { if ($.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify($.name, message) } else { $.msg($.name, '', message) } } else { console.log(message) } }
// 完整 Env
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) }