Jump to content

Recommended Posts

Posted

Unknown Packets Protection Spam. ( This diff is for Interlude L2J but with some modifications can be inserted in Gracia Final or Gracia pt2 etc )

 

Your server will have protections from PHX Spammers, sending unknown packets.

 

Diff file:

Index: C:/Workspace/L2_GameServer_It/java/config/server.properties
===================================================================
--- C:/Workspace/L2_GameServer_It/java/config/server.properties	(revision 1025)
+++ C:/Workspace/L2_GameServer_It/java/config/server.properties	(working copy)
@@ -69,6 +69,16 @@
# Define how many players are allowed to play simultaneously on your server.
MaximumOnlineUsers=100

+# Activate Protection for unknownPacket flooding
+PacketProtection = False
+# How much unknown packets before punishment.
+# If the player send more than 5 unknownPackets per second, the player get punished.
+UnknownPacketsBeforeBan = 5
+# Punishments
+# 1 - broadcast warning to gms only
+# 2 - kick player (default)
+# 3 - kick & ban player (Accesslevel -99)
+UnknownPacketsPunishment = 2

# Minimum and maximum protocol revision that server allow to connect.
# You must keep MinProtocolRevision <= MaxProtocolRevision.
Index: C:/Workspace/L2_GameServer_It/java/net/sf/l2j/Config.java
===================================================================
--- C:/Workspace/L2_GameServer_It/java/net/sf/l2j/Config.java	(revision 1025)
+++ C:/Workspace/L2_GameServer_It/java/net/sf/l2j/Config.java	(working copy)
@@ -78,6 +78,10 @@
    /** Maximum number of players allowed to play simultaneously on server */
    public static int   MAXIMUM_ONLINE_USERS;
    
+    public static boolean ENABLE_PACKET_PROTECTION;
+    public static int MAX_UNKNOWN_PACKETS;
+    public static int UNKNOWN_PACKETS_PUNiSHMENT;
+    
    // Setting for serverList
    /** Displays [] in front of server name ? */
    public static boolean SERVER_LIST_BRACKET;
@@ -1120,6 +1124,10 @@

                MAX_CHARACTERS_NUMBER_PER_ACCOUNT = Integer.parseInt(serverSettings.getProperty("CharMaxNumber", "0"));
                MAXIMUM_ONLINE_USERS        = Integer.parseInt(serverSettings.getProperty("MaximumOnlineUsers", "100"));
+                
+                ENABLE_PACKET_PROTECTION = Boolean.parseBoolean(serverSettings.getProperty("PacketProtection", "false"));
+                MAX_UNKNOWN_PACKETS = Integer.parseInt(serverSettings.getProperty("UnknownPacketsBeforeBan", "5"));
+                UNKNOWN_PACKETS_PUNiSHMENT = Integer.parseInt(serverSettings.getProperty("UnknownPacketsPunishment", "2"));
               
                MIN_PROTOCOL_REVISION   = Integer.parseInt(serverSettings.getProperty("MinProtocolRevision", "660"));
                MAX_PROTOCOL_REVISION   = Integer.parseInt(serverSettings.getProperty("MaxProtocolRevision", "665"));
@@ -2082,6 +2090,10 @@
        else if (pName.equalsIgnoreCase("AutoDeleteInvalidQuestData")) AUTODELETE_INVALID_QUEST_DATA = Boolean.valueOf(pValue);

        else if (pName.equalsIgnoreCase("MaximumOnlineUsers")) MAXIMUM_ONLINE_USERS = Integer.parseInt(pValue);
+        
+        else if (pName.equalsIgnoreCase("PacketProtection")) ENABLE_PACKET_PROTECTION = Boolean.parseBoolean(pValue);
+        else if (pName.equalsIgnoreCase("UnknownPacketsBeforeBan")) MAX_UNKNOWN_PACKETS = Integer.parseInt(pValue);
+        else if (pName.equalsIgnoreCase("UnknownPacketsPunishment")) UNKNOWN_PACKETS_PUNiSHMENT = Integer.parseInt(pValue);

        else if (pName.equalsIgnoreCase("ZoneTown")) ZONE_TOWN = Integer.parseInt(pValue);

Index: C:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/network/L2GameClient.java
===================================================================
--- C:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/network/L2GameClient.java	(revision 1025)
+++ C:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/network/L2GameClient.java	(working copy)
@@ -41,6 +41,7 @@
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.entity.L2Event;
import net.sf.l2j.gameserver.serverpackets.L2GameServerPacket;
+import net.sf.l2j.gameserver.util.FloodProtector;
import net.sf.l2j.util.EventData;

import com.l2jserver.mmocore.network.MMOClient;
@@ -84,6 +85,9 @@
	// Flood protection
	public byte packetsSentInSec = 0;
	public int packetsSentStartTick = 0;
+	 
+    // UnknownPacket protection
+    private int unknownPacketCount = 0;

	public L2GameClient(MMOConnection<L2GameClient> con)
	{
@@ -489,6 +493,26 @@
    	}
    }
    
