I already know what it is!
Unfortunately, someone is flooding my OT server with nothing better to do. Unfortunately, I stopped at TFS 0.4 and they were going to continue making a small project for people to play around with, but some idiot is attacking the server with an account manager. I don't know how to work with websites, but I'll see if I can put one online, and I'd be grateful!
I suggest to update to a more recent framework, such as TFS 1.5 or newer. The server receives a packet with an invalid RSA block size, so it rejects it before decrypting. In other words your server can't decrypt the packet sent by client.
My advice is first read the error using cmd, so you can check the log even if it crashes.
You can read the error if you start it up through cmd like this:
Code:
cd "your_tfs_directory"
theforgottenserver.exe
Then check this guide to use a more recent framework (is a little outdated but it will help).
I know some distributions have the option autoBanishUnknownBytes = false, but, this could lead us to a few mistakes. If you're using classic tibia client, elfbot is known for sending unknown packets and that will do unjustified banishments if you're allowing elfbot. If you wish to go further, at c++ you can see this:
C++:
bool Protocol::RSA_decrypt(NetworkMessage& msg)
{
if ((msg.getLength() - msg.getBufferPosition()) != 128) {
return false;
}
g_RSA.decrypt(reinterpret_cast<char*>(msg.getBuffer()) + msg.getBufferPosition()); //does not break strict aliasing
return msg.getByte() == 0;
}
So the warning you attached means
someone connected to the server port, but the packet they sent was not a valid Tibia/TFS login packet. At older TFS this is handled by:
C++:
if ((msg.getLength() - msg.getBufferPosition()) != 128) {
return false;
}
But modern TFS, if i'm not wrong, uses:
C++:
if (msg.getRemainingBufferLength() < RSA_BUFFER_LENGTH) {
return false;
}
tfs::rsa::decrypt(msg.getRemainingBuffer(), RSA_BUFFER_LENGTH);
return msg.getByte() == 0;
which is more flexible. I'll quote the following:
Modern TFS does not really “decrypt invalid packets better”; it rejects them earlier and more safely. It also changed the RSA size check from requiring the remaining packet to be exactly 128 bytes to requiring at least 128 bytes, then decrypting only the RSA block. This makes the login parser more compatible with newer packet structures and avoids some false invalid-size cases.
Being this said, this is not a solution yet since we're going to need you to provide more information in order to move forward. Are you hosting your server using your own router? You're receiving wrong packets due server-side implementations or you got proof that is user-provoked? You can login to the server?
Regards!