Invisible Character Prevention.

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Invisible Character Prevention.

Postby Ephemeral » Wed May 04, 2011 6:42 pm

Since I recently saw a thread on a forum about how people can do this with cheat engine, I added a little fix into the faith core to prevent it, and if it works (It should, I think) then it should probably be in the public core as well.

Removed link because its probably a bad idea.

(I couldn't figure out how to make a patch file from this, its in two diff SVN's)
Code: Select all
if (ch.Race == (byte)eRace.AlbionMinotaur || ch.Race == (byte)eRace.MidgardMinotaur || ch.Race == (byte)eRace.HiberniaMinotaur)
{

if(ch.Gender != 0)
{
if (log.IsWarnEnabled)

log.Warn("Wrong gender for minotaur race: " + ch.Realm);


if (ServerProperties.Properties.BAN_HACKERS)
{
DBBannedAccount b = new DBBannedAccount();
b.Author = "SERVER";
b.Account = ch.AccountName;
b.DateBan = DateTime.Now;
b.Type = "A";
b.Reason = String.Format("Auto-ban InvalidGender '{0}' on invalid minotaur. Account '{1}'", GameServer.Database.Escape(ch.Name), GameServer.Database.Escape(ch.AccountName));
GameServer.Database.AddObject(b);
GameServer.Database.SaveObject(b);
GameServer.Instance.LogCheatAction(string.Format(b.Reason + ". Client Account: {0}, DB Account: {1}", ch.AccountName, ch.AccountName));
}

valid = false;
}
}

Put it anywhere in the try section with the other checks in the file

GameServer/packets/Client/168/CharacterCreateRequestHandler

Its in the character valid check.
Code: Select all
public static bool IsCharacterValid(DOLCharacters ch)

Updated post thanks to
[20:24] <@Tolakram> gender in db is 0=male, 1=female enum is 0=neutral, 1=male, 2=female. DOL code is awesometastic
Last edited by Ephemeral on Thu May 05, 2011 12:25 am, edited 1 time in total.
"The swarm is always smarter, faster and more adept than any actor which seeks to thwart it."
C++, Java, C#, VB.NET, ASM.
Current Project:
Engine Developer for The Red Solstice
User avatar
Ephemeral
DOL Freak
 
Posts: 554
Joined: Wed Mar 30, 2011 12:23 am

Re: Invisible Character Prevention.

Postby Tolakram » Wed May 04, 2011 6:47 pm

Females aren't allowed? I had no idea.

What's the real problem here though. Why is the toon invisible? Invalid model?
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: Invisible Character Prevention.

Postby geshi » Wed May 04, 2011 6:48 pm

Tola, check Developer Forum !
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Invisible Character Prevention.

Postby Ephemeral » Wed May 04, 2011 6:50 pm

I assume its because the client tries to set an invalid model for a female minotaur, and that gets sent to the server (well hm, Just realized it could be done with a model check as well, but this is probably simpler to write) and then the other clients try to display that an all, and they fail.
"The swarm is always smarter, faster and more adept than any actor which seeks to thwart it."
C++, Java, C#, VB.NET, ASM.
Current Project:
Engine Developer for The Red Solstice
User avatar
Ephemeral
DOL Freak
 
Posts: 554
Joined: Wed Mar 30, 2011 12:23 am

Re: Invisible Character Prevention.

Postby Etaew » Wed May 04, 2011 6:56 pm

Thank you for notifying us about this vulnerability.
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7602
Joined: Mon Oct 13, 2003 5:04 pm
Website: http://etaew.net
Location: England

Re: Invisible Character Prevention.

Postby Graveen » Wed May 04, 2011 9:08 pm

God, this is the first usefull patch from Haji !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Accepted, soon in SVN, thank you !
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Invisible Character Prevention.

Postby geshi » Wed May 04, 2011 9:37 pm

God, this is the first usefull patch from Haji !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Accepted, soon in SVN, thank you !
Don't forget his major vamp fix too :mrgreen: ! having 0 WS sucked ! :D
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Invisible Character Prevention.

Postby Ephemeral » Wed May 04, 2011 10:26 pm

God, this is the first usefull patch from Haji !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Accepted, soon in SVN, thank you !

See post below yours.


:< And don't be hating, my big thing is gonna be the antihack which none of you will ever use. :P
"The swarm is always smarter, faster and more adept than any actor which seeks to thwart it."
C++, Java, C#, VB.NET, ASM.
Current Project:
Engine Developer for The Red Solstice
User avatar
Ephemeral
DOL Freak
 
Posts: 554
Joined: Wed Mar 30, 2011 12:23 am

Re: Invisible Character Prevention.

Postby Tolakram » Thu May 05, 2011 12:12 am

The invisible player is a result of the languagemanager failing to come up with a race name and spamming the lookup text. The carelessness at which languagemgr was written is a constant thorn in my side.

In addition, the Gender enum does NOT map to dolcharacter gender. :)
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: Invisible Character Prevention.

Postby Ephemeral » Thu May 05, 2011 12:22 am

The invisible player is a result of the languagemanager failing to come up with a race name and spamming the lookup text. The carelessness at which languagemgr was written is a constant thorn in my side.

In addition, the Gender enum does NOT map to dolcharacter gender. :)
- WHY -

FFS, where else would that gender apply?
"The swarm is always smarter, faster and more adept than any actor which seeks to thwart it."
C++, Java, C#, VB.NET, ASM.
Current Project:
Engine Developer for The Red Solstice
User avatar
Ephemeral
DOL Freak
 
Posts: 554
Joined: Wed Mar 30, 2011 12:23 am

Re: Invisible Character Prevention.

Postby Dinberg » Thu May 05, 2011 10:12 am

The beauty of open source. So beautiful.
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest