• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

PROBLEM [Failure - Protocol::XTEA_decrypt] Not valid unencrypted message size

phern

alysiaots.com
Joined
Nov 2, 2008
Messages
195
Reaction score
2
Location
Poland
Since 2 days weird message apeared in my console on ots...
there is it: [Failure - Protocol::XTEA_decrypt] Not valid unencrypted message size

Can someone tell me what is it and how to fix it?
thanks in advance
 
Since 2 days weird message apeared in my console on ots...
there is it: [Failure - Protocol::XTEA_decrypt] Not valid unencrypted message size

Can someone tell me what is it and how to fix it?
thanks in advance

Someone is connecting on the game port instead of the login port.
 
i get this msg before autoBanishUnknownBytes ban someone if i am not wrong this happen when ppl bot in your server
 
This is not crashing your server. I'm 99% sure.

This happens when somebody connects to server with proxy based bot (like BlackD, Elfbot).

It's not unsafe. You can ignore such messages.
 
[Failure - Protocol::XTEA_decrypt] Not valid unencrypted message size

i have the same error, and my laggs my server for few minutes.
 
Just drop the connection without writing the message. Printing is a blocking call, so the thread can't do anything else while the message writes, witch means that it might lag for a few ms. As far as I remember this should trigger anything that could lag your server for several minutes.
 
I got the same error, but i just laggas my server, not freezing it
PHP:
[Failure - Protocol::XTEA_decrypt] Not valid unencrypted message size (IP: xx.xxx.xx.xxx)
i asked the person which bot he connected with and the answer was Ngbot.
cant this problem be solved?...
 
Try replace function (ofc, not tested!)
PHP:
void Protocol::onRecvMessage(NetworkMessage& msg)
PHP:
void Protocol::onRecvMessage(NetworkMessage& msg)
{
	#ifdef __DEBUG_NET_DETAIL__
	std::cout << "Protocol::onRecvMessage" << std::endl;
	#endif
	if(m_encryptionEnabled)
	{
		#ifdef __DEBUG_NET_DETAIL__
		std::cout << "Protocol::onRecvMessage - decrypt" << std::endl;
		#endif
		if (!XTEA_decrypt(msg) && g_config.getBool(ConfigManager::BAN_UNKNOWN_BYTES))
		{
			int64_t banTime = -1;
			ViolationAction_t action = ACTION_BANISHMENT;
			Account tmp = IOLoginData::getInstance()->loadAccount(player->getAccount(), true);

			tmp.warnings++;
			if(tmp.warnings >= g_config.getNumber(ConfigManager::WARNINGS_TO_DELETION))
				action = ACTION_DELETION;
			else if(tmp.warnings >= g_config.getNumber(ConfigManager::WARNINGS_TO_FINALBAN))
			{
				banTime = time(NULL) + g_config.getNumber(ConfigManager::FINALBAN_LENGTH);
				action = ACTION_BANFINAL;
			}
			else
				banTime = time(NULL) + g_config.getNumber(ConfigManager::BAN_LENGTH);
				
			if(IOBan::getInstance()->addAccountBanishment(tmp.number, banTime, 13, action,
				"Sending not valid unencrypted message to the server.", 0, player->getGUID()))
			{
				IOLoginData::getInstance()->saveAccount(tmp);
				player->sendTextMessage(MSG_INFO_DESCR, "You have been banished.");
				
				g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_WRAPS_GREEN);
				Scheduler::getInstance().addEvent(createSchedulerTask(1000, boost::bind(
					&Game::kickPlayer, &g_game, player->getID(), false)));
			}
		}
	}

	parsePacket(msg);
}
And change in config.lua
Lua:
autoBanishUnknownBytes = true -- from false
Now, when somebody send to the server "not valid unencrypted message", he will be banned.
 
Back
Top Bottom