feat(Core/Packet): Implement AntiDOS protection from Trinity (#2789)

* Implement AntiDOS protection from Trinity


Co-authored-by: jackpoz <giacomopoz@gmail.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: Vincent-Michael <trinity.michael_vincent@gmx.eu>
This commit is contained in:
Nefertumm
2020-03-23 15:46:00 -03:00
committed by GitHub
parent c5a7497f4d
commit 846f7862d8
13 changed files with 473 additions and 80 deletions

View File

@@ -1351,6 +1351,14 @@ void World::LoadConfigSettings(bool reload)
m_bool_configs[CONFIG_SET_ALL_CREATURES_WITH_WAYPOINT_MOVEMENT_ACTIVE] = sConfigMgr->GetBoolDefault("SetAllCreaturesWithWaypointMovementActive", false);
//packet spoof punishment
m_int_configs[CONFIG_PACKET_SPOOF_POLICY] = sConfigMgr->GetIntDefault("PacketSpoof.Policy", (uint32)WorldSession::DosProtection::POLICY_KICK);
m_int_configs[CONFIG_PACKET_SPOOF_BANMODE] = sConfigMgr->GetIntDefault("PacketSpoof.BanMode", (uint32)0);
if (m_int_configs[CONFIG_PACKET_SPOOF_BANMODE] > 1)
m_int_configs[CONFIG_PACKET_SPOOF_BANMODE] = (uint32)0;
m_int_configs[CONFIG_PACKET_SPOOF_BANDURATION] = sConfigMgr->GetIntDefault("PacketSpoof.BanDuration", 86400);
// call ScriptMgr if we're reloading the configuration
sScriptMgr->OnAfterConfigLoad(reload);
}

View File

@@ -334,6 +334,9 @@ enum WorldIntConfigs
CONFIG_WINTERGRASP_BATTLETIME,
CONFIG_WINTERGRASP_NOBATTLETIME,
CONFIG_WINTERGRASP_RESTART_AFTER_CRASH,
CONFIG_PACKET_SPOOF_POLICY,
CONFIG_PACKET_SPOOF_BANMODE,
CONFIG_PACKET_SPOOF_BANDURATION,
CONFIG_WARDEN_CLIENT_RESPONSE_DELAY,
CONFIG_WARDEN_CLIENT_CHECK_HOLDOFF,
CONFIG_WARDEN_CLIENT_FAIL_ACTION,