+    public boolean checkUnknownPackets()
+	{
+		if(this.getActiveChar() != null && 
+				!FloodProtector.getInstance().tryPerformAction(this.getActiveChar().getObjectId(), FloodProtector.PROTECTED_UNKNOWNPACKET))
+		{
+			unknownPacketCount++;
+			if (unknownPacketCount >= Config.MAX_UNKNOWN_PACKETS)
+			{
+				return true;
+			}
+			else
+				return false;
+		}
+		else
+		{
+			unknownPacketCount = 0;
+			return false;
+		}
+	}
+    
    /**
     * Produces the best possible string representation of this client.
     */
Index: C:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/network/L2GamePacketHandler.java
===================================================================
--- C:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/network/L2GamePacketHandler.java	(revision 1025)
+++ C:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/network/L2GamePacketHandler.java	(working copy)
@@ -18,10 +18,13 @@
package net.sf.l2j.gameserver.network;

import java.nio.ByteBuffer;
+import java.sql.Time;
import java.util.concurrent.RejectedExecutionException;
import java.util.logging.Logger;

import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.GmListTable;
+import net.sf.l2j.gameserver.LoginServerThread;
import net.sf.l2j.gameserver.ThreadPoolManager;
import net.sf.l2j.gameserver.clientpackets.*;
import net.sf.l2j.gameserver.network.L2GameClient.GameClientState;
@@ -811,6 +814,8 @@
     	byte[] array = new byte[size];
     	buf.get(array);
     	_log.warning(Util.printData(array, size));
+     	if (Config.ENABLE_PACKET_PROTECTION)
+     		unknownPacketProtection(client);
	}

	private void printDebugDoubleOpcode(int opcode, int id2, ByteBuffer buf, GameClientState state, L2GameClient client)
@@ -820,7 +825,50 @@
     	byte[] array = new byte[size]; 
     	buf.get(array);
     	_log.warning(Util.printData(array, size));
+     	if (Config.ENABLE_PACKET_PROTECTION)
+     		unknownPacketProtection(client);
	}
+	
+	private void unknownPacketProtection(L2GameClient client)
+	{
+		if(client.getActiveChar() != null && client.checkUnknownPackets())
+		{
+			punish(client);
+			return;
+		}
+	}
+	
+	private void punish(L2GameClient client)
+	{
+		switch(Config.UNKNOWN_PACKETS_PUNiSHMENT)
+		{
+			case(1):
+				if (client.getActiveChar() != null)
+				{
+					GmListTable.broadcastMessageToGMs("Player " + client.getActiveChar().toString() + " flooding unknown packets.");
+				}
+				break;
+			case(2):
+				_log.warning("PacketProtection: " + client.toString() + " got kicked due flooding of unknown packets");
+				if (client.getActiveChar() != null) 
+				{
+					GmListTable.broadcastMessageToGMs("Player " + client.getActiveChar().toString() + " flooding unknown packets and got kicked.");
+					client.getActiveChar().sendMessage("You are will be kicked for unknown packet flooding, GM informed.");
+					client.getActiveChar().closeNetConnection();
+				}
+				break;
+			case(3):
+				_log.warning("PacketProtection: " + client.toString() + " got banned due flooding of unknown packets");
+				LoginServerThread.getInstance().sendAccessLevel(client.getAccountName(), -99);
+				if(client.getActiveChar() != null)
+				{
+					GmListTable.broadcastMessageToGMs("Player " + client.getActiveChar().toString() + " flooding unknown packets and got banned.");
+					client.getActiveChar().sendMessage("You are banned for unknown packet flooding, GM informed.");
+					client.getActiveChar().closeNetConnection();
+				}
+				break;
+		}
+	}

	// impl
	public L2GameClient create(MMOConnection<L2GameClient> con)
Index: C:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/util/FloodProtector.java
===================================================================
--- C:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/util/FloodProtector.java	(revision 1025)
+++ C:/Workspace/L2_GameServer_It/java/net/sf/l2j/gameserver/util/FloodProtector.java	(working copy)
@@ -50,15 +50,16 @@

	// =========================================================
	// Enum
-	private static final int PROTECTEDACTIONSIZE = 3;
+	private static final int PROTECTEDACTIONSIZE = 4;

	// reuse delays for protected actions (in game ticks 1 tick = 100ms)
-	private static final int[] REUSEDELAY = new int[]{ 4, 42, 42 };
+	private static final int[] REUSEDELAY = new int[]{ 4, 42, 42, 15 };

	// protected actions
	public static final int PROTECTED_USEITEM	= 0;
	public static final int PROTECTED_ROLLDICE	= 1;
	public static final int PROTECTED_FIREWORK	= 2;
+	public static final int PROTECTED_UNKNOWNPACKET = 3;

	// =========================================================
	// Constructor

 

Note: this is not 100% Mine, i just make some modifications to make it work on Interlude. Thank you.

 

So, Credits: L2JForum,

Posted

It doesn't exists in any Chronicle of L2J, not in c4, c5, c6, Kamael nowhere.

 

ok than flood with unknown packet a gracia server dumbass its dont exists in it for a reason...

Posted

Maybe in Gracia Final

Watch your language.

