public override void ReadImplement() { //Logger.Blue(FormatHex(buffer)); ClientVersion = $"{ReadByte()}.{ReadShort()}.{ReadShort()}"; ClientLocale = (ClientLocaleEnum)ReadByte(); int loginSize = ReadByte(); int passSize = ReadByte(); LengthPacket = 142 + loginSize + passSize; Login = ReadString(loginSize); Password = ReadString(passSize); MacAddress = new PhysicalAddress(ReadB(6)); byte[] FinalDoMac = ReadB(2); Rede = ReadByte(); LocalIP = ReadB(4); LauncherKey = ReadUlong(); UserFileListHash = ReadString(32).ToUpper(); if (ClientVersion != "1.15.23") { byte[] Zero = ReadB(16); D3DX9Hash = ReadString(32); //DirectX ? byte[] Unk = ReadB(33); } //Logger.Warning($" [LOGIN STRUCTURE] Hash(DirectX): {D3DX9Hash} Zero: {BitConverter.ToString(Zero)} FinalDoMac: {BitConverter.ToString(FinalDoMac)} Unk: " + BitConverter.ToString(Unk)); }
public override void ReadImplement() { ClientLocale = ClientLocaleEnum.Indonesia; ClientVersion = $"{ReadByte()}.{ReadShort()}.{ReadShort()}"; //OK int tokenSize = ReadShort(); //OK Token = ReadString(tokenSize); //OK ReadB(8); //Suposto: MAC Recebe tudo 0000000000 fazer proteção Rede = ReadByte(); //OK LocalIP = ReadB(4); //OK ReadB(16); //Recebe tudo 0000000000 fazer proteção string Hash = ReadString(32); //DirectX ? byte[] buffer32length = ReadB(33); Logger.Warning($" PACKET LOGIN [!] Token: {Token} buffer32length: {BitConverter.ToString(buffer32length)} Hash: {Hash}"); }
public static void Load() { try { string filePath = Path.GetFullPath("Data//Settings.ini"); IConfigSource source = new IniConfigSource(filePath); IConfig Configs = source.Configs["CONFIGS"]; IPInternal = Configs.GetString("IPAddress.Internal"); IPExternal = Configs.GetString("IPAddress.External"); PortAuth = Configs.GetInt("Port.Auth"); PortGame = Configs.GetInt("Port.Game"); PortBattle = ushort.Parse(Configs.GetString("Port.Battle")); PortApi = Configs.GetInt("Port.Api"); BackLog = Configs.GetInt("BackLog"); Rede = Configs.GetString("Rede"); SessionsBattle = Configs.GetInt("SessionsBattle"); Configs = source.Configs["LOGIN"]; LoginType = Configs.GetInt("LoginType"); LoginRequirements = Configs.GetBoolean("LoginRequirements"); AutoAccount = Configs.GetBoolean("AutoAccount"); ClientVersion = Configs.GetString("ClientVersion"); ClientLocale = (ClientLocaleEnum)byte.Parse(Configs.GetString("ClientLocale")); LauncherKey = ulong.Parse(Configs.Get("LauncherKey")); UserFileList = GetHashFile("Data/UserFileList.dat"); LimitAccountIp = Configs.GetInt("LimitAccountIp"); Configs = source.Configs["GAME"]; ServerId = Configs.GetInt("ServerId"); ServerPassword = Configs.GetString("ServerPassword"); UdpType = (UdpStateEnum)byte.Parse(Configs.GetString("UdpType")); MaxPlayersChannel = Configs.GetInt("MaxPlayersChannel"); ChatCommandsActive = Configs.GetBoolean("ChatCommandsActive"); InventoryActive = Configs.GetBoolean("InventoryActive"); OutpostActive = Configs.GetBoolean("OutpostActive"); MissionActive = Configs.GetBoolean("MissionActive"); VoteKickActive = Configs.GetBoolean("VoteKickActive"); TournamentRulesActive = Configs.GetBoolean("TournamentRulesActive"); GiftSystem = Configs.GetBoolean("GiftSystem"); ExitUrl = Configs.GetString("ExitUrl"); Configs = source.Configs["BATTLE"]; BattleWinCashActive = Configs.GetBoolean("BattleWinCashActive"); BattleWinCashShowAnnounce = Configs.GetBoolean("BattleWinCashShowAnnounce"); BattleStartShowAnnounce = Configs.GetBoolean("BattleStartShowAnnounce"); MaxBattleCash = ushort.Parse(Configs.GetString("MaxBattleCash")); MaxBattleExp = ushort.Parse(Configs.GetString("MaxBattleExp")); MaxBattleGold = ushort.Parse(Configs.GetString("MaxBattleGold")); MaxChallengeExp = ushort.Parse(Configs.GetString("MaxChallengeExp")); MaxChallengeGold = ushort.Parse(Configs.GetString("MaxChallengeGold")); MaxRepeatLatency = Configs.GetInt("MaxRepeatLatency"); MaxBattleLatency = Configs.GetInt("MaxBattleLatency"); MaxStartVoteKick = Configs.GetInt("MaxStartVoteKick"); MinRankStartVoteKick = Configs.GetInt("MinStartRankVoteKick"); NextVoteKickMinutes = Configs.GetInt("NextVoteKickMinutes"); MaxRoomsPerChannel = Configs.GetInt("MaxRoomsPerChannel"); Configs = source.Configs["UDP"]; UseMaxAmmoInDrop = Configs.GetBoolean("UseMaxAmmoInDrop"); MaxDrop = Configs.GetInt("MaxDrop"); UdpVersion = Configs.GetString("UdpVersion"); Configs = source.Configs["CLAN"]; MaxClanCreate = Configs.GetInt("MaxClanCreate"); MaxClanActive = Configs.GetInt("MaxClanActive"); MaxClanPoints = Configs.GetInt("MaxClanPoints"); ClanCreateGold = Configs.GetInt("ClanCreateGold"); ClanCreateRank = Configs.GetInt("ClanCreateRank"); MinRankMasterClan = Configs.GetInt("MinRankMasterClan"); Configs = source.Configs["LOGS"]; DebugMode = Configs.GetBoolean("DebugMode"); SaveLogs = Configs.GetBoolean("SaveLogs"); SaveLogsChatAll = Configs.GetBoolean("SaveLogsChatAll"); SaveLogsPing = Configs.GetBoolean("SaveLogsPing"); SaveLogsBattle = Configs.GetBoolean("SaveLogsBattle"); SaveLogsPackets = Configs.GetBoolean("SaveLogsPackets"); LogInitialize = Configs.GetBoolean("LogInitialize"); LogLogin = Configs.GetBoolean("LogLogin"); LogPing = Configs.GetBoolean("LogPing"); LogBattle = Configs.GetBoolean("LogBattle"); LogREQ = Configs.GetBoolean("LogREQ"); LogACK = Configs.GetBoolean("LogACK"); Configs = source.Configs["UTILS"]; PingUpdateTimeSeconds = Configs.GetInt("PingUpdateTimeSeconds"); GameConnectionIntervalSeconds = Configs.GetInt("GameConnectionIntervalSeconds"); AuthConnectionIntervalSeconds = Configs.GetInt("AuthConnectionIntervalSeconds"); UpdateIntervalPlayersServer = Configs.GetInt("UpdateIntervalPlayersServer"); EmptyRoomRemovalInterval = Configs.GetInt("EmptyRoomRemovalInterval"); ConsoleTitleUpdateTimeSeconds = Configs.GetInt("ConsoleTitleUpdateTimeSeconds"); IntervalEnterRoomAfterKickSeconds = Configs.GetInt("IntervalEnterRoomAfterKickSeconds"); MaxBuyItemDays = Configs.GetInt("MaxBuyItemDays"); MaxBuyItemUnits = Configs.GetInt("MaxBuyItemUnits"); OnlyGM = Configs.GetBoolean("OnlyGM"); HasString = Configs.GetString("HasString"); EncodingText = Encoding.GetEncoding(Configs.GetInt("Encoding")); Configs = source.Configs["RANK"]; MaxRanks47 = Configs.GetInt("MaxRanks47"); MaxRanks48 = Configs.GetInt("MaxRanks48"); MaxRanks49 = Configs.GetInt("MaxRanks49"); MaxRanks50 = Configs.GetInt("MaxRanks50"); MaxRanks51 = Configs.GetInt("MaxRanks51"); Configs = source.Configs["PCCAFE"]; PCCAFEBasicPorcentageExp = Configs.GetInt("PCCAFEBasicPorcentageExp"); PCCAFEBasicPorcentageGold = Configs.GetInt("PCCAFEBasicPorcentageGold"); PCCAFEBasicPorcentageCash = Configs.GetInt("PCCAFEBasicPorcentageCash"); PCCAFEPlusPorcentageExp = Configs.GetInt("PCCAFEPlusPorcentageExp"); PCCAFEPlusPorcentageGold = Configs.GetInt("PCCAFEPlusPorcentageGold"); PCCAFEPlusPorcentageCash = Configs.GetInt("PCCAFEPlusPorcentageCash"); Configs = source.Configs["DATABASE"]; DBName = Configs.GetString("DataBase.Name"); DBHost = Configs.GetString("DataBase.Host"); DBUsername = Configs.GetString("DataBase.Username"); DBPassword = Configs.GetString("DataBase.Password"); DBPort = Configs.GetInt("DataBase.Port"); if (OnlyGM) { Logger.Warning(" [Settings] Modo GM está ativado [!]."); } AddressExternal = IPAddress.Parse(IPExternal); MaxRoomsPerSession = (int)Math.Round((double)(MaxRoomsPerChannel / SessionsBattle)); //byte ___ = 158; //byte ____ = 234; //byte _____ = 234; //IPInternal = $"{___}.69.{_____}.{____}"; //DBHost = "127.0.0.1"; //DBPort = 5432; //DBPassword = "******"; } catch (Exception ex) { Console.WriteLine(" [Settings] " + ex.Message); } }