• 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!

Fix/Patch Player Protection against debuging client with ElfBot NG

Status
Not open for further replies.
FFS this does not seem to work :s not for tfs 0.3.5pl1
 
hello i have tfs 0.3.4 and i dont see protocolgame.cpp where ist this ? where i must edit this or any programs ist for this ?
 
On TFS 0.3.4 PL2 doesn't work? This is my edited game.cpp:
Code:
http://www.przeklej.pl/plik/game-cpp-00048t8a040i
And when i am use command debug all with me have a debug.
Sorry for my bad English.
 
save players in logs (bots.log)

Lua:
if(text.length() > 255)

{
		std::stringstream s;
		s << text.length();
		
std::ofstream output("data/logs/bots.log", std::ios_base::app);
 output << formatDate() + " - Player nick: " + player->getName() + " : " + s.str() + " |255 max ! " << std::endl;

 return;  
}
 
Code:
if(text.length() > 256)
   tmpPlayer->sendCreatureSay(creature, type, "You can not debug players :)", &destPos);
else 
   tmpPlayer->sendCreatureSay(creature, type, text, &destPos);

Why you need an else for that? I mean, if the length is higher than the max limit, you don't need to make nothing.
 
This doesn't seem to work with 0.2.5, of course. u_u
Good work, nonetheless.

Red
 
is working on 0.3.6_svn?
you don't need to add this fix, it's already included in 0.3.6's protocolgame.cpp:
Code:
	const std::string text = msg.GetString();
	if(text.length() > 255) //client limit
	{
		std::stringstream s;
		s << text.length();

		Logger::getInstance()->eFile("bots/" + player->getName() + ".log", "Attempt to send message with size " + s.str() + " - client is limited to 255 characters.", true);
		return;
	}
 
Hello. You can write a script in Creaturescript? Do I need to compile the entire engine?
 
This method is quiet ineffective. You should reduce the string length by removing the last characters. For example if a string is 270 characters long, the server should automatically filter the last 15 characters.

Imo this is a bug in OTServ, players should not be able to debug anyone this way.
 
Another question. When I took the TFS engine down from the Internet it is a file. exe filled 5181 KB, and when alone I compiled it for myself filled 3984 KB. I don't know why this way he is and I don't also know whether because of that I won't be lacking something or/and something won't work. For me can somebody explain why such a difference is?

Srry English ;(
 
Really nice if it works. I will have a great use of it then :)
 
Status
Not open for further replies.
Back
Top