GoodT
Members-
Posts
148 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by GoodT
-
Can you share english manual for it? On program window its a lot of ??? symbols....
-
I have one idea, but not tested, just written... 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 knownPacket flooding +MaxPacketProtection = False +# How much known packets before punishment. +# If the player send more than 100 knownPackets per second, the player get punished. +KnownPacketsBeforeBan = 100 +# Punishments +# 1 - broadcast warning to gms only +# 2 - kick player (default) +# 3 - kick & ban player (Accesslevel -99) +KnownPacketsPunishment = 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_MAX_PACKET_PROTECTION; + public static int MAX_KNOWN_PACKETS; + public static int KNOWN_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_MAX_PACKET_PROTECTION = Boolean.parseBoolean(serverSettings.getProperty("MaxPacketProtection", "false")); + MAX_KNOWN_PACKETS = Integer.parseInt(serverSettings.getProperty("KnownPacketsBeforeBan", "5")); + KNOWN_PACKETS_PUNiSHMENT = Integer.parseInt(serverSettings.getProperty("KnownPacketsPunishment", "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("MaxPacketProtection")) ENABLE_MAX_PACKET_PROTECTION = Boolean.parseBoolean(pValue); + else if (pName.equalsIgnoreCase("KnownPacketsBeforeBan")) MAX_KNOWN_PACKETS = Integer.parseInt(pValue); + else if (pName.equalsIgnoreCase("KnownPacketsPunishment")) KNOWN_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; + + // KnownPacket protection + private int knownPacketCount = 100; public L2GameClient(MMOConnection<L2GameClient> con) { @@ -489,6 +493,26 @@ } } + public boolean checkknownPackets() + { + if(this.getActiveChar() != null && + !FloodProtector.getInstance().tryPerformAction(this.getActiveChar().getObjectId(), FloodProtector.PROTECTED_KNOWNPACKET)) + { + knownPacketCount++; + if (knownPacketCount >= Config.MAX_KNOWN_PACKETS) + { + return true; + } + else + return false; + } + else + { + knownPacketCount = 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_MAX_PACKET_PROTECTION) + knownPacketProtection(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_MAX_PACKET_PROTECTION) + knownPacketProtection(client); } + + private void knownPacketProtection(L2GameClient client) + { + if(client.getActiveChar() != null && client.checkknownPackets()) + { + punish(client); + return; + } + } + + private void punish(L2GameClient client) + { + switch(Config.KNOWN_PACKETS_PUNiSHMENT) + { + case(1): + if (client.getActiveChar() != null) + { + GmListTable.broadcastMessageToGMs("Player " + client.getActiveChar().toString() + " flooding known packets."); + } + break; + case(2): + _log.warning("PacketProtection: " + client.toString() + " got kicked due flooding of known packets"); + if (client.getActiveChar() != null) + { + GmListTable.broadcastMessageToGMs("Player " + client.getActiveChar().toString() + " flooding known packets and got kicked."); + client.getActiveChar().sendMessage("You are will be kicked for known packet flooding, GM informed."); + client.getActiveChar().closeNetConnection(); + } + break; + case(3): + _log.warning("PacketProtection: " + client.toString() + " got banned due flooding of known packets"); + LoginServerThread.getInstance().sendAccessLevel(client.getAccountName(), -99); + if(client.getActiveChar() != null) + { + GmListTable.broadcastMessageToGMs("Player " + client.getActiveChar().toString() + " flooding known packets and got banned."); + client.getActiveChar().sendMessage("You are banned for known 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_KNOWNPACKET = 100; // ========================================================= // Constructor
-
WTS [WTS] PTS Vampire all files - rev. to 1.2.2010
GoodT replied to GoodT's topic in Marketplace [L2Packs & Files]
I change prize to: 100 Eur for pack and 50 for geodata... for more info pm -
L2J-Archid Epilogue / Interlude
GoodT replied to Setekh's topic in Server Development Discussion [L2J]
I think wlll be open on 25th february, when Archid IL - restart (pheonix syndrom) ;). -
Its only for elfs female? Pls answer...
-
New working code ;)... Thx xAddytzu for idea... Index: /trunk/L2J/java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java =================================================================== --- /trunk/L2J/java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java (revision 9) +++ /trunk/L2J/java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java (revision 52) @@ -25,4 +25,5 @@ import net.sf.l2j.gameserver.ai.CtrlIntention; import net.sf.l2j.gameserver.model.L2CharPosition; +import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.SystemMessageId; @@ -31,4 +32,5 @@ import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; import net.sf.l2j.gameserver.templates.L2WeaponType; +import net.sf.l2j.gameserver.util.FloodProtector; import net.sf.l2j.gameserver.util.IllegalPlayerAction; import net.sf.l2j.gameserver.util.Util; @@ -100,4 +102,8 @@ if (activeChar == null) return; + + L2Object player = null; + if (!FloodProtector.getInstance().tryPerformAction(player.getObjectId(), FloodProtector.PROTECTED_PACKETS)) + return; _curX = activeChar.getX(); Index: /trunk/L2J/java/net/sf/l2j/gameserver/util/FloodProtector.java =================================================================== --- /trunk/L2J/java/net/sf/l2j/gameserver/util/FloodProtector.java (revision 31) +++ /trunk/L2J/java/net/sf/l2j/gameserver/util/FloodProtector.java (revision 52) @@ -34,4 +34,5 @@ private static final Logger _log = Logger.getLogger(FloodProtector.class.getName()); private static FloodProtector _instance; + public static final FloodProtector getInstance() @@ -76,6 +77,7 @@ public static final int PROTECTED_GIVEITEMTOPET = 13; public static final int PROTECTED_BANKING_SYSTEM = 14; + public static final int PROTECTED_PACKETS = 15; public static final int PROTECTED_UNKNOWNPACKET = 16; public static final int PROTECTED_BYPASS = 17; // =========================================================
-
Good looking, but unusefull for slow connection. Its very big ...
-
S80 and S90 for IL? WTF?
-
WTS [WTS] PTS Vampire all files - rev. to 1.2.2010
GoodT replied to GoodT's topic in Marketplace [L2Packs & Files]
I just guess... you a I just guess you are the biggest l2off developer and you have the best files of the world. Others newest files its shit. Or no? xD Dont spam, my topic dude. -
WTS [WTS] PTS Vampire all files - rev. to 1.2.2010
GoodT replied to GoodT's topic in Marketplace [L2Packs & Files]
You never see my files, just tell shit. -
WTS [WTS] PTS Vampire all files - rev. to 1.2.2010
GoodT replied to GoodT's topic in Marketplace [L2Packs & Files]
All error logs files are clean ;). My files are tested and work very nice. -
WTS [WTS] PTS Vampire all files - rev. to 1.2.2010
GoodT replied to GoodT's topic in Marketplace [L2Packs & Files]
I just tell its 100% for last vampire revision. And i try it, its the best ;). A lot of big IL PTS server dont have following quality files, that me ;). -
WTS [WTS] PTS Vampire all files - rev. to 1.2.2010
GoodT replied to GoodT's topic in Marketplace [L2Packs & Files]
:D, its cracked dude... -
WTS [WTS] PTS Vampire all files - rev. to 1.2.2010
GoodT replied to GoodT's topic in Marketplace [L2Packs & Files]
19.01.2010 - 1,7MB ;) -
WTS [WTS] PTS Vampire all files - rev. to 1.2.2010
GoodT posted a topic in Marketplace [L2Packs & Files]
I want sell all files with sql queries. Its last rev. of l2vamp. ;) Tested and 100% working with no errors. Some of the server details : Totally Updated NPC (Monsters, Raids, Summons) Stats, Drops and Skills - Full working scripts - Full rework of npcdata - Updated Reuse Delay of Major Skill - Fixed Mental Shield as Interlude. - Added Blacksmith new SA weapon. - Recovered Unique Boss stats. -Trick now used only with dagger. - updated all critical damage buff effect as Interlude - Fixed all new C5/Interlude weapon for enchant enabled - Fixed skill Deflect Arror as Interlude. - Drop DB Updated and more .... Prize: 250 $ or 210 eur Geodata pack (last rev. of stazis files) Prize: 150 $ or 130 eur More info - pm or post here -
Very good rework, good job. txh
-
Anti System PHX Marriage System Away system Champions Mobs System Features (the famous Full system PvP) Grand Bosses (work in process) Events such as: Capture The Flag (CTF), Team vs Team (TVT), Death Match (DM), VIP Event Start Custom Title Start Custom Level Skill 100% working, even for lvl 80 Flood Protectors System Speed limit for P. Crate, M. Crate and Evasion. Clan Leader Color Admin / GM Title Color Enchant System Differentiating system Donors Item reward system for PvP PK Color System by PK PvP Olympiads worked Full Geodata PathNode Fix Bluff Fix Customs. Fix Peace Zones Trade Offline Lord Castle Announce Party Fix Friend List Fix Pet Info Fix Pet Pop up fix Clan Hall besiege him 100% Ai_Gruops rework. Strengths 100% New Message Input - Google translate power! ;)
-
I dont know, why a lot of users spam this forum, with "GoodT thx to L2JServer". Omg, its my thing and DāЯқŜiĐє you stop spam. You have 1k post? I think, how you have it.
-
Thx, good share, thx to L2jserver
-
Simply but nice code.
-
Wow, when you add ammo will be perfect :-D.
-
[Share]Santa Claus Armor [Interlude]
GoodT replied to Devangell™'s topic in Client Development Discussion
Amazing christmas share, but only human :(. -
[share]Loading Screen's Interlude List!! New
GoodT replied to Devangell™'s topic in Client Development Discussion
Very nice share... Thx for it -
Very nice. Thx for share... My little army reborn :-D.
-
[Developement] New antihack way.
GoodT replied to dEvilKinG's topic in Server Development Discussion [L2J]
Very nice idea, I something try ;).