my language? please first read what u write and then post it plx ! my language is fine :) i just sayd to intrepid to stop cause ur gonna cry like a baby ;)
Posted

Ohh plz dont start flame,so with this you will have full protect from Phx, i dont know why but i cant trust it...

Posted

Ohh plz dont start flame,so with this you will have full protect from Phx, i dont know why but i cant trust it...

 

no thats not true ONLY if you use INTERLUDE you have with that protection againt 1 exploit with the unknown packet flood thats all

Guest
This topic is now closed to further replies.


  • Posts

    • This post originally appeared on MmoGah. Arena Breakout: Infinite is a hardcore tactical extraction shooter that demands precision, patience, and strategy. This guide will walk you through everything a beginner needs to know—from gear and combat to survival and extraction.     What Is Arena Breakout: Infinite? Arena Breakout: Infinite (ABI) is a free-to-play online extraction shooter developed by MoreFun Studios and released on Steam in September 2025. Unlike traditional battle royales, ABI focuses on risk vs. reward rather than being the last one standing. Players enter instanced maps called "raids," where they must scavenge loot, survive enemy encounters, and extract safely.   Core Gameplay Mechanics 1. Raids and Extraction Each raid features 4–6 teams (solo or squad) dropped into a map. The goal is to loot valuable items and extract through designated points. Extraction is not exclusive—multiple teams can leave the map alive. 2. PvPvE Combat You'll face both human players and AI enemies. AI can be unpredictable and deadly, especially in high-tier zones. 3. No Hand-Holding ABI offers no tutorials or guidance. You learn by dying—and surviving.   Gear and Loadouts 1. Choose Wisely Your gear determines your survivability. Armor, helmets, and medical supplies are essential. Weapons vary in recoil, damage, and handling. Start with low-cost rifles like the AKS-74U or MP5. 2. Insurance System You can insure gear to recover it if you die and it isn't looted. Use insurance for expensive items, but don't rely on it blindly. 3. Backpacks and Storage Larger backpacks allow more loot but make you a bigger target. Organize your inventory to quickly access meds and ammo during combat.   Tactical Tips for Beginners 1. Know What to Loot Prioritize high-value items like weapon parts, medical kits, and rare electronics. Learn loot hotspots on each map—warehouses, bunkers, and military zones often yield better gear. 2. Sound Is Everything Footsteps, gunfire, and reloads are loud. Use headphones and move cautiously. Crouch-walking and slow peeking reduce noise and improve stealth. 3. Map Knowledge Study maps offline or in low-risk raids. Learn extraction points, choke zones, and sniper nests. 4. Stamina Management Sprinting drains stamina, which affects aim and movement. Rest in safe zones and avoid overexertion during firefights.   Combat and Survival 1. Engage Smartly Don't chase kills—survival and extraction are the real goals. Use cover, lean mechanics, and suppressive fire to control fights. 2. Healing and Damage ABI features a detailed health system: limbs can be fractured, bleeding, or disabled. Carry splints, bandages, and painkillers. Know how to treat each condition. 3. Death Is a Lesson You will die—a lot. Use each death to learn positioning, gear value, and enemy behavior.   Progression and Economy 1. Free-to-Play Friendly ABI is generous with starter gear and daily rewards. You can earn the currency Arena Breakout: Infinite Koens through successful raids and selling loot. 2. Marketplace Trade gear with other players or sell to vendors. Prices fluctuate—learn market trends to maximize profit. 3. No Skill Trees Unlike similar games, ABI doesn't use operator skills. Progression is gear-based and tactical, not RPG-style.   Settings and Optimization 1. Graphics and Performance Lower shadows and post-processing for better visibility. Use high FPS settings for smoother combat. 2. Keybinds Customize controls for quick access to healing, leaning, and inventory. Practice muscle memory in offline raids. 3. Audio Settings Maximize footstep and gunfire volume. Reduce ambient noise to focus on threats.   Beginner Loadout Recommendation Slot Item Notes Primary Gun AKS-74U or MP5 Low recoil, easy to handle Secondary Pistol (optional) Backup for emergencies Armor Basic Vest Better than nothing Helmet Light Helmet Protects against headshots Backpack Medium Balance between space and size Meds Bandages, Splints Treat bleeding and fractures Ammo 2–3 extra mags Always reload before fights         Final Advice for New Players Start slow: Don't rush into high-tier zones. Learn the basics in low-risk areas. Play with friends: Squad play improves survival and makes learning easier. Watch and learn: Study streamers and guides to understand advanced tactics. Don't hoard: Use your gear. Hoarding leads to stagnation and fear of loss. Extract often: Surviving and extracting builds confidence and resources. Arena Breakout: Infinite is brutal, but deeply rewarding. With patience and practice, you'll evolve from a terrified scavenger to a confident operator. Every raid is a story—make yours one of survival and triumph.
    • Hola , quería montar un c4 off l2 no custom , me podrían recomendar datapacks y que funcione con windows servers modernos o en una máquina virtual , ya que no tengo plat para comprar y solo lo usare para jugar solo ya que soy un fanático del c4  
    • Hello i need one developer for make one l2 server
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock