Skip to content

Commit

Permalink
kick assholes who try to send unauthorized controller messages; log them
Browse files Browse the repository at this point in the history
to a special HackAttempts channel (note: add to logservertargets and we'll
get a nice log with ip addys we can autoban with fail2ban)
  • Loading branch information
DarthArgus committed Jan 8, 2017
1 parent 9b42314 commit b81ee4d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion engine/server/library/serverGame/src/shared/core/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,11 @@ void Client::receiveClientMessage(const GameNetworkMessage &message) {
}
} else {
// log as a likely hack
LOG("CustomerService", ("UnauthorizedControllerMessage: Player %s sent an unauthorized controller message %d for object %s.", PlayerObject::getAccountDescription(getCharacterObjectId()).c_str(), o.getMessage(), o.getNetworkId().getValueString().c_str()));
LOG("HackAttempts", ("Unauthorized Controller Message: Player %s at %s sent an unauthorized controller message %d for object %s", PlayerObject::getAccountDescription(getCharacterObjectId()).c_str(), getIpAddress().c_str(), o.getMessage(), o.getNetworkId().getValueString().c_str()));

KickPlayer const kickMessage(m_characterObjectId, "Hack Attempt");
GameServer::getInstance().sendToConnectionServers(kickMessage);
GameServer::getInstance().dropClient(m_characterObjectId);
}

if (!appended) {
Expand Down

0 comments on commit b81ee4d

Please sign in to comment.