mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
1 line
6.1 KiB
JavaScript
1 line
6.1 KiB
JavaScript
const _0x2cfd28=_0x1f4c;(function(_0x552fa8,_0x45fd80){const _0x5a29d7=_0x1f4c,_0x294688=_0x552fa8();while(!![]){try{const _0x39efae=-parseInt(_0x5a29d7(0x199))/0x1+-parseInt(_0x5a29d7(0x1a0))/0x2*(parseInt(_0x5a29d7(0x19b))/0x3)+parseInt(_0x5a29d7(0x1a2))/0x4+-parseInt(_0x5a29d7(0x194))/0x5*(parseInt(_0x5a29d7(0x19d))/0x6)+-parseInt(_0x5a29d7(0x19f))/0x7+parseInt(_0x5a29d7(0x1b7))/0x8+-parseInt(_0x5a29d7(0x1a5))/0x9*(-parseInt(_0x5a29d7(0x193))/0xa);if(_0x39efae===_0x45fd80)break;else _0x294688['push'](_0x294688['shift']());}catch(_0x20a04b){_0x294688['push'](_0x294688['shift']());}}}(_0x93e9,0x59646));import{Wrapper}from'./qqnt';import{GlobalAdapter}from'./qqnt/adapters';import{NapCatCoreWrapper}from'./wrapper';function _0x1f4c(_0x4ce8b8,_0x4fa41e){const _0x93e993=_0x93e9();return _0x1f4c=function(_0x1f4cbc,_0x41fa3e){_0x1f4cbc=_0x1f4cbc-0x181;let _0x511da7=_0x93e993[_0x1f4cbc];return _0x511da7;},_0x1f4c(_0x4ce8b8,_0x4fa41e);}import{NapCatCoreLogin}from'./login';import{NapCatCoreSession}from'./session';import{NapCatCoreService}from'./service';import{appid,qqVersionConfigInfo}from'@/common/utils/QQBasicInfo';import{dbUtil}from'@/common/utils/db';import{hostname,systemVersion}from'@/common/utils/system';import{selfInfo}from'@/common/data';import _0x1729f2 from'node:path';import _0x3b1952 from'node:fs';function _0x93e9(){const _0x16a3d5=['replace','登录失败','getLogger','V1_WIN_NQ_','836568zRsNqA','emit','then','uid','0|1|2|10|5|8|9|4|3|6|7','resolve','本账号数据/缓存目录:','_GW_B','debug','system.online','getProfileService','YTRhn','uin','getGroupService','error','system.login.error','loginSuccessCbList','jsrOF','dataPath','QQNT\x20版本:','catch','onMessage','wrapper','ZCEXq','103640SSsgnX','290bspiQw','service','curVersion','QQNT\x20数据目录:','onLoginSuccess','266810XtCvbT','map','32484QAWTIs','stringify','52638KYWgea','split','4275845HgGxnK','82MwrtWs','getMsgService','1942344FVYIGR','dataPathGlobal','login','1395qNuaEb','mkdirSync','initPostLogin','addLoginSuccessCallback','log','getBuddyService','NodeIGlobalAdapter','init','adapter','./NapCat/data','session','Windows\x2010\x20Pro','kDWhs','pjTFo'];_0x93e9=function(){return _0x16a3d5;};return _0x93e9();}import{EventEmitter}from'node:events';import*as _0x400893 from'@log4js-node/log4js-api';export class NapCatCore extends EventEmitter{[_0x2cfd28(0x1a9)];[_0x2cfd28(0x1ad)];['wrapper'];[_0x2cfd28(0x1a4)];[_0x2cfd28(0x1af)];[_0x2cfd28(0x195)];[_0x2cfd28(0x18b)]=[];constructor(){const _0x1e0460=_0x2cfd28,_0x38e23d={'ZCEXq':_0x1e0460(0x1bb),'kGOIJ':'Core','pjTFo':_0x1e0460(0x197),'kImwV':_0x1e0460(0x18e),'YTRhn':_0x1e0460(0x1b0)},_0x403c30=_0x38e23d[_0x1e0460(0x192)][_0x1e0460(0x19e)]('|');let _0x439d01=0x0;while(!![]){switch(_0x403c30[_0x439d01++]){case'0':super();continue;case'1':this['log']=_0x400893[_0x1e0460(0x1b5)](_0x38e23d['kGOIJ']);continue;case'2':this[_0x1e0460(0x1ad)]=new GlobalAdapter();continue;case'3':this[_0x1e0460(0x1a9)][_0x1e0460(0x183)](_0x38e23d[_0x1e0460(0x1b2)],this[_0x1e0460(0x191)][_0x1e0460(0x1a3)]);continue;case'4':this[_0x1e0460(0x1a9)]['debug'](_0x38e23d['kImwV'],qqVersionConfigInfo['curVersion']);continue;case'5':this[_0x1e0460(0x1a4)]=new NapCatCoreLogin(this);continue;case'6':this[_0x1e0460(0x191)]['init']({'base_path_prefix':'','platform_type':0x3,'app_type':0x4,'app_version':qqVersionConfigInfo[_0x1e0460(0x196)],'os_version':_0x38e23d[_0x1e0460(0x186)],'use_xlog':!![],'qua':_0x1e0460(0x1b6)+qqVersionConfigInfo[_0x1e0460(0x196)][_0x1e0460(0x1b3)]('-','_')+_0x1e0460(0x182),'global_path_config':{'desktopGlobalPath':this[_0x1e0460(0x191)][_0x1e0460(0x1a3)]},'thumb_config':{'maxSide':0x144,'minSide':0x30,'longLimit':0x6,'density':0x2}},new Wrapper[(_0x1e0460(0x1ab))](this['adapter']));continue;case'7':this[_0x1e0460(0x1a4)][_0x1e0460(0x1ac)]({'machineId':'','appid':appid,'platVer':systemVersion,'commonPath':this[_0x1e0460(0x191)]['dataPathGlobal'],'clientVer':qqVersionConfigInfo['curVersion'],'hostName':hostname});continue;case'8':this['session']=new NapCatCoreSession();continue;case'9':this[_0x1e0460(0x195)]=new NapCatCoreService(this);continue;case'10':this[_0x1e0460(0x191)]=new NapCatCoreWrapper();continue;}break;}}async[_0x2cfd28(0x1a7)](_0x187a7c){const _0x5c14a4=_0x2cfd28,_0x1171d5={'kDWhs':_0x5c14a4(0x18a)};this[_0x5c14a4(0x1af)][_0x5c14a4(0x1ac)](_0x187a7c[_0x5c14a4(0x187)],_0x187a7c[_0x5c14a4(0x1ba)],this[_0x5c14a4(0x191)][_0x5c14a4(0x18d)])[_0x5c14a4(0x1b9)](()=>{const _0x299ecd=_0x5c14a4;this[_0x299ecd(0x198)](_0x187a7c[_0x299ecd(0x187)],_0x187a7c[_0x299ecd(0x1ba)]);})[_0x5c14a4(0x18f)](_0x165ac9=>{const _0x2346bb=_0x5c14a4;console[_0x2346bb(0x189)](_0x2346bb(0x1b4),JSON[_0x2346bb(0x19c)](_0x165ac9)),this['emit'](_0x1171d5[_0x2346bb(0x1b1)],{'code':'-1','message':_0x165ac9});});}[_0x2cfd28(0x198)](_0x497c23,_0x30ce63){const _0x20e395=_0x2cfd28,_0x1dae25={'jsrOF':function(_0x516994){return _0x516994();},'Gzciy':function(_0x1f43f4,_0x59053a){return _0x1f43f4 instanceof _0x59053a;},'yoOHY':_0x20e395(0x184)},_0x36e861=_0x1729f2[_0x20e395(0x1bc)](this[_0x20e395(0x191)]['dataPath'],_0x20e395(0x1ae));_0x3b1952[_0x20e395(0x1a6)](_0x36e861,{'recursive':!![]}),this[_0x20e395(0x1a9)][_0x20e395(0x183)](_0x20e395(0x181),_0x36e861),dbUtil['createConnection'](_0x1729f2[_0x20e395(0x1bc)](_0x36e861,'./'+_0x497c23+'.db')),selfInfo[_0x20e395(0x187)]=_0x497c23,selfInfo['uid']=_0x30ce63,this[_0x20e395(0x195)]['init'](this[_0x20e395(0x1af)][_0x20e395(0x191)][_0x20e395(0x1a1)](),this[_0x20e395(0x1af)]['wrapper'][_0x20e395(0x188)](),this[_0x20e395(0x1af)][_0x20e395(0x191)][_0x20e395(0x1aa)](),this['session'][_0x20e395(0x191)][_0x20e395(0x185)](),this[_0x20e395(0x1af)][_0x20e395(0x191)]['getProfileLikeService']()),this[_0x20e395(0x18b)][_0x20e395(0x19a)](_0x502a28=>{const _0x164f69=_0x20e395;new Promise((_0x4d7e73,_0x1541b2)=>{const _0xf1e5e8=_0x1f4c,_0x21750d=_0x1dae25[_0xf1e5e8(0x18c)](_0x502a28);_0x1dae25['Gzciy'](_0x21750d,Promise)&&_0x21750d[_0xf1e5e8(0x1b9)](_0x4d7e73)[_0xf1e5e8(0x18f)](_0x1541b2);})[_0x164f69(0x1b9)]();}),this[_0x20e395(0x1b8)](_0x1dae25['yoOHY'],{'uin':_0x497c23,'uid':_0x30ce63});}[_0x2cfd28(0x190)](){}[_0x2cfd28(0x1a8)](_0x3dc70e){const _0x5a1364=_0x2cfd28;this[_0x5a1364(0x18b)]['push'](_0x3dc70e);}}export const napCatCore=new NapCatCore(); |