How to work:
Elfbot NG cheaters sending to servers messages length > 256 characters, server send this message to your client and you got debug ;x (buffer overflow)
Example:
How to protect:
open game.cpp
and find:
replace with:
find:
replace with:
Test in talkaction:
Screenshot:
Sorry for my bad english ;x
@edit
http://opentibia.svn.sourceforge.net/viewvc/opentibia?view=rev&revision=4661
By Simone:
In protocolgame.cpp
after:
add:
Thanks [-;
Elfbot NG cheaters sending to servers messages length > 256 characters, server send this message to your client and you got debug ;x (buffer overflow)
Example:
Code:
auto 100 say "dsahjdnsjadhasujh238d23h783hcsjdchsdjklshavhdfjkvfhfjdhklhdjvkhfjkdhsljdhjahldjkdhfjsdklhfasdjklfhdjkshfsdjkfhdslfashfdjklshfsdjklfhskflhsczxcdsahjdnsjadhasujh238d23h783hcsjdchsdjklshavhdfjkvfhfjdhklhdjvkhfjkdhsljdhjahldjkdhfjsdklhfasdjklfhdjkshfsdjkfhdslfashfdjklshfsdjklfhskflhsczxcdsahjdnsjadhasujh238d23h783hcsjdchsdjklshavhdfjkvfhfjdhklhdjvkhfjkdhsljdhjahldjkdhfjsdklhfasdjklfhdjkshfsdjkfhdslfashfdjklshfsdjklfhskflhsczxcdsahjdnsjadhasujh238d23h783hcsjdchsdjklshavhdfjkvfhfjdhklhdjvkhfjkdhslj"
How to protect:
open game.cpp
and find:
Code:
return g_chat.talkToChannel(player, type, text, channelId);
Code:
if(text.length() > 256)
return g_chat.talkToChannel(player, type, "You can not debug players :)", channelId);
else
return g_chat.talkToChannel(player, type, text, channelId);
Code:
tmpPlayer->sendCreatureSay(creature, type, text, &destPos);
Code:
if(text.length() > 256)
tmpPlayer->sendCreatureSay(creature, type, "You can not debug players :)", &destPos);
else
tmpPlayer->sendCreatureSay(creature, type, text, &destPos);
Test in talkaction:
Code:
function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "Command requires param.")
return TRUE
end
Pipa = getPlayerByName(param)
if isPlayer(Pipa) == TRUE then
doCreatureSay(Pipa, TALKTYPE_SAY, "dsahjdnsjadhasujh238d23h783hcsjdchsdjklshavhdfjkvfhfjdhklhdjvkhfjkdhsljdhjahldjkdhfjsdklhfasdjklfhdjkshfsdjkfhdslfashfdjklshfsdjklfhskflhsczxcdsahjdnsjadhasujh238d23h783hcsjdchsdjklshavhdfjkvfhfjdhklhdjvkhfjkdhsljdhjahldjkdhfjsdklhfasdjklfhdjkshfsdjkfhdslfashfdjklshfsdjklfhskflhsczxcdsahjdnsjadhasujh238d23h783hcsjdchsdjklshavhdfjkvfhfjdhklhdjvkhfjkdhsljdhjahldjkdhfjsdklhfasdjklfhdjkshfsdjkfhdslfashfdjklshfsdjklfhskflhsczxcdsahjdnsjadhasujh238d23h783hcsjdchsdjklshavhdfjkvfhfjdhklhdjvkhfjkdhslj")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "Nie ma lamki.")
end
end
Code:
<talkaction log="yes" words="/debug" access="3" event="script" value="debug.lua"/>
Code:
/debug Dulin
Screenshot:
Sorry for my bad english ;x
@edit
http://opentibia.svn.sourceforge.net/viewvc/opentibia?view=rev&revision=4661
By Simone:
In protocolgame.cpp
after:
Code:
const std::string text = msg.GetString();
Code:
if(text.length() > 255)
return;
Last edited: